Create a current account delivery channel
You can 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), and then consume the standardized resource data from these services.
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 the 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 whose resources you want to deliver. For example, if the RAM user is granted the global ReadOnlyAccess policy, the user can deliver information for all cloud resources in the account. If the RAM user is granted only the AliyunVPCReadOnlyAccess policy, the user can deliver only VPC resource information.
NoteThe delivery scope of a delivery channel is not affected by subsequent permission changes to the RAM user who created it. For example, if a RAM user creates a delivery channel for VPC resources and the user's read-only permissions for VPC 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 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 delivery channel name.
The value can contain Chinese characters, letters, digits, and the special characters
-_, with a maximum length of 64 characters.Description
The delivery channel description.
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 information for all resource types in the current account.
-
Custom Resource Scope: Delivers 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 snapshot delivery.
Delivery Channel
Object Storage Service (OSS).
Region
The region of the OSS bucket.
Bucket Name
The bucket name must be prefixed with
resourcecenter-.If no bucket is available, 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 locally. 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.
SLS discards configuration change events that exceed 1 MB. To avoid data loss, you can enable oversized file delivery, which sends 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 delivery channel name.
The value can contain Chinese characters, letters, digits, and the special characters
-_, with a maximum length of 64 characters.Description
The delivery channel description.
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 information for all resource types in the current account.
-
Custom Resource Scope: Delivers 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
Turn on this switch to deliver resource configuration change events.
Delivery Channel
Log Service (SLS).
Region
The region of the SLS Project.
Project Name
The Project name.
If no Project is available, click Create to create one.
Logstore Name
The Logstore name must be prefixed with
resourcecenter-.If no Logstore is available, click Create to create one. A new Logstore has no indexes preconfigured. To analyze the data, configure indexes on the Log Service console after 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 to be delivered. Otherwise, you cannot query or analyze the data after delivery.
Large File Delivery
If you select Large File Delivery, basic information of events that exceed 1 MB is delivered to the SLS Logstore while 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 an OSS bucket. You can use the same bucket as the one for resource snapshot delivery or select a different 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 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.