ALIYUN::ApiGateway::VpcAccessConfig类型用于配置VPC授权,以便专有网络的API对外提供服务。

语法

{
  "Type": "ALIYUN::ApiGateway::VpcAccessConfig",
  "Properties": {
    "InstanceId": String,
    "VpcId": String,
    "Name": String,
    "Port": Integer
  }
}

属性

属性名称类型必须允许更新描述约束
InstanceId String ECS或SLB的实例ID必须属于VpcId所指定的专有网络
VpcId String 专有网络ID
Name String 自定义授权名称需要保持唯一
Port Integer 实例对应的端口号

返回值

Fn::GetAtt

无。

示例

  • YAML格式

    ROSTemplateFormatVersion: '2015-09-01'
    Parameters:
      InstanceId:
        Type: String
        AssociationProperty: ALIYUN::ECS::Instance::InstanceId
      VpcId:
        Type: String
        AssociationProperty: ALIYUN::ECS::VPC::VPCId
    Resources:
      VpcAccesssConfig:
        Type: ALIYUN::ApiGateway::VpcAccessConfig
        Properties:
          VpcId:
            Ref: VpcId
          InstanceId:
            Ref: InstanceId
          Port: 8080
          Name: ros_test_vpc_access
  • JSON格式

    {
      "ROSTemplateFormatVersion": "2015-09-01",
      "Parameters": {
        "InstanceId": {
          "Type": "String",
          "AssociationProperty": "ALIYUN::ECS::Instance::InstanceId"
        },
        "VpcId": {
          "Type": "String",
          "AssociationProperty": "ALIYUN::ECS::VPC::VPCId"
        }
      },
      "Resources": {
        "VpcAccesssConfig": {
          "Type": "ALIYUN::ApiGateway::VpcAccessConfig",
          "Properties": {
            "VpcId": {
              "Ref": "VpcId"
            },
            "InstanceId": {
              "Ref": "InstanceId"
            },
            "Port": 8080,
            "Name": "ros_test_vpc_access"
          }
        }
      }
    }