ALIYUN::ECS::DeploymentSet

更新时间:
复制 MD 格式

ALIYUN::ECS::DeploymentSet creates a deployment set in a specified 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.

2 to 128 characters. Must start with a letter. Cannot start with http:// or https://. Can contain letters, digits, colons (:), underscores (_), and hyphens (-).

Description

String

No

Yes

The description of the deployment set.

2 to 256 characters. Must start with a letter. Cannot start with http:// or https://.

OnUnableToRedeployFailedInstance

String

No

No

The emergency solution when instances in the deployment set cannot be evenly distributed across zones after they are failed over from faulty physical machines to normal physical machines due to insufficient resources.

Valid values:

  • CancelMembershipAndStart (default): removes instances from the deployment set and restarts them immediately after failover.

  • KeepStopped: leaves 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 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 uses the Long data type. Precision may be lost during serialization or deserialization. The value must not exceed 9007199254740991.

Return values

Fn::GetAtt

DeploymentSetId: the deployment set ID.

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"
            ]
          }
        }
      }
    }