public class SimulateCustomPolicyRequest extends AmazonWebServiceRequest implements Serializable, Cloneable
SimulateCustomPolicy operation.
Simulate a set of IAM policies against a list of API actions and AWS resources to determine the policies' effective permissions. The policies are provided as a list of strings.
The simulation does not perform the API actions, it only checks the authorization to determine if the simulated policies allow or deny the actions.
If you want to simulate existing policies attached to an IAM user, group, or role, use SimulatePrincipalPolicy instead.
Context keys are variables maintained by AWS and its services that
provide details about the context of an API query request, and can be
evaluated by using the Condition element of an IAM
policy. To get the list of context keys required by the policies to
simulate them correctly, use GetContextKeysForCustomPolicy.
If the output is long, you can paginate the results using the
MaxItems and Marker parameters.
NOOP| Constructor and Description |
|---|
SimulateCustomPolicyRequest() |
| Modifier and Type | Method and Description |
|---|---|
SimulateCustomPolicyRequest |
clone()
Creates a shallow clone of this request.
|
boolean |
equals(Object obj) |
List<String> |
getActionNames()
A list of names of API actions to evaluate in the simulation.
|
List<ContextEntry> |
getContextEntries()
A list of context keys and corresponding values that are used by the
simulation.
|
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.
|
List<String> |
getPolicyInputList()
A list of policy documents to include in the simulation.
|
List<String> |
getResourceArns()
A list of ARNs of AWS resources to include in the simulation.
|
int |
hashCode() |
void |
setActionNames(Collection<String> actionNames)
A list of names of API actions to evaluate in the simulation.
|
void |
setContextEntries(Collection<ContextEntry> contextEntries)
A list of context keys and corresponding values that are used by the
simulation.
|
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 |
setPolicyInputList(Collection<String> policyInputList)
A list of policy documents to include in the simulation.
|
void |
setResourceArns(Collection<String> resourceArns)
A list of ARNs of AWS resources to include in the simulation.
|
String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
SimulateCustomPolicyRequest |
withActionNames(Collection<String> actionNames)
A list of names of API actions to evaluate in the simulation.
|
SimulateCustomPolicyRequest |
withActionNames(String... actionNames)
A list of names of API actions to evaluate in the simulation.
|
SimulateCustomPolicyRequest |
withContextEntries(Collection<ContextEntry> contextEntries)
A list of context keys and corresponding values that are used by the
simulation.
|
SimulateCustomPolicyRequest |
withContextEntries(ContextEntry... contextEntries)
A list of context keys and corresponding values that are used by the
simulation.
|
SimulateCustomPolicyRequest |
withMarker(String marker)
Use this parameter only when paginating results and only after you
receive a response indicating that the results are truncated.
|
SimulateCustomPolicyRequest |
withMaxItems(Integer maxItems)
Use this only when paginating results to indicate the maximum number
of items you want in the response.
|
SimulateCustomPolicyRequest |
withPolicyInputList(Collection<String> policyInputList)
A list of policy documents to include in the simulation.
|
SimulateCustomPolicyRequest |
withPolicyInputList(String... policyInputList)
A list of policy documents to include in the simulation.
|
SimulateCustomPolicyRequest |
withResourceArns(Collection<String> resourceArns)
A list of ARNs of AWS resources to include in the simulation.
|
SimulateCustomPolicyRequest |
withResourceArns(String... resourceArns)
A list of ARNs of AWS resources to include in the simulation.
|
copyBaseTo, getCustomQueryParameters, getCustomRequestHeaders, getGeneralProgressListener, getReadLimit, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, putCustomQueryParameter, putCustomRequestHeader, setGeneralProgressListener, setRequestCredentials, setRequestMetricCollector, withGeneralProgressListener, withRequestMetricCollectorpublic List<String> getPolicyInputList()
public void setPolicyInputList(Collection<String> policyInputList)
policyInputList - A list of policy documents to include in the simulation. Each document
is specified as a string containing the complete, valid JSON text of
an IAM policy.public SimulateCustomPolicyRequest withPolicyInputList(String... policyInputList)
NOTE: This method appends the values to the existing list (if
any). Use setPolicyInputList(java.util.Collection) or withPolicyInputList(java.util.Collection) if you want to override
the existing values.
Returns a reference to this object so that method calls can be chained together.
policyInputList - A list of policy documents to include in the simulation. Each document
is specified as a string containing the complete, valid JSON text of
an IAM policy.public SimulateCustomPolicyRequest withPolicyInputList(Collection<String> policyInputList)
Returns a reference to this object so that method calls can be chained together.
policyInputList - A list of policy documents to include in the simulation. Each document
is specified as a string containing the complete, valid JSON text of
an IAM policy.public List<String> getActionNames()
iam:CreateUser.iam:CreateUser.public void setActionNames(Collection<String> actionNames)
iam:CreateUser.actionNames - A list of names of API actions to evaluate in the simulation. Each
action is evaluated for each resource. Each action must include the
service identifier, such as iam:CreateUser.public SimulateCustomPolicyRequest withActionNames(String... actionNames)
iam:CreateUser.
NOTE: This method appends the values to the existing list (if
any). Use setActionNames(java.util.Collection) or withActionNames(java.util.Collection) if you want to override the
existing values.
Returns a reference to this object so that method calls can be chained together.
actionNames - A list of names of API actions to evaluate in the simulation. Each
action is evaluated for each resource. Each action must include the
service identifier, such as iam:CreateUser.public SimulateCustomPolicyRequest withActionNames(Collection<String> actionNames)
iam:CreateUser.
Returns a reference to this object so that method calls can be chained together.
actionNames - A list of names of API actions to evaluate in the simulation. Each
action is evaluated for each resource. Each action must include the
service identifier, such as iam:CreateUser.public List<String> getResourceArns()
*
(all resources). Each API in the ActionNames parameter is
evaluated for each resource in this list. The simulation determines
the access result (allowed or denied) of each combination and reports
it in the response.*
(all resources). Each API in the ActionNames parameter is
evaluated for each resource in this list. The simulation determines
the access result (allowed or denied) of each combination and reports
it in the response.public void setResourceArns(Collection<String> resourceArns)
*
(all resources). Each API in the ActionNames parameter is
evaluated for each resource in this list. The simulation determines
the access result (allowed or denied) of each combination and reports
it in the response.resourceArns - A list of ARNs of AWS resources to include in the simulation. If this
parameter is not provided then the value defaults to *
(all resources). Each API in the ActionNames parameter is
evaluated for each resource in this list. The simulation determines
the access result (allowed or denied) of each combination and reports
it in the response.public SimulateCustomPolicyRequest withResourceArns(String... resourceArns)
*
(all resources). Each API in the ActionNames parameter is
evaluated for each resource in this list. The simulation determines
the access result (allowed or denied) of each combination and reports
it in the response.
NOTE: This method appends the values to the existing list (if
any). Use setResourceArns(java.util.Collection) or withResourceArns(java.util.Collection) if you want to override the
existing values.
Returns a reference to this object so that method calls can be chained together.
resourceArns - A list of ARNs of AWS resources to include in the simulation. If this
parameter is not provided then the value defaults to *
(all resources). Each API in the ActionNames parameter is
evaluated for each resource in this list. The simulation determines
the access result (allowed or denied) of each combination and reports
it in the response.public SimulateCustomPolicyRequest withResourceArns(Collection<String> resourceArns)
*
(all resources). Each API in the ActionNames parameter is
evaluated for each resource in this list. The simulation determines
the access result (allowed or denied) of each combination and reports
it in the response.
Returns a reference to this object so that method calls can be chained together.
resourceArns - A list of ARNs of AWS resources to include in the simulation. If this
parameter is not provided then the value defaults to *
(all resources). Each API in the ActionNames parameter is
evaluated for each resource in this list. The simulation determines
the access result (allowed or denied) of each combination and reports
it in the response.public List<ContextEntry> getContextEntries()
Condition element in one of the simulated IAM permission
policies, the corresponding value is supplied.Condition element in one of the simulated IAM permission
policies, the corresponding value is supplied.public void setContextEntries(Collection<ContextEntry> contextEntries)
Condition element in one of the simulated IAM permission
policies, the corresponding value is supplied.contextEntries - A list of context keys and corresponding values that are used by the
simulation. Whenever a context key is evaluated by a
Condition element in one of the simulated IAM permission
policies, the corresponding value is supplied.public SimulateCustomPolicyRequest withContextEntries(ContextEntry... contextEntries)
Condition element in one of the simulated IAM permission
policies, the corresponding value is supplied.
NOTE: This method appends the values to the existing list (if
any). Use setContextEntries(java.util.Collection) or withContextEntries(java.util.Collection) if you want to override the
existing values.
Returns a reference to this object so that method calls can be chained together.
contextEntries - A list of context keys and corresponding values that are used by the
simulation. Whenever a context key is evaluated by a
Condition element in one of the simulated IAM permission
policies, the corresponding value is supplied.public SimulateCustomPolicyRequest withContextEntries(Collection<ContextEntry> contextEntries)
Condition element in one of the simulated IAM permission
policies, the corresponding value is supplied.
Returns a reference to this object so that method calls can be chained together.
contextEntries - A list of context keys and corresponding values that are used by the
simulation. Whenever a context key is evaluated by a
Condition element in one of the simulated IAM permission
policies, the corresponding value is supplied.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. If this is the
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. If this is the
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. If this is the
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 there are additional items
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. If this is the
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 SimulateCustomPolicyRequest 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. If this is the
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 there are additional items
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. If this is the
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 getMarker()
Marker element in the response you
received to inform the next call about where to start.
Constraints:
Length: 1 - 320
Pattern: [\u0020-\u00FF]+
Marker element in the response you
received to inform the next call about where to start.public void setMarker(String marker)
Marker element in the response you
received to inform the next call about where to 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 you
received to inform the next call about where to start.public SimulateCustomPolicyRequest withMarker(String marker)
Marker element in the response you
received to inform the next call about where to 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 you
received to inform the next call about where to start.public String toString()
toString in class ObjectObject.toString()public SimulateCustomPolicyRequest clone()
AmazonWebServiceRequestclone in class AmazonWebServiceRequestObject.clone()Copyright © 2015. All rights reserved.