getTaskExecution

Data source for managing an AWS ECS (Elastic Container) Task Execution. This data source calls the RunTask API, allowing execution of one-time tasks that don't fit a standard resource lifecycle. See the feature request issue for additional context.

NOTE on preview operations: This data source calls the RunTask API on every read operation, which means new task(s) may be created from a pulumi preview command if all attributes are known. Placing this functionality behind a data source is an intentional trade off to enable use cases requiring a one-time task execution without relying on provisioners. Caution should be taken to ensure the data source is only executed once, or that the resulting tasks can safely run in parallel. {{% examples %}}

Example Usage

{{% /examples %}}

Return

A collection of values returned by getTaskExecution.

Parameters

argument

A collection of arguments for invoking getTaskExecution.


suspend fun getTaskExecution(capacityProviderStrategies: List<GetTaskExecutionCapacityProviderStrategy>? = null, cluster: String, desiredCount: Int? = null, enableEcsManagedTags: Boolean? = null, enableExecuteCommand: Boolean? = null, group: String? = null, launchType: String? = null, networkConfiguration: GetTaskExecutionNetworkConfiguration? = null, overrides: GetTaskExecutionOverrides? = null, placementConstraints: List<GetTaskExecutionPlacementConstraint>? = null, placementStrategies: List<GetTaskExecutionPlacementStrategy>? = null, platformVersion: String? = null, propagateTags: String? = null, referenceId: String? = null, startedBy: String? = null, tags: Map<String, String>? = null, taskDefinition: String): GetTaskExecutionResult

Return

A collection of values returned by getTaskExecution.

Parameters

capacityProviderStrategies

Set of capacity provider strategies to use for the cluster. See below.

cluster

Short name or full Amazon Resource Name (ARN) of the cluster to run the task on.

desiredCount

Number of instantiations of the specified task to place on your cluster. You can specify up to 10 tasks for each call.

enableEcsManagedTags

Specifies whether to enable Amazon ECS managed tags for the tasks within the service.

enableExecuteCommand

Specifies whether to enable Amazon ECS Exec for the tasks within the service.

group

Name of the task group to associate with the task. The default value is the family name of the task definition.

launchType

Launch type on which to run your service. Valid values are EC2, FARGATE, and EXTERNAL.

networkConfiguration

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. See below.

overrides

A list of container overrides that specify the name of a container in the specified task definition and the overrides it should receive.

placementConstraints

An array of placement constraint objects to use for the task. You can specify up to 10 constraints for each task. See below.

placementStrategies

The placement strategy objects to use for the task. You can specify a maximum of 5 strategy rules for each task. See below.

platformVersion

The platform version the task uses. A platform version is only specified for tasks hosted on Fargate. If one isn't specified, the LATEST platform version is used.

propagateTags

Specifies whether to propagate the tags from the task definition to the task. If no value is specified, the tags aren't propagated. An error will be received if you specify the SERVICE option when running a task. Valid values are TASK_DEFINITION or NONE.

referenceId

The reference ID to use for the task.

startedBy

An optional tag specified when a task is started.

tags

Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

taskDefinition

The family and revision (family:revision) or full ARN of the task definition to run. If a revision isn't specified, the latest ACTIVE revision is used. The following arguments are optional:

See also


Return

A collection of values returned by getTaskExecution.

Parameters

argument

Builder for com.pulumi.aws.ecs.kotlin.inputs.GetTaskExecutionPlainArgs.

See also