# SelectorProperty

An object representing an AWS Fargate profile selector.

- Source: Generated at build time
- Type last changed: v2.93.0 · 23 Aug 2023

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

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

Python:

```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:

```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();
```

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 selectorProperty = new SelectorProperty {
    Namespace = "namespace",

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

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

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

## Properties

- `labels`: [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.LabelProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_eks.CfnFargateProfile.LabelProperty.html)[] — 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.

- `namespace`: string (required) — The Kubernetes `namespace` that the selector should match.
