Vincula uma política de limitação personalizada a APIs.
Sintaxe
{
"Type": "ALIYUN::ApiGateway::TrafficControlBinding",
"Properties": {
"ApiIds": List,
"TrafficControlId": String,
"StageName": String,
"GroupId": String
}
}
Propriedades
|
Propriedade |
Tipo |
Obrigatório |
Editável |
Descrição |
Restrição |
|
ApiIds |
List |
Sim |
Sim |
IDs das APIs. |
Máximo: 100. |
|
GroupId |
String |
Sim |
Sim |
ID do grupo de APIs. |
Nenhuma. |
|
StageName |
String |
Sim |
Sim |
Ambiente de vinculação da política de limitação. |
Valores válidos:
|
|
TrafficControlId |
String |
Sim |
Sim |
ID da política de limitação. |
Nenhuma. |
Valores de retorno
Fn::GetAtt
Nenhum.
Exemplos
Formato YAML
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
TrafficControlId:
Type: String
Description: the ID of the throttling policy.
GroupId:
Type: String
Description: the ID of the API group.
ApiId:
Type: String
Description: the ID of the API to which the custom throttling policy is bound.
Resources:
TrafficControlBinding:
Type: ALIYUN::ApiGateway::TrafficControlBinding
Properties:
TrafficControlId:
Ref: TrafficControlId
GroupId:
Ref: GroupId
ApiIds:
- Ref: ApiId
StageName: RELEASE
Formato JSON
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"TrafficControlId": {
"Type": "String",
"Description": "the ID of the throttling policy."
},
"GroupId": {
"Type": "String",
"Description": "the ID of the API group."
},
"ApiId": {
"Type": "String",
"Description": "the ID of the API to which the custom throttling policy is bound."
}
},
"Resources": {
"TrafficControlBinding": {
"Type": "ALIYUN::ApiGateway::TrafficControlBinding",
"Properties": {
"TrafficControlId": {
"Ref": "TrafficControlId"
},
"GroupId": {
"Ref": "GroupId"
},
"ApiIds": [
{
"Ref": "ApiId"
}
],
"StageName": "RELEASE"
}
}
}
}