Cloud Config allows you to specify a Message Service (MNS) topic to receive the notifications of resource change events, resource non-compliance events, and resource snapshot delivery events. You can also specify the push method and content of the topic.

Prerequisites

MNS is activated. For more information, see Activate MNS and authorize RAM users to access MNS.

Use an ordinary account

You can specify an MNS topic to receive the notifications of the resource events that belong to your Alibaba Cloud account.

  1. Log on to the Cloud Config console.
  2. In the left-side navigation pane, choose Delivery Services > Deliver Data to Message Service.
  3. On the Deliver Data to Message Service page, turn on MNS Settings.
  4. Set the required parameters to specify an MNS topic to receive the notifications of resource events.

    The following table describes the parameters.

    Parameter Description
    Select Acceptable Content
    The type of event whose notifications are to be sent to the MNS topic. Valid values:
    • Historical Configuration Changes: the configuration change events. Cloud Config sends notifications to the MNS topic when the configurations of resources change.
    • Non-compliance Events: the resource non-compliance events. If a resource is evaluated as non-compliant, Cloud Config sends notifications to the MNS topic.
    MNS Region The region where the MNS topic resides.
    Topic Name The name of the MNS topic. The topic name must be unique within your Alibaba Cloud account in the specified region.
    • If you select Create a topic in the account, you must specify a topic name.
    • If you select Select an existing topic from the account, you must select an existing topic from the Topic Name drop-down list.
    Maximum Message Size (Byte) The maximum length of the notification body that can be sent to the topic. Unit: byte. Valid values: 1024 to 65536. Default value: 65536.
    Note We recommend that you set this parameter to a value greater than or equal to 8192. Otherwise, the notification delivery may fail due to the length limit.
    Enable Logging Specifies whether to store the operation logs of the MNS topic in the associated Log Service Logstore. The operation logs are generated when notifications are received, forwarded, and deleted.
    Minimum Risk Level of the Events to Subscribe The lowest risk level of the events to which you want to subscribe. Valid values:
    • All Risk Levels
    • High Risk
    • Medium Risk
    • Low Risk

    For example, if you select Medium Risk, Cloud Config sends notifications of the non-compliance events at the Medium Risk and High Risk levels. The non-compliance events at the Low Risk level are ignored.

    Resources to Subscribe The types of the resources whose events you want to subscribe to. Valid values:
    • All Supported Resource Types: Subscribe to the events of all supported types of resources. If a new service is integrated with Cloud Config, the resource type of the service is automatically added to the monitoring scope.
    • Custom Resource Types: Subscribe to the events of the specified types of resources.
    Recipient Address for Large Files
    The Object Storage Service (OSS) bucket that is used to receive the large files that Cloud Config sends to the MNS topic.
    • If you set this parameter, a file that Cloud Config sends to the MNS topic is automatically transferred to the specified OSS bucket when the file size exceeds 64 KB.
    • If you leave this parameter empty, the excess part of a file that Cloud Config sends to the MNS topic is automatically truncated when the file size exceeds 64 KB.
    Note The Region and Account parameters are automatically set based on the settings in the Content and Recipient Address section. You need only to select the bucket to receive the large files that exceed 64 KB in size.
  5. Click OK.

Use a management account

You can use a management account to specify an MNS topic to receive the notifications of the resource events of the management account and its member accounts. Only management accounts are authorized to configure the subscription settings of resource events. No member accounts have the relevant permissions.

  1. Log on to the Cloud Config console.
  2. In the left-side navigation pane, choose Delivery Services > Deliver Data to Message Service.
  3. On the Deliver Data to Message Service page, turn on MNS Settings.
  4. Set the required parameters to specify an MNS topic to receive the notifications of resource events.
    You can create an MNS topic within the management account, or select an existing MNS topic that belongs to the management account or a member account. The specified MNS topic receives the notifications of the resource events that occur within the management account and its member accounts.
    • To send notifications of resource events to a topic that belongs to the management account, select Create a topic in the account or Select an existing topic from the account, and then set the required parameters. The following table describes the parameters.
      Parameter Description
      Select Acceptable Content
      The type of event whose notifications are to be sent to the MNS topic. Valid values:
      • Historical Configuration Changes: the configuration change events. Cloud Config sends notifications to the MNS topic when the configurations of resources change.
      • Non-compliance Events: the resource non-compliance events. If a resource is evaluated as non-compliant, Cloud Config sends notifications to the MNS topic.
      MNS Region The region where the MNS topic resides.
      Topic Name The name of the MNS topic. The topic name must be unique within the management account in the specified region.
      • If you select Create a topic in the account, you must specify a topic name.
      • If you select Select an existing topic from the account, you must select an existing topic from the Topic Name drop-down list.
      Maximum Message Size (Byte) The maximum length of the notification body that can be sent to the topic. Unit: byte. Valid values: 1024 to 65536. Default value: 65536.
      Note We recommend that you set this parameter to a value greater than or equal to 8192. Otherwise, the notification delivery may fail due to the length limit.
      Enable Logging Specifies whether to store the operation logs of the MNS topic in the associated Log Service Logstore. The operation logs are generated when notifications are received, forwarded, and deleted.
      Minimum Risk Level of the Events to Subscribe The lowest risk level of the events to which you want to subscribe. Valid values:
      • All Risk Levels
      • High Risk
      • Medium Risk
      • Low Risk

      For example, if you select Medium Risk, Cloud Config sends notifications of the non-compliance events at the Medium Risk and High Risk levels. The non-compliance events at the Low Risk level are ignored.

      Resources to Subscribe The types of the resources whose events you want to subscribe to. Valid values:
      • All Supported Resource Types: Subscribe to the events of all supported types of resources. If a new service is integrated with Cloud Config, the resource type of the service is automatically added to the monitoring scope.
      • Custom Resource Types: Subscribe to the events of the specified types of resources.
      Recipient Address for Large Files
      The Object Storage Service (OSS) bucket that is used to receive the large files that Cloud Config sends to the MNS topic.
      • If you set this parameter, a file that Cloud Config sends to the MNS topic is automatically transferred to the specified OSS bucket when the file size exceeds 64 KB.
      • If you leave this parameter empty, the excess part of a file that Cloud Config sends to the MNS topic is automatically truncated when the file size exceeds 64 KB.
      Note The Region and Account parameters are automatically set based on the settings in the Content and Recipient Address section. You need only to select the bucket to receive the large files that exceed 64 KB in size.
    • To send notifications of resource events to a topic that belongs to a member account, select Select an existing topic from other enterprise management accounts, and then set the required parameters. Before you set the parameters, make sure that the member account has available topics. The following table describes the parameters.
      Parameter Description
      Select Acceptable Content
      The type of event whose notifications are to be sent to the MNS topic. Valid values:
      • Historical Configuration Changes: the configuration change events. Cloud Config sends notifications to the MNS topic when the configurations of resources change.
      • Non-compliance Events: the resource non-compliance events. If a resource is evaluated as non-compliant, Cloud Config sends notifications to the MNS topic.
      The ARN of the topic that belongs to the destination account The ARN of the topic within the member account. The ARN consists of the following information: the ID of the region where the topic resides, the ID of the member account, and the name of the topic. You can select the region from the Region drop-down list, the member account from the Member Accounts drop-down list, and the topic from the Topic Name drop-down list.
      The role ARN that belongs to the destination account The ARN of the role to be assumed by the member account. The ARN consists of the following information: the ID of the member account and the service-linked role for Cloud Config. You can select the member account from the drop-down list and use the default service-linked role.
      Minimum Risk Level of the Events to Subscribe The lowest risk level of the events to which you want to subscribe. Valid values:
      • All Risk Levels
      • High Risk
      • Medium Risk
      • Low Risk

      For example, if you select Medium Risk, Cloud Config sends notifications of the non-compliance events at the Medium Risk and High Risk levels. The non-compliance events at the Low Risk level are ignored.

      Resources to Subscribe The types of the resources whose events you want to subscribe to. Valid values:
      • All Supported Resource Types: Subscribe to the events of all supported types of resources. If a new service is integrated with Cloud Config, the resource type of the service is automatically added to the monitoring scope.
      • Custom Resource Types: Subscribe to the events of the specified types of resources.
      Recipient Address for Large Files
      The Object Storage Service (OSS) bucket that is used to receive the large files that Cloud Config sends to the MNS topic.
      • If you set this parameter, a file that Cloud Config sends to the MNS topic is automatically transferred to the specified OSS bucket when the file size exceeds 64 KB.
      • If you leave this parameter empty, the excess part of a file that Cloud Config sends to the MNS topic is automatically truncated when the file size exceeds 64 KB.
      Note The Region and Account parameters are automatically set based on the settings in the Content and Recipient Address section. You need only to select the bucket to receive the large files that exceed 64 KB in size.
  5. Click OK.
  6. In the The changes will apply to all member accounts in the organization. Are you sure you want to apply the changes? message, click OK.

What to do next

After the notifications of resource events are sent to the specified topic, you can log on to the MNS console to specify the push method and content of the topic. For more information, see Publish a message.