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 IAM User 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 after you
receive a response indicating that the results are truncated.
|
Integer |
getMaxItems()
Use this only when paginating results to indicate the maximum number
of items 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 after you
receive a response indicating that the results are truncated.
|
void |
setMaxItems(Integer maxItems)
Use this only when paginating results to indicate the maximum number
of items 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 after you
receive a response indicating that the results are truncated.
|
ListPoliciesRequest |
withMaxItems(Integer maxItems)
Use this only when paginating results to indicate the maximum number
of items 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, getCloneRoot, getCloneSource, getCustomQueryParameters, getCustomRequestHeaders, getGeneralProgressListener, getReadLimit, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, getSdkClientExecutionTimeout, getSdkRequestTimeout, putCustomQueryParameter, putCustomRequestHeader, setGeneralProgressListener, setRequestCredentials, setRequestMetricCollector, setSdkClientExecutionTimeout, setSdkRequestTimeout, withGeneralProgressListener, withRequestMetricCollector, withSdkClientExecutionTimeout, withSdkRequestTimeoutpublic 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 that
you received to indicate where the next call should start.
Constraints:
Length: 1 - 320
Pattern: [\u0020-\u00FF]+
Marker element in the response that
you received to indicate where the next call should start.public void setMarker(String marker)
Marker element in the response that
you received to indicate where the next call should start.
Constraints:
Length: 1 - 320
Pattern: [\u0020-\u00FF]+
marker - Use this parameter only when paginating results and only after you
receive a response indicating that the results are truncated. Set it
to the value of the Marker element in the response that
you received to indicate where the next call should start.public ListPoliciesRequest withMarker(String marker)
Marker element in the response that
you received to indicate where the next call should start.
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 after you
receive a response indicating that the results are truncated. Set it
to the value of the Marker element in the response that
you received to indicate where the next call should start.public Integer getMaxItems()
IsTruncated response element
is true. This parameter is optional. If you do not
include it, it defaults to 100. Note that IAM might return fewer
results, even when there are more results available. In that case, the
IsTruncated response element returns true
and Marker contains a value to include in the subsequent
call that tells the service where to continue from.
Constraints:
Range: 1 - 1000
IsTruncated response element
is true. This parameter is optional. If you do not
include it, it defaults to 100. Note that IAM might return fewer
results, even when there are more results available. In that case, the
IsTruncated response element returns true
and Marker contains a value to include in the subsequent
call that tells the service where to continue from.
public void setMaxItems(Integer maxItems)
IsTruncated response element
is true. This parameter is optional. If you do not
include it, it defaults to 100. Note that IAM might return fewer
results, even when there are more results available. In that case, the
IsTruncated response element returns true
and Marker contains a value to include in the subsequent
call that tells the service where to continue from.
Constraints:
Range: 1 - 1000
maxItems - Use this only when paginating results to indicate the maximum number
of items you want in the response. If additional items exist 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. Note that IAM might return fewer
results, even when there are more results available. In that case, the
IsTruncated response element returns true
and Marker contains a value to include in the subsequent
call that tells the service where to continue from.
public ListPoliciesRequest withMaxItems(Integer maxItems)
IsTruncated response element
is true. This parameter is optional. If you do not
include it, it defaults to 100. Note that IAM might return fewer
results, even when there are more results available. In that case, the
IsTruncated response element returns true
and Marker contains a value to include in the subsequent
call that tells the service where to continue from.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Range: 1 - 1000
maxItems - Use this only when paginating results to indicate the maximum number
of items you want in the response. If additional items exist 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. Note that IAM might return fewer
results, even when there are more results available. In that case, the
IsTruncated response element returns true
and Marker contains a value to include in the subsequent
call that tells the service where to continue from.
public String toString()
toString in class ObjectObject.toString()public ListPoliciesRequest clone()
clone in class AmazonWebServiceRequestCopyright © 2015. All rights reserved.