OperatingSystemFamily

class aws_cdk.aws_ecs.OperatingSystemFamily(*args: Any, **kwargs)

Bases: object

The operating system for Fargate Runtime Platform.

ExampleMetadata

infused

Example:

# Create a Task Definition for the Windows container to start
task_definition = ecs.FargateTaskDefinition(self, "TaskDef",
    runtime_platform=ecs.RuntimePlatform(
        operating_system_family=ecs.OperatingSystemFamily.WINDOWS_SERVER_2019_CORE,
        cpu_architecture=ecs.CpuArchitecture.X86_64
    ),
    cpu=1024,
    memory_limit_mi_b=2048
)

task_definition.add_container("windowsservercore",
    logging=ecs.LogDriver.aws_logs(stream_prefix="win-iis-on-fargate"),
    port_mappings=[ecs.PortMapping(container_port=80)],
    image=ecs.ContainerImage.from_registry("mcr.microsoft.com/windows/servercore/iis:windowsservercore-ltsc2019")
)

Attributes

LINUX = <aws_cdk.aws_ecs.OperatingSystemFamily object>
WINDOWS_SERVER_2004_CORE = <aws_cdk.aws_ecs.OperatingSystemFamily object>
WINDOWS_SERVER_2016_FULL = <aws_cdk.aws_ecs.OperatingSystemFamily object>
WINDOWS_SERVER_2019_CORE = <aws_cdk.aws_ecs.OperatingSystemFamily object>
WINDOWS_SERVER_2019_FULL = <aws_cdk.aws_ecs.OperatingSystemFamily object>
WINDOWS_SERVER_2022_CORE = <aws_cdk.aws_ecs.OperatingSystemFamily object>
WINDOWS_SERVER_2022_FULL = <aws_cdk.aws_ecs.OperatingSystemFamily object>
WINDOWS_SERVER_20_H2_CORE = <aws_cdk.aws_ecs.OperatingSystemFamily object>

Static Methods

classmethod of(family)

Other operating system family.

Parameters

family (str) – operating system family.

See

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-taskdefinition-runtimeplatform.html#cfn-ecs-taskdefinition-runtimeplatform-operatingsystemfamily for all available operating system family.

Return type

OperatingSystemFamily