文档

ALIYUN::ApiGateway::App

更新时间:

ALIYUN::ApiGateway::App类型用于创建App。App是您调用第三方API时的身份,要调用第三方API必须创建App。

语法

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

属性

属性名称

类型

必须

允许更新

描述

约束

AppName

String

App的名称。

全局唯一。建议命名时加上特定标识,避免重名。

长度为4~15个字符,必须以英文字符或中文字符开头,可包含英文字符、中文字符、数字和下划线(_)。

Tags

List

标签。

最多设置20个标签。

Description

String

App描述信息。

长度不超过180个字符。

AppSecret

String

App密码。

AppCode

String

应用的AppCode。

AppKey

String

App的密钥。

用于调用API时使用。

Tags语法

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

Tags属性

属性名称

类型

必须

允许更新

描述

约束

Key

String

标签键。

长度为1~128个字符,不能以aliyunacs:开头,不能包含http://或者https://

Value

String

标签值。

长度为0~128个字符,不能以aliyunacs:开头,不能包含http://或者https://

返回值

Fn::GetAtt

  • AppKey:App的密钥。

  • AppSecret:App的密码。

  • AppId:App的ID。

  • Tags:标签。

  • AppCode:应用的AppCode。

示例

  • YAML格式

    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格式

    {
      "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"
            ]
          }
        }
      }
    }
  • 本页导读 (1)
文档反馈