Configure data delivery to MNS

更新时间:
复制 MD 格式

Cloud Config delivers resource change logs and non-compliance events to a specified topic in Simple Message Queue (MNS). You can configure the push method and content for the topic.

Prerequisites

  • Make sure you have enabled Simple Message Queue (MNS). For more information, see Enable Simple Message Queue (MNS) and grant permissions.

    Important

    Enabling Simple Message Queue (MNS) is free of charge. However, charges apply when Cloud Config delivers data to MNS. For more information, see Billing.

  • If you need to deliver large files to a bucket in Object Storage Service (OSS), you must enable OSS and create a bucket. For more information, see Quick start for the console.

    Note

    Make sure that the Region, Account, and Bucket Name specified for the large file delivery address are the same as those for the standard file delivery address.

Background information

To stop incurring MNS fees, delete the topic in the MNS console. Deleting the topic disables the Cloud Config delivery task and stops data delivery. For more information, see Delete a topic.

Procedure

  1. Log on to the Cloud Config console.

  2. Optional. In the upper-left corner, select an account group.

    This operation is required only if you are using a management account of a resource directory. Otherwise, you do not need to perform the operation.

  3. In the left-side navigation pane, click Deliveries.

  4. On the Deliveries page, click Create Delivery in the upper-left corner.

  5. On the Create Delivery page, enter a Delivery Name, select Channel Type for Simple Message Queue (formerly MNS), and then configure the related parameters.

    The following table describes the delivery parameters.

    Parameter

    Description

    Content

    The type of data to deliver to the MNS topic. Valid values:

    • Historical Configuration Changes: When a resource configuration changes, Cloud Config delivers the change log to the MNS topic.

    • Non-compliance Events: When a resource is evaluated as non-compliant, Cloud Config delivers the non-compliance event to the MNS topic.

    Topic Source

    The source of the topic. Valid values:

    • Create a topic in the account.: Creates a topic in the Cloud Config console. You must specify a topic name, region, maximum message size, and enable logging. The topic name must be unique within the same account and region.

    • Select an existing topic from the account.: Selects an existing topic from MNS. You must specify the topic name, region, maximum message size, and enable logging.

    • Select an existing topic from other accounts (This option is available only for management accounts or delegated administrator accounts): The Alibaba Cloud Resource Name (ARN) of the topic in the destination account. The ARN includes the Region, Members, and Topic Name.

      Member accounts cannot configure data delivery and instead deliver data based on the settings of the management account.

      Note

      If the management account has configured a delegated administrator account for Cloud Config, the delegated administrator account can configure data delivery on behalf of the management account. For more information about how to add a delegated administrator account, see Add a delegated administrator account.

    Minimum Risk Level of the Events to Subscribe

    The minimum risk level of non-compliance events to deliver. Valid values:

    • All Levels

    • High

    • Medium

    • Low

    For example, if you select Medium, Cloud Config sends you non-compliance events of Medium and High risk levels but filters out those of Low risk level.

    Events of Specified Resource Type

    The resource types for which data will be delivered. For a list of resource types supported by Cloud Config, see Supported resource types and resource relationships.

    Recipient Address For Large Files

    The destination for large files delivered to MNS.

    • If you configure this parameter, when a file delivered to MNS exceeds 64 KB, Cloud Config automatically transfers it to the specified OSS bucket.

    • If you do not configure this parameter, Cloud Config automatically discards the excess portion of files larger than 64 KB.

  6. Click OK.

  7. (Optional) In the Confirm Operation dialog box, click OK.

    This operation is required only if you are using a management account of a resource directory. Otherwise, you do not need to perform the operation.

    Note

    The new delivery applies only to all members in the current account group.

Next steps

View the delivery results and download the JSON files.

  1. On the Deliveries page, click the ID of the delivery you created.

  2. In the Extended Information section of the target delivery, click the topic name.

    You are redirected to the topic list page in the MNS console. You can configure the push method and content for the destination topic. For more information, see Publish a message.

    For examples of the content in the JSON files, see Example of a resource change log and Example of a resource non-compliance event.