You can call this operation to create a deployment set in a specified 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
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.

Action String Yes CreateDeploymentSet

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

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 value, but you must ensure that it is unique among different requests. The ClientToken value can only contain ASCII characters and cannot exceed 64 characters in length. For more information, see How to ensure idempotence.

DeploymentSetName String No FinanceDeployment

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

Description String No FinanceJoshua

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

Domain String No null

The deployment domain.

Note We recommend that you use other parameters to ensure future compatibility.
Granularity String No null

The deployment granularity.

Note We recommend that you use other parameters to ensure future compatibility.
OnUnableToRedeployFailedInstance String No CancelMembershipAndStart

The emergency solution to redeploy failed instances in the deployment set. Default value: CancelMembershipAndStart. Valid values:

  • CancelMembershipAndStart: restarts the instances immediately after they are shut down and migrated to other deployment sets.
  • KeepStopped: keeps the instances shut down and restarts them after the deployment set is replenished.
Strategy String No null

The deployment strategy.

Note We recommend that you use other parameters to ensure future compatibility.

Response parameters

Parameter Type Example Description
DeploymentSetId String ds-bp1frxuzdg87zh4pzq***

The ID of the deployment set.

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

The ID of the request.

Examples

Sample requests

https://ecs.aliyuncs.com/?Action=CreateDeploymentSet
&RegionId=cn-hangzhou
&DeploymentStrategy=Availability
&DeploymentSetName=AvailMySet
&<Common request parameters>

Sample success responses

XML format

<CreateDeploymentSetResponse>
	  <RequestId>04F0F334-1335-436C-A1D7-6C044FE73368</RequestId>
	  <DeploymentSetId>ds-bp1frxuzdg87zh4pzq***</DeploymentSetId>
</CreateDeploymentSetResponse>

JSON format

{
	"RequestId":"04F0F334-1335-436C-A1D7-6C044FE73368",
	"DeploymentSetId":"ds-bp1frxuzdg87zh4pzq***"
}

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. The error message returned because the required RegionId parameter is not specified.
400 InvalidDeploymentSetName.Malformed Specified deployment set name is not valid. The error message returned because the specified DeploymentSetName parameter is invalid.
400 InvalidDescription.Malformed The specified parameter Description is not valid. The error message returned because the specified Description parameter is invalid. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
400 InvalidDeploymentSetId.NotFound The specified DeploymentSetId does not exist. The error message returned because the specified DeploymentSetId parameter does not exist. Check whether the deployment set ID is correct.
400 MissingParameter The input parameter DeploymentSetId that is mandatory for processing this request is not supplied. The error message returned because the required DeploymentSetId parameter is not specified.
400 InvalidParameter.Domain The specified parameter Domain is not valid. The error message returned because the specified Domain parameter is invalid.
400 InvalidParameter.Strategy The specified parameter Strategy is not valid The error message returned because the specified Strategy parameter is invalid.
400 InvalidParameter.granularity The specified parameter Granularity is not valid. The error message returned because the specified Granularity parameter is invalid.
400 DependencyViolation.domain.granularity The DeploymentSet domain and granularity is violation. The error message returned because the domain and the data granularity of the deployment set conflict with each other.
400 DependencyViolation.strategy.granularity The DeploymentSet strategy and granularity is violation. The error message returned because the strategy and the data granularity of the deployment set conflict with each other.
400 DEPLOYMENTSET.QUOTA_FULL The deploymentSet quota is full The error message returned because the maximum number of deployment sets has been reached. Reduce the number of deployment sets.

For a list of error codes, visit the API Error Center.