Creates a delivery channel.
Operation description
In this example, a delivery channel is created. The type of the delivery channel is OSS
, the Alibaba Cloud Resource Name (ARN) of the delivery destination is acs:oss:cn-shanghai:100931896542****:new-bucket
, and the ARN of the role that is assigned to the delivery channel is acs:ram::100931896542****:role/aliyunserviceroleforconfig
. The returned result shows that the delivery channel is created, and the ID of the delivery channel is cdc-8e45ff4e06a3a8****
.
Debugging
Authorization information
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
DeliveryChannelName | string | No | The name of the delivery channel. Note
If you do not configure this parameter, this parameter is left empty.
| testoss |
DeliveryChannelType | string | Yes | The type of the delivery channel. Valid values:
| OSS |
DeliveryChannelTargetArn | string | Yes | The Alibaba Cloud Resource Name (ARN) of the delivery destination. Valid values:
| acs:oss:cn-shanghai:100931896542****:new-bucket |
DeliveryChannelAssumeRoleArn | string | Yes | The ARN of the role that you want to assign to the delivery channel. Specify the ARN in the following format: | acs:ram::100931896542****:role/aliyunserviceroleforconfig |
DeliveryChannelCondition | string | No | The rule that you want to attach to the delivery channel. This parameter is available only for delivery channels of the MNS type. This parameter specifies the lowest risk level and the resource types for the events to which you want to subscribe.
| [{"filterType":"ResourceType","values":["ACS::ActionTrail::Trail","ACS::CBWP::CommonBandwidthPackage","ACS::CDN::Domain","ACS::CEN::CenBandwidthPackage","ACS::CEN::CenInstance","ACS::CEN::Flowlog","ACS::DdosCoo::Instance"],"multiple":true}] |
Description | string | No | The description of the delivery channel. | My OSS delivery. |
ClientToken | string | No | The client token that is used to ensure the idempotency of the request. You can use the client to generate the token, but you must ensure that the token is unique among different requests. The | 1594295238-f9361358-5843-4294-8d30-b5183fac**** |
ConfigurationSnapshot | boolean | No | Specifies whether to deliver scheduled resource snapshots to the OSS bucket. If the value of this parameter is true, the scheduled resource snapshots are delivered to the specified OSS bucket at 00:00:00 and 12:00:00 on a daily basis. Valid values:
Note
This parameter is applicable only to delivery channels of the OSS type.
| false |
ConfigurationItemChangeNotification | boolean | No | Specifies whether to deliver resource change logs to the specified destination. If you set this parameter to true, Cloud Config delivers resource change logs to OSS, Log Service, or MNS when the configurations of the resources change. Valid values:
Note
This parameter is available for delivery channels of the OSS, SLS, and MNS types.
| false |
NonCompliantNotification | boolean | No | Specifies whether to deliver resource non-compliance events. If you set this parameter to true, Cloud Config delivers resource non-compliance events to Log Service or MNS when resources are considered non-compliant. Valid values:
Note
This parameter is available only for delivery channels of the SLS or MNS type.
| false |
OversizedDataOSSTargetArn | string | No | The ARN of the OSS bucket to which you want to transfer the delivery data when the size of the data exceeds the specified upper limit of the delivery channel. Format: If you do not configure this parameter, Cloud Config delivers only summary data. Note
This parameter is available only for delivery channels of the SLS or MNS type. The maximum storage size of delivery channels of the SLS type is 1 MB, and the maximum storage size of delivery channels of the MNS type is 64 KB.
| acs:oss:cn-shanghai:100931896542****:new-bucket |
For more information about common request parameters, see Common parameters.
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "A7A0FFF8-0B44-40C6-8BBF-3A185EFDERTHG",
"DeliveryChannelId": "cdc-8e45ff4e06a3a8****"
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | DeliveryChannelNotExists | The delivery channel does not exist. | The delivery channel does not exist. |
400 | Invalid.DeliveryChannelAssumeRoleArn.Format | The specified format of DeliveryChannelAssumeRoleArn is invalid. | The specified format of DeliveryChannelAssumeRoleArn is invalid. |
400 | Invalid.DeliveryChannelTargetArn.Format | The specified format of DeliveryChannelTargetArn is invalid. | The specified format of DeliveryChannelTargetArn is invalid. |
400 | Invalid.DeliveryChannelCondition.Format | The specified format of DeliveryChannelCondition is invalid. | The specified format of DeliveryChannelCondition is invalid. |
400 | MemberNotBelongToMaster | The specified member does not belong to your organization. | The specified member does not belong to your organization. |
400 | DeliveryChannelAccountNotSupport | Cross-account delivery that is not in the RD is not supported. | Cross-account delivery that is not in the RD is not supported. |
400 | DeliveryChannelMnsUnreachable | The MNS topic is unreachable. | The MNS topic is unreachable. |
400 | DeliveryChannelOssUnreachable | The OSS bucket is unreachable. | The OSS bucket is unreachable. |
400 | DeliveryChannelSlsUnreachable | SLS logstore is unreachable. | The SLS Logstore is unreachable. |
404 | AccountNotExisted | Your account does not exist. | The specified account does not exist. |
For a list of error codes, visit the Service error codes.