调用 DescribeDeploymentSets 接口查询部署集的属性。
下表仅列出该接口特有的请求参数和部分公共参数。更多信息请见公共参数。
参数 | 类型 | 是否必填 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | DescribeDeploymentSets | 要执行的操作,取值:DescribeDeploymentSets。 |
Version | String | 是 | 2020-04-01 | API的版本,取值:2020-04-01。 |
DeploymentSetIds.N | Array of String | 否 | DeploymentSetIds.1=dps-yc1o9aahks5m57nk****&DeploymentSetIds.2=dps-ybr1vulgy87grbt6**** | 部署集ID。
|
DeploymentSetName | String | 否 | testDeploymentSet | 部署集名称。
|
Granularity | String | 否 | host | 部署粒度,取值:
说明
|
MaxResults | Integer | 否 | 10 | 分页查询时设置的每页行数。
|
NextToken | String | 否 | -- | 分页查询凭证,用于标记分页的位置,初次调用该接口时无需设置。下次查询时,取值为上一次API调用返回的 |
Strategy | String | 否 | Availability | 部署策略,取值:
|
下表仅列出本接口特有的返回参数。更多信息请参见返回结构。
参数 | 类型 | 示例值 | 描述 |
---|---|---|---|
DeploymentSets | Array of DeploymentSetsForDescribeDeploymentSets | -- | 部署集详情。 |
NextToken | String | bHpwdXJja2RxemU1eG5sb3NzdGcW1-RCEq****** | 本次调用返回的查询凭证值,返回为空表示该页为末页。 |
GET /?Action=DescribeDeploymentSets&Version=2020-04-01&DeploymentSetIds.1=dps-yc1o9aahks5m57nk**** HTTP/1.1 Host: open.volcengineapi.com Region: cn-beijing ServiceName: ecs
{ "ResponseMetadata": { "RequestId": "2021110417394001022514606307*****", "Action": "DescribeDeploymentSets", "Version": "2020-04-01", "Service": "ecs", "Region": "cn-beijing" }, "Result": { "DeploymentSets": [ { "CreatedAt": "2021-11-25T15:12:58+08:00", "DeploymentSetDescription": "", "DeploymentSetId": "dps-yc1o9aahks5m57nk****", "DeploymentSetName": "testDeploymentSet", "Strategy": "Availability", "Granularity": "host", "InstanceAmount": 1, "InstanceIds": [ i-3tigy72q3u3vj0x2**** ], "Capacities": [ { "ZoneId": "cn-beijing-a", "UsedCount": 1, "AvailableCount": 4 } ] } ], "NextToken":"bHpwdXJja2RxemU1eG5sb3NzdGcW1-RCEq******" } }
下表为您列举了该接口与业务逻辑相关的错误码。公共错误码请参见公共错误码文档。
状态码 | 错误码 | 错误信息 | 说明 |
---|---|---|---|
400 | InvalidArgument | The specified argument is invalid. | 指定的参数不合法。 |
400 | LimitExceeded.MaximumDeploymentSetIds | You've reached the limit on the number of DeploymentSetIds that you can set. | 指定的DeploymentSets数量超过最大限制。 |
500 | InternalError | An internal error has occurred. | 内部错误,请重试。如果多次尝试失败,请提交工单。 |