Class ContainerAttribute

java.lang.Object
software.amazon.awssdk.services.networkfirewall.model.ContainerAttribute
All Implemented Interfaces:
Serializable, SdkPojo, ToCopyableBuilder<ContainerAttribute.Builder,ContainerAttribute>

@Generated("software.amazon.awssdk:codegen") public final class ContainerAttribute extends Object implements SdkPojo, Serializable, ToCopyableBuilder<ContainerAttribute.Builder,ContainerAttribute>

A key-value filter pair used in container association monitoring configurations to narrow which containers are tracked. The key must match exactly. The value can be an exact value or a wildcard pattern.

See Also:
  • Method Details

    • key

      public final String key()

      The attribute key to filter on. For Amazon EKS, specify namespace to filter by namespace, or specify a Kubernetes label key. For Amazon ECS, specify a container instance attribute name. Keys don't support wildcards.

      Valid characters are letters, numbers, spaces, hyphens (-), underscores (_), periods ( .), forward slashes (/), and colons (:).

      Returns:
      The attribute key to filter on. For Amazon EKS, specify namespace to filter by namespace, or specify a Kubernetes label key. For Amazon ECS, specify a container instance attribute name. Keys don't support wildcards.

      Valid characters are letters, numbers, spaces, hyphens (-), underscores (_), periods (.), forward slashes (/), and colons (:).

    • value

      public final String value()

      The attribute value to match. You can specify an exact value, such as payments-api, or a wildcard pattern, such as payments-*.

      Valid characters are letters, numbers, spaces, hyphens (-), underscores (_), periods ( .), forward slashes (/), colons (:), asterisks (*), and backslashes (\).

      Network Firewall evaluates the value using the following rules:

      • An asterisk (*) matches zero or more characters. For example, payments-* matches payments-, payments-api, and payments-api-v2, and *-prod matches web-prod.

      • The pattern must match the entire value. For example, payments-* doesn't match my-payments-api. To match a value that contains payments anywhere, use *payments*.

      • Matching is case sensitive. For example, Payments-* doesn't match payments-api.

      • To match a literal asterisk, escape it with a backslash (\*). To match a literal backslash, use \\. A backslash followed by any other character matches a literal backslash followed by that character.

      • A wildcard pattern matches only containers that have the attribute. For example, a filter with key app and value * matches every container that has an app label, but doesn't match a container without an app label.

      • A value that doesn't contain * or \ matches only that exact value.

      A value can contain at most 10 unescaped asterisks. Escaped asterisks (\*) don't count toward this limit. A value can't end with a single unescaped backslash.

      Returns:
      The attribute value to match. You can specify an exact value, such as payments-api, or a wildcard pattern, such as payments-*.

      Valid characters are letters, numbers, spaces, hyphens (-), underscores (_), periods (.), forward slashes (/), colons (:), asterisks ( *), and backslashes (\).

      Network Firewall evaluates the value using the following rules:

      • An asterisk (*) matches zero or more characters. For example, payments-* matches payments-, payments-api, and payments-api-v2, and *-prod matches web-prod.

      • The pattern must match the entire value. For example, payments-* doesn't match my-payments-api. To match a value that contains payments anywhere, use *payments*.

      • Matching is case sensitive. For example, Payments-* doesn't match payments-api.

      • To match a literal asterisk, escape it with a backslash (\*). To match a literal backslash, use \\. A backslash followed by any other character matches a literal backslash followed by that character.

      • A wildcard pattern matches only containers that have the attribute. For example, a filter with key app and value * matches every container that has an app label, but doesn't match a container without an app label.

      • A value that doesn't contain * or \ matches only that exact value.

      A value can contain at most 10 unescaped asterisks. Escaped asterisks (\*) don't count toward this limit. A value can't end with a single unescaped backslash.

    • toBuilder

      public ContainerAttribute.Builder toBuilder()
      Description copied from interface: ToCopyableBuilder
      Take this object and create a builder that contains all of the current property values of this object.
      Specified by:
      toBuilder in interface ToCopyableBuilder<ContainerAttribute.Builder,ContainerAttribute>
      Returns:
      a builder for type T
    • builder

      public static ContainerAttribute.Builder builder()
    • serializableBuilderClass

      public static Class<? extends ContainerAttribute.Builder> serializableBuilderClass()
    • hashCode

      public final int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public final boolean equals(Object obj)
      Overrides:
      equals in class Object
    • equalsBySdkFields

      public final boolean equalsBySdkFields(Object obj)
      Description copied from interface: SdkPojo
      Indicates whether some other object is "equal to" this one by SDK fields. An SDK field is a modeled, non-inherited field in an SdkPojo class, and is generated based on a service model.

      If an SdkPojo class does not have any inherited fields, equalsBySdkFields and equals are essentially the same.

      Specified by:
      equalsBySdkFields in interface SdkPojo
      Parameters:
      obj - the object to be compared with
      Returns:
      true if the other object equals to this object by sdk fields, false otherwise.
    • toString

      public final String toString()
      Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value.
      Overrides:
      toString in class Object
    • getValueForField

      public final <T> Optional<T> getValueForField(String fieldName, Class<T> clazz)
    • sdkFields

      public final List<SdkField<?>> sdkFields()
      Specified by:
      sdkFields in interface SdkPojo
      Returns:
      List of SdkField in this POJO. May be empty list but should never be null.
    • sdkFieldNameToField

      public final Map<String,SdkField<?>> sdkFieldNameToField()
      Specified by:
      sdkFieldNameToField in interface SdkPojo
      Returns:
      The mapping between the field name and its corresponding field.