All Products
Search
Document Center

Elastic Compute Service:DescribeDeploymentSets

Last Updated:Nov 14, 2024

Queries the details of one or more deployment sets. When you call this operation, you can specify parameters, such as DeploymentSetIds, Strategy, and DeploymentSetName, in the request.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
ecs:DescribeDeploymentSetsget
*DeploymentSet
acs:ecs:{#regionId}:{#accountId}:deploymentset/*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

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

cn-hangzhou
PageNumberintegerNo

The page number.

Pages start from page 1.

Default value: 1.

1
PageSizeintegerNo

The number of entries per page.

Valid values: 1 to 50.

Default value: 10.

10
DeploymentSetIdsstringNo

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

["ds-bp67acfmxazb4ph****", "ds-bp67acfmxazb4pi****", … "ds-bp67acfmxazb4pj****"]
NetworkTypestringNo
Note This parameter is deprecated.
null
StrategystringNo

The deployment strategy. Valid values:

  • Availability: high availability strategy
  • AvailabilityGroup: high availability group strategy
Availability
DeploymentSetNamestringNo

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 digits, letters, colons (:), underscores (_), and hyphens (-).

testDeploymentSetName
GranularitystringNo
Note This parameter is deprecated.
null
DomainstringNo
Note This parameter is deprecated.
null

Response parameters

ParameterTypeDescriptionExample
object
PageSizeinteger

The number of entries per page.

1
PageNumberinteger

The page number.

1
RequestIdstring

The request ID.

473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E
TotalCountinteger

The total number of queried deployment sets.

1
RegionIdstring

The ID of the region.

cn-hangzhou
DeploymentSetsarray<object>

Details about the deployment sets.

DeploymentSetobject
CreationTimestring

The time when the deployment set was created.

2021-12-07T06:01:46Z
Strategystring

The deployment strategy.

LooseDispersion
DeploymentSetIdstring

The ID of the deployment set.

ds-bp67acfmxazb4ph****
DeploymentStrategystring

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

Availability
DeploymentSetDescriptionstring

The description of the deployment set.

testDeploymentSetDescription
Domainstring

The deployment domain.

default
GroupCountinteger

The number of deployment set groups in the deployment set.

Note This parameter is valid only when the Strategy request parameter is set to AvailabilityGroup.
3
Granularitystring

The deployment granularity.

host
DeploymentSetNamestring

The name of the deployment set.

testDeploymentSetName
InstanceAmountinteger

The number of instances in the deployment set.

3
InstanceIdsarray

The IDs of the Elastic Compute Service (ECS) instances in the deployment set.

InstanceIdstring

The ID of the ECS instance in the deployment set.

i-bp67acfmxazb4ph****
Capacitiesarray<object>

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

Capacityobject
ZoneIdstring

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

cn-hangzhou-i
UsedAmountinteger

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

2
AvailableAmountinteger

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

18

Examples

Sample success responses

JSONformat

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

Error codes

HTTP status codeError codeError messageDescription
403InvalidDeploymentSetIds.TooManyInputThe parameter DeploymentSets size should less than 100.The number of specified deployment sets exceeds 100.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2022-01-17The Error code has changed. The response structure of the API has changedView Change Details