Class AttachedPolicy

java.lang.Object
com.amazonaws.services.identitymanagement.model.AttachedPolicy
All Implemented Interfaces:
Serializable, Cloneable

public class AttachedPolicy extends Object implements Serializable, Cloneable

Contains information about an attached policy.

An attached policy is a managed policy that has been attached to a user, group, or role. This data type is used as a response element in the ListAttachedGroupPolicies, ListAttachedRolePolicies, ListAttachedUserPolicies, and GetAccountAuthorizationDetails actions.

For more information about managed policies, refer to Managed Policies and Inline Policies in the Using IAM guide.

See Also:
  • Constructor Details

    • AttachedPolicy

      public AttachedPolicy()
  • Method Details

    • setPolicyName

      public void setPolicyName(String policyName)

      The friendly name of the attached policy.

      Parameters:
      policyName - The friendly name of the attached policy.
    • getPolicyName

      public String getPolicyName()

      The friendly name of the attached policy.

      Returns:
      The friendly name of the attached policy.
    • withPolicyName

      public AttachedPolicy withPolicyName(String policyName)

      The friendly name of the attached policy.

      Parameters:
      policyName - The friendly name of the attached policy.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • setPolicyArn

      public void setPolicyArn(String policyArn)
      Parameters:
      policyArn -
    • getPolicyArn

      public String getPolicyArn()
      Returns:
    • withPolicyArn

      public AttachedPolicy withPolicyArn(String policyArn)
      Parameters:
      policyArn -
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • toString

      public String toString()
      Returns a string representation of this object; useful for testing and debugging.
      Overrides:
      toString in class Object
      Returns:
      A string representation of this object.
      See Also:
    • equals

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

      public int hashCode()
      Overrides:
      hashCode in class Object
    • clone

      public AttachedPolicy clone()
      Overrides:
      clone in class Object