ALIYUN::APIG::Gateway类型用于创建云原生API网关。
语法
{
"Type": "ALIYUN::APIG::Gateway",
"Properties": {
"PaymentType": String,
"Spec": String,
"ZoneConfig": Map,
"GatewayName": String,
"LogConfig": Map,
"NetworkAccessConfig": Map,
"VSwitch": Map,
"Vpc": Map
}
}
属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
PaymentType | String | 是 | 否 | 付费类型。 | 取值:
|
Spec | String | 是 | 否 | 网关规格。 | 无 |
ZoneConfig | Map | 是 | 否 | 可用区配置。 | 更多信息,请参见ZoneConfig属性。 |
GatewayName | String | 否 | 是 | 网关名称。 | 无 |
LogConfig | Map | 否 | 否 | 日志服务配置。 | 更多信息,请参见LogConfig属性。 |
NetworkAccessConfig | Map | 否 | 否 | 网络配置。 | 更多信息,请参见NetworkAccessConfig属性。 |
VSwitch | Map | 否 | 否 | 网关绑定的VSwitch配置。 | 更多信息,请参见VSwitch属性。 |
Vpc | Map | 否 | 否 | 网关绑定的Vpc配置。 | 更多信息,请参见Vpc属性。 |
NetworkAccessConfig语法
"NetworkAccessConfig": {
"Type": String
}
NetworkAccessConfig属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
Type | String | 是 | 否 | 网络访问类型。 | 取值:
|
VSwitch语法
"VSwitch": {
"VSwitchId": String,
"Name": String
}
VSwitch属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
VSwitchId | String | 是 | 否 | 交换机ID。 | 无 |
Name | String | 否 | 否 | 交换机名称。 | 无 |
ZoneConfig语法
"ZoneConfig": {
"SelectOption": String
}
ZoneConfig属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
SelectOption | String | 是 | 否 | 可用区选项。 | 取值:
|
Vpc语法
"Vpc": {
"VpcId": String,
"Name": String
}
Vpc属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
VpcId | String | 是 | 否 | 专有网络ID。 | 无 |
Name | String | 否 | 否 | VPC网关的名称。 | 无 |
LogConfig语法
"LogConfig": {
"Sls": Map
}
LogConfig属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
Sls | Map | 否 | 否 | SLS服务配置。 | 无 |
Sls语法
"Sls": {
"Enable": Boolean
}
Sls属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
Enable | Boolean | 否 | 否 | 是否启用SLS配置。 | 无 |
返回值
Fn::GetAtt
CreateTime:创建时间戳,单位:毫秒。
Vpc:网关绑定的VPC。
LoadBalancers:网关的入口地址列表。
SecurityGroup:网关的安全组。
GatewayId:网关ID。
Zones:网关的可用区配置。
VSwitch:网关的交换机配置。
Version:网关版本。
UpdateTime:更新时间戳,单位:毫秒。
PaymentType:付费类型。
GatewayName:网关名称。
ExpireTime:包年包月到期时间戳,单位:毫秒。
Spec:网关规格。
示例
ROSTemplateFormatVersion: '2015-09-01'
Metadata:
ALIYUN::ROS::Interface:
ParameterGroups:
- Parameters:
- Vpc
- ZoneConfig
- VSwitch
Label:
default:
en: Network Configuration
zh-cn: 网络配置
- Parameters:
- PaymentType
- Spec
Label:
default:
en: Gateway Configuration
zh-cn: 网关配置
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",
"zh-cn": "网络配置"
}
}
},
{
"Parameters": [
"PaymentType",
"Spec"
],
"Label": {
"default": {
"en": "Gateway Configuration",
"zh-cn": "网关配置"
}
}
}
]
}
},
"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"
]
}
}
}
}