Class Selector.Builder
java.lang.Object
software.amazon.awscdk.services.eks.Selector.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<Selector>
- Enclosing interface:
Selector
@Stability(Stable)
public static final class Selector.Builder
extends Object
implements software.amazon.jsii.Builder<Selector>
A builder for
Selector
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.Sets the value ofSelector.getLabels()
Sets the value ofSelector.getNamespace()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
namespace
Sets the value ofSelector.getNamespace()
- Parameters:
namespace
- The Kubernetes namespace that the selector should match. This parameter is required. You must specify a namespace for a selector. The selector only matches pods that are created in this namespace, but you can create multiple selectors to target multiple namespaces.- Returns:
this
-
labels
Sets the value ofSelector.getLabels()
- Parameters:
labels
- 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.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<Selector>
- Returns:
- a new instance of
Selector
- Throws:
NullPointerException
- if any required attribute was not provided
-