Class GetUserPolicyResponse

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

@Generated("software.amazon.awssdk:codegen") public final class GetUserPolicyResponse extends IamResponse implements ToCopyableBuilder<GetUserPolicyResponse.Builder,GetUserPolicyResponse>

Contains the response to a successful GetUserPolicy request.

  • Method Details

    • userName

      public final String userName()

      The user the policy is associated with.

      Returns:
      The user the policy is associated with.
    • policyName

      public final String policyName()

      The name of the policy.

      Returns:
      The name of the policy.
    • policyDocument

      public final String policyDocument()

      The policy document.

      IAM stores policies in JSON format. However, resources that were created using CloudFormation templates can be formatted in YAML. CloudFormation always converts a YAML policy to JSON format before submitting it to IAM.

      Returns:
      The policy document.

      IAM stores policies in JSON format. However, resources that were created using CloudFormation templates can be formatted in YAML. CloudFormation always converts a YAML policy to JSON format before submitting it to IAM.

    • toBuilder

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

      public static GetUserPolicyResponse.Builder builder()
    • serializableBuilderClass

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

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

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