ALIYUN::APIG::Gateway is used to create a Cloud-native API Gateway instance.
Syntax
{
"Type": "ALIYUN::APIG::Gateway",
"Properties": {
"PaymentType": String,
"Spec": String,
"ZoneConfig": Map,
"GatewayName": String,
"LogConfig": Map,
"NetworkAccessConfig": Map,
"VSwitch": Map,
"Vpc": Map
}
}
Properties
Property | Type | Required | Editable | Description | Constraint |
PaymentType | String | Yes | No | The billing method. | Valid values:
|
Spec | String | Yes | No | The instance type. | None. |
ZoneConfig | Map | Yes | No | The zone configurations. | For more information, see ZoneConfig property. |
GatewayName | String | No | Yes | The name of the instance. | None. |
LogConfig | Map | No | No | The log configurations. | For more information, see LogConfig property. |
NetworkAccessConfig | Map | No | No | The network configurations. | For more information, see NetworkAccessConfig property. |
VSwitch | Map | No | No | The vSwitch configurations of the instance. | For more information, see VSwitch properties. |
Vpc | Map | No | No | The virtual private cloud (VPC) configurations of the instance. | For more information, see Vpc properties. |
NetworkAccessConfig syntax
"NetworkAccessConfig": {
"Type": String
}
NetworkAccessConfig property
Property | Type | Required | Editable | Description | Constraint |
Type | String | Yes | No | The network access type. | Valid values:
|
VSwitch syntax
"VSwitch": {
"VSwitchId": String,
"Name": String
}
VSwitch properties
Property | Type | Required | Editable | Description | Constraint |
VSwitchId | String | Yes | No | The ID of the vSwitch. | None. |
Name | String | No | No | The name of the vSwitch. | None. |
ZoneConfig syntax
"ZoneConfig": {
"SelectOption": String
}
ZoneConfig property
Property | Type | Required | Editable | Description | Constraint |
SelectOption | String | Yes | No | The option for selecting the zone. | Valid values:
|
Vpc syntax
"Vpc": {
"VpcId": String,
"Name": String
}
Vpc properties
Property | Type | Required | Editable | Description | Constraint |
VpcId | String | Yes | No | The ID of the VPC. | None. |
Name | String | No | No | The name of the VPC. | None. |
LogConfig syntax
"LogConfig": {
"Sls": Map
}
LogConfig property
Property | Type | Required | Editable | Description | Constraint |
Sls | Map | No | No | The Simple Log Service (SLS) configurations. | None. |
Sls syntax
"Sls": {
"Enable": Boolean
}
Sls property
Property | Type | Required | Editable | Description | Constraint |
Enable | Boolean | No | No | Specifies whether to enable the SLS configurations. | None. |
Return values
Fn::GetAtt
CreateTime: the creation timestamp. Unit: milliseconds.
Vpc: the VPC of the instance.
LoadBalancers: the ingress IP addresses of the instance.
SecurityGroup: the security group of the instance.
GatewayId: the ID of the instance.
Zones: the zone configurations of the instance.
VSwitch: the vSwitch configurations of the instance.
Version: the version of the instance.
UpdateTime: the update timestamp. Unit: milliseconds.
PaymentType: the billing method.
GatewayName: the name of the instance.
ExpireTime: the expiration timestamp of the subscription. Unit: milliseconds.
Spec: the instance type.
Environments: the environments to which the API is published.
Examples
ROSTemplateFormatVersion: '2015-09-01'
Metadata:
ALIYUN::ROS::Interface:
ParameterGroups:
- Parameters:
- Vpc
- ZoneConfig
- VSwitch
Label:
default:
en: Network Configuration
- Parameters:
- PaymentType
- Spec
Label:
default:
en: Gateway Configuration
Parameters:
VSwitch:
AssociationPropertyMetadata:
Parameters:
VSwitchId:
AssociationPropertyMetadata:
VpcId: ${Vpc.VpcId}
AssociationProperty: ALIYUN::VPC::VSwitch::VSwitchId
Type: String
Description:
en: The ID of the VSwitch.
Required: true
Name:
Type: String
Description:
en: The name of the VSwitch.
Required: false
Type: Json
Description:
en: The virtual switch associated with the Gateway.
Required: false
ZoneConfig:
AssociationPropertyMetadata:
Parameters:
SelectOption:
Type: String
Description:
en: |-
Availability Zone Options. Valid values:
* Auto
* Manual
AllowedValues:
- Auto
- Manual
Required: true
Type: Json
Description:
en: Availability Zone Configuration.
Required: true
Vpc:
AssociationPropertyMetadata:
Parameters:
VpcId:
AssociationProperty: ALIYUN::ECS::VPC::VPCId
Type: String
Description:
en: The VPC network ID.
Required: true
Name:
Type: String
Description:
en: The name of the VPC gateway.
Required: false
Type: Json
Description:
en: The VPC associated with the Gateway.
Required: false
PaymentType:
AssociationProperty: InstanceChargeType
Type: String
Description:
en: |-
The payment type of the gateway. Valid values:
* PayAsYouGo
* Subscription
AllowedValues:
- PayAsYouGo
- Subscription
Required: true
Default: PayAsYouGo
Spec:
Type: String
Description:
en: Gateway instance specifications.
Required: true
Default: apigw.small.x1
Resources:
ExtensionResource:
Type: ALIYUN::APIG::Gateway
Properties:
VSwitch:
Ref: VSwitch
ZoneConfig:
Ref: ZoneConfig
Vpc:
Ref: Vpc
PaymentType:
Ref: PaymentType
Spec:
Ref: Spec
Outputs:
CreateTime:
Description: 'The creation timestamp. Unit: milliseconds.'
Value:
Fn::GetAtt:
- ExtensionResource
- CreateTime
Vpc:
Description: The VPC associated with the Gateway.
Value:
Fn::GetAtt:
- ExtensionResource
- Vpc
LoadBalancers:
Description: The list of Gateway ingress addresses.
Value:
Fn::GetAtt:
- ExtensionResource
- LoadBalancers
SecurityGroup:
Description: The Security Group of the Gateway.
Value:
Fn::GetAtt:
- ExtensionResource
- SecurityGroup
GatewayId:
Description: The ID of the Gateway.
Value:
Fn::GetAtt:
- ExtensionResource
- GatewayId
Zones:
Description: The List of zones associated with the Gateway.
Value:
Fn::GetAtt:
- ExtensionResource
- Zones
VSwitch:
Description: The virtual switch associated with the Gateway.
Value:
Fn::GetAtt:
- ExtensionResource
- VSwitch
Version:
Description: The gateway version.
Value:
Fn::GetAtt:
- ExtensionResource
- Version
UpdateTime:
Description: 'Update the timestamp. Unit: milliseconds.'
Value:
Fn::GetAtt:
- ExtensionResource
- UpdateTime
PaymentType:
Description: The payment type of the gateway.
Value:
Fn::GetAtt:
- ExtensionResource
- PaymentType
GatewayName:
Description: The name of the resource.
Value:
Fn::GetAtt:
- ExtensionResource
- GatewayName
ExpireTime:
Description: 'Package year and package month expiration timestamp. Unit: milliseconds.'
Value:
Fn::GetAtt:
- ExtensionResource
- ExpireTime
Spec:
Description: Gateway instance specifications.
Value:
Fn::GetAtt:
- ExtensionResource
- Spec
{
"ROSTemplateFormatVersion": "2015-09-01",
"Metadata": {
"ALIYUN::ROS::Interface": {
"ParameterGroups": [
{
"Parameters": [
"Vpc",
"ZoneConfig",
"VSwitch"
],
"Label": {
"default": {
"en": "Network Configuration",
}
}
},
{
"Parameters": [
"PaymentType",
"Spec"
],
"Label": {
"default": {
"en": "Gateway Configuration",
}
}
}
]
}
},
"Parameters": {
"VSwitch": {
"AssociationPropertyMetadata": {
"Parameters": {
"VSwitchId": {
"AssociationPropertyMetadata": {
"VpcId": "${Vpc.VpcId}"
},
"AssociationProperty": "ALIYUN::VPC::VSwitch::VSwitchId",
"Type": "String",
"Description": {
"en": "The ID of the VSwitch."
},
"Required": true
},
"Name": {
"Type": "String",
"Description": {
"en": "The name of the VSwitch."
},
"Required": false
}
}
},
"Type": "Json",
"Description": {
"en": "The virtual switch associated with the Gateway."
},
"Required": false
},
"ZoneConfig": {
"AssociationPropertyMetadata": {
"Parameters": {
"SelectOption": {
"Type": "String",
"Description": {
"en": "Availability Zone Options. Valid values:\n* Auto\n* Manual"
},
"AllowedValues": [
"Auto",
"Manual"
],
"Required": true
}
}
},
"Type": "Json",
"Description": {
"en": "Availability Zone Configuration."
},
"Required": true
},
"Vpc": {
"AssociationPropertyMetadata": {
"Parameters": {
"VpcId": {
"AssociationProperty": "ALIYUN::ECS::VPC::VPCId",
"Type": "String",
"Description": {
"en": "The VPC network ID."
},
"Required": true
},
"Name": {
"Type": "String",
"Description": {
"en": "The name of the VPC gateway."
},
"Required": false
}
}
},
"Type": "Json",
"Description": {
"en": "The VPC associated with the Gateway."
},
"Required": false
},
"PaymentType": {
"AssociationProperty": "InstanceChargeType",
"Type": "String",
"Description": {
"en": "The payment type of the gateway. Valid values:\n* PayAsYouGo\n* Subscription"
},
"AllowedValues": [
"PayAsYouGo",
"Subscription"
],
"Required": true,
"Default": "PayAsYouGo"
},
"Spec": {
"Type": "String",
"Description": {
"en": "Gateway instance specifications."
},
"Required": true,
"Default":"apigw.small.x1"
}
},
"Resources": {
"ExtensionResource": {
"Type": "ALIYUN::APIG::Gateway",
"Properties": {
"VSwitch": {
"Ref": "VSwitch"
},
"ZoneConfig": {
"Ref": "ZoneConfig"
},
"Vpc": {
"Ref": "Vpc"
},
"PaymentType": {
"Ref": "PaymentType"
},
"Spec": {
"Ref": "Spec"
}
}
}
},
"Outputs": {
"CreateTime": {
"Description": "The creation timestamp. Unit: milliseconds.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"CreateTime"
]
}
},
"Vpc": {
"Description": "The VPC associated with the Gateway.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"Vpc"
]
}
},
"LoadBalancers": {
"Description": "The list of Gateway ingress addresses.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"LoadBalancers"
]
}
},
"SecurityGroup": {
"Description": "The Security Group of the Gateway.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"SecurityGroup"
]
}
},
"GatewayId": {
"Description": "The ID of the Gateway.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"GatewayId"
]
}
},
"Zones": {
"Description": "The List of zones associated with the Gateway.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"Zones"
]
}
},
"VSwitch": {
"Description": "The virtual switch associated with the Gateway.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"VSwitch"
]
}
},
"Version": {
"Description": "The gateway version.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"Version"
]
}
},
"UpdateTime": {
"Description": "Update the timestamp. Unit: milliseconds.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"UpdateTime"
]
}
},
"PaymentType": {
"Description": "The payment type of the gateway.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"PaymentType"
]
}
},
"GatewayName": {
"Description": "The name of the resource.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"GatewayName"
]
}
},
"ExpireTime": {
"Description": "Package year and package month expiration timestamp. Unit: milliseconds.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"ExpireTime"
]
}
},
"Spec": {
"Description": "Gateway instance specifications.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"Spec"
]
}
}
}
}