All Products
Search
Document Center

Resource Orchestration Service:ALIYUN::ApiGateway::App

Last Updated:Jul 17, 2024

ALIYUN::ApiGateway::App is used to create an application. Before you call a third-party API, you must create an application and use the application as an identity to call the API.

Syntax

{
  "Type": "ALIYUN::ApiGateway::App",
  "Properties": {
    "Description": String,
    "Tags": List,
    "AppName": String,
    "AppSecret": String,
    "AppCode": String,
    "AppKey": String
  }
}   

Properties

Property

Type

Required

Editable

Description

Constraint

AppName

String

Yes

Yes

The application name.

The name must be globally unique. We recommend that you add a special identifier to ensure that the name is unique.

The name must be 4 to 15 characters in length and can contain letters, digits, and underscores (_). The name must start with a letter.

AppCode

String

No

No

The AppCode of the application.

None.

AppKey

String

No

No

The key of the application.

The key is used for calling an API.

AppSecret

String

No

No

The password of the application.

None.

Description

String

No

Yes

The description of the application.

The description can be up to 180 characters in length.

Tags

List

No

Yes

The tags of the application.

You can add up to 20 tags to the application.

Tags syntax

"Tags": [
  {
    "Value": String,
    "Key": String
  }
]  

Tags properties

Property

Type

Required

Editable

Description

Constraint

Key

String

Yes

No

The tag key.

The tag key must be 1 to 128 characters in length and cannot contain http:// or https://. The tag key cannot start with aliyun or acs:.

Value

String

No

No

The tag value.

The tag value can be up to 128 characters in length and cannot contain http:// or https://. The tag value cannot start with aliyun or acs:.

Return values

Fn::GetAtt

  • AppKey: the key of the application.

  • AppSecret: the secret of the application.

  • AppId: the application ID.

  • Tags: the tags of the application.

  • AppCode: the AppCode of the application.

Examples

YAML format

ROSTemplateFormatVersion: '2015-09-01'
Parameters: {}
Resources:
  APP:
    Type: ALIYUN::ApiGateway::App
    Properties:
      Description: Test Create App
      AppName: DemoApp
Outputs:
  AppId:
    Description: The id of the created APP
    Value:
      Fn::GetAtt:
        - APP
        - AppId
  AppKey:
    Description: The key of the APP
    Value:
      Fn::GetAtt:
        - APP
        - AppKey
  AppSecret:
    Description: The secret of the APP
    Value:
      Fn::GetAtt:
        - APP
        - AppSecret

JSON format

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
  },
  "Resources": {
    "APP": {
      "Type": "ALIYUN::ApiGateway::App",
      "Properties": {
        "Description": "Test Create App",
        "AppName": "DemoApp"
      }
    }
  },
  "Outputs": {
    "AppId": {
      "Description": "The id of the created APP",
      "Value": {
        "Fn::GetAtt": [
          "APP",
          "AppId"
        ]
      }
    },
    "AppKey": {
      "Description": "The key of the APP",
      "Value": {
        "Fn::GetAtt": [
          "APP",
          "AppKey"
        ]
      }
    },
    "AppSecret": {
      "Description": "The secret of the APP",
      "Value": {
        "Fn::GetAtt": [
          "APP",
          "AppSecret"
        ]
      }
    }
  }
}