创建访问凭证
创建云厂商访问凭证。此接口需要数据源模块权限。
请求地址:/openapi/v1/access/create
请求方法:POST
请求参数
| 参数 | 类型 | 是否必填 | 说明 |
|---|---|---|---|
| name | String | 是 | 凭证名称。 |
| type | String | 是 | 凭证类型:accessKey 或 role。 |
| vendor | String | 是 | 云厂商:aliyun、tencent、huawei、aws、ecloud、gcp 或 baidu。 |
| accessKey | String | 是 | AccessKey ID。 |
| accessKeySecret | String | 是 | AccessKey Secret。 |
| roleName | String | 否 | Role 名称;type 为 role 时必填。 |
| arn | String | 否 | Role ARN;type 为 role 时必填。 |
请求示例
{
"name": "example-access",
"type": "accessKey",
"vendor": "aliyun",
"accessKey": "<accessKey>",
"accessKeySecret": "<accessKeySecret>"
}
返回参数
| 参数 | 类型 | 说明 |
|---|---|---|
| success | Boolean | 请求是否成功。 |
| requestId | String | 请求 ID。 |
| data.accessId | String | 新创建的访问凭证 ID。 |
调用成功示例
{"success": true, "requestId": "<requestId>", "data": {"accessId": "<accessId>"}}