ALIYUN::VPC::GrantInstanceToCen类型用于为云企业网实例授权。
语法
{
"Type": "ALIYUN::VPC::GrantInstanceToCen",
"Properties": {
"InstanceId": String,
"CenOwnerId": Integer,
"CenId": String,
"InstanceType": String
}
}
属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
---|---|---|---|---|---|
InstanceId | String | 是 | 否 | 网络实例ID。 | 无 |
CenOwnerId | Integer | 是 | 否 | 要授权的云企业网实例所属账号的UID。 | 无 |
CenId | String | 是 | 否 | 要授权的云企业网的实例ID。 | 无 |
InstanceType | String | 是 | 否 | 网络实例类型。 | 取值:
|
返回值
Fn::GetAtt
- InstanceId:网络实例ID。
- CenId:要授权的云企业网的实例ID。
示例
JSON
格式
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"InstanceId": {
"Type": "String",
"Description": "The ID of the network instance."
},
"CenOwnerId": {
"Type": "Number",
"Description": "The UID of the account to which the target CEN instance belongs."
},
"CenId": {
"Type": "String",
"Description": "The ID of the CEN instance to be authorized."
},
"InstanceType": {
"Type": "String",
"Description": "The type of the network instance. Valid values:\nVPC: Virtual Private Cloud (VPC).\nVBR: Virtual Border Router (VBR).\nCCN: Cloud Connect Network (CCN).",
"AllowedValues": [
"CCN",
"VBR",
"VPC"
]
}
},
"Resources": {
"GrantInstanceToCen": {
"Type": "ALIYUN::VPC::GrantInstanceToCen",
"Properties": {
"InstanceId": {
"Ref": "InstanceId"
},
"CenOwnerId": {
"Ref": "CenOwnerId"
},
"CenId": {
"Ref": "CenId"
},
"InstanceType": {
"Ref": "InstanceType"
}
}
}
},
"Outputs": {
"InstanceId": {
"Description": "The ID of the network instance.",
"Value": {
"Fn::GetAtt": [
"GrantInstanceToCen",
"InstanceId"
]
}
},
"CenId": {
"Description": "The ID of the CEN instance to be authorized.",
"Value": {
"Fn::GetAtt": [
"GrantInstanceToCen",
"CenId"
]
}
}
}
}
YAML
格式
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
InstanceId:
Type: String
Description: The ID of the network instance.
CenOwnerId:
Type: Number
Description: The UID of the account to which the target CEN instance belongs.
CenId:
Type: String
Description: The ID of the CEN instance to be authorized.
InstanceType:
Type: String
Description: |-
The type of the network instance. Valid values:
VPC: Virtual Private Cloud (VPC).
VBR: Virtual Border Router (VBR).
CCN: Cloud Connect Network (CCN).
AllowedValues:
- CCN
- VBR
- VPC
Resources:
GrantInstanceToCen:
Type: 'ALIYUN::VPC::GrantInstanceToCen'
Properties:
InstanceId:
Ref: InstanceId
CenOwnerId:
Ref: CenOwnerId
CenId:
Ref: CenId
InstanceType:
Ref: InstanceType
Outputs:
InstanceId:
Description: The ID of the network instance.
Value:
'Fn::GetAtt':
- GrantInstanceToCen
- InstanceId
CenId:
Description: The ID of the CEN instance to be authorized.
Value:
'Fn::GetAtt':
- GrantInstanceToCen
- CenId