1. Packages
  2. AWS Classic
  3. API Docs
  4. ecs
  5. getTaskExecution

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.42.0 published on Wednesday, Jun 26, 2024 by Pulumi

aws.ecs.getTaskExecution

Explore with Pulumi AI

aws logo

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.42.0 published on Wednesday, Jun 26, 2024 by Pulumi

    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.

    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],
            "securityGroups": [example_aws_security_group["id"]],
            "assignPublicIp": 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: %!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.
    TaskDefinition string

    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:

    CapacityProviderStrategies List<GetTaskExecutionCapacityProviderStrategy>
    Set of capacity provider strategies to use for the cluster. See below.
    ClientToken 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.
    DesiredCount int
    Number of instantiations of the specified task to place on your cluster. You can specify up to 10 tasks for each call.
    EnableEcsManagedTags bool
    Specifies whether to enable Amazon ECS managed tags for the tasks within the service.
    EnableExecuteCommand bool
    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.
    LaunchType string
    Launch type on which to run your service. Valid values are EC2, FARGATE, and EXTERNAL.
    NetworkConfiguration GetTaskExecutionNetworkConfiguration
    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 GetTaskExecutionOverrides
    A list of container overrides that specify the name of a container in the specified task definition and the overrides it should receive.
    PlacementConstraints List<GetTaskExecutionPlacementConstraint>
    An array of placement constraint objects to use for the task. You can specify up to 10 constraints for each task. See below.
    PlacementStrategies List<GetTaskExecutionPlacementStrategy>
    The placement strategy objects to use for the task. You can specify a maximum of 5 strategy rules for each task. See below.
    PlatformVersion 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.
    PropagateTags 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 are TASK_DEFINITION or NONE.
    ReferenceId string
    The reference ID to use for the task.
    StartedBy string
    An optional tag specified when a task is started.
    Tags 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.
    TaskDefinition string

    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:

    CapacityProviderStrategies []GetTaskExecutionCapacityProviderStrategy
    Set of capacity provider strategies to use for the cluster. See below.
    ClientToken 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.
    DesiredCount int
    Number of instantiations of the specified task to place on your cluster. You can specify up to 10 tasks for each call.
    EnableEcsManagedTags bool
    Specifies whether to enable Amazon ECS managed tags for the tasks within the service.
    EnableExecuteCommand bool
    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.
    LaunchType string
    Launch type on which to run your service. Valid values are EC2, FARGATE, and EXTERNAL.
    NetworkConfiguration GetTaskExecutionNetworkConfiguration
    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 GetTaskExecutionOverrides
    A list of container overrides that specify the name of a container in the specified task definition and the overrides it should receive.
    PlacementConstraints []GetTaskExecutionPlacementConstraint
    An array of placement constraint objects to use for the task. You can specify up to 10 constraints for each task. See below.
    PlacementStrategies []GetTaskExecutionPlacementStrategy
    The placement strategy objects to use for the task. You can specify a maximum of 5 strategy rules for each task. See below.
    PlatformVersion 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.
    PropagateTags 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 are TASK_DEFINITION or NONE.
    ReferenceId string
    The reference ID to use for the task.
    StartedBy string
    An optional tag specified when a task is started.
    Tags 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.
    taskDefinition String

    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:

    capacityProviderStrategies List<GetTaskExecutionCapacityProviderStrategy>
    Set of capacity provider strategies to use for the cluster. See below.
    clientToken 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.
    desiredCount Integer
    Number of instantiations of the specified task to place on your cluster. You can specify up to 10 tasks for each call.
    enableEcsManagedTags Boolean
    Specifies whether to enable Amazon ECS managed tags for the tasks within the service.
    enableExecuteCommand Boolean
    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.
    launchType String
    Launch type on which to run your service. Valid values are EC2, FARGATE, and EXTERNAL.
    networkConfiguration GetTaskExecutionNetworkConfiguration
    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 GetTaskExecutionOverrides
    A list of container overrides that specify the name of a container in the specified task definition and the overrides it should receive.
    placementConstraints List<GetTaskExecutionPlacementConstraint>
    An array of placement constraint objects to use for the task. You can specify up to 10 constraints for each task. See below.
    placementStrategies List<GetTaskExecutionPlacementStrategy>
    The placement strategy objects to use for the task. You can specify a maximum of 5 strategy rules for each task. See below.
    platformVersion 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.
    propagateTags 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 are TASK_DEFINITION or NONE.
    referenceId String
    The reference ID to use for the task.
    startedBy String
    An optional tag specified when a task is started.
    tags 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.
    taskDefinition string

    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:

    capacityProviderStrategies GetTaskExecutionCapacityProviderStrategy[]
    Set of capacity provider strategies to use for the cluster. See below.
    clientToken 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.
    desiredCount number
    Number of instantiations of the specified task to place on your cluster. You can specify up to 10 tasks for each call.
    enableEcsManagedTags boolean
    Specifies whether to enable Amazon ECS managed tags for the tasks within the service.
    enableExecuteCommand boolean
    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.
    launchType string
    Launch type on which to run your service. Valid values are EC2, FARGATE, and EXTERNAL.
    networkConfiguration GetTaskExecutionNetworkConfiguration
    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 GetTaskExecutionOverrides
    A list of container overrides that specify the name of a container in the specified task definition and the overrides it should receive.
    placementConstraints GetTaskExecutionPlacementConstraint[]
    An array of placement constraint objects to use for the task. You can specify up to 10 constraints for each task. See below.
    placementStrategies GetTaskExecutionPlacementStrategy[]
    The placement strategy objects to use for the task. You can specify a maximum of 5 strategy rules for each task. See below.
    platformVersion 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.
    propagateTags 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 are TASK_DEFINITION or NONE.
    referenceId string
    The reference ID to use for the task.
    startedBy string
    An optional tag specified when a task is started.
    tags {[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 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:

    capacity_provider_strategies Sequence[GetTaskExecutionCapacityProviderStrategy]
    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.
    enable_ecs_managed_tags bool
    Specifies whether to enable Amazon ECS managed tags for the tasks within the service.
    enable_execute_command bool
    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, and EXTERNAL.
    network_configuration GetTaskExecutionNetworkConfiguration
    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 GetTaskExecutionOverrides
    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[GetTaskExecutionPlacementConstraint]
    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[GetTaskExecutionPlacementStrategy]
    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.
    propagate_tags 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 are TASK_DEFINITION or NONE.
    reference_id str
    The reference ID to use for the task.
    started_by str
    An optional tag specified when a task is started.
    tags 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.
    taskDefinition String

    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:

    capacityProviderStrategies List<Property Map>
    Set of capacity provider strategies to use for the cluster. See below.
    clientToken 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.
    desiredCount Number
    Number of instantiations of the specified task to place on your cluster. You can specify up to 10 tasks for each call.
    enableEcsManagedTags Boolean
    Specifies whether to enable Amazon ECS managed tags for the tasks within the service.
    enableExecuteCommand Boolean
    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.
    launchType String
    Launch type on which to run your service. Valid values are EC2, FARGATE, and EXTERNAL.
    networkConfiguration 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.
    placementConstraints 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.
    placementStrategies 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.
    platformVersion 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.
    propagateTags 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 are TASK_DEFINITION or NONE.
    referenceId String
    The reference ID to use for the task.
    startedBy String
    An optional tag specified when a task is started.
    tags 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:

    Supporting Types

    GetTaskExecutionCapacityProviderStrategy

    CapacityProvider 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 the base count of tasks has been satisfied. Defaults to 0.
    CapacityProvider 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 the base count of tasks has been satisfied. Defaults to 0.
    capacityProvider 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 the base count of tasks has been satisfied. Defaults to 0.
    capacityProvider 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 the base count of tasks has been satisfied. Defaults to 0.
    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 the base count of tasks has been satisfied. Defaults to 0.
    capacityProvider 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 the base count of tasks has been satisfied. Defaults to 0.

    GetTaskExecutionNetworkConfiguration

    Subnets List<string>
    Subnets associated with the task or service.
    AssignPublicIp bool

    Assign a public IP address to the ENI (Fargate launch type only). Valid values are true or false. Default false.

    For more information, see the Task Networking documentation.

    SecurityGroups 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.
    AssignPublicIp bool

    Assign a public IP address to the ENI (Fargate launch type only). Valid values are true or false. Default false.

    For more information, see the Task Networking documentation.

    SecurityGroups []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.
    assignPublicIp Boolean

    Assign a public IP address to the ENI (Fargate launch type only). Valid values are true or false. Default false.

    For more information, see the Task Networking documentation.

    securityGroups 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.
    assignPublicIp boolean

    Assign a public IP address to the ENI (Fargate launch type only). Valid values are true or false. Default false.

    For more information, see the Task Networking documentation.

    securityGroups 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_ip bool

    Assign a public IP address to the ENI (Fargate launch type only). Valid values are true or false. Default false.

    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.
    assignPublicIp Boolean

    Assign a public IP address to the ENI (Fargate launch type only). Valid values are true or false. Default false.

    For more information, see the Task Networking documentation.

    securityGroups 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

    ContainerOverrides List<GetTaskExecutionOverridesContainerOverride>
    One or more container overrides that are sent to a task. See below.
    Cpu string
    The CPU override for the task.
    ExecutionRoleArn string
    Amazon Resource Name (ARN) of the task execution role override for the task.
    InferenceAcceleratorOverrides List<GetTaskExecutionOverridesInferenceAcceleratorOverride>
    Elastic Inference accelerator override for the task. See below.
    Memory string
    The memory override for the task.
    TaskRoleArn string
    Amazon Resource Name (ARN) of the role that containers in this task can assume.
    ContainerOverrides []GetTaskExecutionOverridesContainerOverride
    One or more container overrides that are sent to a task. See below.
    Cpu string
    The CPU override for the task.
    ExecutionRoleArn string
    Amazon Resource Name (ARN) of the task execution role override for the task.
    InferenceAcceleratorOverrides []GetTaskExecutionOverridesInferenceAcceleratorOverride
    Elastic Inference accelerator override for the task. See below.
    Memory string
    The memory override for the task.
    TaskRoleArn string
    Amazon Resource Name (ARN) of the role that containers in this task can assume.
    containerOverrides List<GetTaskExecutionOverridesContainerOverride>
    One or more container overrides that are sent to a task. See below.
    cpu String
    The CPU override for the task.
    executionRoleArn String
    Amazon Resource Name (ARN) of the task execution role override for the task.
    inferenceAcceleratorOverrides List<GetTaskExecutionOverridesInferenceAcceleratorOverride>
    Elastic Inference accelerator override for the task. See below.
    memory String
    The memory override for the task.
    taskRoleArn String
    Amazon Resource Name (ARN) of the role that containers in this task can assume.
    containerOverrides GetTaskExecutionOverridesContainerOverride[]
    One or more container overrides that are sent to a task. See below.
    cpu string
    The CPU override for the task.
    executionRoleArn string
    Amazon Resource Name (ARN) of the task execution role override for the task.
    inferenceAcceleratorOverrides GetTaskExecutionOverridesInferenceAcceleratorOverride[]
    Elastic Inference accelerator override for the task. See below.
    memory string
    The memory override for the task.
    taskRoleArn string
    Amazon Resource Name (ARN) of the role that containers in this task can assume.
    container_overrides Sequence[GetTaskExecutionOverridesContainerOverride]
    One or more container overrides that are sent to a task. See below.
    cpu str
    The CPU override for the task.
    execution_role_arn str
    Amazon Resource Name (ARN) of the task execution role override for the task.
    inference_accelerator_overrides Sequence[GetTaskExecutionOverridesInferenceAcceleratorOverride]
    Elastic Inference accelerator override for the task. See below.
    memory str
    The memory override for the task.
    task_role_arn str
    Amazon Resource Name (ARN) of the role that containers in this task can assume.
    containerOverrides List<Property Map>
    One or more container overrides that are sent to a task. See below.
    cpu String
    The CPU override for the task.
    executionRoleArn String
    Amazon Resource Name (ARN) of the task execution role override for the task.
    inferenceAcceleratorOverrides List<Property Map>
    Elastic Inference accelerator override for the task. See below.
    memory String
    The memory override for the task.
    taskRoleArn String
    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<GetTaskExecutionOverridesContainerOverrideEnvironment>
    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.
    MemoryReservation int
    The soft limit (in MiB) of memory to reserve for the container, instead of the default value from the task definition.
    ResourceRequirements List<GetTaskExecutionOverridesContainerOverrideResourceRequirement>
    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 []GetTaskExecutionOverridesContainerOverrideEnvironment
    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.
    MemoryReservation int
    The soft limit (in MiB) of memory to reserve for the container, instead of the default value from the task definition.
    ResourceRequirements []GetTaskExecutionOverridesContainerOverrideResourceRequirement
    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<GetTaskExecutionOverridesContainerOverrideEnvironment>
    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.
    memoryReservation Integer
    The soft limit (in MiB) of memory to reserve for the container, instead of the default value from the task definition.
    resourceRequirements List<GetTaskExecutionOverridesContainerOverrideResourceRequirement>
    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 GetTaskExecutionOverridesContainerOverrideEnvironment[]
    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.
    memoryReservation number
    The soft limit (in MiB) of memory to reserve for the container, instead of the default value from the task definition.
    resourceRequirements GetTaskExecutionOverridesContainerOverrideResourceRequirement[]
    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[GetTaskExecutionOverridesContainerOverrideEnvironment]
    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[GetTaskExecutionOverridesContainerOverrideResourceRequirement]
    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.
    memoryReservation Number
    The soft limit (in MiB) of memory to reserve for the container, instead of the default value from the task definition.
    resourceRequirements 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

    Key string
    The name of the key-value pair. For environment variables, this is the name of the environment variable.
    Value string
    The value of the key-value pair. For environment variables, this is the value of the environment variable.
    Key string
    The name of the key-value pair. For environment variables, this is the name of the environment variable.
    Value string
    The value of the key-value pair. For environment variables, this is the value of the environment variable.
    key String
    The name of the key-value pair. For environment variables, this is the name of the environment variable.
    value String
    The value of the key-value pair. For environment variables, this is the value of the environment variable.
    key string
    The name of the key-value pair. For environment variables, this is the name of the environment variable.
    value string
    The value of the key-value pair. For environment variables, this is the value of the environment variable.
    key str
    The name of the key-value pair. For environment variables, this is the name of the environment variable.
    value str
    The value of the key-value pair. For environment variables, this is the value of the environment variable.
    key String
    The name of the key-value pair. For environment variables, this is the name of the environment variable.
    value String
    The value of the key-value pair. For environment variables, this is the value of the environment variable.

    GetTaskExecutionOverridesContainerOverrideResourceRequirement

    Type string
    The type of resource to assign to a container. Valid values are GPU or InferenceAccelerator.
    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 the InferenceAccelerator type is used, the value matches the deviceName for an InferenceAccelerator specified in a task definition.
    Type string
    The type of resource to assign to a container. Valid values are GPU or InferenceAccelerator.
    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 the InferenceAccelerator type is used, the value matches the deviceName for an InferenceAccelerator specified in a task definition.
    type String
    The type of resource to assign to a container. Valid values are GPU or InferenceAccelerator.
    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 the InferenceAccelerator type is used, the value matches the deviceName for an InferenceAccelerator specified in a task definition.
    type string
    The type of resource to assign to a container. Valid values are GPU or InferenceAccelerator.
    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 the InferenceAccelerator type is used, the value matches the deviceName for an InferenceAccelerator specified in a task definition.
    type str
    The type of resource to assign to a container. Valid values are GPU or InferenceAccelerator.
    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 the InferenceAccelerator type is used, the value matches the deviceName for an InferenceAccelerator specified in a task definition.
    type String
    The type of resource to assign to a container. Valid values are GPU or InferenceAccelerator.
    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 the InferenceAccelerator type is used, the value matches the deviceName for an InferenceAccelerator specified in a task definition.

    GetTaskExecutionOverridesInferenceAcceleratorOverride

    DeviceName string
    The Elastic Inference accelerator device name to override for the task. This parameter must match a deviceName specified in the task definition.
    DeviceType string
    The Elastic Inference accelerator type to use.
    DeviceName string
    The Elastic Inference accelerator device name to override for the task. This parameter must match a deviceName specified in the task definition.
    DeviceType string
    The Elastic Inference accelerator type to use.
    deviceName String
    The Elastic Inference accelerator device name to override for the task. This parameter must match a deviceName specified in the task definition.
    deviceType String
    The Elastic Inference accelerator type to use.
    deviceName string
    The Elastic Inference accelerator device name to override for the task. This parameter must match a deviceName specified in the task definition.
    deviceType 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.
    deviceName String
    The Elastic Inference accelerator device name to override for the task. This parameter must match a deviceName specified in the task definition.
    deviceType String
    The Elastic Inference accelerator type to use.

    GetTaskExecutionPlacementConstraint

    Type string
    The type of constraint. Valid values are distinctInstance or memberOf. Use distinctInstance to ensure that each task in a particular group is running on a different container instance. Use memberOf 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 or memberOf. Use distinctInstance to ensure that each task in a particular group is running on a different container instance. Use memberOf 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 or memberOf. Use distinctInstance to ensure that each task in a particular group is running on a different container instance. Use memberOf 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 or memberOf. Use distinctInstance to ensure that each task in a particular group is running on a different container instance. Use memberOf 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 or memberOf. Use distinctInstance to ensure that each task in a particular group is running on a different container instance. Use memberOf 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 or memberOf. Use distinctInstance to ensure that each task in a particular group is running on a different container instance. Use memberOf 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, and binpack.

    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, and binpack.

    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, and binpack.

    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, and binpack.

    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, and binpack.

    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, and binpack.

    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.
    aws logo

    Try AWS Native preview for resources not in the classic version.

    AWS Classic v6.42.0 published on Wednesday, Jun 26, 2024 by Pulumi