All Products
Search
Document Center

Resource Orchestration Service:ALIYUN::ECS::DeploymentSet

Last Updated:Jan 09, 2024

ALIYUN::ECS::DeploymentSet is used to create a deployment set in a region.

Syntax

{
  "Type": "ALIYUN::ECS::DeploymentSet",
  "Properties": {
    "DeploymentSetName": String,
    "Description": String,
    "OnUnableToRedeployFailedInstance": String,
    "Strategy": String,
    "GroupCount": Number
  }
}

Properties

Property

Type

Required

Editable

Description

Constraint

DeploymentSetName

String

No

Yes

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

Yes

The description of the deployment set.

The description must be 2 to 256 characters in length. It must start with a letter and cannot start with http:// or https://.

OnUnableToRedeployFailedInstance

String

No

No

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 (default): 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.

Strategy

String

No

No

The deployment strategy.

Valid values:

  • Availability (default): high availability strategy

  • AvailabilityGroup: high availability group strategy

GroupCount

Number

No

No

The number of deployment set groups in the deployment set.

Valid values: 1 to 7.

Default value: 3.

Note

This property takes effect only when Strategy is set to AvailabilityGroup.

Important

GroupCount is of the Long data type. The precision of the property value may be lost during the serialization or deserialization process. Make sure that the value is no greater than 9007199254740991.

Return values

Fn::GetAtt

DeploymentSetId: the ID of the deployment set.

Examples

  • YAML format

    ROSTemplateFormatVersion: '2015-09-01'
    Resources:
      DeploymentSet:
        Type: ALIYUN::ECS::DeploymentSet
        Properties:
          DeploymentSetName: TestDeploymentSet
          OnUnableToRedeployFailedInstance: CancelMembershipAndStart
    Outputs:
      DeploymentSetId:
        Description: The ID of the deployment set.
        Value:
          Fn::GetAtt:
            - DeploymentSet
            - DeploymentSetId
  • JSON format

    {
      "ROSTemplateFormatVersion": "2015-09-01",
      "Resources": {
        "DeploymentSet": {
          "Type": "ALIYUN::ECS::DeploymentSet",
          "Properties": {
            "DeploymentSetName": "TestDeploymentSet",
            "OnUnableToRedeployFailedInstance": "CancelMembershipAndStart"
          }
        }
      },
      "Outputs": {
        "DeploymentSetId": {
          "Description": "The ID of the deployment set.",
          "Value": {
            "Fn::GetAtt": [
              "DeploymentSet",
              "DeploymentSetId"
            ]
          }
        }
      }
    }