Create a delivery channel for your current Alibaba Cloud account to deliver scheduled resource snapshots and resource configuration change events to Object Storage Service (OSS) or Log Service (SLS). You can then consume the standardized resource data from OSS or SLS.
Prerequisites
You can use your Alibaba Cloud account (main account) or a RAM user under the main account to create a delivery channel. We recommend that you use a RAM user with the required permissions.
-
Permissions to manage delivery channels: Grant the following custom policy to a RAM user to allow them to manage delivery channels for the current account in Resource Center.
{ "Version": "1", "Statement": [{ "Effect": "Allow", "Action": [ "resourcecenter:CreateDeliveryChannel", "resourcecenter:UpdateDeliveryChannel", "resourcecenter:DeleteDeliveryChannel", "resourcecenter:ListDeliveryChannels", "resourcecenter:GetDeliveryChannel", "resourcecenter:GetDeliveryChannelStatistics" ], "Resource": [ "*" ] }] } -
Read-only permissions for cloud services: Grant the RAM user read-only permissions for the cloud services that provide the resources you want to deliver. For example, if a RAM user is granted the global ReadOnlyAccess policy, they can deliver information for all cloud resources in the account. If the RAM user is granted only the AliyunVPCReadOnlyAccess policy, they can deliver only information for VPC resources.
NoteThe delivery scope of a delivery channel is not affected by subsequent changes to the permissions of the RAM user who created it. For example, a RAM user has the required permissions to deliver VPC resources and creates a delivery channel for them. If the RAM user's read-only permissions for VPC resources are later revoked, the delivery channel continues to deliver VPC resource information.
For more information, see Create a custom policy and Manage the permissions of a RAM user.
Limitations
Each Alibaba Cloud account can have a maximum of five delivery channels for the current account.
Deliver scheduled resource snapshots
A resource snapshot is a complete copy of all resource configurations in a specified scope at a point in time. Resource Center delivers these snapshots to an OSS bucket on a scheduled basis.
Prerequisites
-
You have activated Object Storage Service (OSS). For more information, see Activate OSS.
-
Using OSS incurs fees. For more information, see OSS Pricing.
Procedure
-
Log on to the Resource Center console.
-
In the left-side navigation pane, choose .
-
On the Within Current Account tab, click Create Delivery Task.
-
Enter the basic information for the delivery channel and click Next.
Parameter
Description
Delivery Task Name
The name of the delivery channel.
Format: The value can contain Chinese characters, letters, digits, and the special characters
-_, with a maximum length of 64 characters.Description
The description of the delivery channel.
Format: The value can be up to 256 characters in length and can contain Chinese characters, letters, digits, and the special characters
-_.Resource Scope
-
All Resources: Delivers resource information for all resource types in the current account.
-
Custom Resource Scope: Delivers resource information only for the selected resource types.
Note-
For a list of supported resource types, see Cloud services and resource types that are supported by Resource Center.
-
If you select All Resources, new resource types supported by Resource Center are automatically included in the delivery scope.
-
-
Configure the delivery channel to deliver scheduled resource snapshots to the specified OSS bucket.
Parameter
Description
Resource Snapshot Delivery
Turn on this switch to enable resource snapshot delivery.
Delivery Channel
Object Storage Service (OSS).
Region
The region where the OSS bucket is located.
Bucket Name
The bucket name must be prefixed with
resourcecenter-.If you do not have a bucket, click Create to create one.
Daily Delivery Time
The time of day when resource snapshots are delivered.
-
Click Confirm.
Next steps
After delivery is configured, you can view resource snapshots in OSS or download the JSON files to your local machine. For more information, see View resource snapshots.
Deliver resource configuration change events
A resource configuration change event is generated when a resource is created, deleted, or modified. Resource Center delivers these events to an SLS Logstore.
Due to limitations in SLS, configuration change events that exceed 1 MB are discarded. To avoid this, you can enable oversized file delivery, which sends these large events to an OSS bucket instead.
Prerequisites
-
You have activated Log Service (SLS). For more information, see Activate Log Service.
-
Using SLS incurs fees. For more information, see SLS Pricing.
-
To enable oversized file delivery, you must also activate OSS. Using OSS incurs fees. For more information, see Activate OSS, OSS Pricing.
Procedure
-
Log on to the Resource Center console.
-
In the left-side navigation pane, choose .
-
On the Within Current Account tab, click Create Delivery Task.
-
Enter the basic information for the delivery channel and click Next.
Parameter
Description
Delivery Task Name
The name of the delivery channel.
Format: The value can contain Chinese characters, letters, digits, and the special characters
-_, with a maximum length of 64 characters.Description
The description of the delivery channel.
Format: The value can be up to 256 characters in length and can contain Chinese characters, letters, digits, and the special characters
-_.Resource Scope
-
All Resources: Delivers resource information for all resource types in the current account.
-
Custom Resource Scope: Delivers resource information only for the selected resource types.
Note-
For a list of supported resource types, see Cloud services and resource types that are supported by Resource Center.
-
If you select All Resources, new resource types supported by Resource Center are automatically included in the delivery scope.
-
-
Configure the delivery channel to deliver resource configuration change events to the specified SLS Logstore.
Parameter
Description
Resource Configuration Change Delivery
Enable this switch to deliver resource configuration change events.
Delivery Channel
Log Service (SLS).
Region
The region where the SLS Project is located.
Project Name
The name of the Project.
If you do not have a Project, click Create to create one.
Logstore Name
The Logstore name must be prefixed with
resourcecenter-.If you do not have a Logstore, click Create to create one. A new Logstore does not have any indexes preconfigured. To analyze the data, you must configure indexes on the Log Service console after you finish setting up the delivery channel.
If you select an existing Logstore, make sure that it is empty or that the existing data has the same structure as the data that will be delivered. Otherwise, you will not be able to query or analyze the data after it is delivered.
Large File Delivery
If you select Large File Delivery, when a resource configuration change event exceeds 1 MB, its basic information is delivered to the SLS Logstore and its detailed content is sent to an OSS bucket. If you do not select this option, events that exceed 1 MB are discarded.
NoteOversized file delivery requires you to specify an OSS bucket. You can use the same bucket as the one for resource snapshot delivery or select a different existing bucket.
-
Click Confirm.
Next steps
After delivery is configured, you can view resource configuration change events in SLS and run queries for analysis. For more information, see View resource configuration changes.
Related documents
-
When you create a delivery channel, a service-linked role named AliyunServiceRoleForResourceCenterDelivery is automatically created in your account. This role allows Resource Center to access your resources in other cloud services. For more information, see AliyunServiceRoleForResourceCenterDelivery.
-
For the structure and examples of data delivered to OSS or SLS, see Data structure of resource snapshots and Data structure of resource configuration change events.
-
You can view failed delivery events as system events in CloudMonitor. For more information, see View failed delivery events and configure alert notifications in CloudMonitor.