O recurso ALIYUN::ApiGateway::Plugin cria um plug-in do API Gateway.
Sintaxe
{
"Type": "ALIYUN::ApiGateway::Plugin",
"Properties": {
"PluginName": String,
"Description": String,
"PluginData": String,
"PluginType": String,
"Tags": List
}
}
Propriedades
Propriedade | Tipo | Obrigatório | Editável | Descrição | Restrição |
PluginData | String | Sim | Sim | Definição do plug-in. | Especifique a definição no formato JSON ou YAML. |
PluginName | String | Sim | Sim | Nome do plug-in. | O nome deve ter de 4 a 50 caracteres e pode conter letras, dígitos e hifens (-). O nome não pode começar com hífen (-). |
PluginType | String | Sim | Não | Tipo do plug-in. | Valores válidos:
|
Description | String | Não | Sim | Descrição do plug-in. | A descrição pode ter até 200 caracteres. |
Tags | List | Não | Sim | Tags do plug-in. | Adicione até 20 tags ao plug-in. Para mais informações, consulte Propriedades de Tags. |
Sintaxe de Tags
"Tags": [
{
"Key": String,
"Value": String
}
]
Propriedades de Tags
|
Propriedade |
Tipo |
Obrigatório |
Editável |
Descrição |
Restrição |
|
Key |
String |
Sim |
Não |
Chave da tag. |
A chave da tag deve ter de 1 a 128 caracteres e não pode conter |
|
Value |
String |
Não |
Não |
Valor da tag. |
O valor da tag pode ter até 128 caracteres e não pode conter |
Valores de retorno
Fn::GetAtt
Description: descrição do plug-in.
PluginName: nome do plug-in.
PluginData: definição do plug-in.
PluginId: ID do plug-in.
PluginType: tipo do plug-in.
Exemplos
Formato YAML
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
Description:
Description: The description of the plug-in, which cannot exceed 200 characters.
Type: String
PluginData:
Description: The definition statement of the plug-in. Plug-in definition statements
in the JSON and YAML formats are supported.
Type: String
PluginName:
Description: The name of the plug-in that you want to create. It can contain uppercase
English letters, lowercase English letters, Chinese characters, numbers, and
underscores (). It must be 4 to 50 characters in length and cannot start with
an underscore ().
Type: String
PluginType:
Description: 'The type of the plug-in. Valid values: ipControl: indicates IP address-based
access control. trafficControl: indicates throttling. backendSignature: indicates
backend signature. jwtAuth: indicates JWT (OpenId Connect). cors: indicates
cross-origin resource access (CORS). caching: indicates caching.'
Type: String
Resources:
ApiGatewayPlugin:
Properties:
Description:
Ref: Description
PluginData:
Ref: PluginData
PluginName:
Ref: PluginName
PluginType:
Ref: PluginType
Type: ALIYUN::ApiGateway::Plugin
Outputs:
Description:
Description: The description of the plug-in, which cannot exceed 200 characters.
Value:
Fn::GetAtt:
- ApiGatewayPlugin
- Description
PluginData:
Description: The definition statement of the plug-in. Plug-in definition statements
in the JSON and YAML formats are supported.
Value:
Fn::GetAtt:
- ApiGatewayPlugin
- PluginData
PluginId:
Description: The generated plugin ID.
Value:
Fn::GetAtt:
- ApiGatewayPlugin
- PluginId
PluginName:
Description: The name of the plug-in that you want to create. It can contain uppercase
English letters, lowercase English letters, Chinese characters, numbers, and
underscores (). It must be 4 to 50 characters in length and cannot start with
an underscore ().
Value:
Fn::GetAtt:
- ApiGatewayPlugin
- PluginName
PluginType:
Description: 'The type of the plug-in. Valid values: ipControl: indicates IP address-based
access control. trafficControl: indicates throttling. backendSignature: indicates
backend signature. jwtAuth: indicates JWT (OpenId Connect). cors: indicates
cross-origin resource access (CORS). caching: indicates caching.'
Value:
Fn::GetAtt:
- ApiGatewayPlugin
- PluginType
Formato JSON
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"PluginName": {
"Type": "String",
"Description": "The name of the plug-in that you want to create. It can contain uppercase English letters, lowercase English letters, Chinese characters, numbers, and underscores (). It must be 4 to 50 characters in length and cannot start with an underscore ()."
},
"Description": {
"Type": "String",
"Description": "The description of the plug-in, which cannot exceed 200 characters."
},
"PluginData": {
"Type": "String",
"Description": "The definition statement of the plug-in. Plug-in definition statements in the JSON and YAML formats are supported."
},
"PluginType": {
"Type": "String",
"Description": "The type of the plug-in. Valid values: ipControl: indicates IP address-based access control. trafficControl: indicates throttling. backendSignature: indicates backend signature. jwtAuth: indicates JWT (OpenId Connect). cors: indicates cross-origin resource access (CORS). caching: indicates caching."
}
},
"Resources": {
"ApiGatewayPlugin": {
"Type": "ALIYUN::ApiGateway::Plugin",
"Properties": {
"PluginName": {
"Ref": "PluginName"
},
"Description": {
"Ref": "Description"
},
"PluginData": {
"Ref": "PluginData"
},
"PluginType": {
"Ref": "PluginType"
}
}
}
},
"Outputs": {
"Description": {
"Description": "The description of the plug-in, which cannot exceed 200 characters.",
"Value": {
"Fn::GetAtt": [
"ApiGatewayPlugin",
"Description"
]
}
},
"PluginName": {
"Description": "The name of the plug-in that you want to create. It can contain uppercase English letters, lowercase English letters, Chinese characters, numbers, and underscores (). It must be 4 to 50 characters in length and cannot start with an underscore ().",
"Value": {
"Fn::GetAtt": [
"ApiGatewayPlugin",
"PluginName"
]
}
},
"PluginData": {
"Description": "The definition statement of the plug-in. Plug-in definition statements in the JSON and YAML formats are supported.",
"Value": {
"Fn::GetAtt": [
"ApiGatewayPlugin",
"PluginData"
]
}
},
"PluginId": {
"Description": "The generated plugin ID.",
"Value": {
"Fn::GetAtt": [
"ApiGatewayPlugin",
"PluginId"
]
}
},
"PluginType": {
"Description": "The type of the plug-in. Valid values: ipControl: indicates IP address-based access control. trafficControl: indicates throttling. backendSignature: indicates backend signature. jwtAuth: indicates JWT (OpenId Connect). cors: indicates cross-origin resource access (CORS). caching: indicates caching.",
"Value": {
"Fn::GetAtt": [
"ApiGatewayPlugin",
"PluginType"
]
}
}
}
}