新增多云资产配置信息。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
授权信息
当前API暂无授权信息透出。
请求参数
| 名称 | 类型 | 必填 | 描述 | 示例值 |
|---|---|---|---|---|
| Vendor | string | 是 | 云资产厂商。取值:
| AWS |
| AkType | string | 是 | AK 类型。取值:
| primary |
| SecretId | string | 是 | AK 参数 Id。取值: 1.AkType 取值 primary:
2.AkType 取值 sub:
说明
AkType 取值为 primary 则该值为他云的主账号 SecretID。AkType 取值为 sub 则该值为他云子账号 Access Key ID。Azure 不做区分,该值为认证信息的 appId。谷歌云是通过服务账号接入的,AkType 默认取值 sub, 该值取自 JSON 格式服务密钥文件的 private_key_id 属性值。
| 45GLRV4SOT0YFB**** |
| SecretKey | string | 是 | AK 参数 Secret。取值: 1.AkType 取值 primary:
2.AkType 取值 sub:
说明
AkType 取值为 primary 则该值为他云的主账号 Secret Access Key。AkType 取值为 sub 则该值为他云子账号 Secret Access Key。Azure 不做区分,该值为认证信息的 password。谷歌云是通过服务账号接入的,AkType 默认取值 sub, 该值取自 JSON 格式服务密钥文件的 private_key 属性值。
| AE6SLd**** |
| Regions | array | 否 | AK 信息验证所使用的 Region 列表,仅对 Vendor 为 AWS 有效。 说明
调用 ListCloudVendorRegions 接口可以获取该参数。
| |
| regions | string | 否 | AK 信息验证所使用的 Region。 | ap-south-1 |
| SubscriptionIds | array | 否 | 订阅 ID 列表。 说明
该参数已无效。
| |
| string | 否 | 订阅 ID。 说明
该参数已无效。
| 9b41e7ae-fcbf-4983-aa32-6fb2e***** | |
| TenantId | string | 否 | 租户 ID,仅对 Vendor 为 Azure 有效。 | 95304a97-339b-4de5-9a7d-cdbffaf**** |
| Domain | string | 否 | 接入账号域。取值:
说明
该参数仅对 Vendor 为 HUAWEICLOUD、Azure、AWS、VOLCENGINE 有效,且为必传。
| global |
| AuthModules | array | 否 | AK 关联模块列表。 | |
| string | 否 | AK 关联模块 Code。取值:
| HOST | |
| Lang | string | 否 | 请求和接收消息的语言类型。默认值为 zh。取值:
| zh |
| VendorAuthAlias | string | 否 | AK 账号名称。 说明
用于标识三方主机资产的所属账号信息。
| test |
| ExtendInfo | string | 否 | 扩展信息。 说明
用于记录不同厂商扩展信息。
谷歌云是通过服务账号接入的,ExtendInfo 存储的是 json 格式服务密钥文件,排除了 private_key_id 和 zprivate_key 字段。文件中包含字段:type,project_id,client_email,client_id,auth_uri,token_uri,auth_provider_x509_cert_url,client_x509_cert_url,universe_domain。
| {\"product\":\"webFirewall\",\"remark\":\"remark\"} |
| CtdrCloudUserId | string | 否 | 账号 ID。 说明
接入的云厂商的账号 ID,当权限说明包含威胁分析与响应时必填。
| azure_demo_1 |
返回参数
示例
正常返回示例
JSON格式
{
"RequestId": "A60DA4EC-7CD8-577D-AD73-***",
"Data": {
"Status": 0,
"AuthId": 2158,
"AkType": "sub",
"SecretId": "AE6SLd****",
"ServiceStatus": 0,
"Vendor": "Tencent",
"Message": "The IAM user is forbidden in the currently selected region",
"AuthModules": [
{
"ModuleDisp": "Host Assets",
"ModuleStatement": "Read permission of the cloud server or virtual machine",
"Module": "HOST",
"ModuleAssetType": "Cloud server or virtual machine",
"ModuleServiceStatus": 0,
"Message": "ak_domain_error"
}
],
"VendorAuthAlias": "test",
"CtdrCloudUserId": "azure_demo_1"
}
}错误码
| HTTP status code | 错误码 | 错误信息 | 描述 |
|---|---|---|---|
| 400 | CreateAkError | Failed to create an AK. | 创建AK错误。 |
| 403 | NoPermission | caller has no permission | 当前操作未被授权,请联系主账号在RAM控制台进行授权后再执行操作。 |
| 500 | ServerError | ServerError | 服务故障,请稍后重试! |
访问错误中心查看更多错误码。
变更历史
| 变更时间 | 变更内容概要 | 操作 |
|---|---|---|
| 2024-10-30 | OpenAPI 错误码发生变更、OpenAPI 入参发生变更 | 查看变更详情 |
| 2024-09-25 | OpenAPI 错误码发生变更 | 查看变更详情 |
