ALIYUN::ApiGateway::StageConfig is used to configure the test, staging, or production environment variables for an API group.
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 name of the environment for which you want to configure the API group. | Valid values:
|
Variables | Map | Yes | Yes | The environment variables. | Specify the environment variables in the |
Return values
Fn::GetAtt
None.
Examples
Note
Change the values of masked parameters, such as the Default field of the GroupId parameter, based on your business requirements.
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"
}
}
}
}