All Products
Search
Document Center

Resource Orchestration Service:ALIYUN::ApiGateway::VpcAccessConfig

Last Updated:Jul 10, 2024

ALIYUN::ApiGateway::VpcAccessConfig is used to configure virtual private cloud (VPC) access authorization for an instance. This helps APIs provide services based on private networks.

Syntax

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

Properties

Property

Type

Required

Editable

Description

Constraint

InstanceId

String

Yes

Yes

The ID of the Elastic Compute Service (ECS) or Server Load Balancer (SLB) instance for which you want to configure VPC access authorization.

The instance must belong to the VPC specified by VpcId.

Name

String

Yes

Yes

The name of the custom authorization.

The name must be unique.

Port

Integer

Yes

Yes

The port number of the instance.

None.

VpcId

String

Yes

Yes

The VPC ID.

None.

Return values

Fn::GetAtt

None.

Examples

Note

Change the values of masked parameters based on your business requirements.

YAML format

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 format

{
  "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_ac****"
      }
    }
  }
}