ALIYUN::APIG::Environment is used to create an environment.
Syntax
{
"Type": "ALIYUN::APIG::Environment",
"Properties": {
"EnvironmentName": String,
"GatewayId": String,
"Description": String
}
}Properties
Property | Type | Required | Editable | Description | Constraint |
EnvironmentName | String | Yes | No | The environment name. | None. |
GatewayId | String | Yes | No | The gateway ID. | None. |
Description | String | No | Yes | The description of the environment. | None. |
Return values
Fn::GetAtt
EnvironmentId: the environment ID.
Description: the description of the environment.
EnvironmentName: the environment name.
GatewayId: the gateway ID.
Examples
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
EnvironmentName:
Type: String
Description:
en: The name of the environment.
Required: true
GatewayId:
Type: String
Description:
en: Gateway ID.
AssociationProperty: ALIYUN::APIG::Gateway::GatewayId
Required: true
Resources:
ExtensionResource:
Type: ALIYUN::APIG::Environment
Properties:
EnvironmentName:
Ref: EnvironmentName
GatewayId:
Ref: GatewayId
Outputs:
EnvironmentId:
Description: The ID of the environment.
Value:
Fn::GetAtt:
- ExtensionResource
- EnvironmentId
Description:
Description: Description of the environment.
Value:
Fn::GetAtt:
- ExtensionResource
- Description
EnvironmentName:
Description: The name of the resource.
Value:
Fn::GetAtt:
- ExtensionResource
- EnvironmentName
GatewayId:
Description: The ID of the Gateway.
Value:
Fn::GetAtt:
- ExtensionResource
- GatewayId
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"EnvironmentName": {
"Type": "String",
"Description": {
"en": "The name of the environment."
},
"Required": true
},
"GatewayId": {
"Type": "String",
"Description": {
"en": "Gateway ID."
},
"AssociationProperty": "ALIYUN::APIG::Gateway::GatewayId",
"Required": true
}
},
"Resources": {
"ExtensionResource": {
"Type": "ALIYUN::APIG::Environment",
"Properties": {
"EnvironmentName": {
"Ref": "EnvironmentName"
},
"GatewayId": {
"Ref": "GatewayId"
}
}
}
},
"Outputs": {
"EnvironmentId": {
"Description": "The ID of the environment.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"EnvironmentId"
]
}
},
"Description": {
"Description": "Description of the environment.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"Description"
]
}
},
"EnvironmentName": {
"Description": "The name of the resource.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"EnvironmentName"
]
}
},
"GatewayId": {
"Description": "The ID of the Gateway.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"GatewayId"
]
}
}
}
}