aws.ecs.getTaskExecution
Explore with Pulumi AI
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 apulumi 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.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = aws.ecs.getTaskExecution({
cluster: exampleAwsEcsCluster.id,
taskDefinition: exampleAwsEcsTaskDefinition.arn,
desiredCount: 1,
launchType: "FARGATE",
networkConfiguration: {
subnets: exampleAwsSubnet.map(__item => __item.id),
securityGroups: [exampleAwsSecurityGroup.id],
assignPublicIp: false,
},
});
import pulumi
import pulumi_aws as aws
example = aws.ecs.get_task_execution(cluster=example_aws_ecs_cluster["id"],
task_definition=example_aws_ecs_task_definition["arn"],
desired_count=1,
launch_type="FARGATE",
network_configuration={
"subnets": [__item["id"] for __item in example_aws_subnet],
"security_groups": [example_aws_security_group["id"]],
"assign_public_ip": False,
})
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ecs"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := ecs.GetTaskExecution(ctx, &ecs.GetTaskExecutionArgs{
Cluster: exampleAwsEcsCluster.Id,
TaskDefinition: exampleAwsEcsTaskDefinition.Arn,
DesiredCount: pulumi.IntRef(1),
LaunchType: pulumi.StringRef("FARGATE"),
NetworkConfiguration: ecs.GetTaskExecutionNetworkConfiguration{
Subnets: []string(%!v(PANIC=Format method: fatal: A failure has occurred: unlowered splat expression @ example.pp:6,22-44)),
SecurityGroups: interface{}{
exampleAwsSecurityGroup.Id,
},
AssignPublicIp: pulumi.BoolRef(false),
},
}, nil);
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = Aws.Ecs.GetTaskExecution.Invoke(new()
{
Cluster = exampleAwsEcsCluster.Id,
TaskDefinition = exampleAwsEcsTaskDefinition.Arn,
DesiredCount = 1,
LaunchType = "FARGATE",
NetworkConfiguration = new Aws.Ecs.Inputs.GetTaskExecutionNetworkConfigurationInputArgs
{
Subnets = exampleAwsSubnet.Select(__item => __item.Id).ToList(),
SecurityGroups = new[]
{
exampleAwsSecurityGroup.Id,
},
AssignPublicIp = false,
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ecs.EcsFunctions;
import com.pulumi.aws.ecs.inputs.GetTaskExecutionArgs;
import com.pulumi.aws.ecs.inputs.GetTaskExecutionNetworkConfigurationArgs;
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 example = EcsFunctions.getTaskExecution(GetTaskExecutionArgs.builder()
.cluster(exampleAwsEcsCluster.id())
.taskDefinition(exampleAwsEcsTaskDefinition.arn())
.desiredCount(1)
.launchType("FARGATE")
.networkConfiguration(GetTaskExecutionNetworkConfigurationArgs.builder()
.subnets(exampleAwsSubnet.stream().map(element -> element.id()).collect(toList()))
.securityGroups(exampleAwsSecurityGroup.id())
.assignPublicIp(false)
.build())
.build());
}
}
Coming soon!
Using getTaskExecution
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getTaskExecution(args: GetTaskExecutionArgs, opts?: InvokeOptions): Promise<GetTaskExecutionResult>
function getTaskExecutionOutput(args: GetTaskExecutionOutputArgs, opts?: InvokeOptions): Output<GetTaskExecutionResult>
def get_task_execution(capacity_provider_strategies: Optional[Sequence[GetTaskExecutionCapacityProviderStrategy]] = None,
client_token: Optional[str] = None,
cluster: Optional[str] = None,
desired_count: Optional[int] = None,
enable_ecs_managed_tags: Optional[bool] = None,
enable_execute_command: Optional[bool] = None,
group: Optional[str] = None,
launch_type: Optional[str] = None,
network_configuration: Optional[GetTaskExecutionNetworkConfiguration] = None,
overrides: Optional[GetTaskExecutionOverrides] = None,
placement_constraints: Optional[Sequence[GetTaskExecutionPlacementConstraint]] = None,
placement_strategies: Optional[Sequence[GetTaskExecutionPlacementStrategy]] = None,
platform_version: Optional[str] = None,
propagate_tags: Optional[str] = None,
reference_id: Optional[str] = None,
started_by: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
task_definition: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetTaskExecutionResult
def get_task_execution_output(capacity_provider_strategies: Optional[pulumi.Input[Sequence[pulumi.Input[GetTaskExecutionCapacityProviderStrategyArgs]]]] = None,
client_token: Optional[pulumi.Input[str]] = None,
cluster: Optional[pulumi.Input[str]] = None,
desired_count: Optional[pulumi.Input[int]] = None,
enable_ecs_managed_tags: Optional[pulumi.Input[bool]] = None,
enable_execute_command: Optional[pulumi.Input[bool]] = None,
group: Optional[pulumi.Input[str]] = None,
launch_type: Optional[pulumi.Input[str]] = None,
network_configuration: Optional[pulumi.Input[GetTaskExecutionNetworkConfigurationArgs]] = None,
overrides: Optional[pulumi.Input[GetTaskExecutionOverridesArgs]] = None,
placement_constraints: Optional[pulumi.Input[Sequence[pulumi.Input[GetTaskExecutionPlacementConstraintArgs]]]] = None,
placement_strategies: Optional[pulumi.Input[Sequence[pulumi.Input[GetTaskExecutionPlacementStrategyArgs]]]] = None,
platform_version: Optional[pulumi.Input[str]] = None,
propagate_tags: Optional[pulumi.Input[str]] = None,
reference_id: Optional[pulumi.Input[str]] = None,
started_by: Optional[pulumi.Input[str]] = None,
tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
task_definition: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetTaskExecutionResult]
func GetTaskExecution(ctx *Context, args *GetTaskExecutionArgs, opts ...InvokeOption) (*GetTaskExecutionResult, error)
func GetTaskExecutionOutput(ctx *Context, args *GetTaskExecutionOutputArgs, opts ...InvokeOption) GetTaskExecutionResultOutput
> Note: This function is named GetTaskExecution
in the Go SDK.
public static class GetTaskExecution
{
public static Task<GetTaskExecutionResult> InvokeAsync(GetTaskExecutionArgs args, InvokeOptions? opts = null)
public static Output<GetTaskExecutionResult> Invoke(GetTaskExecutionInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetTaskExecutionResult> getTaskExecution(GetTaskExecutionArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: aws:ecs/getTaskExecution:getTaskExecution
arguments:
# arguments dictionary
The following arguments are supported:
- Cluster string
- Short name or full Amazon Resource Name (ARN) of the cluster to run the task on.
- Task
Definition string The
family
andrevision
(family:revision
) or full ARN of the task definition to run. If a revision isn't specified, the latestACTIVE
revision is used.The following arguments are optional:
- Capacity
Provider List<GetStrategies Task Execution Capacity Provider Strategy> - Set of capacity provider strategies to use for the cluster. See below.
- Client
Token string - An identifier that you provide to ensure the idempotency of the request. It must be unique and is case sensitive. Up to 64 characters are allowed. The valid characters are characters in the range of 33-126, inclusive. For more information, see Ensuring idempotency.
- Desired
Count int - Number of instantiations of the specified task to place on your cluster. You can specify up to 10 tasks for each call.
- bool
- Specifies whether to enable Amazon ECS managed tags for the tasks within the service.
- Enable
Execute boolCommand - Specifies whether to enable Amazon ECS Exec for the tasks within the service.
- Group string
- Name of the task group to associate with the task. The default value is the family name of the task definition.
- Launch
Type string - Launch type on which to run your service. Valid values are
EC2
,FARGATE
, andEXTERNAL
. - Network
Configuration GetTask Execution Network Configuration - 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
Get
Task Execution Overrides - A list of container overrides that specify the name of a container in the specified task definition and the overrides it should receive.
- Placement
Constraints List<GetTask Execution Placement Constraint> - An array of placement constraint objects to use for the task. You can specify up to 10 constraints for each task. See below.
- Placement
Strategies List<GetTask Execution Placement Strategy> - The placement strategy objects to use for the task. You can specify a maximum of 5 strategy rules for each task. See below.
- Platform
Version string - 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. - string
- 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 areTASK_DEFINITION
orNONE
. - Reference
Id string - The reference ID to use for the task.
- Started
By string - An optional tag specified when a task is started.
- Dictionary<string, string>
- 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.
- Cluster string
- Short name or full Amazon Resource Name (ARN) of the cluster to run the task on.
- Task
Definition string The
family
andrevision
(family:revision
) or full ARN of the task definition to run. If a revision isn't specified, the latestACTIVE
revision is used.The following arguments are optional:
- Capacity
Provider []GetStrategies Task Execution Capacity Provider Strategy - Set of capacity provider strategies to use for the cluster. See below.
- Client
Token string - An identifier that you provide to ensure the idempotency of the request. It must be unique and is case sensitive. Up to 64 characters are allowed. The valid characters are characters in the range of 33-126, inclusive. For more information, see Ensuring idempotency.
- Desired
Count int - Number of instantiations of the specified task to place on your cluster. You can specify up to 10 tasks for each call.
- bool
- Specifies whether to enable Amazon ECS managed tags for the tasks within the service.
- Enable
Execute boolCommand - Specifies whether to enable Amazon ECS Exec for the tasks within the service.
- Group string
- Name of the task group to associate with the task. The default value is the family name of the task definition.
- Launch
Type string - Launch type on which to run your service. Valid values are
EC2
,FARGATE
, andEXTERNAL
. - Network
Configuration GetTask Execution Network Configuration - 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
Get
Task Execution Overrides - A list of container overrides that specify the name of a container in the specified task definition and the overrides it should receive.
- Placement
Constraints []GetTask Execution Placement Constraint - An array of placement constraint objects to use for the task. You can specify up to 10 constraints for each task. See below.
- Placement
Strategies []GetTask Execution Placement Strategy - The placement strategy objects to use for the task. You can specify a maximum of 5 strategy rules for each task. See below.
- Platform
Version string - 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. - string
- 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 areTASK_DEFINITION
orNONE
. - Reference
Id string - The reference ID to use for the task.
- Started
By string - An optional tag specified when a task is started.
- map[string]string
- 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.
- cluster String
- Short name or full Amazon Resource Name (ARN) of the cluster to run the task on.
- task
Definition String The
family
andrevision
(family:revision
) or full ARN of the task definition to run. If a revision isn't specified, the latestACTIVE
revision is used.The following arguments are optional:
- capacity
Provider List<GetStrategies Task Execution Capacity Provider Strategy> - Set of capacity provider strategies to use for the cluster. See below.
- client
Token String - An identifier that you provide to ensure the idempotency of the request. It must be unique and is case sensitive. Up to 64 characters are allowed. The valid characters are characters in the range of 33-126, inclusive. For more information, see Ensuring idempotency.
- desired
Count Integer - Number of instantiations of the specified task to place on your cluster. You can specify up to 10 tasks for each call.
- Boolean
- Specifies whether to enable Amazon ECS managed tags for the tasks within the service.
- enable
Execute BooleanCommand - Specifies whether to enable Amazon ECS Exec for the tasks within the service.
- group String
- Name of the task group to associate with the task. The default value is the family name of the task definition.
- launch
Type String - Launch type on which to run your service. Valid values are
EC2
,FARGATE
, andEXTERNAL
. - network
Configuration GetTask Execution Network Configuration - 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
Get
Task Execution Overrides - A list of container overrides that specify the name of a container in the specified task definition and the overrides it should receive.
- placement
Constraints List<GetTask Execution Placement Constraint> - An array of placement constraint objects to use for the task. You can specify up to 10 constraints for each task. See below.
- placement
Strategies List<GetTask Execution Placement Strategy> - The placement strategy objects to use for the task. You can specify a maximum of 5 strategy rules for each task. See below.
- platform
Version String - 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. - String
- 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 areTASK_DEFINITION
orNONE
. - reference
Id String - The reference ID to use for the task.
- started
By String - An optional tag specified when a task is started.
- Map<String,String>
- 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.
- cluster string
- Short name or full Amazon Resource Name (ARN) of the cluster to run the task on.
- task
Definition string The
family
andrevision
(family:revision
) or full ARN of the task definition to run. If a revision isn't specified, the latestACTIVE
revision is used.The following arguments are optional:
- capacity
Provider GetStrategies Task Execution Capacity Provider Strategy[] - Set of capacity provider strategies to use for the cluster. See below.
- client
Token string - An identifier that you provide to ensure the idempotency of the request. It must be unique and is case sensitive. Up to 64 characters are allowed. The valid characters are characters in the range of 33-126, inclusive. For more information, see Ensuring idempotency.
- desired
Count number - Number of instantiations of the specified task to place on your cluster. You can specify up to 10 tasks for each call.
- boolean
- Specifies whether to enable Amazon ECS managed tags for the tasks within the service.
- enable
Execute booleanCommand - Specifies whether to enable Amazon ECS Exec for the tasks within the service.
- group string
- Name of the task group to associate with the task. The default value is the family name of the task definition.
- launch
Type string - Launch type on which to run your service. Valid values are
EC2
,FARGATE
, andEXTERNAL
. - network
Configuration GetTask Execution Network Configuration - 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
Get
Task Execution Overrides - A list of container overrides that specify the name of a container in the specified task definition and the overrides it should receive.
- placement
Constraints GetTask Execution Placement Constraint[] - An array of placement constraint objects to use for the task. You can specify up to 10 constraints for each task. See below.
- placement
Strategies GetTask Execution Placement Strategy[] - The placement strategy objects to use for the task. You can specify a maximum of 5 strategy rules for each task. See below.
- platform
Version string - 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. - string
- 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 areTASK_DEFINITION
orNONE
. - reference
Id string - The reference ID to use for the task.
- started
By string - An optional tag specified when a task is started.
- {[key: string]: string}
- 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.
- cluster str
- Short name or full Amazon Resource Name (ARN) of the cluster to run the task on.
- task_
definition str The
family
andrevision
(family:revision
) or full ARN of the task definition to run. If a revision isn't specified, the latestACTIVE
revision is used.The following arguments are optional:
- capacity_
provider_ Sequence[Getstrategies Task Execution Capacity Provider Strategy] - Set of capacity provider strategies to use for the cluster. See below.
- client_
token str - An identifier that you provide to ensure the idempotency of the request. It must be unique and is case sensitive. Up to 64 characters are allowed. The valid characters are characters in the range of 33-126, inclusive. For more information, see Ensuring idempotency.
- desired_
count int - Number of instantiations of the specified task to place on your cluster. You can specify up to 10 tasks for each call.
- bool
- Specifies whether to enable Amazon ECS managed tags for the tasks within the service.
- enable_
execute_ boolcommand - Specifies whether to enable Amazon ECS Exec for the tasks within the service.
- group str
- Name of the task group to associate with the task. The default value is the family name of the task definition.
- launch_
type str - Launch type on which to run your service. Valid values are
EC2
,FARGATE
, andEXTERNAL
. - network_
configuration GetTask Execution Network Configuration - 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
Get
Task Execution Overrides - A list of container overrides that specify the name of a container in the specified task definition and the overrides it should receive.
- placement_
constraints Sequence[GetTask Execution Placement Constraint] - An array of placement constraint objects to use for the task. You can specify up to 10 constraints for each task. See below.
- placement_
strategies Sequence[GetTask Execution Placement Strategy] - The placement strategy objects to use for the task. You can specify a maximum of 5 strategy rules for each task. See below.
- platform_
version str - 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. - str
- 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 areTASK_DEFINITION
orNONE
. - reference_
id str - The reference ID to use for the task.
- started_
by str - An optional tag specified when a task is started.
- Mapping[str, str]
- 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.
- cluster String
- Short name or full Amazon Resource Name (ARN) of the cluster to run the task on.
- task
Definition String The
family
andrevision
(family:revision
) or full ARN of the task definition to run. If a revision isn't specified, the latestACTIVE
revision is used.The following arguments are optional:
- capacity
Provider List<Property Map>Strategies - Set of capacity provider strategies to use for the cluster. See below.
- client
Token String - An identifier that you provide to ensure the idempotency of the request. It must be unique and is case sensitive. Up to 64 characters are allowed. The valid characters are characters in the range of 33-126, inclusive. For more information, see Ensuring idempotency.
- desired
Count Number - Number of instantiations of the specified task to place on your cluster. You can specify up to 10 tasks for each call.
- Boolean
- Specifies whether to enable Amazon ECS managed tags for the tasks within the service.
- enable
Execute BooleanCommand - Specifies whether to enable Amazon ECS Exec for the tasks within the service.
- group String
- Name of the task group to associate with the task. The default value is the family name of the task definition.
- launch
Type String - Launch type on which to run your service. Valid values are
EC2
,FARGATE
, andEXTERNAL
. - network
Configuration Property Map - 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 Property Map
- A list of container overrides that specify the name of a container in the specified task definition and the overrides it should receive.
- placement
Constraints List<Property Map> - An array of placement constraint objects to use for the task. You can specify up to 10 constraints for each task. See below.
- placement
Strategies List<Property Map> - The placement strategy objects to use for the task. You can specify a maximum of 5 strategy rules for each task. See below.
- platform
Version String - 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. - String
- 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 areTASK_DEFINITION
orNONE
. - reference
Id String - The reference ID to use for the task.
- started
By String - An optional tag specified when a task is started.
- Map<String>
- 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.
getTaskExecution Result
The following output properties are available:
- Cluster string
- Id string
- The provider-assigned unique ID for this managed resource.
- Task
Arns List<string> - A list of the provisioned task ARNs.
- Task
Definition string - Capacity
Provider List<GetStrategies Task Execution Capacity Provider Strategy> - Client
Token string - Desired
Count int - bool
- Enable
Execute boolCommand - Group string
- Launch
Type string - Network
Configuration GetTask Execution Network Configuration - Overrides
Get
Task Execution Overrides - Placement
Constraints List<GetTask Execution Placement Constraint> - Placement
Strategies List<GetTask Execution Placement Strategy> - Platform
Version string - string
- Reference
Id string - Started
By string - Dictionary<string, string>
- Cluster string
- Id string
- The provider-assigned unique ID for this managed resource.
- Task
Arns []string - A list of the provisioned task ARNs.
- Task
Definition string - Capacity
Provider []GetStrategies Task Execution Capacity Provider Strategy - Client
Token string - Desired
Count int - bool
- Enable
Execute boolCommand - Group string
- Launch
Type string - Network
Configuration GetTask Execution Network Configuration - Overrides
Get
Task Execution Overrides - Placement
Constraints []GetTask Execution Placement Constraint - Placement
Strategies []GetTask Execution Placement Strategy - Platform
Version string - string
- Reference
Id string - Started
By string - map[string]string
- cluster String
- id String
- The provider-assigned unique ID for this managed resource.
- task
Arns List<String> - A list of the provisioned task ARNs.
- task
Definition String - capacity
Provider List<GetStrategies Task Execution Capacity Provider Strategy> - client
Token String - desired
Count Integer - Boolean
- enable
Execute BooleanCommand - group String
- launch
Type String - network
Configuration GetTask Execution Network Configuration - overrides
Get
Task Execution Overrides - placement
Constraints List<GetTask Execution Placement Constraint> - placement
Strategies List<GetTask Execution Placement Strategy> - platform
Version String - String
- reference
Id String - started
By String - Map<String,String>
- cluster string
- id string
- The provider-assigned unique ID for this managed resource.
- task
Arns string[] - A list of the provisioned task ARNs.
- task
Definition string - capacity
Provider GetStrategies Task Execution Capacity Provider Strategy[] - client
Token string - desired
Count number - boolean
- enable
Execute booleanCommand - group string
- launch
Type string - network
Configuration GetTask Execution Network Configuration - overrides
Get
Task Execution Overrides - placement
Constraints GetTask Execution Placement Constraint[] - placement
Strategies GetTask Execution Placement Strategy[] - platform
Version string - string
- reference
Id string - started
By string - {[key: string]: string}
- cluster str
- id str
- The provider-assigned unique ID for this managed resource.
- task_
arns Sequence[str] - A list of the provisioned task ARNs.
- task_
definition str - capacity_
provider_ Sequence[Getstrategies Task Execution Capacity Provider Strategy] - client_
token str - desired_
count int - bool
- enable_
execute_ boolcommand - group str
- launch_
type str - network_
configuration GetTask Execution Network Configuration - overrides
Get
Task Execution Overrides - placement_
constraints Sequence[GetTask Execution Placement Constraint] - placement_
strategies Sequence[GetTask Execution Placement Strategy] - platform_
version str - str
- reference_
id str - started_
by str - Mapping[str, str]
- cluster String
- id String
- The provider-assigned unique ID for this managed resource.
- task
Arns List<String> - A list of the provisioned task ARNs.
- task
Definition String - capacity
Provider List<Property Map>Strategies - client
Token String - desired
Count Number - Boolean
- enable
Execute BooleanCommand - group String
- launch
Type String - network
Configuration Property Map - overrides Property Map
- placement
Constraints List<Property Map> - placement
Strategies List<Property Map> - platform
Version String - String
- reference
Id String - started
By String - Map<String>
Supporting Types
GetTaskExecutionCapacityProviderStrategy
- Capacity
Provider string - Name of the capacity provider.
- Base int
- The number of tasks, at a minimum, to run on the specified capacity provider. Only one capacity provider in a capacity provider strategy can have a base defined. Defaults to
0
. - Weight int
- The relative percentage of the total number of launched tasks that should use the specified capacity provider. The
weight
value is taken into consideration after thebase
count of tasks has been satisfied. Defaults to0
.
- Capacity
Provider string - Name of the capacity provider.
- Base int
- The number of tasks, at a minimum, to run on the specified capacity provider. Only one capacity provider in a capacity provider strategy can have a base defined. Defaults to
0
. - Weight int
- The relative percentage of the total number of launched tasks that should use the specified capacity provider. The
weight
value is taken into consideration after thebase
count of tasks has been satisfied. Defaults to0
.
- capacity
Provider String - Name of the capacity provider.
- base Integer
- The number of tasks, at a minimum, to run on the specified capacity provider. Only one capacity provider in a capacity provider strategy can have a base defined. Defaults to
0
. - weight Integer
- The relative percentage of the total number of launched tasks that should use the specified capacity provider. The
weight
value is taken into consideration after thebase
count of tasks has been satisfied. Defaults to0
.
- capacity
Provider string - Name of the capacity provider.
- base number
- The number of tasks, at a minimum, to run on the specified capacity provider. Only one capacity provider in a capacity provider strategy can have a base defined. Defaults to
0
. - weight number
- The relative percentage of the total number of launched tasks that should use the specified capacity provider. The
weight
value is taken into consideration after thebase
count of tasks has been satisfied. Defaults to0
.
- capacity_
provider str - Name of the capacity provider.
- base int
- The number of tasks, at a minimum, to run on the specified capacity provider. Only one capacity provider in a capacity provider strategy can have a base defined. Defaults to
0
. - weight int
- The relative percentage of the total number of launched tasks that should use the specified capacity provider. The
weight
value is taken into consideration after thebase
count of tasks has been satisfied. Defaults to0
.
- capacity
Provider String - Name of the capacity provider.
- base Number
- The number of tasks, at a minimum, to run on the specified capacity provider. Only one capacity provider in a capacity provider strategy can have a base defined. Defaults to
0
. - weight Number
- The relative percentage of the total number of launched tasks that should use the specified capacity provider. The
weight
value is taken into consideration after thebase
count of tasks has been satisfied. Defaults to0
.
GetTaskExecutionNetworkConfiguration
- Subnets List<string>
- Subnets associated with the task or service.
- Assign
Public boolIp Assign a public IP address to the ENI (Fargate launch type only). Valid values are
true
orfalse
. Defaultfalse
.For more information, see the Task Networking documentation.
- Security
Groups List<string> - Security groups associated with the task or service. If you do not specify a security group, the default security group for the VPC is used.
- Subnets []string
- Subnets associated with the task or service.
- Assign
Public boolIp Assign a public IP address to the ENI (Fargate launch type only). Valid values are
true
orfalse
. Defaultfalse
.For more information, see the Task Networking documentation.
- Security
Groups []string - Security groups associated with the task or service. If you do not specify a security group, the default security group for the VPC is used.
- subnets List<String>
- Subnets associated with the task or service.
- assign
Public BooleanIp Assign a public IP address to the ENI (Fargate launch type only). Valid values are
true
orfalse
. Defaultfalse
.For more information, see the Task Networking documentation.
- security
Groups List<String> - Security groups associated with the task or service. If you do not specify a security group, the default security group for the VPC is used.
- subnets string[]
- Subnets associated with the task or service.
- assign
Public booleanIp Assign a public IP address to the ENI (Fargate launch type only). Valid values are
true
orfalse
. Defaultfalse
.For more information, see the Task Networking documentation.
- security
Groups string[] - Security groups associated with the task or service. If you do not specify a security group, the default security group for the VPC is used.
- subnets Sequence[str]
- Subnets associated with the task or service.
- assign_
public_ boolip Assign a public IP address to the ENI (Fargate launch type only). Valid values are
true
orfalse
. Defaultfalse
.For more information, see the Task Networking documentation.
- security_
groups Sequence[str] - Security groups associated with the task or service. If you do not specify a security group, the default security group for the VPC is used.
- subnets List<String>
- Subnets associated with the task or service.
- assign
Public BooleanIp Assign a public IP address to the ENI (Fargate launch type only). Valid values are
true
orfalse
. Defaultfalse
.For more information, see the Task Networking documentation.
- security
Groups List<String> - Security groups associated with the task or service. If you do not specify a security group, the default security group for the VPC is used.
GetTaskExecutionOverrides
- Container
Overrides List<GetTask Execution Overrides Container Override> - One or more container overrides that are sent to a task. See below.
- Cpu string
- The CPU override for the task.
- Execution
Role stringArn - Amazon Resource Name (ARN) of the task execution role override for the task.
- Inference
Accelerator List<GetOverrides Task Execution Overrides Inference Accelerator Override> - Elastic Inference accelerator override for the task. See below.
- Memory string
- The memory override for the task.
- Task
Role stringArn - Amazon Resource Name (ARN) of the role that containers in this task can assume.
- Container
Overrides []GetTask Execution Overrides Container Override - One or more container overrides that are sent to a task. See below.
- Cpu string
- The CPU override for the task.
- Execution
Role stringArn - Amazon Resource Name (ARN) of the task execution role override for the task.
- Inference
Accelerator []GetOverrides Task Execution Overrides Inference Accelerator Override - Elastic Inference accelerator override for the task. See below.
- Memory string
- The memory override for the task.
- Task
Role stringArn - Amazon Resource Name (ARN) of the role that containers in this task can assume.
- container
Overrides List<GetTask Execution Overrides Container Override> - One or more container overrides that are sent to a task. See below.
- cpu String
- The CPU override for the task.
- execution
Role StringArn - Amazon Resource Name (ARN) of the task execution role override for the task.
- inference
Accelerator List<GetOverrides Task Execution Overrides Inference Accelerator Override> - Elastic Inference accelerator override for the task. See below.
- memory String
- The memory override for the task.
- task
Role StringArn - Amazon Resource Name (ARN) of the role that containers in this task can assume.
- container
Overrides GetTask Execution Overrides Container Override[] - One or more container overrides that are sent to a task. See below.
- cpu string
- The CPU override for the task.
- execution
Role stringArn - Amazon Resource Name (ARN) of the task execution role override for the task.
- inference
Accelerator GetOverrides Task Execution Overrides Inference Accelerator Override[] - Elastic Inference accelerator override for the task. See below.
- memory string
- The memory override for the task.
- task
Role stringArn - Amazon Resource Name (ARN) of the role that containers in this task can assume.
- container_
overrides Sequence[GetTask Execution Overrides Container Override] - One or more container overrides that are sent to a task. See below.
- cpu str
- The CPU override for the task.
- execution_
role_ strarn - Amazon Resource Name (ARN) of the task execution role override for the task.
- inference_
accelerator_ Sequence[Getoverrides Task Execution Overrides Inference Accelerator Override] - Elastic Inference accelerator override for the task. See below.
- memory str
- The memory override for the task.
- task_
role_ strarn - Amazon Resource Name (ARN) of the role that containers in this task can assume.
- container
Overrides List<Property Map> - One or more container overrides that are sent to a task. See below.
- cpu String
- The CPU override for the task.
- execution
Role StringArn - Amazon Resource Name (ARN) of the task execution role override for the task.
- inference
Accelerator List<Property Map>Overrides - Elastic Inference accelerator override for the task. See below.
- memory String
- The memory override for the task.
- task
Role StringArn - Amazon Resource Name (ARN) of the role that containers in this task can assume.
GetTaskExecutionOverridesContainerOverride
- Name string
- The name of the container that receives the override. This parameter is required if any override is specified.
- Commands List<string>
- The command to send to the container that overrides the default command from the Docker image or the task definition.
- Cpu int
- The number of cpu units reserved for the container, instead of the default value from the task definition.
- Environments
List<Get
Task Execution Overrides Container Override Environment> - The environment variables to send to the container. You can add new environment variables, which are added to the container at launch, or you can override the existing environment variables from the Docker image or the task definition. See below.
- Memory int
- The hard limit (in MiB) of memory to present to the container, instead of the default value from the task definition. If your container attempts to exceed the memory specified here, the container is killed.
- Memory
Reservation int - The soft limit (in MiB) of memory to reserve for the container, instead of the default value from the task definition.
- Resource
Requirements List<GetTask Execution Overrides Container Override Resource Requirement> - The type and amount of a resource to assign to a container, instead of the default value from the task definition. The only supported resource is a GPU. See below.
- Name string
- The name of the container that receives the override. This parameter is required if any override is specified.
- Commands []string
- The command to send to the container that overrides the default command from the Docker image or the task definition.
- Cpu int
- The number of cpu units reserved for the container, instead of the default value from the task definition.
- Environments
[]Get
Task Execution Overrides Container Override Environment - The environment variables to send to the container. You can add new environment variables, which are added to the container at launch, or you can override the existing environment variables from the Docker image or the task definition. See below.
- Memory int
- The hard limit (in MiB) of memory to present to the container, instead of the default value from the task definition. If your container attempts to exceed the memory specified here, the container is killed.
- Memory
Reservation int - The soft limit (in MiB) of memory to reserve for the container, instead of the default value from the task definition.
- Resource
Requirements []GetTask Execution Overrides Container Override Resource Requirement - The type and amount of a resource to assign to a container, instead of the default value from the task definition. The only supported resource is a GPU. See below.
- name String
- The name of the container that receives the override. This parameter is required if any override is specified.
- commands List<String>
- The command to send to the container that overrides the default command from the Docker image or the task definition.
- cpu Integer
- The number of cpu units reserved for the container, instead of the default value from the task definition.
- environments
List<Get
Task Execution Overrides Container Override Environment> - The environment variables to send to the container. You can add new environment variables, which are added to the container at launch, or you can override the existing environment variables from the Docker image or the task definition. See below.
- memory Integer
- The hard limit (in MiB) of memory to present to the container, instead of the default value from the task definition. If your container attempts to exceed the memory specified here, the container is killed.
- memory
Reservation Integer - The soft limit (in MiB) of memory to reserve for the container, instead of the default value from the task definition.
- resource
Requirements List<GetTask Execution Overrides Container Override Resource Requirement> - The type and amount of a resource to assign to a container, instead of the default value from the task definition. The only supported resource is a GPU. See below.
- name string
- The name of the container that receives the override. This parameter is required if any override is specified.
- commands string[]
- The command to send to the container that overrides the default command from the Docker image or the task definition.
- cpu number
- The number of cpu units reserved for the container, instead of the default value from the task definition.
- environments
Get
Task Execution Overrides Container Override Environment[] - The environment variables to send to the container. You can add new environment variables, which are added to the container at launch, or you can override the existing environment variables from the Docker image or the task definition. See below.
- memory number
- The hard limit (in MiB) of memory to present to the container, instead of the default value from the task definition. If your container attempts to exceed the memory specified here, the container is killed.
- memory
Reservation number - The soft limit (in MiB) of memory to reserve for the container, instead of the default value from the task definition.
- resource
Requirements GetTask Execution Overrides Container Override Resource Requirement[] - The type and amount of a resource to assign to a container, instead of the default value from the task definition. The only supported resource is a GPU. See below.
- name str
- The name of the container that receives the override. This parameter is required if any override is specified.
- commands Sequence[str]
- The command to send to the container that overrides the default command from the Docker image or the task definition.
- cpu int
- The number of cpu units reserved for the container, instead of the default value from the task definition.
- environments
Sequence[Get
Task Execution Overrides Container Override Environment] - The environment variables to send to the container. You can add new environment variables, which are added to the container at launch, or you can override the existing environment variables from the Docker image or the task definition. See below.
- memory int
- The hard limit (in MiB) of memory to present to the container, instead of the default value from the task definition. If your container attempts to exceed the memory specified here, the container is killed.
- memory_
reservation int - The soft limit (in MiB) of memory to reserve for the container, instead of the default value from the task definition.
- resource_
requirements Sequence[GetTask Execution Overrides Container Override Resource Requirement] - The type and amount of a resource to assign to a container, instead of the default value from the task definition. The only supported resource is a GPU. See below.
- name String
- The name of the container that receives the override. This parameter is required if any override is specified.
- commands List<String>
- The command to send to the container that overrides the default command from the Docker image or the task definition.
- cpu Number
- The number of cpu units reserved for the container, instead of the default value from the task definition.
- environments List<Property Map>
- The environment variables to send to the container. You can add new environment variables, which are added to the container at launch, or you can override the existing environment variables from the Docker image or the task definition. See below.
- memory Number
- The hard limit (in MiB) of memory to present to the container, instead of the default value from the task definition. If your container attempts to exceed the memory specified here, the container is killed.
- memory
Reservation Number - The soft limit (in MiB) of memory to reserve for the container, instead of the default value from the task definition.
- resource
Requirements List<Property Map> - The type and amount of a resource to assign to a container, instead of the default value from the task definition. The only supported resource is a GPU. See below.
GetTaskExecutionOverridesContainerOverrideEnvironment
GetTaskExecutionOverridesContainerOverrideResourceRequirement
- Type string
- The type of resource to assign to a container. Valid values are
GPU
orInferenceAccelerator
. - Value string
- The value for the specified resource type. If the
GPU
type is used, the value is the number of physical GPUs the Amazon ECS container agent reserves for the container. The number of GPUs that's reserved for all containers in a task can't exceed the number of available GPUs on the container instance that the task is launched on. If theInferenceAccelerator
type is used, the value matches thedeviceName
for an InferenceAccelerator specified in a task definition.
- Type string
- The type of resource to assign to a container. Valid values are
GPU
orInferenceAccelerator
. - Value string
- The value for the specified resource type. If the
GPU
type is used, the value is the number of physical GPUs the Amazon ECS container agent reserves for the container. The number of GPUs that's reserved for all containers in a task can't exceed the number of available GPUs on the container instance that the task is launched on. If theInferenceAccelerator
type is used, the value matches thedeviceName
for an InferenceAccelerator specified in a task definition.
- type String
- The type of resource to assign to a container. Valid values are
GPU
orInferenceAccelerator
. - value String
- The value for the specified resource type. If the
GPU
type is used, the value is the number of physical GPUs the Amazon ECS container agent reserves for the container. The number of GPUs that's reserved for all containers in a task can't exceed the number of available GPUs on the container instance that the task is launched on. If theInferenceAccelerator
type is used, the value matches thedeviceName
for an InferenceAccelerator specified in a task definition.
- type string
- The type of resource to assign to a container. Valid values are
GPU
orInferenceAccelerator
. - value string
- The value for the specified resource type. If the
GPU
type is used, the value is the number of physical GPUs the Amazon ECS container agent reserves for the container. The number of GPUs that's reserved for all containers in a task can't exceed the number of available GPUs on the container instance that the task is launched on. If theInferenceAccelerator
type is used, the value matches thedeviceName
for an InferenceAccelerator specified in a task definition.
- type str
- The type of resource to assign to a container. Valid values are
GPU
orInferenceAccelerator
. - value str
- The value for the specified resource type. If the
GPU
type is used, the value is the number of physical GPUs the Amazon ECS container agent reserves for the container. The number of GPUs that's reserved for all containers in a task can't exceed the number of available GPUs on the container instance that the task is launched on. If theInferenceAccelerator
type is used, the value matches thedeviceName
for an InferenceAccelerator specified in a task definition.
- type String
- The type of resource to assign to a container. Valid values are
GPU
orInferenceAccelerator
. - value String
- The value for the specified resource type. If the
GPU
type is used, the value is the number of physical GPUs the Amazon ECS container agent reserves for the container. The number of GPUs that's reserved for all containers in a task can't exceed the number of available GPUs on the container instance that the task is launched on. If theInferenceAccelerator
type is used, the value matches thedeviceName
for an InferenceAccelerator specified in a task definition.
GetTaskExecutionOverridesInferenceAcceleratorOverride
- Device
Name string - The Elastic Inference accelerator device name to override for the task. This parameter must match a deviceName specified in the task definition.
- Device
Type string - The Elastic Inference accelerator type to use.
- Device
Name string - The Elastic Inference accelerator device name to override for the task. This parameter must match a deviceName specified in the task definition.
- Device
Type string - The Elastic Inference accelerator type to use.
- device
Name String - The Elastic Inference accelerator device name to override for the task. This parameter must match a deviceName specified in the task definition.
- device
Type String - The Elastic Inference accelerator type to use.
- device
Name string - The Elastic Inference accelerator device name to override for the task. This parameter must match a deviceName specified in the task definition.
- device
Type string - The Elastic Inference accelerator type to use.
- device_
name str - The Elastic Inference accelerator device name to override for the task. This parameter must match a deviceName specified in the task definition.
- device_
type str - The Elastic Inference accelerator type to use.
- device
Name String - The Elastic Inference accelerator device name to override for the task. This parameter must match a deviceName specified in the task definition.
- device
Type String - The Elastic Inference accelerator type to use.
GetTaskExecutionPlacementConstraint
- Type string
- The type of constraint. Valid values are
distinctInstance
ormemberOf
. UsedistinctInstance
to ensure that each task in a particular group is running on a different container instance. UsememberOf
to restrict the selection to a group of valid candidates. - Expression string
- A cluster query language expression to apply to the constraint. The expression can have a maximum length of 2000 characters. You can't specify an expression if the constraint type is
distinctInstance
.
- Type string
- The type of constraint. Valid values are
distinctInstance
ormemberOf
. UsedistinctInstance
to ensure that each task in a particular group is running on a different container instance. UsememberOf
to restrict the selection to a group of valid candidates. - Expression string
- A cluster query language expression to apply to the constraint. The expression can have a maximum length of 2000 characters. You can't specify an expression if the constraint type is
distinctInstance
.
- type String
- The type of constraint. Valid values are
distinctInstance
ormemberOf
. UsedistinctInstance
to ensure that each task in a particular group is running on a different container instance. UsememberOf
to restrict the selection to a group of valid candidates. - expression String
- A cluster query language expression to apply to the constraint. The expression can have a maximum length of 2000 characters. You can't specify an expression if the constraint type is
distinctInstance
.
- type string
- The type of constraint. Valid values are
distinctInstance
ormemberOf
. UsedistinctInstance
to ensure that each task in a particular group is running on a different container instance. UsememberOf
to restrict the selection to a group of valid candidates. - expression string
- A cluster query language expression to apply to the constraint. The expression can have a maximum length of 2000 characters. You can't specify an expression if the constraint type is
distinctInstance
.
- type str
- The type of constraint. Valid values are
distinctInstance
ormemberOf
. UsedistinctInstance
to ensure that each task in a particular group is running on a different container instance. UsememberOf
to restrict the selection to a group of valid candidates. - expression str
- A cluster query language expression to apply to the constraint. The expression can have a maximum length of 2000 characters. You can't specify an expression if the constraint type is
distinctInstance
.
- type String
- The type of constraint. Valid values are
distinctInstance
ormemberOf
. UsedistinctInstance
to ensure that each task in a particular group is running on a different container instance. UsememberOf
to restrict the selection to a group of valid candidates. - expression String
- A cluster query language expression to apply to the constraint. The expression can have a maximum length of 2000 characters. You can't specify an expression if the constraint type is
distinctInstance
.
GetTaskExecutionPlacementStrategy
- Type string
The type of placement strategy. Valid values are
random
,spread
, andbinpack
.For more information, see the Placement Strategy documentation.
- Field string
- The field to apply the placement strategy against.
- Type string
The type of placement strategy. Valid values are
random
,spread
, andbinpack
.For more information, see the Placement Strategy documentation.
- Field string
- The field to apply the placement strategy against.
- type String
The type of placement strategy. Valid values are
random
,spread
, andbinpack
.For more information, see the Placement Strategy documentation.
- field String
- The field to apply the placement strategy against.
- type string
The type of placement strategy. Valid values are
random
,spread
, andbinpack
.For more information, see the Placement Strategy documentation.
- field string
- The field to apply the placement strategy against.
- type str
The type of placement strategy. Valid values are
random
,spread
, andbinpack
.For more information, see the Placement Strategy documentation.
- field str
- The field to apply the placement strategy against.
- type String
The type of placement strategy. Valid values are
random
,spread
, andbinpack
.For more information, see the Placement Strategy documentation.
- field String
- The field to apply the placement strategy against.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
aws
Terraform Provider.