ALIYUN::ApiGateway::App类型用于创建App。App是您调用第三方API时的身份,要调用第三方API必须创建App。
语法
{
"Type": "ALIYUN::ApiGateway::App",
"Properties": {
"Description": String,
"Tags": List,
"AppName": String
}
}
属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
---|---|---|---|---|---|
AppName | String | 是 | 是 | App的名称 | 全局唯一。建议命名时加上特定标识,避免重名。
长度为4~15个字符,必须以英文字符或中文字符开头,可包含英文字符、中文字符、数字和下划线(_)。 |
Tags | List | 否 | 是 | 标签 | 最多设置20个标签。 |
Description | String | 否 | 是 | App描述信息 | 长度不超过180个字符。 |
Tags语法
"Tags": [
{
"Value": String,
"Key": String
}
]
Tags属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
---|---|---|---|---|---|
Key | String | 是 | 否 | 标签键 | 无 |
Value | String | 否 | 否 | 标签值 | 无 |
返回值
Fn::GetAtt
- AppKey:App的密钥。
- AppSecret:App的密码。
- AppId:App的ID。
- Tags:标签。
示例
JSON
格式
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"Description": {
"Type": "String",
"Description": "Description of the App, less than 180 characters."
},
"Tags": {
"Type": "Json",
"Description": "Tags to attach to app. Max support 20 tags to add during create app. Each tag with two properties Key and Value, and Key is required.",
"MaxLength": 20
},
"AppName": {
"Type": "String",
"Description": "The name of the App.Need [4, 15] Chinese\\English\\Number characters or \"_\",and should start with Chinese/English character."
}
},
"Resources": {
"APP": {
"Type": "ALIYUN::ApiGateway::App",
"Properties": {
"Description": {
"Ref": "Description"
},
"Tags": {
"Ref": "Tags"
},
"AppName": {
"Ref": "AppName"
}
}
}
},
"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"
]
}
},
"Tags": {
"Description": "Tags of app",
"Value": {
"Fn::GetAtt": [
"APP",
"Tags"
]
}
}
}
}
YAML
格式
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
Description:
Type: String
Description: 'Description of the App, less than 180 characters.'
Tags:
Type: Json
Description: >-
Tags to attach to app. Max support 20 tags to add during create app. Each
tag with two properties Key and Value, and Key is required.
MaxLength: 20
AppName:
Type: String
Description: >-
The name of the App.Need [4, 15] Chinese\English\Number characters or
"_",and should start with Chinese/English character.
Resources:
APP:
Type: 'ALIYUN::ApiGateway::App'
Properties:
Description:
Ref: Description
Tags:
Ref: Tags
AppName:
Ref: AppName
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
Tags:
Description: Tags of app
Value:
'Fn::GetAtt':
- APP
- Tags
在文档使用中是否遇到以下问题
更多建议
匿名提交