Todos os produtos
Search
Central de documentação

Resource Orchestration Service:ALIYUN::KAFKA::Acl

Última atualização: Jun 27, 2026

Cria uma lista de controle de acesso (ACL) para uma instância do ApsaraMQ for Kafka.

Sintaxe

{
  "Type": "ALIYUN::KAFKA::Acl",
  "Properties": {
    "AclResourceName": String,
    "AclOperationTypes": List,
    "AclResourceType": String,
    "AclResourcePatternType": String,
    "InstanceId": String,
    "Username": String,
    "AclPermissionType": String,
    "Host": String
  }
}

Propriedades

Propriedade

Tipo

Obrigatória

Editável

Descrição

Restrição

AclResourceName

String

Sim

Não

Nome do recurso.

  • O valor pode ser um nome de tópico, ID de grupo, nome de cluster ou ID de transação.

  • Use um asterisco (*) para especificar todos os recursos do tipo indicado.

Nota

A consulta de recursos autorizados com asterisco (*) só é possível após a concessão das permissões necessárias em todos os recursos.

AclOperationTypes

List

Sim

Não

Tipos de operações permitidas.

Separe várias operações por vírgulas (,).

Valores válidos:

  • Write: operações de escrita.

  • Read: operações de leitura.

  • Describe: leituras de IDs de transação.

  • IdempotentWrite: gravações idempotentes de dados em clusters.

  • IDEMPOTENT_WRITE: gravações idempotentes de dados em clusters. Este valor está disponível apenas para instâncias do ApsaraMQ for Kafka V3.

  • DESCRIBE_CONFIGS: consultas de configurações. Disponível apenas para instâncias do ApsaraMQ for Kafka V3.

Nota

Esta propriedade está disponível apenas para instâncias serverless do ApsaraMQ for Kafka V3.

AclResourceType

String

Sim

Não

Tipo de recurso.

Valores válidos:

  • Topic: tópico

  • Group: grupo de consumidores

  • Cluster: cluster

  • TransactionalId: ID de transação

AclResourcePatternType

String

Sim

Não

Modo de correspondência.

Valores válidos:

  • LITERAL: correspondência exata

  • PREFIXED: correspondência por prefixo

InstanceId

String

Sim

Não

ID da instância.

Nenhuma.

Username

String

Sim

Não

Nome de usuário.

  • Use um asterisco (*) para especificar todos os nomes de usuário.

Nota

A consulta de usuários autorizados com asterisco (*) só é possível após a concessão das permissões necessárias a todos os usuários.

AclPermissionType

String

Não

Não

Tipo de autorização.

Valores válidos:

  • DENY

  • ALLOW

Nota

Esta propriedade está disponível apenas para instâncias serverless do ApsaraMQ for Kafka V3.

Host

String

Não

Não

Endereço IP de source.

Nota

Especifique apenas um endereço IP específico ou use um asterisco (*) para abranger todos os endereços IP. Blocos CIDR não são suportados.

Disponível apenas para instâncias serverless do ApsaraMQ for Kafka V3.

Valores de retorno

Fn::GetAtt

  • InstanceId: o ID da instância.

  • Username: o nome de usuário.

  • AclResourceType: o tipo de recurso.

Exemplos

  • YAML format

    ROSTemplateFormatVersion: '2015-09-01'
    Parameters:
      AclResourceName:
        Type: String
        Description:
          en: |-
            The resource name.
            The value can be a topic name, a group ID, a cluster name, or a transaction ID.
            You can use an asterisk (*) to specify the names of all resources of the specified type.
            Note You can use an asterisk (*) to query the resources on which permissions are granted only after you grant the user the required permissions on all resources.
        Required: true
        MinLength: 1
        MaxLength: 256
      AclOperationTypes:
        AssociationPropertyMetadata:
          Parameter:
            Type: String
            Description:
              en: |-
                The type of the operation allowed by the access control list (ACL). Valid values:
                Write
                Read
                Describe: reads of transactional IDs.
                IdempotentWrite: idempotent data writes to clusters.
                IDEMPOTENT_WRITE: idempotent data writes to clusters. This value isavailable only for ApsaraMQ for Kafka V3 instances.
            AllowedValues:
              - Write
              - Read
              - Describe
              - IdempotentWrite
              - IDEMPOTENT_WRITE
              - DESCRIBE_CONFIGS
            Required: true
        AssociationProperty: List[Parameter]
        Type: Json
        Description:
          en: The types of operations allowed by the ACL.
        Required: true
        MinLength: 1
        MaxLength: 10
      Username:
        Type: String
        Description:
          en: |-
            The username.
            You can use an asterisk (*) to specify all usernames.
            Note You can use an asterisk (*) to query the authorized users only after you grant the required permissions to all users.
        AllowedPattern: ^[a-zA-Z][a-zA-Z0-9_]{2,63}$
        Required: true
      InstanceId:
        Type: String
        Description:
          en: The instance ID.
        Required: true
        MinLength: 1
        MaxLength: 64
      AclResourceType:
        Type: String
        Description:
          en: |-
            The resource type. Valid values:
            Topic
            Group
            Cluster
            TransactionalId: transactional ID
        AllowedValues:
          - Cluster
          - Group
          - Topic
          - TransactionalId
        Required: true
      AclResourcePatternType:
        Type: String
        Description:
          en: |-
            The matching mode. Valid values:
            LITERAL: exact match
            PREFIXED: prefix match
        AllowedValues:
          - LITERAL
          - PREFIXED
        Required: true
    Resources:
      Acl:
        Type: ALIYUN::KAFKA::Acl
        Properties:
          AclResourceName:
            Ref: AclResourceName
          AclOperationTypes:
            Ref: AclOperationTypes
          Username:
            Ref: Username
          InstanceId:
            Ref: InstanceId
          AclResourceType:
            Ref: AclResourceType
          AclResourcePatternType:
            Ref: AclResourcePatternType
    Outputs:
      InstanceId:
        Description: The instance ID.
        Value:
          Fn::GetAtt:
            - Acl
            - InstanceId
      Username:
        Description: The username.
        Value:
          Fn::GetAtt:
            - Acl
            - Username
      AclResourceType:
        Description: The resource type.
        Value:
          Fn::GetAtt:
            - Acl
            - AclResourceType
  • JSON format

    {
      "ROSTemplateFormatVersion": "2015-09-01",
      "Parameters": {
        "AclResourceName": {
          "Type": "String",
          "Description": {
            "en": "The resource name.\nThe value can be a topic name, a group ID, a cluster name, or a transaction ID.\nYou can use an asterisk (*) to specify the names of all resources of the specified type.\nNote You can use an asterisk (*) to query the resources on which permissions are granted only after you grant the user the required permissions on all resources."
          },
          "Required": true,
          "MinLength": 1,
          "MaxLength": 256
        },
        "AclOperationTypes": {
          "AssociationPropertyMetadata": {
            "Parameter": {
              "Type": "String",
              "Description": {
                "en": "The type of the operation allowed by the access control list (ACL). Valid values:\nWrite\nRead\nDescribe: reads of transactional IDs.\nIdempotentWrite: idempotent data writes to clusters.\nIDEMPOTENT_WRITE: idempotent data writes to clusters. This value isavailable only for ApsaraMQ for Kafka V3 instances."
              },
              "AllowedValues": [
                "Write",
                "Read",
                "Describe",
                "IdempotentWrite",
                "IDEMPOTENT_WRITE",
                "DESCRIBE_CONFIGS"
              ],
              "Required": true
            }
          },
          "AssociationProperty": "List[Parameter]",
          "Type": "Json",
          "Description": {
            "en": "The types of operations allowed by the ACL."
          },
          "Required": true,
          "MinLength": 1,
          "MaxLength": 10
        },
        "Username": {
          "Type": "String",
          "Description": {
            "en": "The username.\nYou can use an asterisk (*) to specify all usernames.\nNote You can use an asterisk (*) to query the authorized users only after you grant the required permissions to all users."
          },
          "AllowedPattern": "^[a-zA-Z][a-zA-Z0-9_]{2,63}$",
          "Required": true
        },
        "InstanceId": {
          "Type": "String",
          "Description": {
            "en": "The instance ID."
          },
          "Required": true,
          "MinLength": 1,
          "MaxLength": 64
        },
        "AclResourceType": {
          "Type": "String",
          "Description": {
            "en": "The resource type. Valid values:\nTopic\nGroup\nCluster\nTransactionalId: transactional ID"
          },
          "AllowedValues": [
            "Cluster",
            "Group",
            "Topic",
            "TransactionalId"
          ],
          "Required": true
        },
        "AclResourcePatternType": {
          "Type": "String",
          "Description": {
            "en": "The matching mode. Valid values:\nLITERAL: exact match\nPREFIXED: prefix match"
          },
          "AllowedValues": [
            "LITERAL",
            "PREFIXED"
          ],
          "Required": true
        }
      },
      "Resources": {
        "Acl": {
          "Type": "ALIYUN::KAFKA::Acl",
          "Properties": {
            "AclResourceName": {
              "Ref": "AclResourceName"
            },
            "AclOperationTypes": {
              "Ref": "AclOperationTypes"
            },
            "Username": {
              "Ref": "Username"
            },
            "InstanceId": {
              "Ref": "InstanceId"
            },
            "AclResourceType": {
              "Ref": "AclResourceType"
            },
            "AclResourcePatternType": {
              "Ref": "AclResourcePatternType"
            }
          }
        }
      },
      "Outputs": {
        "InstanceId": {
          "Description": "The instance ID.",
          "Value": {
            "Fn::GetAtt": [
              "Acl",
              "InstanceId"
            ]
          }
        },
        "Username": {
          "Description": "The username.",
          "Value": {
            "Fn::GetAtt": [
              "Acl",
              "Username"
            ]
          }
        },
        "AclResourceType": {
          "Description": "The resource type.",
          "Value": {
            "Fn::GetAtt": [
              "Acl",
              "AclResourceType"
            ]
          }
        }
      }
    }