ALIYUN::FC3::VpcBinding类型用于创建VPC绑定。
语法
{
"Type": "ALIYUN::FC3::VpcBinding",
"Properties": {
"FunctionName": String,
"VpcId": String
}
}
属性
|
属性名称 |
类型 |
必须 |
允许更新 |
描述 |
约束 |
|
FunctionName |
String |
是 |
否 |
函数名称。 |
无 |
|
VpcId |
String |
否 |
否 |
VPC实例ID。 |
无 |
返回值
Fn::GetAtt
VpcId:VPC实例ID。
示例
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
FunctionName:
Type: String
Description:
en: Function Name.
Required: true
VpcId:
Type: String
AssociationProperty: ALIYUN::ECS::VPC::VPCId
Description:
en: VPC instance ID.
Required: false
Resources:
ExtensionResource:
Type: ALIYUN::FC3::VpcBinding
Properties:
FunctionName:
Ref: FunctionName
VpcId:
Ref: VpcId
Outputs:
VpcId:
Description: VPC instance ID.
Value:
Fn::GetAtt:
- ExtensionResource
- VpcId
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"FunctionName": {
"Type": "String",
"Description": {
"en": "Function Name."
},
"Required": true
},
"VpcId": {
"Type": "String",
"AssociationProperty": "ALIYUN::ECS::VPC::VPCId",
"Description": {
"en": "VPC instance ID."
},
"Required": false
}
},
"Resources": {
"ExtensionResource": {
"Type": "ALIYUN::FC3::VpcBinding",
"Properties": {
"FunctionName": {
"Ref": "FunctionName"
},
"VpcId": {
"Ref": "VpcId"
}
}
}
},
"Outputs": {
"VpcId": {
"Description": "VPC instance ID.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"VpcId"
]
}
}
}
}
该文章对您有帮助吗?