ALIYUN::ApiGateway::StageConfig configures environment variables for an API group in the test, staging, or production environment.
Syntax
{
"Type": "ALIYUN::ApiGateway::StageConfig",
"Properties": {
"Variables": Map,
"GroupId": String,
"StageName": String
}
}
Properties
|
Property |
Type |
Required |
Editable |
Description |
Constraint |
|
GroupId |
String |
Yes |
Yes |
The ID of the API group. |
None. |
|
StageName |
String |
Yes |
Yes |
The target environment for the API group. |
Valid values:
|
|
Variables |
Map |
Yes |
Yes |
The environment variables. |
Use the |
Return values
Fn::GetAtt
None.
Examples
Note
Replace masked parameter values, such as the Default field of GroupId, with your actual values.
YAML format
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
Variables:
Default:
env: test
Type: Json
GroupId:
Default: c22139c9e5e04d32b90a*******
Type: String
Description: Test ApiGateway StageConfig
Resources:
StageConfig:
Type: 'ALIYUN::ApiGateway::StageConfig'
Properties:
Variables:
Ref: Variables
GroupId:
Ref: GroupId
StageName: TEST
JSON format
{
"ROSTemplateFormatVersion": "2015-09-01",
"Description": "Test ApiGateway StageConfig",
"Parameters": {
"Variables": {
"Type": "Json",
"Default": {
"env": "test"
}
},
"GroupId": {
"Type": "String",
"Default": "c22139c9e5e04d32b90a*******"
}
},
"Resources": {
"StageConfig": {
"Type": "ALIYUN::ApiGateway::StageConfig",
"Properties": {
"Variables": {
"Ref": "Variables"
},
"GroupId": {
"Ref": "GroupId"
},
"StageName": "TEST"
}
}
}
}