Skip to content
v2.276.0

SelectorProperty Struct ​

An object representing an AWS Fargate profile selector.

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 selectorProperty: eks.CfnFargateProfile.SelectorProperty = {
  namespace: 'namespace',

  // the properties below are optional
  labels: [{
    key: 'key',
    value: 'value',
  }],
};
python
# 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

selector_property = eks.CfnFargateProfile.SelectorProperty(
    namespace="namespace",

    # the properties below are optional
    labels=[eks.CfnFargateProfile.LabelProperty(
        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.*;

SelectorProperty selectorProperty = SelectorProperty.builder()
        .namespace("namespace")

        // the properties below are optional
        .labels(List.of(LabelProperty.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 selectorProperty = new SelectorProperty {
    Namespace = "namespace",

    // the properties below are optional
    Labels = new [] { new LabelProperty {
        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"

selectorProperty := &SelectorProperty{
	Namespace: jsii.String("namespace"),

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

Properties ​

labelsoptionalIResolvable | IResolvable | CfnFargateProfile.LabelProperty[]labelsoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, LabelProperty]]]labelsoptionalIResolvableLabelsoptionalIResolvableLabelsoptionalinterface{}#
The Kubernetes labels that the selector should match.

A pod must contain all of the labels that are specified in the selector for it to be considered a match.

namespacestringnamespacestrnamespaceStringNamespacestringNamespace*stringrequired#
The Kubernetes `namespace` that the selector should match.