调用DescribeDeliveryChannels接口查询投递渠道信息。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

请求参数

名称 类型 是否必选 示例值 描述
Action String DescribeDeliveryChannels

要执行的操作,取值:DescribeDeliveryChannels。

DeliveryChannelIds String cdc-d9106457e0d900b1****,cdc-d9106457e0d900b1****

投递渠道ID。多个用英文逗号(,)分隔。详情请参见PutDeliveryChannel

返回数据

名称 类型 示例值 描述
DeliveryChannels Array of DeliveryChannel

投递渠道信息。

DeliveryChannelAssumeRoleArn String acs:ram::120886317861****:role/aliyunserviceroleforconfig

投递渠道扮演角色ARN。

DeliveryChannelCondition String [{"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}]

投递渠道附加规则。当前仅MNS类型的投递渠道支持该参数。

您可以指定MNS订阅事件的最低风险等级和资源类型,具体如下:

  • 订阅事件的最低风险等级为:{"filterType":"RuleRiskLevel","value":"1","multiple":false}

    value表示您需要过滤的风险等级。取值:1表示高风险,2表示中风险,3表示低风险。

  • 订阅事件的资源类型为:{"filterType":"ResourceType","values":["ACS::ACK::Cluster","ACS::ActionTrail::Trail","ACS::CBWP::CommonBandwidthPackage"],"multiple":true}

    values表示您需要订阅事件的资源类型,是一个资源类型的JSON数组。

    例如:[{"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}]

DeliveryChannelId String cdc-d9106457e0d900b1****

投递渠道ID。

DeliveryChannelName String myDeliveryChannel

投递渠道名称。

DeliveryChannelTargetArn String acs:oss:cn-shanghai:120886317861****:text123457

投递渠道目标地址的ARN。

  • 当DeliveryChannelType为OSS时,该参数为Bucket的ARN。
  • 当DeliveryChannelType为MNS时,该参数为Topic的ARN。
  • 当DeliveryChannelType为SLS时,该参数为Logstore的ARN。
DeliveryChannelType String OSS

投递渠道类型。取值:

  • OSS:对象存储
  • MNS:消息服务
  • SLS:日志服务
Description String My OSS delivery.

投递渠道描述。

Status Integer 1

投递设置状态。取值:

  • 0:关闭
  • 1:开启
RequestId String 8300C16A-5DCA-4DB4-88C1-DE0493EC409C

请求ID。

示例

请求示例

http(s)://[Endpoint]/?Action=DescribeDeliveryChannels
&<公共请求参数>

正常返回示例

XML 格式

<DescribeDeliveryChannelsResponse>
      <DeliveryChannels>
            <Status>1</Status>
            <Description></Description>
            <DeliveryChannelId>cdc-d9106457e0d900b1****</DeliveryChannelId>
            <DeliveryChannelName></DeliveryChannelName>
            <DeliveryChannelTargetArn>acs:oss:cn-shanghai:120886317861****:text123457</DeliveryChannelTargetArn>
            <DeliveryChannelAssumeRoleArn>acs:ram::120886317861****:role/aliyunserviceroleforconfig</DeliveryChannelAssumeRoleArn>
            <DeliveryChannelType>OSS</DeliveryChannelType>
            <DeliveryChannelCondition></DeliveryChannelCondition>
      </DeliveryChannels>
      <DeliveryChannels>
            <Status>1</Status>
            <Description></Description>
            <DeliveryChannelId>cdc-d9106457e0d900b1****</DeliveryChannelId>
            <DeliveryChannelName></DeliveryChannelName>
            <DeliveryChannelTargetArn>acs:mns:cn-hangzhou:120886317861****:/topics/testmns001</DeliveryChannelTargetArn>
            <DeliveryChannelAssumeRoleArn>acs:ram::120886317861****:role/aliyunserviceroleforconfig</DeliveryChannelAssumeRoleArn>
            <DeliveryChannelType>MNS</DeliveryChannelType>
            <DeliveryChannelCondition>[{"filterType":"RuleRiskLevel","value":"1","multiple":false}]</DeliveryChannelCondition>
      </DeliveryChannels>
      <RequestId>8300C16A-5DCA-4DB4-88C1-DE0493EC409C</RequestId>
</DescribeDeliveryChannelsResponse>

JSON 格式

{
  "DeliveryChannels": [
    {
      "Status": 1,
      "Description": "",
      "DeliveryChannelId": "cdc-d9106457e0d900b1****",
      "DeliveryChannelName": "",
      "DeliveryChannelTargetArn": "acs:oss:cn-shanghai:120886317861****:text123457",
      "DeliveryChannelAssumeRoleArn": "acs:ram::120886317861****:role/aliyunserviceroleforconfig",
      "DeliveryChannelType": "OSS",
      "DeliveryChannelCondition": ""
    },
    {
      "Status": 1,
      "Description": "",
      "DeliveryChannelId": "cdc-d9106457e0d900b1****",
      "DeliveryChannelName": "",
      "DeliveryChannelTargetArn": "acs:mns:cn-hangzhou:120886317861****:/topics/testmns001",
      "DeliveryChannelAssumeRoleArn": "acs:ram::120886317861****:role/aliyunserviceroleforconfig",
      "DeliveryChannelType": "MNS",
      "DeliveryChannelCondition": "[{\"filterType\":\"RuleRiskLevel\",\"value\":\"1\",\"multiple\":false}]"
    }
  ],
  "RequestId": "8300C16A-5DCA-4DB4-88C1-DE0493EC409C"
}

错误码

HttpCode 错误码 错误信息 描述
404 AccountNotExisted Your account does not exist. 您的账号不存在。
400 DeliveryChannelNotExists The delivery channel does not exist. 投递渠道不存在。
503 ServiceUnavailable The request has failed due to a temporary failure of the server. 服务不可用。

访问错误中心查看更多错误码。