Class SubscriptionFilter

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

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

Represents a subscription filter.

See Also:
  • Method Details

    • filterName

      public final String filterName()

      The name of the subscription filter.

      Returns:
      The name of the subscription filter.
    • logGroupName

      public final String logGroupName()

      The name of the log group.

      Returns:
      The name of the log group.
    • filterPattern

      public final String filterPattern()
      Returns the value of the FilterPattern property for this object.
      Returns:
      The value of the FilterPattern property for this object.
    • destinationArn

      public final String destinationArn()

      The Amazon Resource Name (ARN) of the destination.

      Returns:
      The Amazon Resource Name (ARN) of the destination.
    • roleArn

      public final String roleArn()

      Returns:
    • distribution

      public final Distribution distribution()
      Returns the value of the Distribution property for this object.

      If the service returns an enum value that is not available in the current SDK version, distribution will return Distribution.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from distributionAsString().

      Returns:
      The value of the Distribution property for this object.
      See Also:
    • distributionAsString

      public final String distributionAsString()
      Returns the value of the Distribution property for this object.

      If the service returns an enum value that is not available in the current SDK version, distribution will return Distribution.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from distributionAsString().

      Returns:
      The value of the Distribution property for this object.
      See Also:
    • applyOnTransformedLogs

      public final Boolean applyOnTransformedLogs()

      This parameter is valid only for log groups that have an active log transformer. For more information about log transformers, see PutTransformer.

      If this value is true, the subscription filter is applied on the transformed version of the log events instead of the original ingested log events.

      Returns:
      This parameter is valid only for log groups that have an active log transformer. For more information about log transformers, see PutTransformer.

      If this value is true, the subscription filter is applied on the transformed version of the log events instead of the original ingested log events.

    • creationTime

      public final Long creationTime()

      The creation time of the subscription filter, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC.

      Returns:
      The creation time of the subscription filter, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC.
    • fieldSelectionCriteria

      public final String fieldSelectionCriteria()

      The filter expression that specifies which log events are processed by this subscription filter based on system fields. Returns the fieldSelectionCriteria value if it was specified when the subscription filter was created.

      Returns:
      The filter expression that specifies which log events are processed by this subscription filter based on system fields. Returns the fieldSelectionCriteria value if it was specified when the subscription filter was created.
    • hasEmitSystemFields

      public final boolean hasEmitSystemFields()
      For responses, this returns true if the service returned a value for the EmitSystemFields property. This DOES NOT check that the value is non-empty (for which, you should check the isEmpty() method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.
    • emitSystemFields

      public final List<String> emitSystemFields()

      The list of system fields that are included in the log events sent to the subscription destination. Returns the emitSystemFields value if it was specified when the subscription filter was created.

      Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.

      This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the hasEmitSystemFields() method.

      Returns:
      The list of system fields that are included in the log events sent to the subscription destination. Returns the emitSystemFields value if it was specified when the subscription filter was created.
    • toBuilder

      public SubscriptionFilter.Builder toBuilder()
      Specified by:
      toBuilder in interface ToCopyableBuilder<SubscriptionFilter.Builder,SubscriptionFilter>
    • builder

      public static SubscriptionFilter.Builder builder()
    • serializableBuilderClass

      public static Class<? extends SubscriptionFilter.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)
      Specified by:
      equalsBySdkFields in interface SdkPojo
    • 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
    • sdkFieldNameToField

      public final Map<String,SdkField<?>> sdkFieldNameToField()
      Specified by:
      sdkFieldNameToField in interface SdkPojo