ALIYUN::Flink::Instance

ALIYUN::Flink::Instance类型用于创建一个包年包月或按量付费的Flink实例。

语法

{
  "Type": "ALIYUN::Flink::Instance",
  "Properties": {
    "InstanceName": String,
    "VpcId": String,
    "ZoneId": String,
    "Bucket": String,
    "VSwitchIds": List,
    "PricingCycle": String,
    "ChargeType": String,
    "AutoRenew": Boolean,
    "PromotionCode": String,
    "ResourceSpec": Map,
    "Duration": Integer,
    "UsePromotionCode": Boolean
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

InstanceName

String

实例名称。

VpcId

String

专有网络ID。

ZoneId

String

实例所属的可用区ID。

Bucket

String

存储空间名称。

VSwitchIds

List

虚拟交换机ID。

PricingCycle

String

订购周期。

取值:

  • 年(Year)

  • 月(Month)

ChargeType

String

付费类型。

取值:

  • POST:按量付费。

  • PRE:包年包月。

AutoRenew

Boolean

续费方式。

取值:

  • true:自动续费。

  • false:手动续费。

PromotionCode

String

优惠码。

ResourceSpec

Map

资源规格。

更多信息,请参考ResourceSpec属性

Duration

Integer

订购周期数量。

说明

ChargeType配置为PRE时,本参数必填。

UsePromotionCode

Boolean

是否使用优惠券。

取值:

  • true:使用。

  • false:不使用。

ResourceSpec语法

"ResourceSpec": {
  "Cpu": Integer,
  "MemoryGB": Integer
}

ResourceSpec属性

属性名称

类型

必须

允许更新

描述

约束

Cpu

Integer

CPU数量。

MemoryGB

Integer

内存大小。

单位为GB。

说明

内存数量必须为CPU数量的4倍。

返回值

Fn::GetAtt

  • InstanceId:实例ID。

  • OrderId:订单ID。

  • WorkspaceId:工作空间ID。

示例

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  InstanceName:
    Type: String
    Description: The name of instance.
    AllowedPattern: ^[a-z][a-z0-9-]{1,60}
  VpcId:
    Type: String
    Description: VPC ID.
  ZoneId:
    Type: String
    Description: The available area ID of the instance.
  Bucket:
    Type: String
    Description: OSS bucket name.
  VSwitchIds:
    Type: CommaDelimitedList
    Description: Virtual switch ID.
  ChargeType:
    Type: String
    Description: |-
      The payment type, the value of the value is as follows:
      POST: pay as you go.
      PRE: subscription.
    AllowedValues:
      - PayAsYouGo
      - PostPaid
      - PayOnDemand
      - Postpaid
      - PostPay
      - POST
      - Subscription
      - PrePaid
      - PrePay
      - Prepaid
      - PRE
Resources:
  Instance:
    Type: ALIYUN::Flink::Instance
    Properties:
      InstanceName:
        Ref: InstanceName
      VpcId:
        Ref: VpcId
      ZoneId:
        Ref: ZoneId
      Bucket:
        Ref: Bucket
      VSwitchIds:
        Ref: VSwitchIds
      ChargeType:
        Ref: ChargeType
Outputs:
  InstanceId:
    Description: Instance ID.
    Value:
      Fn::GetAtt:
        - Instance
        - InstanceId
  OrderId:
    Description: Order information.
    Value:
      Fn::GetAtt:
        - Instance
        - OrderId
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "InstanceName": {
      "Type": "String",
      "Description": "The name of instance.",
      "AllowedPattern": "^[a-z][a-z0-9-]{1,60}"
    },
    "VpcId": {
      "Type": "String",
      "Description": "VPC ID."
    },
    "ZoneId": {
      "Type": "String",
      "Description": "The available area ID of the instance."
    },
    "Bucket": {
      "Type": "String",
      "Description": "OSS bucket name."
    },
    "VSwitchIds": {
      "Type": "CommaDelimitedList",
      "Description": "Virtual switch ID."
    },
    "ChargeType": {
      "Type": "String",
      "Description": "The payment type, the value of the value is as follows:\nPOST: pay as you go.\nPRE: subscription.",
      "AllowedValues": [
        "PayAsYouGo",
        "PostPaid",
        "PayOnDemand",
        "Postpaid",
        "PostPay",
        "POST",
        "Subscription",
        "PrePaid",
        "PrePay",
        "Prepaid",
        "PRE"
      ]
    }
  },
  "Resources": {
    "Instance": {
      "Type": "ALIYUN::Flink::Instance",
      "Properties": {
        "InstanceName": {
          "Ref": "InstanceName"
        },
        "VpcId": {
          "Ref": "VpcId"
        },
        "ZoneId": {
          "Ref": "ZoneId"
        },
        "Bucket": {
          "Ref": "Bucket"
        },
        "VSwitchIds": {
          "Ref": "VSwitchIds"
        },
        "ChargeType": {
          "Ref": "ChargeType"
        }
      }
    }
  },
  "Outputs": {
    "InstanceId": {
      "Description": "Instance ID.",
      "Value": {
        "Fn::GetAtt": [
          "Instance",
          "InstanceId"
        ]
      }
    },
    "OrderId": {
      "Description": "Order information.",
      "Value": {
        "Fn::GetAtt": [
          "Instance",
          "OrderId"
        ]
      }
    }
  }
}