绑定管控策略
下表仅列出该接口特有的请求参数和部分公共参数。更多信息请见公共参数。
参数 | 类型 | 是否必填 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | AttachServiceControlPolicy | 要执行的操作,取值:AttachServiceControlPolicy。 |
Version | String | 是 | 2022-01-01 | API的版本,取值:2022-01-01。 |
TargetType | Integer | 是 | 2 | 目标类型 1. OU 2. Account |
PolicyID | String | 是 | 122222224444 | 策略ID |
TargetID | String | 是 | 21111111 | 绑定策略的目标节点ID |
本接口无特有的返回参数。更多信息请见返回结构。
POST /?Action=AttachServiceControlPolicy&Version=2022-01-01 HTTP/1.1 Host: https://organization.volcengineapi.com Content-Type: application/json; charset=UTF-8 X-Date: 20250620T081828Z X-Content-Sha256: 287e874e******d653b44d21e Authorization: HMAC-SHA256 Credential=Adfks******wekfwe/20250620/cn-beijing/organization/request, SignedHeaders=host;x-content-sha256;x-date, Signature=47a7d934ff7b37c03938******cd7b8278a40a1057690c401e92246a0e41085f { "TargetType": 2, "PolicyID": "122222222244444444", "TargetID": "211111111" }
{ "ResponseMetadata": { "RequestId": "202506201618510802201970929CA7D2", "Action": "AttachServiceControlPolicy", "Version": "2022-01-01", "Service": "organization", "Region": "cn-beijing" }, "Result": {} }
下表为您列举了该接口与业务逻辑相关的错误码。公共错误码请参见公共错误码文档。
状态码 | 错误码 | 说明 |
---|---|---|
400 | TargetNotFoundException | 所选绑定目标不存在 |
400 | InvalidParam | 参数不合法 |
400 | PermissionError | 无权限,没有对该资源进行该操作的权限 |
400 | ConcurrentException | 并发请求异常 |
400 | DuplicatePolicyAttachmentException | 当前策略已绑定在所选目标上 |
400 | PolicyNotFoundException | 该策略不存在 |
400 | PolicyTypeNotEnabledException | 管控策略功能已关闭 |
400 | ReachedQuotaLimit | 已超出资源限额 |
404 | RecordNotExists | 记录不存在 |
500 | InternalError | 未知错误,根据错误信息判断详情 |