AWS::ECS::TaskDefinition¶
Registers a new task definition from the supplied family and containerDefinitions.
Generated by cfn-typegen --out cfn_types AWS::ECS::TaskDefinition into cfn_types/ecs.py:
# Generated by cfn-typegen from the CloudFormation registry schemas. Do not edit.
# fmt: off
# ruff: noqa
"""AWS::ECS resources."""
from collections.abc import Mapping, Sequence
from typing import Any, Literal, NotRequired, Unpack
from typing_extensions import TypedDict
from cfn_typed.base import DeletionPolicy, DependsOn, ResourceAttrs, Tag, UpdateReplacePolicy, build
from cfn_typed.intrinsics import Expr
CONSTRAINTS:dict[str,Any]={
'AWS::ECS::TaskDefinition':{'Volumes':{'T':{'P':{'EFSVolumeConfiguration':{'P':{'TransitEncryption':{'e':["ENABLED","DISABLED"]},'AuthorizationConfig':{'P':{'IAM':{'e':["ENABLED","DISABLED"]}}}}}}}},'ContainerDefinitions':{'T':{'P':{'ResourceRequirements':{'T':{'P':{'SharingStrategy':{'P':{'NvidiaMps':{'P':{'Memory':{'m':1},'MaxComputePercent':{'m':1,'M':100}}}}}}}},'VersionConsistency':{'e':["enabled","disabled"]},'PortMappings':{'T':{'P':{'AppProtocol':{'e':["http","http2","grpc"]}}}}}}}},
}
ATTRIBUTES:dict[str,Any]={"AWS::ECS::TaskDefinition":["TaskDefinitionArn"]}
RULES:dict[str,Any]={}
Nested types (39)
These are defined above the properties in the generated module.
class TaskDefinitionInferenceAccelerator(TypedDict, closed=True):
DeviceType: NotRequired[Expr[str]]
DeviceName: NotRequired[Expr[str]]
class TaskDefinitionTaskDefinitionPlacementConstraint(TypedDict, closed=True):
'The constraint on task placement in the task definition.'
Type: Expr[str]
'The type of constraint.'
Expression: NotRequired[Expr[str]]
'A cluster query language expression to apply to the constraint.'
class TaskDefinitionRuntimePlatform(TypedDict, closed=True):
'Information about the platform for the Amazon ECS service or task.'
OperatingSystemFamily: NotRequired[Expr[str]]
'The operating system.'
CpuArchitecture: NotRequired[Expr[str]]
'The CPU architecture.'
class TaskDefinitionKeyValuePair(TypedDict, closed=True):
'A key-value pair object.'
Value: NotRequired[Expr[str]]
'The value of the key-value pair.'
Name: NotRequired[Expr[str]]
'The name of the key-value pair.'
class TaskDefinitionProxyConfiguration(TypedDict, closed=True):
'The configuration details for the App Mesh proxy.'
ProxyConfigurationProperties: NotRequired[Expr[Sequence[Expr[TaskDefinitionKeyValuePair]]]]
'The set of network configuration parameters to provide the Container Network Interface (CNI) plugin, specified as key-value pairs.'
Type: NotRequired[Expr[str]]
'The proxy type.'
ContainerName: Expr[str]
'The name of the container that will serve as the App Mesh proxy.'
class TaskDefinitionAuthorizationConfig(TypedDict, closed=True):
'The authorization configuration details for the Amazon EFS file system.'
IAM: NotRequired[Expr[str]]
'Determines whether to use the Amazon ECS task role defined in a task definition when mounting the Amazon EFS file system.'
AccessPointId: NotRequired[Expr[str]]
'The Amazon EFS access point ID to use.'
class TaskDefinitionEFSVolumeConfiguration(TypedDict, closed=True):
"This parameter is specified when you're using an Amazon Elastic File System file system for task storage."
FilesystemId: Expr[str]
'The Amazon EFS file system ID to use.'
TransitEncryption: NotRequired[Expr[str]]
'Determines whether to use encryption for Amazon EFS data in transit between the Amazon ECS host and the Amazon EFS server.'
AuthorizationConfig: NotRequired[Expr[TaskDefinitionAuthorizationConfig]]
'The authorization configuration details for the Amazon EFS file system.'
RootDirectory: NotRequired[Expr[str]]
'The directory within the Amazon EFS file system to mount as the root directory inside the host.'
TransitEncryptionPort: NotRequired[Expr[int]]
'The port to use when sending encrypted data between the Amazon ECS host and the Amazon EFS server.'
class TaskDefinitionS3FilesVolumeConfiguration(TypedDict, closed=True):
"This parameter is specified when you're using an Amazon S3 Files file system for task storage."
FileSystemArn: Expr[str]
'The full ARN of the S3 Files file system to mount.'
AccessPointArn: NotRequired[Expr[str]]
'The full ARN of the S3 Files access point to use.'
RootDirectory: NotRequired[Expr[str]]
'The directory within the Amazon S3 Files file system to mount as the root directory.'
TransitEncryptionPort: NotRequired[Expr[int]]
'The port to use for sending encrypted data between the ECS host and the S3 Files file system.'
class TaskDefinitionHostVolumeProperties(TypedDict, closed=True):
'The ``HostVolumeProperties`` property specifies details on a container instance bind mount host volume.'
SourcePath: NotRequired[Expr[str]]
"When the ``host`` parameter is used, specify a ``sourcePath`` to declare the path on the host container instance that's presented to the container."
class TaskDefinitionDockerVolumeConfiguration(TypedDict, closed=True):
'The ``DockerVolumeConfiguration`` property specifies a Docker volume configuration and is used when you use Docker volumes.'
DriverOpts: NotRequired[Expr[Mapping[str, Expr[str]]]]
'A map of Docker driver-specific options passed through.'
Scope: NotRequired[Expr[str]]
'The scope for the Docker volume that determines its lifecycle.'
Autoprovision: NotRequired[Expr[bool]]
"If this value is ``true``, the Docker volume is created if it doesn't already exist."
Driver: NotRequired[Expr[str]]
'The Docker volume driver to use.'
Labels: NotRequired[Expr[Mapping[str, Expr[str]]]]
'Custom metadata to add to your Docker volume.'
class TaskDefinitionFSxAuthorizationConfig(TypedDict, closed=True):
'The authorization configuration details for Amazon FSx for Windows File Server file system.'
CredentialsParameter: Expr[str]
'The authorization credential option to use.'
Domain: Expr[str]
'A fully qualified domain name hosted by an [](https://docs.aws.amazon.com/directoryservice/latest/admin-guide/directory_microsoft_ad.html) Managed Microsoft ...'
class TaskDefinitionFSxWindowsFileServerVolumeConfiguration(TypedDict, closed=True):
"This parameter is specified when you're using [Amazon FSx for Windows File Server](https://docs.aws.amazon.com/fsx/latest/WindowsGuide/what-is.html) file sys..."
AuthorizationConfig: NotRequired[Expr[TaskDefinitionFSxAuthorizationConfig]]
'The authorization configuration details for the Amazon FSx for Windows File Server file system.'
FileSystemId: Expr[str]
'The Amazon FSx for Windows File Server file system ID to use.'
RootDirectory: Expr[str]
'The directory within the Amazon FSx for Windows File Server file system to mount as the root directory inside the host.'
class TaskDefinitionVolume(TypedDict, closed=True):
'The data volume configuration for tasks launched using this task definition.'
EFSVolumeConfiguration: NotRequired[Expr[TaskDefinitionEFSVolumeConfiguration]]
'This parameter is specified when you use an Amazon Elastic File System file system for task storage.'
S3FilesVolumeConfiguration: NotRequired[Expr[TaskDefinitionS3FilesVolumeConfiguration]]
'This parameter is specified when you use an Amazon S3 Files file system for task storage.'
Host: NotRequired[Expr[TaskDefinitionHostVolumeProperties]]
'This parameter is specified when you use bind mount host volumes.'
ConfiguredAtLaunch: NotRequired[Expr[bool]]
'Indicates whether the volume should be configured at launch time.'
DockerVolumeConfiguration: NotRequired[Expr[TaskDefinitionDockerVolumeConfiguration]]
'This parameter is specified when you use Docker volumes.'
FSxWindowsFileServerVolumeConfiguration: NotRequired[Expr[TaskDefinitionFSxWindowsFileServerVolumeConfiguration]]
'This parameter is specified when you use Amazon FSx for Windows File Server file system for task storage.'
Name: NotRequired[Expr[str]]
'The name of the volume.'
class TaskDefinitionSecret(TypedDict, closed=True):
'An object representing the secret to expose to your container.'
ValueFrom: Expr[str]
'The secret to expose to the container.'
Name: Expr[str]
'The name of the secret.'
class TaskDefinitionHealthCheck(TypedDict, closed=True):
'The ``HealthCheck`` property specifies an object representing a container health check.'
Command: NotRequired[Expr[list[Expr[str]]]]
'A string array representing the command that the container runs to determine if it is healthy.'
Timeout: NotRequired[Expr[int]]
'The time period in seconds to wait for a health check to succeed before it is considered a failure.'
Retries: NotRequired[Expr[int]]
'The number of times to retry a failed health check before the container is considered unhealthy.'
Interval: NotRequired[Expr[int]]
'The time period in seconds between each health check execution.'
StartPeriod: NotRequired[Expr[int]]
'The optional grace period to provide containers time to bootstrap before failed health checks count towards the maximum number of retries.'
class TaskDefinitionVolumeFrom(TypedDict, closed=True):
'Details on a data volume from another container in the same task definition.'
ReadOnly: NotRequired[Expr[bool]]
'If this value is ``true``, the container has read-only access to the volume.'
SourceContainer: NotRequired[Expr[str]]
'The name of another container within the same task definition to mount volumes from.'
class TaskDefinitionLogConfiguration(TypedDict, closed=True):
'The ``LogConfiguration`` property specifies log configuration options to send to a custom log driver for the container.'
SecretOptions: NotRequired[Expr[Sequence[Expr[TaskDefinitionSecret]]]]
'The secrets to pass to the log configuration.'
Options: NotRequired[Expr[Mapping[str, Expr[str]]]]
'The configuration options to send to the log driver.'
LogDriver: Expr[str]
'The log driver to use for the container.'
class TaskDefinitionNvidiaMpsAllocation(TypedDict, closed=True):
Memory: Expr[int]
'The amount of GPU memory, in MiB, allocated to the container.'
MaxComputePercent: NotRequired[Expr[int]]
"The maximum percentage of the GPU's compute capacity that the container can use."
class TaskDefinitionSharingStrategy(TypedDict, closed=True):
NvidiaMps: Expr[TaskDefinitionNvidiaMpsAllocation]
class TaskDefinitionResourceRequirement(TypedDict, closed=True):
'The type and amount of a resource to assign to a container.'
Type: Expr[str]
'The type of resource to assign to a container.'
SharingStrategy: NotRequired[Expr[TaskDefinitionSharingStrategy]]
Value: NotRequired[Expr[str]]
'The value for the specified resource type.'
class TaskDefinitionEnvironmentFile(TypedDict, closed=True):
'A list of files containing the environment variables to pass to a container.'
Type: NotRequired[Expr[str]]
'The file type to use.'
Value: NotRequired[Expr[str]]
'The Amazon Resource Name (ARN) of the Amazon S3 object containing the environment variable file.'
class TaskDefinitionFirelensConfiguration(TypedDict, closed=True):
'The FireLens configuration for the container.'
Options: NotRequired[Expr[Mapping[str, Expr[str]]]]
'The options to use when configuring the log router.'
Type: NotRequired[Expr[str]]
'The log router to use.'
class TaskDefinitionSystemControl(TypedDict, closed=True):
'A list of namespaced kernel parameters to set in the container.'
Value: NotRequired[Expr[str]]
'The namespaced kernel parameter to set a ``value`` for.'
Namespace: NotRequired[Expr[str]]
'The namespaced kernel parameter to set a ``value`` for.'
class TaskDefinitionUlimit(TypedDict, closed=True):
'The ``ulimit`` settings to pass to the container.'
SoftLimit: Expr[int]
'The soft limit for the ``ulimit`` type.'
HardLimit: Expr[int]
'The hard limit for the ``ulimit`` type.'
Name: Expr[str]
'The ``type`` of the ``ulimit``.'
class TaskDefinitionRepositoryCredentials(TypedDict, closed=True):
'The repository credentials for private registry authentication.'
CredentialsParameter: NotRequired[Expr[str]]
'The Amazon Resource Name (ARN) of the secret containing the private repository credentials.'
class TaskDefinitionHostEntry(TypedDict, closed=True):
'The ``HostEntry`` property specifies a hostname and an IP address that are added to the ``/etc/hosts`` file of a container through the ``extraHosts`` paramet...'
Hostname: NotRequired[Expr[str]]
'The hostname to use in the ``/etc/hosts`` entry.'
IpAddress: NotRequired[Expr[str]]
'The IP address to use in the ``/etc/hosts`` entry.'
class TaskDefinitionKernelCapabilities(TypedDict, closed=True):
'The Linux capabilities to add or remove from the default Docker configuration for a container defined in the task definition.'
Add: NotRequired[Expr[list[Expr[str]]]]
'The Linux capabilities for the container that have been added to the default configuration provided by Docker.'
Drop: NotRequired[Expr[list[Expr[str]]]]
'The Linux capabilities for the container that have been removed from the default configuration provided by Docker.'
class TaskDefinitionTmpfs(TypedDict, closed=True):
'The container path, mount options, and size of the tmpfs mount.'
Size: Expr[int]
'The maximum size (in MiB) of the tmpfs volume.'
ContainerPath: NotRequired[Expr[str]]
'The absolute file path where the tmpfs volume is to be mounted.'
MountOptions: NotRequired[Expr[list[Expr[str]]]]
'The list of tmpfs volume mount options.'
class TaskDefinitionDevice(TypedDict, closed=True):
'The ``Device`` property specifies an object representing a container instance host device.'
HostPath: NotRequired[Expr[str]]
'The path for the device on the host container instance.'
Permissions: NotRequired[Expr[list[Expr[str]]]]
'The explicit permissions to provide to the container for the device.'
ContainerPath: NotRequired[Expr[str]]
'The path inside the container at which to expose the host device.'
class TaskDefinitionLinuxParameters(TypedDict, closed=True):
'The Linux-specific options that are applied to the container, such as Linux [KernelCapabilities](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/AP...'
Capabilities: NotRequired[Expr[TaskDefinitionKernelCapabilities]]
'The Linux capabilities for the container that are added to or dropped from the default configuration provided by Docker.'
Swappiness: NotRequired[Expr[int]]
"This allows you to tune a container's memory swappiness behavior."
Tmpfs: NotRequired[Expr[Sequence[Expr[TaskDefinitionTmpfs]]]]
'The container path, mount options, and size (in MiB) of the tmpfs mount.'
SharedMemorySize: NotRequired[Expr[int]]
'The value for the size (in MiB) of the ``/dev/shm`` volume.'
Devices: NotRequired[Expr[Sequence[Expr[TaskDefinitionDevice]]]]
'Any host devices to expose to the container.'
InitProcessEnabled: NotRequired[Expr[bool]]
'Run an ``init`` process inside the container that forwards signals and reaps processes.'
MaxSwap: NotRequired[Expr[int]]
'The total amount of swap memory (in MiB) a container can use.'
class TaskDefinitionRestartPolicy(TypedDict, closed=True):
'You can enable a restart policy for each container defined in your task definition, to overcome transient failures faster and maintain task availability.'
IgnoredExitCodes: NotRequired[Expr[Sequence[Expr[int]]]]
'A list of exit codes that Amazon ECS will ignore and not attempt a restart on.'
RestartAttemptPeriod: NotRequired[Expr[int]]
'A period of time (in seconds) that the container must run for before a restart can be attempted.'
Enabled: NotRequired[Expr[bool]]
'Specifies whether a restart policy is enabled for the container.'
class TaskDefinitionMountPoint(TypedDict, closed=True):
"The details for a volume mount point that's used in a container definition."
ReadOnly: NotRequired[Expr[bool]]
'If this value is ``true``, the container has read-only access to the volume.'
SourceVolume: NotRequired[Expr[str]]
'The name of the volume to mount.'
ContainerPath: NotRequired[Expr[str]]
'The path on the container to mount the host volume at.'
class TaskDefinitionContainerDependency(TypedDict, closed=True):
'The ``ContainerDependency`` property specifies the dependencies defined for container startup and shutdown.'
Condition: NotRequired[Expr[str]]
'The dependency condition of the container.'
ContainerName: NotRequired[Expr[str]]
'The name of a container.'
class TaskDefinitionPortMapping(TypedDict, closed=True):
'The ``PortMapping`` property specifies a port mapping.'
AppProtocol: NotRequired[Expr[str]]
"The application protocol that's used for the port mapping."
ContainerPortRange: NotRequired[Expr[str]]
"The port number range on the container that's bound to the dynamically mapped host port range."
HostPort: NotRequired[Expr[int]]
'The port number on the container instance to reserve for your container.'
ContainerPort: NotRequired[Expr[int]]
"The port number on the container that's bound to the user-specified or automatically assigned host port."
Protocol: NotRequired[Expr[str]]
"The protocol that's used for the port mapping."
Name: NotRequired[Expr[str]]
"The name that's used for the port mapping."
class TaskDefinitionContainerDefinition(TypedDict, closed=True):
'The ``ContainerDefinition`` property specifies a container definition.'
User: NotRequired[Expr[str]]
'The user to use inside the container.'
Secrets: NotRequired[Expr[Sequence[Expr[TaskDefinitionSecret]]]]
'The secrets to pass to the container.'
Memory: NotRequired[Expr[int]]
'The amount (in MiB) of memory to present to the container.'
Privileged: NotRequired[Expr[bool]]
'When this parameter is true, the container is given elevated privileges on the host container instance (similar to the ``root`` user).'
HealthCheck: NotRequired[Expr[TaskDefinitionHealthCheck]]
'The container health check command and associated configuration parameters for the container.'
StartTimeout: NotRequired[Expr[int]]
'Time duration (in seconds) to wait before giving up on resolving dependencies for a container.'
VolumesFrom: NotRequired[Expr[Sequence[Expr[TaskDefinitionVolumeFrom]]]]
'Data volumes to mount from another container.'
Cpu: NotRequired[Expr[int]]
'The number of ``cpu`` units reserved for the container.'
EntryPoint: NotRequired[Expr[list[Expr[str]]]]
"Early versions of the Amazon ECS container agent don't properly handle ``entryPoint`` parameters."
DnsServers: NotRequired[Expr[list[Expr[str]]]]
'A list of DNS servers that are presented to the container.'
ReadonlyRootFilesystem: NotRequired[Expr[bool]]
'When this parameter is true, the container is given read-only access to its root file system.'
Image: Expr[str]
'The image used to start a container.'
Essential: NotRequired[Expr[bool]]
'If the ``essential`` parameter of a container is marked as ``true``, and that container fails or stops for any reason, all other containers that are part of ...'
LogConfiguration: NotRequired[Expr[TaskDefinitionLogConfiguration]]
'The log configuration specification for the container.'
ResourceRequirements: NotRequired[Expr[Sequence[Expr[TaskDefinitionResourceRequirement]]]]
'The type and amount of a resource to assign to a container.'
EnvironmentFiles: NotRequired[Expr[Sequence[Expr[TaskDefinitionEnvironmentFile]]]]
'A list of files containing the environment variables to pass to a container.'
Name: Expr[str]
'The name of a container.'
FirelensConfiguration: NotRequired[Expr[TaskDefinitionFirelensConfiguration]]
'The FireLens configuration for the container.'
DockerSecurityOptions: NotRequired[Expr[list[Expr[str]]]]
'A list of strings to provide custom configuration for multiple security systems.'
SystemControls: NotRequired[Expr[Sequence[Expr[TaskDefinitionSystemControl]]]]
'A list of namespaced kernel parameters to set in the container.'
Interactive: NotRequired[Expr[bool]]
'When this parameter is ``true``, you can deploy containerized applications that require ``stdin`` or a ``tty`` to be allocated.'
DnsSearchDomains: NotRequired[Expr[list[Expr[str]]]]
'A list of DNS search domains that are presented to the container.'
CredentialSpecs: NotRequired[Expr[list[Expr[str]]]]
'A list of ARNs in SSM or Amazon S3 to a credential spec (``CredSpec``) file that configures the container for Active Directory authentication.'
Ulimits: NotRequired[Expr[Sequence[Expr[TaskDefinitionUlimit]]]]
'A list of ``ulimits`` to set in the container.'
StopTimeout: NotRequired[Expr[int]]
"Time duration (in seconds) to wait before the container is forcefully killed if it doesn't exit normally on its own."
WorkingDirectory: NotRequired[Expr[str]]
'The working directory to run commands inside the container in.'
MemoryReservation: NotRequired[Expr[int]]
'The soft limit (in MiB) of memory to reserve for the container.'
RepositoryCredentials: NotRequired[Expr[TaskDefinitionRepositoryCredentials]]
'The private repository authentication credentials to use.'
ExtraHosts: NotRequired[Expr[Sequence[Expr[TaskDefinitionHostEntry]]]]
'A list of hostnames and IP address mappings to append to the ``/etc/hosts`` file on the container.'
Hostname: NotRequired[Expr[str]]
'The hostname to use for your container.'
LinuxParameters: NotRequired[Expr[TaskDefinitionLinuxParameters]]
'Linux-specific modifications that are applied to the container, such as Linux kernel capabilities.'
VersionConsistency: NotRequired[Expr[str]]
'Specifies whether Amazon ECS will resolve the container image tag provided in the container definition to an image digest.'
RestartPolicy: NotRequired[Expr[TaskDefinitionRestartPolicy]]
'The restart policy for a container.'
DisableNetworking: NotRequired[Expr[bool]]
'When this parameter is true, networking is off within the container.'
PseudoTerminal: NotRequired[Expr[bool]]
'When this parameter is ``true``, a TTY is allocated.'
MountPoints: NotRequired[Expr[Sequence[Expr[TaskDefinitionMountPoint]]]]
'The mount points for data volumes in your container.'
DependsOn: NotRequired[Expr[Sequence[Expr[TaskDefinitionContainerDependency]]]]
'The dependencies defined for container startup and shutdown.'
DockerLabels: NotRequired[Expr[Mapping[str, Expr[str]]]]
'A key/value map of labels to add to the container.'
PortMappings: NotRequired[Expr[Sequence[Expr[TaskDefinitionPortMapping]]]]
'The list of port mappings for the container.'
Command: NotRequired[Expr[list[Expr[str]]]]
"The command that's passed to the container."
Environment: NotRequired[Expr[Sequence[Expr[TaskDefinitionKeyValuePair]]]]
'The environment variables to pass to a container.'
Links: NotRequired[Expr[list[Expr[str]]]]
'The ``links`` parameter allows containers to communicate with each other without the need for port mappings.'
class TaskDefinitionEphemeralStorage(TypedDict, closed=True):
'The amount of ephemeral storage to allocate for the task.'
SizeInGiB: NotRequired[Expr[int]]
'The total amount, in GiB, of ephemeral storage to set for the task.'
class TaskDefinitionProps(TypedDict, closed=True):
'Registers a new task definition from the supplied ``family`` and ``containerDefinitions``.'
TaskRoleArn: NotRequired[Expr[str]]
'The short name or full Amazon Resource Name (ARN) of the IAMlong role that grants containers in the task permission to call AWS APIs on your behalf.'
IpcMode: NotRequired[Expr[str]]
'The IPC resource namespace to use for the containers in the task.'
InferenceAccelerators: NotRequired[Expr[Sequence[Expr[TaskDefinitionInferenceAccelerator]]]]
Memory: NotRequired[Expr[str]]
'The amount (in MiB) of memory used by the task.'
PlacementConstraints: NotRequired[Expr[Sequence[Expr[TaskDefinitionTaskDefinitionPlacementConstraint]]]]
'An array of placement constraint objects to use for tasks.'
Cpu: NotRequired[Expr[str]]
'The number of ``cpu`` units used by the task.'
RequiresCompatibilities: NotRequired[Expr[list[Expr[str]]]]
'The task launch types the task definition was validated against.'
NetworkMode: NotRequired[Expr[str]]
'The Docker networking mode to use for the containers in the task.'
PidMode: NotRequired[Expr[str]]
'The process namespace to use for the containers in the task.'
EnableFaultInjection: NotRequired[Expr[bool]]
"Enables fault injection and allows for fault injection requests to be accepted from the task's containers."
ExecutionRoleArn: NotRequired[Expr[str]]
'The Amazon Resource Name (ARN) of the task execution role that grants the Amazon ECS container agent permission to make AWS API calls on your behalf.'
RuntimePlatform: NotRequired[Expr[TaskDefinitionRuntimePlatform]]
'The operating system that your tasks definitions run on.'
ProxyConfiguration: NotRequired[Expr[TaskDefinitionProxyConfiguration]]
'The configuration details for the App Mesh proxy.'
Volumes: NotRequired[Expr[Sequence[Expr[TaskDefinitionVolume]]]]
'The list of data volume definitions for the task.'
ContainerDefinitions: NotRequired[Expr[Sequence[Expr[TaskDefinitionContainerDefinition]]]]
'A list of container definitions in JSON format that describe the different containers that make up your task.'
Family: NotRequired[Expr[str]]
'The name of a family that this task definition is registered to.'
EphemeralStorage: NotRequired[Expr[TaskDefinitionEphemeralStorage]]
'The ephemeral storage settings to use for tasks run with the task definition.'
Tags: NotRequired[Expr[Sequence[Expr[Tag]]]]
'The metadata that you apply to the task definition to help you categorize and organize them.'
class TaskDefinition(ResourceAttrs):
'Registers a new task definition from the supplied ``family`` and ``containerDefinitions``.'
Type: Literal['AWS::ECS::TaskDefinition']
Properties: NotRequired[TaskDefinitionProps]
def task_definition(
*,
depends_on: DependsOn | None = None,
deletion_policy: DeletionPolicy | None = None,
update_replace_policy: UpdateReplacePolicy | None = None,
condition: str | None = None,
metadata: dict[str, Any] | None = None,
**props: Unpack[TaskDefinitionProps],
) -> TaskDefinition:
return build('AWS::ECS::TaskDefinition', props, depends_on, deletion_policy, update_replace_policy, condition, metadata)
Attributes¶
Read-only values for get_att(logical_id, attribute). They are not accepted as inputs.
TaskDefinitionArn