CfnFargateProfileProps Struct
Properties for defining a CfnFargateProfile.
| Source |
|---|
Example
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
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
// 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();
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"
} }
};
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
The name of your cluster.
fargateProfileNameoptionalstringfargate_profile_nameoptionalstrfargateProfileNameoptionalStringFargateProfileNameoptionalstringFargateProfileNameoptional*string #The name of the Fargate profile.
podExecutionRoleArnstringpod_execution_role_arnstrpodExecutionRoleArnStringPodExecutionRoleArnstringPodExecutionRoleArn*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.
notes
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 in the Amazon EKS User Guide .
selectorsIResolvable | IResolvable | CfnFargateProfile.selectorstyping.Union[IResolvable, typing.List[typing.Union[IResolvable, SelectorProperty]]]selectorsIResolvableSelectorsIResolvableSelectorsinterface{} 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.
subnetsoptionalstring[]subnetsoptionaltyping.List[str]subnetsoptionalList<String>Subnetsoptionalstring[]Subnetsoptional*[]*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.
tagsoptionalCfnTag[]tagsoptionaltyping.List[CfnTag]tagsoptionalList<CfnTag>TagsoptionalCfnTag[]Tagsoptional*[]CfnTag #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.