1. Packages
  2. AWS Native
  3. API Docs
  4. ecs
  5. getTaskDefinition

AWS Native is in preview. AWS Classic is fully supported.

AWS Native v0.109.0 published on Wednesday, Jun 26, 2024 by Pulumi

aws-native.ecs.getTaskDefinition

Explore with Pulumi AI

aws-native logo

AWS Native is in preview. AWS Classic is fully supported.

AWS Native v0.109.0 published on Wednesday, Jun 26, 2024 by Pulumi

    Registers a new task definition from the supplied family and containerDefinitions. Optionally, you can add data volumes to your containers with the volumes parameter. For more information about task definition parameters and defaults, see Amazon ECS Task Definitions in the Amazon Elastic Container Service Developer Guide. You can specify a role for your task with the taskRoleArn parameter. When you specify a role for a task, its containers can then use the latest versions of the CLI or SDKs to make API requests to the AWS services that are specified in the policy that’s associated with the role. For more information, see IAM Roles for Tasks in the Amazon Elastic Container Service Developer Guide. You can specify a Docker networking mode for the containers in your task definition with the networkMode parameter. The available network modes correspond to those described in Network settings in the Docker run reference. If you specify the awsvpc network mode, the task is allocated an elastic network interface, and you must specify a NetworkConfiguration when you create a service or run a task with the task definition. For more information, see Task Networking in the Amazon Elastic Container Service Developer Guide. In the following example or examples, the Authorization header contents (AUTHPARAMS) must be replaced with an AWS Signature Version 4 signature. For more information, see Signature Version 4 Signing Process in the General Reference. You only need to learn how to sign HTTP requests if you intend to create them manually. When you use the or one of the SDKs to make requests to AWS, these tools automatically sign the requests for you, with the access key that you specify when you configure the tools. When you use these tools, you don’t have to sign requests yourself.

    Using getTaskDefinition

    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 getTaskDefinition(args: GetTaskDefinitionArgs, opts?: InvokeOptions): Promise<GetTaskDefinitionResult>
    function getTaskDefinitionOutput(args: GetTaskDefinitionOutputArgs, opts?: InvokeOptions): Output<GetTaskDefinitionResult>
    def get_task_definition(task_definition_arn: Optional[str] = None,
                            opts: Optional[InvokeOptions] = None) -> GetTaskDefinitionResult
    def get_task_definition_output(task_definition_arn: Optional[pulumi.Input[str]] = None,
                            opts: Optional[InvokeOptions] = None) -> Output[GetTaskDefinitionResult]
    func LookupTaskDefinition(ctx *Context, args *LookupTaskDefinitionArgs, opts ...InvokeOption) (*LookupTaskDefinitionResult, error)
    func LookupTaskDefinitionOutput(ctx *Context, args *LookupTaskDefinitionOutputArgs, opts ...InvokeOption) LookupTaskDefinitionResultOutput

    > Note: This function is named LookupTaskDefinition in the Go SDK.

    public static class GetTaskDefinition 
    {
        public static Task<GetTaskDefinitionResult> InvokeAsync(GetTaskDefinitionArgs args, InvokeOptions? opts = null)
        public static Output<GetTaskDefinitionResult> Invoke(GetTaskDefinitionInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetTaskDefinitionResult> getTaskDefinition(GetTaskDefinitionArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: aws-native:ecs:getTaskDefinition
      arguments:
        # arguments dictionary

    The following arguments are supported:

    TaskDefinitionArn string
    The ARN of the task definition.
    TaskDefinitionArn string
    The ARN of the task definition.
    taskDefinitionArn String
    The ARN of the task definition.
    taskDefinitionArn string
    The ARN of the task definition.
    task_definition_arn str
    The ARN of the task definition.
    taskDefinitionArn String
    The ARN of the task definition.

    getTaskDefinition Result

    The following output properties are available:

    Tags List<Pulumi.AwsNative.Outputs.Tag>
    The metadata that you apply to the task definition to help you categorize and organize them. Each tag consists of a key and an optional value. You define both of them. The following basic restrictions apply to tags:

    • Maximum number of tags per resource - 50
    • For each resource, each tag key must be unique, and each tag key can have only one value.
    • Maximum key length - 128 Unicode characters in UTF-8
    • Maximum value length - 256 Unicode characters in UTF-8
    • If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: + - = . _ : / @.
    • Tag keys and values are case-sensitive.
    • Do not use aws:, AWS:, or any upper or lowercase combination of such as a prefix for either keys or values as it is reserved for AWS use. You cannot edit or delete tag keys or values with this prefix. Tags with this prefix do not count against your tags per resource limit.
    TaskDefinitionArn string
    The ARN of the task definition.
    Tags Tag
    The metadata that you apply to the task definition to help you categorize and organize them. Each tag consists of a key and an optional value. You define both of them. The following basic restrictions apply to tags:

    • Maximum number of tags per resource - 50
    • For each resource, each tag key must be unique, and each tag key can have only one value.
    • Maximum key length - 128 Unicode characters in UTF-8
    • Maximum value length - 256 Unicode characters in UTF-8
    • If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: + - = . _ : / @.
    • Tag keys and values are case-sensitive.
    • Do not use aws:, AWS:, or any upper or lowercase combination of such as a prefix for either keys or values as it is reserved for AWS use. You cannot edit or delete tag keys or values with this prefix. Tags with this prefix do not count against your tags per resource limit.
    TaskDefinitionArn string
    The ARN of the task definition.
    tags List<Tag>
    The metadata that you apply to the task definition to help you categorize and organize them. Each tag consists of a key and an optional value. You define both of them. The following basic restrictions apply to tags:

    • Maximum number of tags per resource - 50
    • For each resource, each tag key must be unique, and each tag key can have only one value.
    • Maximum key length - 128 Unicode characters in UTF-8
    • Maximum value length - 256 Unicode characters in UTF-8
    • If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: + - = . _ : / @.
    • Tag keys and values are case-sensitive.
    • Do not use aws:, AWS:, or any upper or lowercase combination of such as a prefix for either keys or values as it is reserved for AWS use. You cannot edit or delete tag keys or values with this prefix. Tags with this prefix do not count against your tags per resource limit.
    taskDefinitionArn String
    The ARN of the task definition.
    tags Tag[]
    The metadata that you apply to the task definition to help you categorize and organize them. Each tag consists of a key and an optional value. You define both of them. The following basic restrictions apply to tags:

    • Maximum number of tags per resource - 50
    • For each resource, each tag key must be unique, and each tag key can have only one value.
    • Maximum key length - 128 Unicode characters in UTF-8
    • Maximum value length - 256 Unicode characters in UTF-8
    • If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: + - = . _ : / @.
    • Tag keys and values are case-sensitive.
    • Do not use aws:, AWS:, or any upper or lowercase combination of such as a prefix for either keys or values as it is reserved for AWS use. You cannot edit or delete tag keys or values with this prefix. Tags with this prefix do not count against your tags per resource limit.
    taskDefinitionArn string
    The ARN of the task definition.
    tags Sequence[root_Tag]
    The metadata that you apply to the task definition to help you categorize and organize them. Each tag consists of a key and an optional value. You define both of them. The following basic restrictions apply to tags:

    • Maximum number of tags per resource - 50
    • For each resource, each tag key must be unique, and each tag key can have only one value.
    • Maximum key length - 128 Unicode characters in UTF-8
    • Maximum value length - 256 Unicode characters in UTF-8
    • If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: + - = . _ : / @.
    • Tag keys and values are case-sensitive.
    • Do not use aws:, AWS:, or any upper or lowercase combination of such as a prefix for either keys or values as it is reserved for AWS use. You cannot edit or delete tag keys or values with this prefix. Tags with this prefix do not count against your tags per resource limit.
    task_definition_arn str
    The ARN of the task definition.
    tags List<Property Map>
    The metadata that you apply to the task definition to help you categorize and organize them. Each tag consists of a key and an optional value. You define both of them. The following basic restrictions apply to tags:

    • Maximum number of tags per resource - 50
    • For each resource, each tag key must be unique, and each tag key can have only one value.
    • Maximum key length - 128 Unicode characters in UTF-8
    • Maximum value length - 256 Unicode characters in UTF-8
    • If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: + - = . _ : / @.
    • Tag keys and values are case-sensitive.
    • Do not use aws:, AWS:, or any upper or lowercase combination of such as a prefix for either keys or values as it is reserved for AWS use. You cannot edit or delete tag keys or values with this prefix. Tags with this prefix do not count against your tags per resource limit.
    taskDefinitionArn String
    The ARN of the task definition.

    Supporting Types

    Tag

    Key string
    The key name of the tag
    Value string
    The value of the tag
    Key string
    The key name of the tag
    Value string
    The value of the tag
    key String
    The key name of the tag
    value String
    The value of the tag
    key string
    The key name of the tag
    value string
    The value of the tag
    key str
    The key name of the tag
    value str
    The value of the tag
    key String
    The key name of the tag
    value String
    The value of the tag

    Package Details

    Repository
    AWS Native pulumi/pulumi-aws-native
    License
    Apache-2.0
    aws-native logo

    AWS Native is in preview. AWS Classic is fully supported.

    AWS Native v0.109.0 published on Wednesday, Jun 26, 2024 by Pulumi