All Products
Search
Document Center

:CreateDeploymentSet

更新時間:Dec 05, 2023

Creates a deployment set in a region.

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 CreateDeploymentSet

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

RegionId String Yes cn-hangzhou

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

OnUnableToRedeployFailedInstance String No CancelMembershipAndStart

The emergency solution to use in the following situation: Instances in the deployment set cannot be distributed to different zones due to resource insufficiency after the instances are failed over from faulty physical machines to normal physical machines. Valid values:

  • CancelMembershipAndStart: removes the instances from the deployment set and restarts the instances immediately after they are failed over.
  • KeepStopped: leaves the instances in the abnormal state and restarts them after resources are replenished.

Default value: CancelMembershipAndStart.

Description String No testDescription

The description of the deployment set. The description must be 2 to 256 characters in length, and cannot start with http:// or https://.

ClientToken String No 123e4567-e89b-12d3-a456-426655440000

The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length. For more information, see How to ensure idempotence.

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 but cannot start with http:// or https://. The name can contain letters, digits, colons (:), underscores (_), and hyphens (-).

Domain String No null
Note This parameter is no longer used.
Granularity 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
  • LowLatency: low latency strategy

Default value: Availability.

GroupCount Long No 1

The number of deployment set groups in the deployment set. Valid values: 1 to 7.

Default value: 3.

Note This parameter is valid only when Strategy is set to AvailabilityGroup.

Response parameters

Parameter

Type

Example

Description

DeploymentSetId String ds-bp1frxuzdg87zh4pzq****

The ID of the deployment set.

RequestId String 473469C7-AA6F-4DC5-B3DB-A3DC0DE3****

The ID of the request.

Examples

Sample requests

http(s)://ecs.aliyuncs.com/?Action=CreateDeploymentSet
&RegionId=cn-hangzhou
&DeploymentSetName=testDeploymentSetName
&Strategy=Availability
&<Common request parameters>

Sample success responses

XML format

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

<CreateDeploymentSetResponse>
    <DeploymentSetId>ds-bp1frxuzdg87zh4pzq****</DeploymentSetId>
    <RequestId>473469C7-AA6F-4DC5-B3DB-A3DC0DE3****</RequestId>
</CreateDeploymentSetResponse>

JSON format

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

{
  "DeploymentSetId" : "ds-bp1frxuzdg87zh4pzq****",
  "RequestId" : "473469C7-AA6F-4DC5-B3DB-A3DC0DE3****"
}

Error codes

HTTP status code

Error code

Error message

Description

400 MissingParameter The input parameter RegionId that is mandatory for processing this request is not supplied. RegionId is required.
400 InvalidDeploymentSetName.Malformed Specified deployment set name is not valid. Invalid DeploymentSetName value.
400 InvalidDescription.Malformed The specified parameter Description is not valid. Invalid Description format. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
400 InvalidParameter.Domain The specified parameter Domain is not valid. Invalid Domain value.
400 InvalidParameter.Strategy The specified parameter Strategy is not valid. Invalid Strategy value.
400 InvalidParameter.granularity The specified parameter Granularity is not valid. Invalid Granularity value.
400 DependencyViolation.domain.granularity The DeploymentSet domain and granularity is violation. The specified Domain and Granularity parameters do not correspond to each other.
400 DependencyViolation.strategy.granularity The DeploymentSet strategy and granularity is violation. The specified Strategy and Granularity parameters do not correspond to each other.
400 DeploymentSet.GroupQuotaFull The deploymentSet group quota is full. The specified number of deployment set groups in the deployment set exceeds the quota.
400 InvalidParameter.GroupCount The specified parameter "GroupCount" is not valid. Invalid GroupCount value.
400 InvalidZoneId.NotFound The zoneId provided does not exist in our records. The specified zone ID is not found.
400 QuotaExceed.DeploymentSet The deploymentSet quota is full. The deployment set quota is exhausted.

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