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 Details

    • Builder

      public Builder()
  • Method Details

    • namespace

      @Stability(Stable) public Selector.Builder namespace(String namespace)
      Sets the value of Selector.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

      @Stability(Stable) public Selector.Builder labels(Map<String,String> labels)
      Sets the value of Selector.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

      @Stability(Stable) public Selector build()
      Builds the configured instance.
      Specified by:
      build in interface software.amazon.jsii.Builder<Selector>
      Returns:
      a new instance of Selector
      Throws:
      NullPointerException - if any required attribute was not provided