All Products
Search
Document Center

:DescribeDeploymentSets

更新時間:Dec 07, 2023

Queries the attributes of deployment sets.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter

Type

Required

Example

Description

Action String Yes DescribeDeploymentSets

The operation that you want to perform. Set the value to DescribeDeploymentSets.

RegionId String Yes cn-hangzhou

The region ID of the deployment set. You can call the DescribeRegions operation to query the most recent region list.

PageNumber Integer No 1

The page number.

Pages start from page 1.

Default value: 1.

PageSize Integer No 10

The number of entries per page.

Valid values: 1 to 50.

Default value: 10.

DeploymentSetIds String No ["ds-bp67acfmxazb4ph****", "ds-bp67acfmxazb4pi****", … "ds-bp67acfmxazb4pj****"]

The IDs of the deployment sets. The value can be a JSON array that consists of up to 100 deployment set IDs in the format of ["ds-xxxxxxxxx", "ds-yyyyyyyyy", … "ds-zzzzzzzzz"]. Separate the deployment set IDs with commas (,).

NetworkType String No null
Note This parameter is no longer used.
Strategy String No Availability

The deployment strategy. Valid values:

  • Availability: high availability strategy.
  • AvailabilityGroup: high availability group strategy.
DeploymentSetName String No testDeploymentSetName

The name of the deployment set. The name must be 2 to 128 characters in length. The name must start with a letter and cannot start with http:// or https://. The name can contain letters, digits, colons (:), underscores (_), and hyphens (-).

Granularity String No null
Note This parameter is no longer used.
Domain String No null
Note This parameter is no longer used.

Response parameters

Parameter

Type

Example

Description

PageSize Integer 1

The number of entries per page.

PageNumber Integer 1

The page number.

RequestId String 473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E

The ID of the request.

TotalCount Integer 1

The total number of queried deployment sets.

RegionId String cn-hangzhou

The region ID of the deployment set.

DeploymentSets Array of DeploymentSet

Details about the deployment sets.

DeploymentSet
CreationTime String 2021-12-07T06:01:46Z

The time when the deployment set was created.

Strategy String LooseDispersion

The deployment strategy.

DeploymentSetId String ds-bp67acfmxazb4ph****

The ID of the deployment set.

DeploymentStrategy String Availability

The deployment strategy. The return value of this parameter is the value of the Strategy request parameter.

DeploymentSetDescription String testDeploymentSetDescription

The description of the deployment set.

Domain String default

The deployment domain.

GroupCount Integer 3

The number of deployment set groups in the deployment set.

Note This parameter is valid only when the deployment set uses the availability group strategy (AvailabilityGroup).
Granularity String host

The deployment granularity.

DeploymentSetName String testDeploymentSetName

The name of the deployment set.

InstanceAmount Integer 3

The number of instances in the deployment set.

InstanceIds Array of String i-bp67acfmxazb4ph****

The ID of the instance.

Capacities Array of Capacity

Details about the capacities of the deployment set. This parameter is available only when the deployment set contains ECS instances. The value contains the capacities of the deployment set in different zones.

Capacity
ZoneId String cn-hangzhou-i

The ID of the zone. Only the zone IDs of existing ECS instances in the deployment set are returned.

UsedAmount Integer 2

The number of ECS instances that reside in the zone in the deployment set.

AvailableAmount Integer 18

The number of ECS instances that can be added to the deployment set in the zone.

Examples

Sample requests

https://ecs.aliyuncs.com/?Action=DescribeDeploymentSets
&RegionId=cn-hangzhou
&PageSize=1
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<DescribeDeploymentSetsResponse>
    <DeploymentSets>
        <DeploymentSet>
            <CreationTime>2021-12-07T06:01:46Z</CreationTime>
            <Granularity>host</Granularity>
            <DeploymentSetDescription>testDeploymentSetDescription</DeploymentSetDescription>
            <Domain>default</Domain>
            <InstanceIds>
                <InstanceId>i-bp67acfmxazb4ph****</InstanceId>
                <InstanceId>i-bp67acfmxazb4pi****</InstanceId>
                <InstanceId>i-bp67acfmxazb4pj****</InstanceId>
            </InstanceIds>
            <InstanceAmount>3</InstanceAmount>
            <Strategy>LooseDispersion</Strategy>
            <DeploymentSetName>testDeploymentSetName</DeploymentSetName>
            <DeploymentStrategy>Availability</DeploymentStrategy>
            <DeploymentSetId>ds-bp67acfmxazb4ph****</DeploymentSetId>
            <capacities>
                <Capacity>
                    <UsedAmount>1</UsedAmount>
                    <ZoneId>cn-hangzhou-h</ZoneId>
                    <AvailableAmount>19</AvailableAmount>
                </Capacity>
                <Capacity>
                    <UsedAmount>2</UsedAmount>
                    <ZoneId>cn-hangzhou-i</ZoneId>
                    <AvailableAmount>18</AvailableAmount>
                </Capacity>
            </capacities>
        </DeploymentSet>
    </DeploymentSets>
    <PageNumber>1</PageNumber>
    <TotalCount>1</TotalCount>
    <PageSize>1</PageSize>
    <RegionId>cn-hangzhou</RegionId>
    <RequestId>473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E</RequestId>
</DescribeDeploymentSetsResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "DeploymentSets" : {
    "DeploymentSet" : {
      "CreationTime" : "2021-12-07T06:01:46Z",
      "Granularity" : "host",
      "DeploymentSetDescription" : "testDeploymentSetDescription",
      "Domain" : "default",
      "InstanceIds" : {
        "InstanceId" : [ "i-bp67acfmxazb4ph****", "i-bp67acfmxazb4pi****", "i-bp67acfmxazb4pj****" ]
      },
      "InstanceAmount" : 3,
      "Strategy" : "LooseDispersion",
      "DeploymentSetName" : "testDeploymentSetName",
      "DeploymentStrategy" : "Availability",
      "DeploymentSetId" : "ds-bp67acfmxazb4ph****",
      "capacities" : {
        "Capacity" : [ {
          "UsedAmount" : 1,
          "ZoneId" : "cn-hangzhou-h",
          "AvailableAmount" : 19
        }, {
          "UsedAmount" : 2,
          "ZoneId" : "cn-hangzhou-i",
          "AvailableAmount" : 18
        } ]
      }
    }
  },
  "PageNumber" : 1,
  "TotalCount" : 1,
  "PageSize" : 1,
  "RegionId" : "cn-hangzhou",
  "RequestId" : "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E"
}

Error codes

HTTP status code

Error code

Error message

Description

403 InvalidDeploymentSetIds.TooManyInput The parameter DeploymentSets size should less than 100. The number of specified deployment sets exceeds 100.

For a list of error codes, see Service error codes.