All Products
Search
Document Center

Resource Orchestration Service:ALIYUN::ApiGateway::StageConfig

Last Updated:May 17, 2023

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

Variables

Map

Yes

Yes

The environment variables.

Specify the environment variables in the key-pair format. You can specify up to 50 environment variables.

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 environment variables.

Valid values:

  • TEST

  • PRE

  • RELEASE

Return values

Fn::GetAtt

None.

Examples

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"
      }
    }
  }
}