ALIYUN::FC3::VpcBinding

更新时间:
复制为 MD 格式

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"
        ]
      }
    }
  }
}