# RuntimePlatform

The interface for Runtime Platform.

- Source: [`aws-ecs/lib/runtime-platform.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/aws-cdk-lib/aws-ecs/lib/runtime-platform.ts#L118)
- Type last changed: v2.7.0 · 12 Jan 2022

## Example

TypeScript:

```ts
declare const cluster: ecs.Cluster;
const applicationLoadBalancedFargateService = new ecsPatterns.ApplicationLoadBalancedFargateService(this, 'Service', {
  cluster,
  memoryLimitMiB: 512,
  taskImageOptions: {
    image: ecs.ContainerImage.fromRegistry('amazon/amazon-ecs-sample'),
  },
  minHealthyPercent: 100,
  runtimePlatform: {
    cpuArchitecture: ecs.CpuArchitecture.ARM64,
    operatingSystemFamily: ecs.OperatingSystemFamily.LINUX,
  },
});
```

Python:

```python
# cluster: ecs.Cluster

application_load_balanced_fargate_service = ecs_patterns.ApplicationLoadBalancedFargateService(self, "Service",
    cluster=cluster,
    memory_limit_mi_b=512,
    task_image_options=ecsPatterns.ApplicationLoadBalancedTaskImageOptions(
        image=ecs.ContainerImage.from_registry("amazon/amazon-ecs-sample")
    ),
    min_healthy_percent=100,
    runtime_platform=ecs.RuntimePlatform(
        cpu_architecture=ecs.CpuArchitecture.ARM64,
        operating_system_family=ecs.OperatingSystemFamily.LINUX
    )
)
```

Java:

```java
Cluster cluster;

ApplicationLoadBalancedFargateService applicationLoadBalancedFargateService = ApplicationLoadBalancedFargateService.Builder.create(this, "Service")
        .cluster(cluster)
        .memoryLimitMiB(512)
        .taskImageOptions(ApplicationLoadBalancedTaskImageOptions.builder()
                .image(ContainerImage.fromRegistry("amazon/amazon-ecs-sample"))
                .build())
        .minHealthyPercent(100)
        .runtimePlatform(RuntimePlatform.builder()
                .cpuArchitecture(CpuArchitecture.ARM64)
                .operatingSystemFamily(OperatingSystemFamily.LINUX)
                .build())
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
Cluster cluster;

var applicationLoadBalancedFargateService = new ApplicationLoadBalancedFargateService(this, "Service", new ApplicationLoadBalancedFargateServiceProps {
    Cluster = cluster,
    MemoryLimitMiB = 512,
    TaskImageOptions = new ApplicationLoadBalancedTaskImageOptions {
        Image = ContainerImage.FromRegistry("amazon/amazon-ecs-sample")
    },
    MinHealthyPercent = 100,
    RuntimePlatform = new RuntimePlatform {
        CpuArchitecture = CpuArchitecture.ARM64,
        OperatingSystemFamily = OperatingSystemFamily.LINUX
    }
});
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
var cluster Cluster

applicationLoadBalancedFargateService := ecsPatterns.NewApplicationLoadBalancedFargateService(this, jsii.String("Service"), &ApplicationLoadBalancedFargateServiceProps{
	Cluster: Cluster,
	MemoryLimitMiB: jsii.Number(512),
	TaskImageOptions: &ApplicationLoadBalancedTaskImageOptions{
		Image: ecs.ContainerImage_FromRegistry(jsii.String("amazon/amazon-ecs-sample")),
	},
	MinHealthyPercent: jsii.Number(100),
	RuntimePlatform: &RuntimePlatform{
		CpuArchitecture: ecs.CpuArchitecture_ARM64(),
		OperatingSystemFamily: ecs.OperatingSystemFamily_LINUX(),
	},
})
```

## Properties

- `cpuArchitecture`: [CpuArchitecture](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ecs.CpuArchitecture.html) = Undefined. — The CpuArchitecture for Fargate Runtime Platform.

- `operatingSystemFamily`: [OperatingSystemFamily](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ecs.OperatingSystemFamily.html) = Undefined. — The operating system for Fargate Runtime Platform.
