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 | 否 | 否 | 訂購周期。 | 取值:
|
ChargeType | String | 是 | 否 | 付費類型。 | 取值:
|
AutoRenew | Boolean | 否 | 否 | 續約方式。 | 取值:
|
PromotionCode | String | 否 | 否 | 優惠碼。 | 無 |
ResourceSpec | Map | 否 | 是 | 資源規格。 | 更多資訊,請參考ResourceSpec屬性。 |
Duration | Integer | 否 | 否 | 訂購周期數量。 | 說明 當ChargeType配置為PRE時,本參數必填。 |
UsePromotionCode | Boolean | 否 | 否 | 是否使用優惠券。 | 取值:
|
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"
]
}
}
}
}