Class LabelSelector

  • All Implemented Interfaces:
    software.amazon.jsii.JsiiSerializable

    @Generated(value="jsii-pacmak/1.59.0 (build eb02c92)",
               date="2022-05-18T23:19:48.630Z")
    @Stability(Stable)
    public class LabelSelector
    extends software.amazon.jsii.JsiiObject
    A label selector is a label query over a set of resources.

    • Constructor Detail

      • LabelSelector

        protected LabelSelector​(software.amazon.jsii.JsiiObjectRef objRef)
      • LabelSelector

        protected LabelSelector​(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • Method Detail

      • doesNotExist

        @Stability(Stable)
        @NotNull
        public static LabelSelector doesNotExist​(@NotNull
                                                 String key)
        Creates a `matchExpressions` "DoesNotExist" entry.

        Parameters:
        key - This parameter is required.
      • exists

        @Stability(Stable)
        @NotNull
        public static LabelSelector exists​(@NotNull
                                           String key)
        Creates a `matchExpressions` "Exists" entry.

        Parameters:
        key - This parameter is required.
      • in

        @Stability(Stable)
        @NotNull
        public static LabelSelector in​(@NotNull
                                       String key,
                                       @NotNull
                                       List<String> values)
        Creates a `matchExpressions` "In" entry.

        Parameters:
        key - This parameter is required.
        values - This parameter is required.
      • is

        @Stability(Stable)
        @NotNull
        public static LabelSelector is​(@NotNull
                                       String key,
                                       @NotNull
                                       String value,
                                       @Nullable
                                       Boolean applyToTemplate)
        Creates a `matchLabels` entry from the key and value.

        Use applyToTemplate to also add this label to the pod metadata of the workload.

        Parameters:
        key - This parameter is required.
        value - This parameter is required.
        applyToTemplate -
      • is

        @Stability(Stable)
        @NotNull
        public static LabelSelector is​(@NotNull
                                       String key,
                                       @NotNull
                                       String value)
        Creates a `matchLabels` entry from the key and value.

        Use applyToTemplate to also add this label to the pod metadata of the workload.

        Parameters:
        key - This parameter is required.
        value - This parameter is required.
      • notIn

        @Stability(Stable)
        @NotNull
        public static LabelSelector notIn​(@NotNull
                                          String key,
                                          @NotNull
                                          List<String> values)
        Creates a `matchExpressions` "NotIn" entry.

        Parameters:
        key - This parameter is required.
        values - This parameter is required.
      • getApplyToTemplate

        @Stability(Stable)
        @NotNull
        public Boolean getApplyToTemplate()
      • getKey

        @Stability(Stable)
        @NotNull
        public String getKey()
      • getValues

        @Stability(Stable)
        @Nullable
        public List<String> getValues()