public class ListPoliciesRequest extends AmazonWebServiceRequest implements Serializable, Cloneable
ListPolicies operation.
Lists all the managed policies that are available to your account, including your own customer managed policies and all AWS managed policies.
You can filter the list of policies that is returned using the
optional OnlyAttached ,
Scope , and PathPrefix
parameters. For example, to list only the customer managed policies in
your AWS account, set Scope to Local . To
list only AWS managed policies, set Scope to
AWS .
You can paginate the results using the MaxItems and
Marker parameters.
For more information about managed policies, refer to Managed Policies and Inline Policies in the Using IAM guide.
NOOP| Constructor and Description |
|---|
ListPoliciesRequest() |
| Modifier and Type | Method and Description |
|---|---|
ListPoliciesRequest |
clone() |
boolean |
equals(Object obj) |
String |
getMarker()
Use this parameter only when paginating results, and only in a
subsequent request after you've received a response where the results
are truncated.
|
Integer |
getMaxItems()
Use this parameter only when paginating results to indicate the
maximum number of policies you want in the response.
|
Boolean |
getOnlyAttached()
A flag to filter the results to only the attached policies.
|
String |
getPathPrefix()
The path prefix for filtering the results.
|
String |
getScope()
The scope to use for filtering the results.
|
int |
hashCode() |
Boolean |
isOnlyAttached()
A flag to filter the results to only the attached policies.
|
void |
setMarker(String marker)
Use this parameter only when paginating results, and only in a
subsequent request after you've received a response where the results
are truncated.
|
void |
setMaxItems(Integer maxItems)
Use this parameter only when paginating results to indicate the
maximum number of policies you want in the response.
|
void |
setOnlyAttached(Boolean onlyAttached)
A flag to filter the results to only the attached policies.
|
void |
setPathPrefix(String pathPrefix)
The path prefix for filtering the results.
|
void |
setScope(PolicyScopeType scope)
The scope to use for filtering the results.
|
void |
setScope(String scope)
The scope to use for filtering the results.
|
String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
ListPoliciesRequest |
withMarker(String marker)
Use this parameter only when paginating results, and only in a
subsequent request after you've received a response where the results
are truncated.
|
ListPoliciesRequest |
withMaxItems(Integer maxItems)
Use this parameter only when paginating results to indicate the
maximum number of policies you want in the response.
|
ListPoliciesRequest |
withOnlyAttached(Boolean onlyAttached)
A flag to filter the results to only the attached policies.
|
ListPoliciesRequest |
withPathPrefix(String pathPrefix)
The path prefix for filtering the results.
|
ListPoliciesRequest |
withScope(PolicyScopeType scope)
The scope to use for filtering the results.
|
ListPoliciesRequest |
withScope(String scope)
The scope to use for filtering the results.
|
copyBaseTo, copyPrivateRequestParameters, getCustomRequestHeaders, getGeneralProgressListener, getReadLimit, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, putCustomRequestHeader, setGeneralProgressListener, setRequestCredentials, setRequestMetricCollector, withGeneralProgressListener, withRequestMetricCollectorpublic String getScope()
To list only AWS
managed policies, set Scope to AWS. To list
only the customer managed policies in your AWS account, set
Scope to Local.
This parameter is
optional. If it is not included, or if it is set to All,
all policies are returned.
Constraints:
Allowed Values: All, AWS, Local
To list only AWS
managed policies, set Scope to AWS. To list
only the customer managed policies in your AWS account, set
Scope to Local.
This parameter is
optional. If it is not included, or if it is set to All,
all policies are returned.
PolicyScopeTypepublic void setScope(String scope)
To list only AWS
managed policies, set Scope to AWS. To list
only the customer managed policies in your AWS account, set
Scope to Local.
This parameter is
optional. If it is not included, or if it is set to All,
all policies are returned.
Constraints:
Allowed Values: All, AWS, Local
scope - The scope to use for filtering the results. To list only AWS
managed policies, set Scope to AWS. To list
only the customer managed policies in your AWS account, set
Scope to Local.
This parameter is
optional. If it is not included, or if it is set to All,
all policies are returned.
PolicyScopeTypepublic ListPoliciesRequest withScope(String scope)
To list only AWS
managed policies, set Scope to AWS. To list
only the customer managed policies in your AWS account, set
Scope to Local.
This parameter is
optional. If it is not included, or if it is set to All,
all policies are returned.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Allowed Values: All, AWS, Local
scope - The scope to use for filtering the results. To list only AWS
managed policies, set Scope to AWS. To list
only the customer managed policies in your AWS account, set
Scope to Local.
This parameter is
optional. If it is not included, or if it is set to All,
all policies are returned.
PolicyScopeTypepublic void setScope(PolicyScopeType scope)
To list only AWS
managed policies, set Scope to AWS. To list
only the customer managed policies in your AWS account, set
Scope to Local.
This parameter is
optional. If it is not included, or if it is set to All,
all policies are returned.
Constraints:
Allowed Values: All, AWS, Local
scope - The scope to use for filtering the results. To list only AWS
managed policies, set Scope to AWS. To list
only the customer managed policies in your AWS account, set
Scope to Local.
This parameter is
optional. If it is not included, or if it is set to All,
all policies are returned.
PolicyScopeTypepublic ListPoliciesRequest withScope(PolicyScopeType scope)
To list only AWS
managed policies, set Scope to AWS. To list
only the customer managed policies in your AWS account, set
Scope to Local.
This parameter is
optional. If it is not included, or if it is set to All,
all policies are returned.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Allowed Values: All, AWS, Local
scope - The scope to use for filtering the results. To list only AWS
managed policies, set Scope to AWS. To list
only the customer managed policies in your AWS account, set
Scope to Local.
This parameter is
optional. If it is not included, or if it is set to All,
all policies are returned.
PolicyScopeTypepublic Boolean isOnlyAttached()
When
OnlyAttached is true, the returned list
contains only the policies that are attached to a user, group, or
role. When OnlyAttached is false, or when
the parameter is not included, all policies are returned.
When
OnlyAttached is true, the returned list
contains only the policies that are attached to a user, group, or
role. When OnlyAttached is false, or when
the parameter is not included, all policies are returned.
public void setOnlyAttached(Boolean onlyAttached)
When
OnlyAttached is true, the returned list
contains only the policies that are attached to a user, group, or
role. When OnlyAttached is false, or when
the parameter is not included, all policies are returned.
onlyAttached - A flag to filter the results to only the attached policies. When
OnlyAttached is true, the returned list
contains only the policies that are attached to a user, group, or
role. When OnlyAttached is false, or when
the parameter is not included, all policies are returned.
public ListPoliciesRequest withOnlyAttached(Boolean onlyAttached)
When
OnlyAttached is true, the returned list
contains only the policies that are attached to a user, group, or
role. When OnlyAttached is false, or when
the parameter is not included, all policies are returned.
Returns a reference to this object so that method calls can be chained together.
onlyAttached - A flag to filter the results to only the attached policies. When
OnlyAttached is true, the returned list
contains only the policies that are attached to a user, group, or
role. When OnlyAttached is false, or when
the parameter is not included, all policies are returned.
public Boolean getOnlyAttached()
When
OnlyAttached is true, the returned list
contains only the policies that are attached to a user, group, or
role. When OnlyAttached is false, or when
the parameter is not included, all policies are returned.
When
OnlyAttached is true, the returned list
contains only the policies that are attached to a user, group, or
role. When OnlyAttached is false, or when
the parameter is not included, all policies are returned.
public String getPathPrefix()
Constraints:
Pattern: ((/[A-Za-z0-9\.,\+@=_-]+)*)/
public void setPathPrefix(String pathPrefix)
Constraints:
Pattern: ((/[A-Za-z0-9\.,\+@=_-]+)*)/
pathPrefix - The path prefix for filtering the results. This parameter is optional.
If it is not included, it defaults to a slash (/), listing all
policies.public ListPoliciesRequest withPathPrefix(String pathPrefix)
Returns a reference to this object so that method calls can be chained together.
Constraints:
Pattern: ((/[A-Za-z0-9\.,\+@=_-]+)*)/
pathPrefix - The path prefix for filtering the results. This parameter is optional.
If it is not included, it defaults to a slash (/), listing all
policies.public String getMarker()
Marker element
in the response you just received.
Constraints:
Length: 1 - 320
Pattern: [\u0020-\u00FF]*
Marker element
in the response you just received.public void setMarker(String marker)
Marker element
in the response you just received.
Constraints:
Length: 1 - 320
Pattern: [\u0020-\u00FF]*
marker - Use this parameter only when paginating results, and only in a
subsequent request after you've received a response where the results
are truncated. Set it to the value of the Marker element
in the response you just received.public ListPoliciesRequest withMarker(String marker)
Marker element
in the response you just received.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 1 - 320
Pattern: [\u0020-\u00FF]*
marker - Use this parameter only when paginating results, and only in a
subsequent request after you've received a response where the results
are truncated. Set it to the value of the Marker element
in the response you just received.public Integer getMaxItems()
IsTruncated response element is true. This
parameter is optional. If you do not include it, it defaults to 100.
Constraints:
Range: 1 - 1000
IsTruncated response element is true. This
parameter is optional. If you do not include it, it defaults to 100.public void setMaxItems(Integer maxItems)
IsTruncated response element is true. This
parameter is optional. If you do not include it, it defaults to 100.
Constraints:
Range: 1 - 1000
maxItems - Use this parameter only when paginating results to indicate the
maximum number of policies you want in the response. If there are
additional policies beyond the maximum you specify, the
IsTruncated response element is true. This
parameter is optional. If you do not include it, it defaults to 100.public ListPoliciesRequest withMaxItems(Integer maxItems)
IsTruncated response element is true. This
parameter is optional. If you do not include it, it defaults to 100.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Range: 1 - 1000
maxItems - Use this parameter only when paginating results to indicate the
maximum number of policies you want in the response. If there are
additional policies beyond the maximum you specify, the
IsTruncated response element is true. This
parameter is optional. If you do not include it, it defaults to 100.public String toString()
toString in class ObjectObject.toString()public ListPoliciesRequest clone()
clone in class AmazonWebServiceRequestCopyright © 2015. All rights reserved.