Package com.pulumi.aws.ecs
Class TaskSet
- java.lang.Object
-
- com.pulumi.resources.Resource
-
- com.pulumi.resources.CustomResource
-
- com.pulumi.aws.ecs.TaskSet
-
public class TaskSet extends com.pulumi.resources.CustomResource
Provides an ECS task set - effectively a task that is expected to run until an error occurs or a user terminates it (typically a webserver or a database). See [ECS Task Set section in AWS developer guide](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/deployment-type-external.html). ## Example Usage <!--Start PulumiCodeChooser -->package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.aws.ecs.TaskSet; import com.pulumi.aws.ecs.TaskSetArgs; import com.pulumi.aws.ecs.inputs.TaskSetLoadBalancerArgs; 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) { var example = new TaskSet("example", TaskSetArgs.builder() .service(exampleAwsEcsService.id()) .cluster(exampleAwsEcsCluster.id()) .taskDefinition(exampleAwsEcsTaskDefinition.arn()) .loadBalancers(TaskSetLoadBalancerArgs.builder() .targetGroupArn(exampleAwsLbTargetGroup.arn()) .containerName("mongo") .containerPort(8080) .build()) .build()); } }
package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.aws.ecs.TaskSet; import com.pulumi.aws.ecs.TaskSetArgs; import com.pulumi.aws.ecs.inputs.TaskSetScaleArgs; 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) { var example = new TaskSet("example", TaskSetArgs.builder() .scale(TaskSetScaleArgs.builder() .value(50) .build()) .build()); } }
-
-
Constructor Summary
Constructors Constructor Description TaskSet(java.lang.String name)
TaskSet(java.lang.String name, TaskSetArgs args)
TaskSet(java.lang.String name, TaskSetArgs args, com.pulumi.resources.CustomResourceOptions options)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description com.pulumi.core.Output<java.lang.String>
arn()
com.pulumi.core.Output<java.util.Optional<java.util.List<TaskSetCapacityProviderStrategy>>>
capacityProviderStrategies()
com.pulumi.core.Output<java.lang.String>
cluster()
com.pulumi.core.Output<java.lang.String>
externalId()
com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>>
forceDelete()
static TaskSet
get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, TaskSetState state, com.pulumi.resources.CustomResourceOptions options)
Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.com.pulumi.core.Output<java.lang.String>
launchType()
com.pulumi.core.Output<java.util.Optional<java.util.List<TaskSetLoadBalancer>>>
loadBalancers()
com.pulumi.core.Output<java.util.Optional<TaskSetNetworkConfiguration>>
networkConfiguration()
com.pulumi.core.Output<java.lang.String>
platformVersion()
com.pulumi.core.Output<TaskSetScale>
scale()
com.pulumi.core.Output<java.lang.String>
service()
com.pulumi.core.Output<java.util.Optional<TaskSetServiceRegistries>>
serviceRegistries()
com.pulumi.core.Output<java.lang.String>
stabilityStatus()
com.pulumi.core.Output<java.lang.String>
status()
com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,java.lang.String>>>
tags()
com.pulumi.core.Output<java.util.Map<java.lang.String,java.lang.String>>
tagsAll()
com.pulumi.core.Output<java.lang.String>
taskDefinition()
com.pulumi.core.Output<java.lang.String>
taskSetId()
com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>>
waitUntilStable()
com.pulumi.core.Output<java.util.Optional<java.lang.String>>
waitUntilStableTimeout()
-
-
-
Constructor Detail
-
TaskSet
public TaskSet(java.lang.String name)
- Parameters:
name
- The _unique_ name of the resulting resource.
-
TaskSet
public TaskSet(java.lang.String name, TaskSetArgs args)
- Parameters:
name
- The _unique_ name of the resulting resource.args
- The arguments to use to populate this resource's properties.
-
TaskSet
public TaskSet(java.lang.String name, TaskSetArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options)
- Parameters:
name
- The _unique_ name of the resulting resource.args
- The arguments to use to populate this resource's properties.options
- A bag of options that control this resource's behavior.
-
-
Method Detail
-
arn
public com.pulumi.core.Output<java.lang.String> arn()
- Returns:
- The Amazon Resource Name (ARN) that identifies the task set.
-
capacityProviderStrategies
public com.pulumi.core.Output<java.util.Optional<java.util.List<TaskSetCapacityProviderStrategy>>> capacityProviderStrategies()
- Returns:
- The capacity provider strategy to use for the service. Can be one or more. Defined below.
-
cluster
public com.pulumi.core.Output<java.lang.String> cluster()
- Returns:
- The short name or ARN of the cluster that hosts the service to create the task set in.
-
externalId
public com.pulumi.core.Output<java.lang.String> externalId()
- Returns:
- The external ID associated with the task set.
-
forceDelete
public com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> forceDelete()
- Returns:
- Whether to allow deleting the task set without waiting for scaling down to 0. You can force a task set to delete even if it's in the process of scaling a resource. Normally, the provider drains all the tasks before deleting the task set. This bypasses that behavior and potentially leaves resources dangling.
-
launchType
public com.pulumi.core.Output<java.lang.String> launchType()
- Returns:
- The launch type on which to run your service. The valid values are `EC2`, `FARGATE`, and `EXTERNAL`. Defaults to `EC2`.
-
loadBalancers
public com.pulumi.core.Output<java.util.Optional<java.util.List<TaskSetLoadBalancer>>> loadBalancers()
- Returns:
- Details on load balancers that are used with a task set. Detailed below.
-
networkConfiguration
public com.pulumi.core.Output<java.util.Optional<TaskSetNetworkConfiguration>> networkConfiguration()
- Returns:
- The network configuration for the service. This parameter is required for task definitions that use the `awsvpc` network mode to receive their own Elastic Network Interface, and it is not supported for other network modes. Detailed below.
-
platformVersion
public com.pulumi.core.Output<java.lang.String> platformVersion()
- Returns:
- The platform version on which to run your service. Only applicable for `launch_type` set to `FARGATE`. Defaults to `LATEST`. More information about Fargate platform versions can be found in the [AWS ECS User Guide](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/platform_versions.html).
-
scale
public com.pulumi.core.Output<TaskSetScale> scale()
- Returns:
- A floating-point percentage of the desired number of tasks to place and keep running in the task set. Detailed below.
-
service
public com.pulumi.core.Output<java.lang.String> service()
- Returns:
- The short name or ARN of the ECS service.
-
serviceRegistries
public com.pulumi.core.Output<java.util.Optional<TaskSetServiceRegistries>> serviceRegistries()
- Returns:
- The service discovery registries for the service. The maximum number of `service_registries` blocks is `1`. Detailed below.
-
stabilityStatus
public com.pulumi.core.Output<java.lang.String> stabilityStatus()
- Returns:
- The stability status. This indicates whether the task set has reached a steady state.
-
status
public com.pulumi.core.Output<java.lang.String> status()
- Returns:
- The status of the task set.
-
tags
public com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,java.lang.String>>> tags()
- Returns:
- A map of tags to assign to the file system. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. If you have set `copy_tags_to_backups` to true, and you specify one or more tags, no existing file system tags are copied from the file system to the backup.
-
tagsAll
public com.pulumi.core.Output<java.util.Map<java.lang.String,java.lang.String>> tagsAll()
- Returns:
- A map of tags assigned to the resource, including those inherited from the provider `default_tags` configuration block.
-
taskDefinition
public com.pulumi.core.Output<java.lang.String> taskDefinition()
- Returns:
- The family and revision (`family:revision`) or full ARN of the task definition that you want to run in your service. The following arguments are optional:
-
taskSetId
public com.pulumi.core.Output<java.lang.String> taskSetId()
- Returns:
- The ID of the task set.
-
waitUntilStable
public com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> waitUntilStable()
- Returns:
- Whether the provider should wait until the task set has reached `STEADY_STATE`.
-
waitUntilStableTimeout
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> waitUntilStableTimeout()
- Returns:
- Wait timeout for task set to reach `STEADY_STATE`. Valid time units include `ns`, `us` (or `µs`), `ms`, `s`, `m`, and `h`. Default `10m`.
-
get
public static TaskSet get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, @Nullable TaskSetState state, @Nullable com.pulumi.resources.CustomResourceOptions options)
Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.- Parameters:
name
- The _unique_ name of the resulting resource.id
- The _unique_ provider ID of the resource to lookup.state
-options
- Optional settings to control the behavior of the CustomResource.
-
-