ALIYUN::Flink::InstanceV2类型用于创建新版flink全托管工作空间。
语法
{
"Type": "ALIYUN::Flink::InstanceV2",
"Properties": {
"ChargeType": String,
"InstanceName": String,
"Storage": Map,
"VpcId": String,
"VSwitchIds": List,
"AutoRenew": Boolean,
"Duration": Integer,
"PricingCycle": String,
"PromotionCode": String,
"ResourceSpec": Map,
"UsePromotionCode": Boolean
}
}属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
ChargeType | String | 是 | 否 | 付费类型。 | 取值如下:
|
InstanceName | String | 是 | 否 | 工作空间名称。 | 以小写英文字母开头,包含小写字母、数字、中划线,且不能用中划线结尾。 |
Storage | Map | 是 | 否 | 存储参数。 | 更多信息,请参考Storage属性。 |
VpcId | String | 是 | 否 | 专有网络 VPC ID。 | 无 |
VSwitchIds | List | 是 | 否 | 虚拟交换机 ID 组。 | 最多支持配置150组虚拟交换机。 |
AutoRenew | Boolean | 否 | 否 | 是否自动续费。 | 取值:
|
Duration | Integer | 否 | 否 | 订购周期数量。 | 当
说明 当 ChargeType 配置为 PRE 时,Duration 参数必填 |
PricingCycle | String | 否 | 否 | 指定预付费实例为包年或包月类型。 | 取值范围如下:
说明 当 ChargeType 配置为 PRE 时,PricingCycle 参数必填 |
PromotionCode | String | 否 | 否 | 优惠券 code。 | 无 |
ResourceSpec | Map | 否 | 否 | 资源规格。 | 更多信息,请参考ResourceSpec属性。 说明 当 ChargeType 配置为 PRE 时,ResourceSpec 参数必填 |
UsePromotionCode | Boolean | 否 | 否 | 是否使用优惠券。 | 无 |
Storage语法
"Storage": {
"FullyManaged": Boolean,
"Oss": Map
}Storage属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
FullyManaged | Boolean | 否 | 否 | 是否选择全托管存储。 | 全托管存储和绑定 oss bucket 的方式仅能选择一种。
|
Oss | Map | 否 | 否 | OSS 存储。 | 更多信息,请参考Oss属性。 |
Oss语法
"Oss": {
"Bucket": String
}Oss属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
Bucket | String | 是 | 否 | 绑定 OSS 的 Bucket 名称。 | 无 |
ResourceSpec语法
"ResourceSpec": {
"Cpu": Integer,
"MemoryGB": Integer
}ResourceSpec属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
Cpu | Integer | 否 | 否 | CPU 数量。 | 说明 在包年包月的工作空间下,CPU 数量必填。在按量付费的工作空间下,可以不用填写 CPU 数量。- 创建的目标项目空间的 CPU 数量要小于工作空间中剩余 CPU 数量(工作空间购买的总 CPU 数量减去其他项目空间已分配 CPU 数量),否则会报错。 |
MemoryGB | Integer | 否 | 否 | 内存大小。 | 说明 内存大小必须为 CPU 数量的 4 倍。 |
返回值
Fn::GetAtt
InstanceId:实例 id。
WorkspaceId:工作空间 ID。
OrderId:订单 id。
示例
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
InstanceName:
Type: String
Description:
en: The name of instance.
AllowedPattern: ^[a-z][a-z0-9-]{1,60}
Required: true
Storage:
AssociationPropertyMetadata:
Parameters:
FullyManaged:
Type: Boolean
Description:
en: Whether the storage is fully managed.
Required: false
Oss:
AssociationPropertyMetadata:
Parameters:
Bucket:
Type: String
Description:
en: OSS bucket name.
Required: true
Type: Json
Description:
en: The OSS storage config
Required: false
Type: Json
Description:
en: |-
Resource specifications.
When ChargeType is configured as PRE, the resource specification parameters must be filled.
Required: true
VpcId:
AssociationProperty: ALIYUN::ECS::VPC::VPCId
Type: String
Description:
en: VPC ID.
Required: true
VSwitchIds:
Type: Json
Description:
en: Virtual switch ID.
Required: true
MinLength: 1
MaxLength: 150
ChargeType:
Type: String
Description:
en: |-
The payment type, the value of the value is as follows:
POST: pay as you go.
PRE: subscription.
AllowedValues:
- PayAsYouGo
- Subscription
Required: true
ResourceSpec:
AssociationPropertyMetadata:
Parameters:
Cpu:
Type: Number
Description:
en: CPU number.
Required: false
MemoryGB:
Type: Number
Description:
en: |-
memory size.The unit is GB.
It shows that the amount of memory must be 4 times the number of CPUs.
Required: false
Type: Json
Description:
en: |-
Resource specifications.
When ChargeType is configured as PRE, the resource specification parameters must be filled.
Required: false
Resources:
InstanceV2:
Type: ALIYUN::Flink::InstanceV2
Properties:
InstanceName:
Ref: InstanceName
Storage:
Ref: Storage
VpcId:
Ref: VpcId
VSwitchIds:
Ref: VSwitchIds
ChargeType:
Ref: ChargeType
ResourceSpec:
Ref: ResourceSpec
Outputs:
InstanceId:
Description: Instance ID.
Value:
Fn::GetAtt:
- InstanceV2
- InstanceId
WorkspaceId:
Description: Workspace ID.
Value:
Fn::GetAtt:
- InstanceV2
- WorkspaceId
OrderId:
Description: Order information.
Value:
Fn::GetAtt:
- InstanceV2
- OrderId
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"InstanceName": {
"Type": "String",
"Description": {
"en": "The name of instance."
},
"AllowedPattern": "^[a-z][a-z0-9-]{1,60}",
"Required": true
},
"Storage": {
"AssociationPropertyMetadata": {
"Parameters": {
"FullyManaged": {
"Type": "Boolean",
"Description": {
"en": "Whether the storage is fully managed."
},
"Required": false
},
"Oss": {
"AssociationPropertyMetadata": {
"Parameters": {
"Bucket": {
"Type": "String",
"Description": {
"en": "OSS bucket name."
},
"Required": true
}
}
},
"Type": "Json",
"Description": {
"en": "The OSS storage config"
},
"Required": false
}
}
},
"Type": "Json",
"Description": {
"en": "Resource specifications.\nWhen ChargeType is configured as PRE, the resource specification parameters must be filled."
},
"Required": true
},
"VpcId": {
"AssociationProperty": "ALIYUN::ECS::VPC::VPCId",
"Type": "String",
"Description": {
"en": "VPC ID."
},
"Required": true
},
"VSwitchIds": {
"Type": "Json",
"Description": {
"en": "Virtual switch ID."
},
"Required": true,
"MinLength": 1,
"MaxLength": 150
},
"ChargeType": {
"Type": "String",
"Description": {
"en": "The payment type, the value of the value is as follows:\nPOST: pay as you go.\nPRE: subscription."
},
"AllowedValues": [
"PayAsYouGo",
"Subscription"
],
"Required": true
},
"ResourceSpec": {
"AssociationPropertyMetadata": {
"Parameters": {
"Cpu": {
"Type": "Number",
"Description": {
"en": "CPU number."
},
"Required": false
},
"MemoryGB": {
"Type": "Number",
"Description": {
"en": "memory size.The unit is GB.\nIt shows that the amount of memory must be 4 times the number of CPUs."
},
"Required": false
}
}
},
"Type": "Json",
"Description": {
"en": "Resource specifications.\nWhen ChargeType is configured as PRE, the resource specification parameters must be filled."
},
"Required": false
}
},
"Resources": {
"InstanceV2": {
"Type": "ALIYUN::Flink::InstanceV2",
"Properties": {
"InstanceName": {
"Ref": "InstanceName"
},
"Storage": {
"Ref": "Storage"
},
"VpcId": {
"Ref": "VpcId"
},
"VSwitchIds": {
"Ref": "VSwitchIds"
},
"ChargeType": {
"Ref": "ChargeType"
},
"ResourceSpec": {
"Ref": "ResourceSpec"
}
}
}
},
"Outputs": {
"InstanceId": {
"Description": "Instance ID.",
"Value": {
"Fn::GetAtt": [
"InstanceV2",
"InstanceId"
]
}
},
"WorkspaceId": {
"Description": "Workspace ID.",
"Value": {
"Fn::GetAtt": [
"InstanceV2",
"WorkspaceId"
]
}
},
"OrderId": {
"Description": "Order information.",
"Value": {
"Fn::GetAtt": [
"InstanceV2",
"OrderId"
]
}
}
}
}