Todos os produtos
Search
Central de documentação

Resource Orchestration Service:DATASOURCE::MNS::Subscription

Última atualização: Jun 27, 2026

Consulta os detalhes de uma assinatura do MNS.

Sintaxe

{
  "Type": "DATASOURCE::MNS::Subscription",
  "Properties": {
    "SubscriptionName": String,
    "TopicName": String,
    "RefreshOptions": String
  }
}

Propriedades

Propriedade

Tipo

Obrigatória

Editável

Descrição

Restrição

SubscriptionName

String

Sim

Sim

Nome da assinatura.

Nenhuma.

TopicName

String

Sim

Sim

Nome do tópico.

Nenhuma.

RefreshOptions

String

Não

Sim

Política de atualização dos recursos de source de dados ao atualizar a pilha.

Valores válidos:

  • Never (padrão): não atualiza os recursos de source de dados durante a atualização da pilha.

  • Always: atualiza os recursos de source de dados durante a atualização da pilha.

Valores de retorno

Fn::GetAtt

  • SubscriptionURL: URL da assinatura.

  • TopicOwner: ID da conta do proprietário do tópico.

  • Endpoint: endpoint usado para receber mensagens da assinatura.

  • CreateTime: hora de criação da assinatura.

  • NotifyStrategy: política de nova tentativa aplicada se ocorrer um erro durante o envio de mensagens para o endpoint.

  • NotifyContentFormat: formato das mensagens enviadas ao endpoint.

  • FilterTag: tag de filtragem de mensagens especificada na assinatura.

  • SubscriptionName: nome da assinatura.

  • LastModifyTime: hora da última modificação da assinatura.

  • TopicName: nome do tópico.

Exemplos

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  SubscriptionName:
    Type: String
    Description:
      en: The name of the subscription.
    Required: true
  TopicName:
    Type: String
    Description:
      en: The name of the topic.
    Required: true
Resources:
  ExtensionDataSource:
    Type: DATASOURCE::MNS::Subscription
    Properties:
      SubscriptionName:
        Ref: SubscriptionName
      TopicName:
        Ref: TopicName
Outputs:
  SubscriptionURL:
    Description: TThe URL of the subscription.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - SubscriptionURL
  TopicOwner:
    Description: The owner of the topic.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - TopicOwner
  Endpoint:
    Description: The endpoint that is used by the subscriber to receive messages.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - Endpoint
  CreateTime:
    Description: The time when the subscription was created.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - CreateTime
  NotifyStrategy:
    Description: The retry policy that is applied if an error occurs when Message Service (MNS) pushes messages to the endpoint.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - NotifyStrategy
  NotifyContentFormat:
    Description: The format of the message that is pushed to the endpoint.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - NotifyContentFormat
  FilterTag:
    Description: Describes the labels by which messages are filtered in this subscription (only messages with consistent labels are pushed).
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - FilterTag
  SubscriptionName:
    Description: The name of the subscription.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - SubscriptionName
  LastModifyTime:
    Description: The time when the subscription was last modified.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - LastModifyTime
  TopicName:
    Description: The name of the topic.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - TopicName
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "SubscriptionName": {
      "Type": "String",
      "Description": {
        "en": "The name of the subscription."
      },
      "Required": true
    },
    "TopicName": {
      "Type": "String",
      "Description": {
        "en": "The name of the topic."
      },
      "Required": true
    }
  },
  "Resources": {
    "ExtensionDataSource": {
      "Type": "DATASOURCE::MNS::Subscription",
      "Properties": {
        "SubscriptionName": {
          "Ref": "SubscriptionName"
        },
        "TopicName": {
          "Ref": "TopicName"
        }
      }
    }
  },
  "Outputs": {
    "SubscriptionURL": {
      "Description": "TThe URL of the subscription.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "SubscriptionURL"
        ]
      }
    },
    "TopicOwner": {
      "Description": "The owner of the topic.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "TopicOwner"
        ]
      }
    },
    "Endpoint": {
      "Description": "The endpoint that is used by the subscriber to receive messages.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "Endpoint"
        ]
      }
    },
    "CreateTime": {
      "Description": "The time when the subscription was created.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "CreateTime"
        ]
      }
    },
    "NotifyStrategy": {
      "Description": "The retry policy that is applied if an error occurs when Message Service (MNS) pushes messages to the endpoint.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "NotifyStrategy"
        ]
      }
    },
    "NotifyContentFormat": {
      "Description": "The format of the message that is pushed to the endpoint.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "NotifyContentFormat"
        ]
      }
    },
    "FilterTag": {
      "Description": "Describes the labels by which messages are filtered in this subscription (only messages with consistent labels are pushed).",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "FilterTag"
        ]
      }
    },
    "SubscriptionName": {
      "Description": "The name of the subscription.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "SubscriptionName"
        ]
      }
    },
    "LastModifyTime": {
      "Description": "The time when the subscription was last modified.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "LastModifyTime"
        ]
      }
    },
    "TopicName": {
      "Description": "The name of the topic.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "TopicName"
        ]
      }
    }
  }
}