Class PutIndexPolicyRequest

All Implemented Interfaces:
SdkPojo, ToCopyableBuilder<PutIndexPolicyRequest.Builder,PutIndexPolicyRequest>

@Generated("software.amazon.awssdk:codegen") public final class PutIndexPolicyRequest extends CloudWatchLogsRequest implements ToCopyableBuilder<PutIndexPolicyRequest.Builder,PutIndexPolicyRequest>
  • Method Details

    • logGroupIdentifier

      public final String logGroupIdentifier()

      Specify either the log group name or log group ARN to apply this field index policy to. If you specify an ARN, use the format arn:aws:logs:region:account-id:log-group:log_group_name Don't include an * at the end.

      Returns:
      Specify either the log group name or log group ARN to apply this field index policy to. If you specify an ARN, use the format arn:aws:logs:region:account-id:log-group:log_group_name Don't include an * at the end.
    • policyDocument

      public final String policyDocument()

      The index policy document, in JSON format. The following is an example of an index policy document that creates indexes with different types.

      "policyDocument": "{"Fields": [ "TransactionId" ], "FieldsV2": {"RequestId": {"type": "FIELD_INDEX"}, "APIName": {"type": "FACET"}, "StatusCode": {"type": "FACET"}}}"

      You can use FieldsV2 to specify the type for each field. Supported types are FIELD_INDEX and FACET. Field names within Fields and FieldsV2 must be mutually exclusive.

      The policy document must include at least one field index. For more information about the fields that can be included and other restrictions, see Field index syntax and quotas.

      Returns:
      The index policy document, in JSON format. The following is an example of an index policy document that creates indexes with different types.

      "policyDocument": "{"Fields": [ "TransactionId" ], "FieldsV2": {"RequestId": {"type": "FIELD_INDEX"}, "APIName": {"type": "FACET"}, "StatusCode": {"type": "FACET"}}}"

      You can use FieldsV2 to specify the type for each field. Supported types are FIELD_INDEX and FACET. Field names within Fields and FieldsV2 must be mutually exclusive.

      The policy document must include at least one field index. For more information about the fields that can be included and other restrictions, see Field index syntax and quotas.

    • toBuilder

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

      public static PutIndexPolicyRequest.Builder builder()
    • serializableBuilderClass

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

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

      public final boolean equals(Object obj)
      Overrides:
      equals in class AwsRequest
    • 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)
      Overrides:
      getValueForField in class SdkRequest
    • 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