Cria um grupo de consumidores para uma instância do ApsaraMQ for Kafka.
Sintaxe
{
"Type": "ALIYUN::KAFKA::ConsumerGroup",
"Properties": {
"InstanceId": String,
"ConsumerId": String,
"Tags": List,
"Remark": String
}
}
Propriedades
|
Propriedade |
Tipo |
Obrigatória |
Editável |
Descrição |
Restrição |
|
InstanceId |
String |
Sim |
Não |
ID da instância do ApsaraMQ for Kafka. |
Nenhuma. |
|
ConsumerId |
String |
Sim |
Não |
Nome do grupo de consumidores. |
O nome deve atender aos seguintes requisitos:
|
|
Tags |
List |
Não |
Sim |
Tags do grupo de consumidores. |
Adicione de 1 a 20 tags. Para mais informações, consulte Propriedades de Tags. |
|
Remark |
String |
Não |
Não |
Descrição do grupo de consumidores. |
Nenhuma. |
Sintaxe de Tags
"Tags": [
{
"Value": String,
"Key": String
}
]
Propriedades de Tags
|
Propriedade |
Tipo |
Obrigatória |
Editável |
Descrição |
Restrição |
|
Value |
String |
Não |
Não |
Valor da tag do grupo de consumidores. |
|
|
Key |
String |
Sim |
Não |
Chave da tag do grupo de consumidores. |
|
Valores de retorno
Fn::GetAtt
ConsumerId: ID do grupo de consumidores.
Arn: Alibaba Cloud Resource Name (ARN).
Exemplos
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
ConsumerId:
Description:
en: 'Group name. Value:
Can only contain letters, numbers, dashes (-), underscores (_), and at least
one English or number.
The length is limited to 3 to 128 characters, and more than 128 characters
will be automatically intercepted.
Once the group name is created, it cannot be modified.'
Type: String
InstanceId:
Description:
en: Kafka instance id.
Type: String
Remark:
Description:
en: Remark description.
Type: String
Resources:
ConsumerGroup:
Properties:
ConsumerId:
Ref: ConsumerId
InstanceId:
Ref: InstanceId
Remark:
Ref: Remark
Type: ALIYUN::KAFKA::ConsumerGroup
Outputs:
ConsumerId:
Description: Consumer group ID
Value:
Fn::GetAtt:
- ConsumerGroup
- ConsumerId
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"InstanceId": {
"Type": "String",
"Description": {
"en": "Kafka instance id."
}
},
"ConsumerId": {
"Type": "String",
"Description": {
"en": "Group name. Value:\nCan only contain letters, numbers, dashes (-), underscores (_), and at least one English or number.\nThe length is limited to 3 to 128 characters, and more than 128 characters will be automatically intercepted.\nOnce the group name is created, it cannot be modified."
}
},
"Remark": {
"Type": "String",
"Description": {
"en": "Remark description."
}
}
},
"Resources": {
"ConsumerGroup": {
"Type": "ALIYUN::KAFKA::ConsumerGroup",
"Properties": {
"InstanceId": {
"Ref": "InstanceId"
},
"ConsumerId": {
"Ref": "ConsumerId"
},
"Remark": {
"Ref": "Remark"
}
}
}
},
"Outputs": {
"ConsumerId": {
"Description": "Consumer group ID",
"Value": {
"Fn::GetAtt": [
"ConsumerGroup",
"ConsumerId"
]
}
}
}
}