同步资产的数据。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
yundun-sas:RefreshAssets |
none |
*全部资源
|
无 | 无 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| AssetType |
string |
否 |
同步的资产类型。默认 ecs。取值:
|
cloud_product |
| CloudAssetType |
integer |
否 |
云产品类型。取值:
|
0 |
| CloudAssetSubType |
integer |
否 |
云产品子类型。 说明
取值参考以下列表。 |
0 |
| Vendor |
integer |
否 |
服务器厂商。取值:
|
0 |
| AuthIds |
array |
否 |
授权记录 ID,最多 1000 项;仅 cloud_k8s 使用,未传或空数组选择当前租户该厂商全部可用授权。 |
|
|
integer |
否 |
当前账号下的一条云厂商授权记录 ID。仅 AssetType 为 cloud_k8s 时使用,须与 Vendor 指定的云厂商一致。 |
1 |
|
| ScopeIds |
array |
否 |
云厂商地域,最多 1000 项;仅 cloud_k8s 使用,未传或空数组通过地域接口展开。 |
|
|
string |
否 |
单个云厂商地域标识。仅 AssetType 为 cloud_k8s 时使用,例如 AWS 中国(北京)为 cn-north-1。 |
cn-north-1 |
|
| ClusterIds |
array |
否 |
厂商集群 locator,最多 1000 项;仅 cloud_k8s 使用,未传或空数组才表示地域完整覆盖。 |
|
|
string |
否 |
单个云厂商集群资源标识。仅 AssetType 为 cloud_k8s 时使用,与云厂商侧标识一致;不同于云安全中心统一列表返回的内部 ClusterId。 |
arn:aws-cn:eks:cn-north-1:1234567890**:cluster/example-cluster |
|
| ClientToken |
string |
否 |
cloud_k8s 必填的 1..128 字符幂等键;其他资产类型仍可不传,由后端条件校验。 |
cloud-k8s-sync-example-001 |
| ResourceDirectoryAccountId |
integer |
否 |
资源目录成员账号主账号 ID。 说明
调用 DescribeMonitorAccounts 接口可以获取该参数。 |
127608589417**** |
| 云资产类型 | 云产品子类型 | 产品名 | 子产品名 |
| 0 | 0 | 云服务器 ECS | 实例 |
| 0 | 1 | 磁盘(存储) | 磁盘(存储) |
| 0 | 2 | 安全组 | 安全组 |
| 1 | 0 | 负载均衡 | 负载均衡 |
| 1 | 1 | 负载均衡 | 应用型负载均衡 |
| 3 | 0 | 云数据库 RDS | 实例 |
| 4 | 0 | 云数据库 MongoDB 版 | 实例 |
| 5 | 0 | 云数据库 Tair(兼容 Redis) | 实例 |
| 6 | 1 | 容器镜像服务 | 企业版 |
| 6 | 2 | 容器镜像服务 | 个人版 |
| 8 | 0 | 容器服务 Kubernetes 版 | 集群 |
| 9 | 0 | 专有网络 VPC | NAT 网关 |
| 9 | 1 | 专有网络 VPC | EIP |
| 9 | 2 | 专有网络 VPC | VPN |
| 11 | 0 | 操作审计 | 跟踪 |
| 12 | 0 | CDN | 实例 |
| 13 | 0 | 数字证书管理服务(原 SSL 证书) | 证书 |
| 14 | 0 | 云效 | 组织 |
| 15 | 0 | 访问控制 | 账号别名 |
| 15 | 1 | 访问控制 | 用户 |
| 15 | 2 | 访问控制 | 权限策略 |
| 15 | 3 | 访问控制 | 分组 |
| 16 | 0 | DDoS 防护 | 实例 |
| 17 | 1 | Web 应用防火墙 | 域名 |
| 18 | 0 | 对象存储 | Bucket |
| 19 | 0 | 云原生关系型数据库 PolarDB | 集群 |
| 20 | 0 | 云数据库 PostgreSQL 版 | 实例 |
| 21 | 0 | 微服务引擎 | 集群 |
| 22 | 0 | 文件存储 NAS | 文件系统 |
| 23 | 0 | 数据安全中心 | 实例 |
| 24 | 0 | 弹性公网 IP | 任播弹性公网 IP |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
|||
| RequestId |
string |
本次调用请求的 ID,是由阿里云为该请求生成的唯一标识符,可用于排查和定位问题。 |
340D7FC4-D575-1661-8ACD-CFA7BE57B795 |
| Success |
boolean |
本次接口请求是否处理成功。true 表示请求处理成功,false 表示失败;对于异步同步任务,不代表任务已经执行完成。 |
|
| Code |
string |
本次请求的业务结果码。200 表示请求处理成功;失败时返回相应的业务错误码。 |
200 |
| Message |
string |
本次请求的业务结果说明。成功时为 successful,失败时返回相应的错误说明。 |
successful |
| HttpStatusCode |
integer |
后端返回的 HTTP 状态码。成功时为 200;失败时返回相应状态码,不能替代异步任务状态。 |
200 |
| TimeCost |
integer |
后端记录的本次请求处理耗时。该字段是否返回取决于后端处理路径,不表示异步同步任务的完整执行耗时。 |
0 |
| Accepted |
boolean |
cloud_k8s 任务已持久化受理,不表示执行完成。 |
|
| Reused |
boolean |
cloud_k8s 幂等键是否复用了同一任务。 |
|
| TaskId |
string |
cloud_k8s 任务标识;兼容路径可通过 ClientToken 查询。 |
mkt-00000000-0000-4000-8000-000000000001 |
| ClientToken |
string |
cloud_k8s 同步请求对应的幂等键,与请求中的 ClientToken 一致。发生受理结果不确定时,可使用原值查询任务,避免生成新键重复提交。 |
cloud-k8s-sync-example-001 |
| ExecutionStatus |
string |
cloud_k8s 异步任务状态,受理通常为 ACCEPTED。 |
ACCEPTED |
| Task |
object |
多云集群同步任务详情。 |
|
| TaskId |
string |
不透明任务标识。 |
mkt-00000000-0000-4000-8000-000000000001 |
| ClientToken |
string |
原受理幂等键。 |
cloud-k8s-sync-example-001 |
| Vendor |
integer |
云厂商。取值:
|
3 |
| ScopeDigest |
string |
服务端规范化范围摘要,不作为业务标识解析。 |
0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef |
| Status |
string |
任务状态。取值:
|
PARTIAL_FAILED |
| ExecutionAttempt |
integer |
任务执行轮次。 |
1 |
| Shards |
array<object> |
执行分片列表。 |
|
|
object |
多云集群同步执行分片。 |
||
| ShardId |
string |
不透明分片标识。 |
region-0000000000000000000000000000000000000001 |
| ProviderAccountId |
string |
已验证的云厂商账号标识。 |
1000000000** |
| RegionId |
string |
云厂商地域标识。 |
ap-guangzhou |
| Stage |
string |
分片阶段。取值:
|
ASSET_DISCOVERY |
| Status |
string |
分片执行状态。 |
FAILED |
| ExecutionAttempt |
integer |
分片执行轮次。 |
1 |
| FailureCode |
string |
失败分类错误码;腾讯云限流错误使用 TKE_RATE_LIMITED。 |
TKE_RATE_LIMITED |
| FailureMessage |
string |
不含凭据或原始敏感响应的失败说明。 |
Tencent rate limited the request |
示例
正常返回示例
JSON格式
{
"RequestId": "340D7FC4-D575-1661-8ACD-CFA7BE57B795",
"Success": true,
"Code": "200",
"Message": "successful",
"HttpStatusCode": 200,
"TimeCost": 0,
"Accepted": true,
"Reused": true,
"TaskId": "mkt-00000000-0000-4000-8000-000000000001",
"ClientToken": "cloud-k8s-sync-example-001",
"ExecutionStatus": "ACCEPTED",
"Task": {
"TaskId": "mkt-00000000-0000-4000-8000-000000000001",
"ClientToken": "cloud-k8s-sync-example-001",
"Vendor": 3,
"ScopeDigest": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",
"Status": "PARTIAL_FAILED",
"ExecutionAttempt": 1,
"Shards": [
{
"ShardId": "region-0000000000000000000000000000000000000001",
"ProviderAccountId": "1000000000**",
"RegionId": "ap-guangzhou",
"Stage": "ASSET_DISCOVERY",
"Status": "FAILED",
"ExecutionAttempt": 1,
"FailureCode": "TKE_RATE_LIMITED",
"FailureMessage": "Tencent rate limited the request"
}
]
}
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 400 | NoPermission | no permission | 无此服务的访问权限。 |
| 400 | DuplicatedRefresh | Refresh in progress, please wait. | 刷新进行中,请稍等。 |
| 400 | RdCheckNoPermission | Resource directory account verification has no permission. | 资源目录账号校验无权限。 |
| 400 | CloudK8s.ClientTokenRequired | ClientToken is required. | |
| 400 | CloudK8s.ClientTokenInvalid | ClientToken must contain 1 to 128 characters. | |
| 400 | CloudK8s.VendorRequired | Vendor is required for cloud_k8s. | |
| 400 | CloudK8s.InvalidRequest | The specified request is invalid. | |
| 400 | CloudK8s.IdentityCapacityExceeded | A provider identity exceeds the supported capacity. | |
| 500 | ServerError | ServerError | 服务故障,请稍后重试! |
| 500 | RdCheckInnerError | Resource directory account service internal error. | 资源目录账号服务内部错误。 |
| 403 | NoPermission | caller has no permission | 当前操作未被授权,请联系主账号在RAM控制台进行授权后再执行操作。 |
| 403 | CloudK8s.TrustedTenantRequired | A trusted tenant identity is required. | |
| 403 | CloudK8s.AuthorizationOwnershipDenied | The authorization does not belong to the trusted tenant. | |
| 403 | CloudK8s.AuthorizationNotFound | No available authorization was found. | |
| 403 | CloudK8s.AuthorizationChangedBeforePublish | The verified authorization changed before the transaction completed. | |
| 503 | CloudK8s.ProviderAdapterUnavailable | The provider adapter is unavailable. | |
| 503 | CloudK8s.SyncUnavailable | Multi-cloud cluster synchronization is not assembled. | |
| 409 | CloudK8s.ClientTokenScopeConflict | ClientToken has been used for another scope. |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。