All Products
Search
Document Center

Resource Orchestration Service:ALIYUN::ApiGateway::Authorization

Last Updated:Aug 14, 2023

ALIYUN::ApiGateway::Authorization is used to authorize APIs to access applications.

Syntax

  {
  "Type": "ALIYUN::ApiGateway::Authorization",
  "Properties": {
    "ApiIds": List,
    "AppIds": List,
    "GroupId": String,
    "StageName": String,
    "Description": String,
    "AuthValidTime": String
  }
}

Properties

Property

Type

Required

Editable

Description

Constraint

ApiIds

List

Yes

Yes

The IDs of the APIs.

You can specify up to 100 IDs.

AppIds

List

Yes

Yes

The IDs of the applications.

Each ID is a GUID that is generated by the system. You can specify multiple IDs.

GroupId

String

Yes

Yes

The ID of the API group.

Each ID is a GUID that is generated by the system.

StageName

String

Yes

Yes

The environment name.

Valid values:

  • TEST

  • PRE

  • RELEASE

Description

String

No

Yes

The description of the authorization.

None.

AuthValidTime

String

No

Yes

The time when the authorization expires.

The time must be in UTC.

If you leave this property empty, the authorization does not expire.

Return values

Fn::GetAtt

None.

Examples

  • YAML format

    ROSTemplateFormatVersion: '2015-09-01'
    Parameters:
      GroupId:
        Type: String
        Default: xxxx10b1b4dc7a2e6ba8ca3xxxx
         
      AppId:
        Type: Number
        Default: 577****
        Description: APP ID
      ApiId:
        Type: String
        Default: xxxxx2a8b6d4ce2ad1f95cbxxxxx
        Description: API ID
    Resources:
      Authorization:
        Type: ALIYUN::ApiGateway::Authorization
        Properties:
          GroupId:
            Ref: GroupId
          StageName: TEST
          AppIds:
            - Ref: AppId
          ApiIds:
            - Ref: ApiId
  • JSON format

    {
      "ROSTemplateFormatVersion": "2015-09-01",
      "Parameters": {
        "GroupId": {
          "Type": "String",
          "Default": "xxxx10b1b4dc7a2e6ba8ca3xxxx",
           
        },
        "AppId": {
          "Type": "Number",
          "Default": "577****",
          "Description": "APP ID"
        },
        "ApiId": {
          "Type": "String",
          "Default": "xxxxx2a8b6d4ce2ad1f95cbxxxxx",
          "Description": "API ID"
        }
      },
      "Resources": {
        "Authorization": {
          "Type": "ALIYUN::ApiGateway::Authorization",
          "Properties": {
            "GroupId": {
              "Ref": "GroupId"
            },
            "StageName": "TEST",
            "AppIds": [
              {
                "Ref": "AppId"
              }
            ],
            "ApiIds": [
              {
                "Ref": "ApiId"
              }
            ]
          }
        }
      }
    }