1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. ecs
  5. EcsDeploymentSet
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

alicloud.ecs.EcsDeploymentSet

Explore with Pulumi AI

Provides a ECS Deployment Set resource.

For information about ECS Deployment Set and how to use it, see What is Deployment Set.

NOTE: Available since v1.140.0.

Example Usage

Basic Usage

import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const config = new pulumi.Config();
const name = config.get("name") || "terraform-example";
const _default = new alicloud.ecs.EcsDeploymentSet("default", {
    strategy: "Availability",
    deploymentSetName: name,
    description: name,
});
Copy
import pulumi
import pulumi_alicloud as alicloud

config = pulumi.Config()
name = config.get("name")
if name is None:
    name = "terraform-example"
default = alicloud.ecs.EcsDeploymentSet("default",
    strategy="Availability",
    deployment_set_name=name,
    description=name)
Copy
package main

import (
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ecs"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		cfg := config.New(ctx, "")
		name := "terraform-example"
		if param := cfg.Get("name"); param != "" {
			name = param
		}
		_, err := ecs.NewEcsDeploymentSet(ctx, "default", &ecs.EcsDeploymentSetArgs{
			Strategy:          pulumi.String("Availability"),
			DeploymentSetName: pulumi.String(name),
			Description:       pulumi.String(name),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;

return await Deployment.RunAsync(() => 
{
    var config = new Config();
    var name = config.Get("name") ?? "terraform-example";
    var @default = new AliCloud.Ecs.EcsDeploymentSet("default", new()
    {
        Strategy = "Availability",
        DeploymentSetName = name,
        Description = name,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.ecs.EcsDeploymentSet;
import com.pulumi.alicloud.ecs.EcsDeploymentSetArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var config = ctx.config();
        final var name = config.get("name").orElse("terraform-example");
        var default_ = new EcsDeploymentSet("default", EcsDeploymentSetArgs.builder()
            .strategy("Availability")
            .deploymentSetName(name)
            .description(name)
            .build());

    }
}
Copy
configuration:
  name:
    type: string
    default: terraform-example
resources:
  default:
    type: alicloud:ecs:EcsDeploymentSet
    properties:
      strategy: Availability
      deploymentSetName: ${name}
      description: ${name}
Copy

Create EcsDeploymentSet Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new EcsDeploymentSet(name: string, args?: EcsDeploymentSetArgs, opts?: CustomResourceOptions);
@overload
def EcsDeploymentSet(resource_name: str,
                     args: Optional[EcsDeploymentSetArgs] = None,
                     opts: Optional[ResourceOptions] = None)

@overload
def EcsDeploymentSet(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     deployment_set_name: Optional[str] = None,
                     description: Optional[str] = None,
                     domain: Optional[str] = None,
                     granularity: Optional[str] = None,
                     on_unable_to_redeploy_failed_instance: Optional[str] = None,
                     strategy: Optional[str] = None)
func NewEcsDeploymentSet(ctx *Context, name string, args *EcsDeploymentSetArgs, opts ...ResourceOption) (*EcsDeploymentSet, error)
public EcsDeploymentSet(string name, EcsDeploymentSetArgs? args = null, CustomResourceOptions? opts = null)
public EcsDeploymentSet(String name, EcsDeploymentSetArgs args)
public EcsDeploymentSet(String name, EcsDeploymentSetArgs args, CustomResourceOptions options)
type: alicloud:ecs:EcsDeploymentSet
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args EcsDeploymentSetArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args EcsDeploymentSetArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args EcsDeploymentSetArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args EcsDeploymentSetArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. EcsDeploymentSetArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var ecsDeploymentSetResource = new AliCloud.Ecs.EcsDeploymentSet("ecsDeploymentSetResource", new()
{
    DeploymentSetName = "string",
    Description = "string",
    OnUnableToRedeployFailedInstance = "string",
    Strategy = "string",
});
Copy
example, err := ecs.NewEcsDeploymentSet(ctx, "ecsDeploymentSetResource", &ecs.EcsDeploymentSetArgs{
	DeploymentSetName:                pulumi.String("string"),
	Description:                      pulumi.String("string"),
	OnUnableToRedeployFailedInstance: pulumi.String("string"),
	Strategy:                         pulumi.String("string"),
})
Copy
var ecsDeploymentSetResource = new EcsDeploymentSet("ecsDeploymentSetResource", EcsDeploymentSetArgs.builder()
    .deploymentSetName("string")
    .description("string")
    .onUnableToRedeployFailedInstance("string")
    .strategy("string")
    .build());
Copy
ecs_deployment_set_resource = alicloud.ecs.EcsDeploymentSet("ecsDeploymentSetResource",
    deployment_set_name="string",
    description="string",
    on_unable_to_redeploy_failed_instance="string",
    strategy="string")
Copy
const ecsDeploymentSetResource = new alicloud.ecs.EcsDeploymentSet("ecsDeploymentSetResource", {
    deploymentSetName: "string",
    description: "string",
    onUnableToRedeployFailedInstance: "string",
    strategy: "string",
});
Copy
type: alicloud:ecs:EcsDeploymentSet
properties:
    deploymentSetName: string
    description: string
    onUnableToRedeployFailedInstance: string
    strategy: string
Copy

EcsDeploymentSet Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The EcsDeploymentSet resource accepts the following input properties:

DeploymentSetName string
The name of the deployment set. The name must be 2 to 128 characters in length and can contain letters, digits, colons (:), underscores (_), and hyphens (-). It must start with a letter and cannot start with http:// or https://.
Description string
The description of the deployment set. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
Domain Changes to this property will trigger replacement. string
Field domain has been deprecated from provider version 1.243.0.

Deprecated: Field domain has been deprecated from provider version 1.243.0.

Granularity Changes to this property will trigger replacement. string
Field granularity has been deprecated from provider version 1.243.0.

Deprecated: Field granularity has been deprecated from provider version 1.243.0.

OnUnableToRedeployFailedInstance string
The emergency solution to use in the situation where instances in the deployment set cannot be evenly distributed to different zones due to resource insufficiency after the instances failover. Valid values:

  • CancelMembershipAndStart - Removes the instances from the deployment set and starts the instances immediately after they are failed over.
  • KeepStopped- Leaves the instances in the Stopped state and starts them after resources are replenished.
Strategy Changes to this property will trigger replacement. string
The deployment strategy. Default value: Availability. Valid values: Availability, AvailabilityGroup, LowLatency.
DeploymentSetName string
The name of the deployment set. The name must be 2 to 128 characters in length and can contain letters, digits, colons (:), underscores (_), and hyphens (-). It must start with a letter and cannot start with http:// or https://.
Description string
The description of the deployment set. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
Domain Changes to this property will trigger replacement. string
Field domain has been deprecated from provider version 1.243.0.

Deprecated: Field domain has been deprecated from provider version 1.243.0.

Granularity Changes to this property will trigger replacement. string
Field granularity has been deprecated from provider version 1.243.0.

Deprecated: Field granularity has been deprecated from provider version 1.243.0.

OnUnableToRedeployFailedInstance string
The emergency solution to use in the situation where instances in the deployment set cannot be evenly distributed to different zones due to resource insufficiency after the instances failover. Valid values:

  • CancelMembershipAndStart - Removes the instances from the deployment set and starts the instances immediately after they are failed over.
  • KeepStopped- Leaves the instances in the Stopped state and starts them after resources are replenished.
Strategy Changes to this property will trigger replacement. string
The deployment strategy. Default value: Availability. Valid values: Availability, AvailabilityGroup, LowLatency.
deploymentSetName String
The name of the deployment set. The name must be 2 to 128 characters in length and can contain letters, digits, colons (:), underscores (_), and hyphens (-). It must start with a letter and cannot start with http:// or https://.
description String
The description of the deployment set. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
domain Changes to this property will trigger replacement. String
Field domain has been deprecated from provider version 1.243.0.

Deprecated: Field domain has been deprecated from provider version 1.243.0.

granularity Changes to this property will trigger replacement. String
Field granularity has been deprecated from provider version 1.243.0.

Deprecated: Field granularity has been deprecated from provider version 1.243.0.

onUnableToRedeployFailedInstance String
The emergency solution to use in the situation where instances in the deployment set cannot be evenly distributed to different zones due to resource insufficiency after the instances failover. Valid values:

  • CancelMembershipAndStart - Removes the instances from the deployment set and starts the instances immediately after they are failed over.
  • KeepStopped- Leaves the instances in the Stopped state and starts them after resources are replenished.
strategy Changes to this property will trigger replacement. String
The deployment strategy. Default value: Availability. Valid values: Availability, AvailabilityGroup, LowLatency.
deploymentSetName string
The name of the deployment set. The name must be 2 to 128 characters in length and can contain letters, digits, colons (:), underscores (_), and hyphens (-). It must start with a letter and cannot start with http:// or https://.
description string
The description of the deployment set. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
domain Changes to this property will trigger replacement. string
Field domain has been deprecated from provider version 1.243.0.

Deprecated: Field domain has been deprecated from provider version 1.243.0.

granularity Changes to this property will trigger replacement. string
Field granularity has been deprecated from provider version 1.243.0.

Deprecated: Field granularity has been deprecated from provider version 1.243.0.

onUnableToRedeployFailedInstance string
The emergency solution to use in the situation where instances in the deployment set cannot be evenly distributed to different zones due to resource insufficiency after the instances failover. Valid values:

  • CancelMembershipAndStart - Removes the instances from the deployment set and starts the instances immediately after they are failed over.
  • KeepStopped- Leaves the instances in the Stopped state and starts them after resources are replenished.
strategy Changes to this property will trigger replacement. string
The deployment strategy. Default value: Availability. Valid values: Availability, AvailabilityGroup, LowLatency.
deployment_set_name str
The name of the deployment set. The name must be 2 to 128 characters in length and can contain letters, digits, colons (:), underscores (_), and hyphens (-). It must start with a letter and cannot start with http:// or https://.
description str
The description of the deployment set. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
domain Changes to this property will trigger replacement. str
Field domain has been deprecated from provider version 1.243.0.

Deprecated: Field domain has been deprecated from provider version 1.243.0.

granularity Changes to this property will trigger replacement. str
Field granularity has been deprecated from provider version 1.243.0.

Deprecated: Field granularity has been deprecated from provider version 1.243.0.

on_unable_to_redeploy_failed_instance str
The emergency solution to use in the situation where instances in the deployment set cannot be evenly distributed to different zones due to resource insufficiency after the instances failover. Valid values:

  • CancelMembershipAndStart - Removes the instances from the deployment set and starts the instances immediately after they are failed over.
  • KeepStopped- Leaves the instances in the Stopped state and starts them after resources are replenished.
strategy Changes to this property will trigger replacement. str
The deployment strategy. Default value: Availability. Valid values: Availability, AvailabilityGroup, LowLatency.
deploymentSetName String
The name of the deployment set. The name must be 2 to 128 characters in length and can contain letters, digits, colons (:), underscores (_), and hyphens (-). It must start with a letter and cannot start with http:// or https://.
description String
The description of the deployment set. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
domain Changes to this property will trigger replacement. String
Field domain has been deprecated from provider version 1.243.0.

Deprecated: Field domain has been deprecated from provider version 1.243.0.

granularity Changes to this property will trigger replacement. String
Field granularity has been deprecated from provider version 1.243.0.

Deprecated: Field granularity has been deprecated from provider version 1.243.0.

onUnableToRedeployFailedInstance String
The emergency solution to use in the situation where instances in the deployment set cannot be evenly distributed to different zones due to resource insufficiency after the instances failover. Valid values:

  • CancelMembershipAndStart - Removes the instances from the deployment set and starts the instances immediately after they are failed over.
  • KeepStopped- Leaves the instances in the Stopped state and starts them after resources are replenished.
strategy Changes to this property will trigger replacement. String
The deployment strategy. Default value: Availability. Valid values: Availability, AvailabilityGroup, LowLatency.

Outputs

All input properties are implicitly available as output properties. Additionally, the EcsDeploymentSet resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing EcsDeploymentSet Resource

Get an existing EcsDeploymentSet resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: EcsDeploymentSetState, opts?: CustomResourceOptions): EcsDeploymentSet
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        deployment_set_name: Optional[str] = None,
        description: Optional[str] = None,
        domain: Optional[str] = None,
        granularity: Optional[str] = None,
        on_unable_to_redeploy_failed_instance: Optional[str] = None,
        strategy: Optional[str] = None) -> EcsDeploymentSet
func GetEcsDeploymentSet(ctx *Context, name string, id IDInput, state *EcsDeploymentSetState, opts ...ResourceOption) (*EcsDeploymentSet, error)
public static EcsDeploymentSet Get(string name, Input<string> id, EcsDeploymentSetState? state, CustomResourceOptions? opts = null)
public static EcsDeploymentSet get(String name, Output<String> id, EcsDeploymentSetState state, CustomResourceOptions options)
resources:  _:    type: alicloud:ecs:EcsDeploymentSet    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
DeploymentSetName string
The name of the deployment set. The name must be 2 to 128 characters in length and can contain letters, digits, colons (:), underscores (_), and hyphens (-). It must start with a letter and cannot start with http:// or https://.
Description string
The description of the deployment set. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
Domain Changes to this property will trigger replacement. string
Field domain has been deprecated from provider version 1.243.0.

Deprecated: Field domain has been deprecated from provider version 1.243.0.

Granularity Changes to this property will trigger replacement. string
Field granularity has been deprecated from provider version 1.243.0.

Deprecated: Field granularity has been deprecated from provider version 1.243.0.

OnUnableToRedeployFailedInstance string
The emergency solution to use in the situation where instances in the deployment set cannot be evenly distributed to different zones due to resource insufficiency after the instances failover. Valid values:

  • CancelMembershipAndStart - Removes the instances from the deployment set and starts the instances immediately after they are failed over.
  • KeepStopped- Leaves the instances in the Stopped state and starts them after resources are replenished.
Strategy Changes to this property will trigger replacement. string
The deployment strategy. Default value: Availability. Valid values: Availability, AvailabilityGroup, LowLatency.
DeploymentSetName string
The name of the deployment set. The name must be 2 to 128 characters in length and can contain letters, digits, colons (:), underscores (_), and hyphens (-). It must start with a letter and cannot start with http:// or https://.
Description string
The description of the deployment set. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
Domain Changes to this property will trigger replacement. string
Field domain has been deprecated from provider version 1.243.0.

Deprecated: Field domain has been deprecated from provider version 1.243.0.

Granularity Changes to this property will trigger replacement. string
Field granularity has been deprecated from provider version 1.243.0.

Deprecated: Field granularity has been deprecated from provider version 1.243.0.

OnUnableToRedeployFailedInstance string
The emergency solution to use in the situation where instances in the deployment set cannot be evenly distributed to different zones due to resource insufficiency after the instances failover. Valid values:

  • CancelMembershipAndStart - Removes the instances from the deployment set and starts the instances immediately after they are failed over.
  • KeepStopped- Leaves the instances in the Stopped state and starts them after resources are replenished.
Strategy Changes to this property will trigger replacement. string
The deployment strategy. Default value: Availability. Valid values: Availability, AvailabilityGroup, LowLatency.
deploymentSetName String
The name of the deployment set. The name must be 2 to 128 characters in length and can contain letters, digits, colons (:), underscores (_), and hyphens (-). It must start with a letter and cannot start with http:// or https://.
description String
The description of the deployment set. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
domain Changes to this property will trigger replacement. String
Field domain has been deprecated from provider version 1.243.0.

Deprecated: Field domain has been deprecated from provider version 1.243.0.

granularity Changes to this property will trigger replacement. String
Field granularity has been deprecated from provider version 1.243.0.

Deprecated: Field granularity has been deprecated from provider version 1.243.0.

onUnableToRedeployFailedInstance String
The emergency solution to use in the situation where instances in the deployment set cannot be evenly distributed to different zones due to resource insufficiency after the instances failover. Valid values:

  • CancelMembershipAndStart - Removes the instances from the deployment set and starts the instances immediately after they are failed over.
  • KeepStopped- Leaves the instances in the Stopped state and starts them after resources are replenished.
strategy Changes to this property will trigger replacement. String
The deployment strategy. Default value: Availability. Valid values: Availability, AvailabilityGroup, LowLatency.
deploymentSetName string
The name of the deployment set. The name must be 2 to 128 characters in length and can contain letters, digits, colons (:), underscores (_), and hyphens (-). It must start with a letter and cannot start with http:// or https://.
description string
The description of the deployment set. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
domain Changes to this property will trigger replacement. string
Field domain has been deprecated from provider version 1.243.0.

Deprecated: Field domain has been deprecated from provider version 1.243.0.

granularity Changes to this property will trigger replacement. string
Field granularity has been deprecated from provider version 1.243.0.

Deprecated: Field granularity has been deprecated from provider version 1.243.0.

onUnableToRedeployFailedInstance string
The emergency solution to use in the situation where instances in the deployment set cannot be evenly distributed to different zones due to resource insufficiency after the instances failover. Valid values:

  • CancelMembershipAndStart - Removes the instances from the deployment set and starts the instances immediately after they are failed over.
  • KeepStopped- Leaves the instances in the Stopped state and starts them after resources are replenished.
strategy Changes to this property will trigger replacement. string
The deployment strategy. Default value: Availability. Valid values: Availability, AvailabilityGroup, LowLatency.
deployment_set_name str
The name of the deployment set. The name must be 2 to 128 characters in length and can contain letters, digits, colons (:), underscores (_), and hyphens (-). It must start with a letter and cannot start with http:// or https://.
description str
The description of the deployment set. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
domain Changes to this property will trigger replacement. str
Field domain has been deprecated from provider version 1.243.0.

Deprecated: Field domain has been deprecated from provider version 1.243.0.

granularity Changes to this property will trigger replacement. str
Field granularity has been deprecated from provider version 1.243.0.

Deprecated: Field granularity has been deprecated from provider version 1.243.0.

on_unable_to_redeploy_failed_instance str
The emergency solution to use in the situation where instances in the deployment set cannot be evenly distributed to different zones due to resource insufficiency after the instances failover. Valid values:

  • CancelMembershipAndStart - Removes the instances from the deployment set and starts the instances immediately after they are failed over.
  • KeepStopped- Leaves the instances in the Stopped state and starts them after resources are replenished.
strategy Changes to this property will trigger replacement. str
The deployment strategy. Default value: Availability. Valid values: Availability, AvailabilityGroup, LowLatency.
deploymentSetName String
The name of the deployment set. The name must be 2 to 128 characters in length and can contain letters, digits, colons (:), underscores (_), and hyphens (-). It must start with a letter and cannot start with http:// or https://.
description String
The description of the deployment set. The description must be 2 to 256 characters in length and cannot start with http:// or https://.
domain Changes to this property will trigger replacement. String
Field domain has been deprecated from provider version 1.243.0.

Deprecated: Field domain has been deprecated from provider version 1.243.0.

granularity Changes to this property will trigger replacement. String
Field granularity has been deprecated from provider version 1.243.0.

Deprecated: Field granularity has been deprecated from provider version 1.243.0.

onUnableToRedeployFailedInstance String
The emergency solution to use in the situation where instances in the deployment set cannot be evenly distributed to different zones due to resource insufficiency after the instances failover. Valid values:

  • CancelMembershipAndStart - Removes the instances from the deployment set and starts the instances immediately after they are failed over.
  • KeepStopped- Leaves the instances in the Stopped state and starts them after resources are replenished.
strategy Changes to this property will trigger replacement. String
The deployment strategy. Default value: Availability. Valid values: Availability, AvailabilityGroup, LowLatency.

Import

ECS Deployment Set can be imported using the id, e.g.

$ pulumi import alicloud:ecs/ecsDeploymentSet:EcsDeploymentSet example <id>
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
Alibaba Cloud pulumi/pulumi-alicloud
License
Apache-2.0
Notes
This Pulumi package is based on the alicloud Terraform Provider.