调用TagDcdnResources添加资源标签。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
请求参数
名称 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | TagDcdnResources |
操作接口名,系统规定参数。取值:TagDcdnResources。 |
ResourceId.N | RepeatList | 是 | example.com |
资源ID。N的取值范围:1~50。 |
ResourceType | String | 是 | DOMAIN |
资源类型。固定值:DOMAIN。 |
Tag.N.Key | String | 是 | env |
标签键。N的取值范围:1~20。 |
Tag.N.Value | String | 否 | value |
标签值。N的取值范围:1~20。 |
返回数据
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
RequestId | String | 97C68796-EB7F-4D41-9D5B-12B909D76508 |
请求ID。 |
示例
请求示例
http(s)://dcdn.aliyuncs.com/?Action=TagDcdnResources
&ResourceId.1=example.com
&ResourceType=DOMAIN
&Tag.1.Key=env
&Tag.1.Value=''
&<公共请求参数>
正常返回示例
XML
格式
<TagDcdnResourcesResponse>
<RequestId>97C68796-EB7F-4D41-9D5B-12B909D76508</RequestId>
</TagDcdnResourcesResponse>
JSON
格式
{
"RequestId":"97C68796-EB7F-4D41-9D5B-12B909D76508"
}
错误码
HttpCode | 错误码 | 错误信息 | 描述 |
---|---|---|---|
400 | InvalidRegionId.Malformed | The specified RegionId is invalid. | RegionId参数非法。 |
400 | Resource.NotExist | The resource does not exist. | 资源不存在。 |
400 | TagKeyIsInvalid | The specified TagKey is invalid. | TagKey非法。 |
400 | TooManyTags | You have entered too many tags. | tag太多了,请重新输入。 |
400 | TagValueIsInvalid | The specified TagValue is invalid. | TagValue非法,请重新输入。 |
400 | TagKeyDuplicated | The specified TagKey is duplicated. | TagKey是重复的。 |
400 | TagIsInvalid | The number of Tag exceeds 20. | Tag超过20个了。 |
400 | ResourceIdIsInvalid | The number of ResourceId exceeds 50. | ResourceId超过50个了。 |
400 | SystemTagIsInvalid | The number of System Tag exceeds 50. | 系统Tag超过50个了。 |
400 | CustomTagIsInvalid | The number of Custom Tag exceeds 20. | Tag个数超过20个了。 |
访问错误中心查看更多错误码。