Class PolicyConfiguration

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

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

Specifies the configuration for a policy preview analysis, including the type of analysis, the target resource, and the policy documents to evaluate.

See Also:
  • Method Details

    • jobType

      public final ImpactAnalysisJobType jobType()

      The type of impact analysis job. Currently only SCP (Service Control Policy) is supported.

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

      Returns:
      The type of impact analysis job. Currently only SCP (Service Control Policy) is supported.
      See Also:
    • jobTypeAsString

      public final String jobTypeAsString()

      The type of impact analysis job. Currently only SCP (Service Control Policy) is supported.

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

      Returns:
      The type of impact analysis job. Currently only SCP (Service Control Policy) is supported.
      See Also:
    • targetId

      public final String targetId()

      The identifier of the target resource for the policy analysis. This can be an Amazon Web Services account ID (12-digit number), an organization root ID (format: r-[0-9a-z]{4,32}), or an organizational unit ID (format: ou-[0-9a-z]{4,32}-[a-z0-9]{8,32}).

      Returns:
      The identifier of the target resource for the policy analysis. This can be an Amazon Web Services account ID (12-digit number), an organization root ID (format: r-[0-9a-z]{4,32}), or an organizational unit ID (format: ou-[0-9a-z]{4,32}-[a-z0-9]{8,32}).
    • hasPolicyDocumentsList

      public final boolean hasPolicyDocumentsList()
      For responses, this returns true if the service returned a value for the PolicyDocumentsList 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.
    • policyDocumentsList

      public final List<String> policyDocumentsList()

      A list of SCP policy documents to test. Each policy document is a JSON string with a maximum length of 5,120 characters. The analysis evaluates how these policies would affect access to resources.

      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 hasPolicyDocumentsList() method.

      Returns:
      A list of SCP policy documents to test. Each policy document is a JSON string with a maximum length of 5,120 characters. The analysis evaluates how these policies would affect access to resources.
    • toBuilder

      public PolicyConfiguration.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<PolicyConfiguration.Builder,PolicyConfiguration>
      Returns:
      a builder for type T
    • builder

      public static PolicyConfiguration.Builder builder()
    • serializableBuilderClass

      public static Class<? extends PolicyConfiguration.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.