Cria uma lista de controle de acesso (ACL) para o API Gateway.
Sintaxe
{
"Type": "ALIYUN::ApiGateway::AccessControl",
"Properties": {
"AccessControlListName": String,
"AddressIpVersion": String,
"AclEntrys": List
}
}
Propriedades
|
Parâmetro |
Tipo |
Obrigatório |
Atualize permitida |
Descrição |
Restrições |
|
AccessControlListName |
String |
Sim |
Não |
Nome da lista de controle de acesso (ACL). |
O nome deve ter de 1 a 30 caracteres e pode conter letras, dígitos, pontos (.), hifens (-), barras (/) e sublinhados (_). O nome deve ser único na região. |
|
AclEntrys |
List |
Não |
Sim |
Lista de entradas da ACL. |
A lista aceita de 1 a 50 entradas. Cada entrada deve ser um bloco CIDR exclusivo. Entradas duplicadas são ignoradas. Para mais informações, consulte Propriedades de AclEntrys. |
|
AddressIpVersion |
String |
Não |
Não |
Versão de IP da ACL. |
Valores válidos:
|
Sintaxe de AclEntrys
"AclEntrys": [
{
"AclEntryComment": String,
"AclEntryIp": String
}
]
Propriedades de AclEntrys
|
Parâmetro |
Tipo |
Obrigatório |
Atualize permitida |
Descrição |
Restrições |
|
AclEntryComment |
String |
Não |
Sim |
Descrição da entrada da ACL. |
Nenhuma |
|
AclEntryIp |
String |
Não |
Sim |
Bloco CIDR da entrada da ACL. |
A entrada deve ser um bloco CIDR. |
Valores de retorno
Fn::GetAtt
AddressIpVersion: Versão de IP da ACL.
AccessControlListName: Nome da ACL.
AclEntrys: Lista de entradas da ACL.
AclId: ID da lista de controle de acesso (ACL).
Exemplos
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
AddressIpVersion:
Type: String
Description: 'The IP version. Valid values: ipv4 and ipv6.'
AllowedValues:
- ipv4
- ipv6
Required: false
AccessControlListName:
Type: String
Description: The name of the ACL. The name must be 1 to 30 characters long, and can contain letters, digits, periods (.), hyphens (-), forward slashes (/), and underscores (_). The name must be unique within the region.
Required: true
MinLength: 1
MaxLength: 30
AclEntrys:
AssociationPropertyMetadata:
Parameters:
AclEntryComment:
Type: String
Description: The description of the ACL entry.
Required: false
AclEntryIp:
Type: String
Description: A single IP address or CIDR block to add to the ACL.
Required: false
AssociationProperty: List[Parameters]
Type: Json
Description: A list of access control entries. You can add up to 50 IP addresses or CIDR blocks to an ACL in each call. If an IP address or CIDR block already exists in the ACL, it is ignored. The entries that you add must be CIDR blocks.
Required: false
MinLength: 1
MaxLength: 50
Resources:
ExtensionResource:
Type: ALIYUN::ApiGateway::AccessControl
Properties:
AddressIpVersion:
Ref: AddressIpVersion
AccessControlListName:
Ref: AccessControlListName
AclEntrys:
Ref: AclEntrys
Outputs:
AddressIpVersion:
Description: 'The IP version. Valid values: ipv4 and ipv6.'
Value:
Fn::GetAtt:
- ExtensionResource
- AddressIpVersion
AccessControlListName:
Description: The name of the ACL.
Value:
Fn::GetAtt:
- ExtensionResource
- AccessControlListName
AclEntrys:
Description: A list of access control entries.
Value:
Fn::GetAtt:
- ExtensionResource
- AclEntrys
AclId:
Description: The ID of the access control list (ACL).
Value:
Fn::GetAtt:
- ExtensionResource
- AclId
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"AddressIpVersion": {
"Type": "String",
"Description": "The IP version. Valid values: ipv4 and ipv6.",
"AllowedValues": [
"ipv4",
"ipv6"
],
"Required": false
},
"AccessControlListName": {
"Type": "String",
"Description": "The name of the ACL. The name must be 1 to 30 characters long, and can contain letters, digits, periods (.), hyphens (-), forward slashes (/), and underscores (_). The name must be unique within the region.",
"Required": true,
"MinLength": 1,
"MaxLength": 30
},
"AclEntrys": {
"AssociationPropertyMetadata": {
"Parameters": {
"AclEntryComment": {
"Type": "String",
"Description": "The description of the ACL entry.",
"Required": false
},
"AclEntryIp": {
"Type": "String",
"Description": "A single IP address or CIDR block to add to the ACL.",
"Required": false
}
}
},
"AssociationProperty": "List[Parameters]",
"Type": "Json",
"Description": "A list of access control entries. You can add up to 50 IP addresses or CIDR blocks to an ACL in each call. If an IP address or CIDR block already exists in the ACL, it is ignored. The entries that you add must be CIDR blocks.",
"Required": false,
"MinLength": 1,
"MaxLength": 50
}
},
"Resources": {
"ExtensionResource": {
"Type": "ALIYUN::ApiGateway::AccessControl",
"Properties": {
"AddressIpVersion": {
"Ref": "AddressIpVersion"
},
"AccessControlListName": {
"Ref": "AccessControlListName"
},
"AclEntrys": {
"Ref": "AclEntrys"
}
}
}
},
"Outputs": {
"AddressIpVersion": {
"Description": "The IP version. Valid values: ipv4 and ipv6.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"AddressIpVersion"
]
}
},
"AccessControlListName": {
"Description": "The name of the ACL.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"AccessControlListName"
]
}
},
"AclEntrys": {
"Description": "A list of access control entries.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"AclEntrys"
]
}
},
"AclId": {
"Description": "The ID of the access control list (ACL).",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"AclId"
]
}
}
}
}