# CfnFargateProfileProps

Properties for defining a `CfnFargateProfile`.

Used as props by: [CfnFargateProfile](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_eks.CfnFargateProfile.html)

- Source: Generated at build time

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_eks as eks } from 'aws-cdk-lib';
const cfnFargateProfileProps: eks.CfnFargateProfileProps = {
  clusterName: 'clusterName',
  podExecutionRoleArn: 'podExecutionRoleArn',
  selectors: [{
    namespace: 'namespace',

    // the properties below are optional
    labels: [{
      key: 'key',
      value: 'value',
    }],
  }],

  // the properties below are optional
  fargateProfileName: 'fargateProfileName',
  subnets: ['subnets'],
  tags: [{
    key: 'key',
    value: 'value',
  }],
};
```

Python:

```python
from aws_cdk import CfnTag
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_eks as eks

cfn_fargate_profile_props = eks.CfnFargateProfileProps(
    cluster_name="clusterName",
    pod_execution_role_arn="podExecutionRoleArn",
    selectors=[eks.CfnFargateProfile.SelectorProperty(
        namespace="namespace",

        # the properties below are optional
        labels=[eks.CfnFargateProfile.LabelProperty(
            key="key",
            value="value"
        )]
    )],

    # the properties below are optional
    fargate_profile_name="fargateProfileName",
    subnets=["subnets"],
    tags=[CfnTag(
        key="key",
        value="value"
    )]
)
```

Java:

```java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.eks.*;

CfnFargateProfileProps cfnFargateProfileProps = CfnFargateProfileProps.builder()
        .clusterName("clusterName")
        .podExecutionRoleArn("podExecutionRoleArn")
        .selectors(List.of(SelectorProperty.builder()
                .namespace("namespace")

                // the properties below are optional
                .labels(List.of(LabelProperty.builder()
                        .key("key")
                        .value("value")
                        .build()))
                .build()))

        // the properties below are optional
        .fargateProfileName("fargateProfileName")
        .subnets(List.of("subnets"))
        .tags(List.of(CfnTag.builder()
                .key("key")
                .value("value")
                .build()))
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.EKS;

var cfnFargateProfileProps = new CfnFargateProfileProps {
    ClusterName = "clusterName",
    PodExecutionRoleArn = "podExecutionRoleArn",
    Selectors = new [] { new SelectorProperty {
        Namespace = "namespace",

        // the properties below are optional
        Labels = new [] { new LabelProperty {
            Key = "key",
            Value = "value"
        } }
    } },

    // the properties below are optional
    FargateProfileName = "fargateProfileName",
    Subnets = new [] { "subnets" },
    Tags = new [] { new CfnTag {
        Key = "key",
        Value = "value"
    } }
};
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

cfnFargateProfileProps := &CfnFargateProfileProps{
	ClusterName: jsii.String("clusterName"),
	PodExecutionRoleArn: jsii.String("podExecutionRoleArn"),
	Selectors: []interface{}{
		&SelectorProperty{
			Namespace: jsii.String("namespace"),

			// the properties below are optional
			Labels: []interface{}{
				&LabelProperty{
					Key: jsii.String("key"),
					Value: jsii.String("value"),
				},
			},
		},
	},

	// the properties below are optional
	FargateProfileName: jsii.String("fargateProfileName"),
	Subnets: []*string{
		jsii.String("subnets"),
	},
	Tags: []CfnTag{
		&CfnTag{
			Key: jsii.String("key"),
			Value: jsii.String("value"),
		},
	},
}
```

## Properties

- `clusterName`: string (required) — The name of your cluster.

- `fargateProfileName`: string — The name of the Fargate profile.

- `podExecutionRoleArn`: string (required) — The Amazon Resource Name (ARN) of the `Pod` execution role to use for a `Pod` that matches the selectors in the Fargate profile.

  The `Pod` execution role allows Fargate infrastructure to register with your cluster as a node, and it provides read access to Amazon ECR image repositories. For more information, see [`Pod` execution role](https://docs.aws.amazon.com/eks/latest/userguide/pod-execution-role.html) in the *Amazon EKS User Guide* .

- `selectors`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnFargateProfile.SelectorProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_eks.CfnFargateProfile.SelectorProperty.html)[] (required) — The selectors to match for a `Pod` to use this Fargate profile.

  Each selector must have an associated Kubernetes `namespace` . Optionally, you can also specify `labels` for a `namespace` . You may specify up to five selectors in a Fargate profile.

- `subnets`: string[] — The IDs of subnets to launch a `Pod` into.

  A `Pod` running on Fargate isn't assigned a public IP address, so only private subnets (with no direct route to an Internet Gateway) are accepted for this parameter.

- `tags`: [CfnTag](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.CfnTag.html)[] — Metadata that assists with categorization and organization.

  Each tag consists of a key and an optional value. You define both. Tags don't propagate to any other cluster or AWS resources.
