public class EvaluationResult extends Object implements Serializable, Cloneable
Contains the results of a simulation.
This data type is used by the return parameter of
SimulatePolicy .
| Constructor and Description |
|---|
EvaluationResult() |
| Modifier and Type | Method and Description |
|---|---|
EvaluationResult |
clone() |
boolean |
equals(Object obj) |
String |
getEvalActionName()
The name of the API action tested on the indicated resource.
|
String |
getEvalDecision()
The result of the simulation.
|
String |
getEvalResourceName()
The ARN of the resource that the indicated API action was tested on.
|
List<Statement> |
getMatchedStatements()
A list of the statements in the input policies that determine the
result for this scenario.
|
List<String> |
getMissingContextValues()
A list of context keys that are required by the included input
policies but that were not provided by one of the input parameters.
|
int |
hashCode() |
void |
setEvalActionName(String evalActionName)
The name of the API action tested on the indicated resource.
|
void |
setEvalDecision(PolicyEvaluationDecisionType evalDecision)
The result of the simulation.
|
void |
setEvalDecision(String evalDecision)
The result of the simulation.
|
void |
setEvalResourceName(String evalResourceName)
The ARN of the resource that the indicated API action was tested on.
|
void |
setMatchedStatements(Collection<Statement> matchedStatements)
A list of the statements in the input policies that determine the
result for this scenario.
|
void |
setMissingContextValues(Collection<String> missingContextValues)
A list of context keys that are required by the included input
policies but that were not provided by one of the input parameters.
|
String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
EvaluationResult |
withEvalActionName(String evalActionName)
The name of the API action tested on the indicated resource.
|
EvaluationResult |
withEvalDecision(PolicyEvaluationDecisionType evalDecision)
The result of the simulation.
|
EvaluationResult |
withEvalDecision(String evalDecision)
The result of the simulation.
|
EvaluationResult |
withEvalResourceName(String evalResourceName)
The ARN of the resource that the indicated API action was tested on.
|
EvaluationResult |
withMatchedStatements(Collection<Statement> matchedStatements)
A list of the statements in the input policies that determine the
result for this scenario.
|
EvaluationResult |
withMatchedStatements(Statement... matchedStatements)
A list of the statements in the input policies that determine the
result for this scenario.
|
EvaluationResult |
withMissingContextValues(Collection<String> missingContextValues)
A list of context keys that are required by the included input
policies but that were not provided by one of the input parameters.
|
EvaluationResult |
withMissingContextValues(String... missingContextValues)
A list of context keys that are required by the included input
policies but that were not provided by one of the input parameters.
|
public String getEvalActionName()
Constraints:
Length: 3 - 128
public void setEvalActionName(String evalActionName)
Constraints:
Length: 3 - 128
evalActionName - The name of the API action tested on the indicated resource.public EvaluationResult withEvalActionName(String evalActionName)
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 3 - 128
evalActionName - The name of the API action tested on the indicated resource.public String getEvalResourceName()
Constraints:
Length: 1 - 2048
public void setEvalResourceName(String evalResourceName)
Constraints:
Length: 1 - 2048
evalResourceName - The ARN of the resource that the indicated API action was tested on.public EvaluationResult withEvalResourceName(String evalResourceName)
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 1 - 2048
evalResourceName - The ARN of the resource that the indicated API action was tested on.public String getEvalDecision()
Constraints:
Allowed Values: allowed, explicitDeny, implicitDeny
PolicyEvaluationDecisionTypepublic void setEvalDecision(String evalDecision)
Constraints:
Allowed Values: allowed, explicitDeny, implicitDeny
evalDecision - The result of the simulation.PolicyEvaluationDecisionTypepublic EvaluationResult withEvalDecision(String evalDecision)
Returns a reference to this object so that method calls can be chained together.
Constraints:
Allowed Values: allowed, explicitDeny, implicitDeny
evalDecision - The result of the simulation.PolicyEvaluationDecisionTypepublic void setEvalDecision(PolicyEvaluationDecisionType evalDecision)
Constraints:
Allowed Values: allowed, explicitDeny, implicitDeny
evalDecision - The result of the simulation.PolicyEvaluationDecisionTypepublic EvaluationResult withEvalDecision(PolicyEvaluationDecisionType evalDecision)
Returns a reference to this object so that method calls can be chained together.
Constraints:
Allowed Values: allowed, explicitDeny, implicitDeny
evalDecision - The result of the simulation.PolicyEvaluationDecisionTypepublic List<Statement> getMatchedStatements()
public void setMatchedStatements(Collection<Statement> matchedStatements)
matchedStatements - A list of the statements in the input policies that determine the
result for this scenario. Remember that even if multiple statements
allow the action on the resource, if only one statement denies that
action, then the explicit deny overrides any allow, and the deny
statement is the only entry included in the result.public EvaluationResult withMatchedStatements(Statement... matchedStatements)
NOTE: This method appends the values to the existing list (if
any). Use setMatchedStatements(java.util.Collection) or
withMatchedStatements(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.
matchedStatements - A list of the statements in the input policies that determine the
result for this scenario. Remember that even if multiple statements
allow the action on the resource, if only one statement denies that
action, then the explicit deny overrides any allow, and the deny
statement is the only entry included in the result.public EvaluationResult withMatchedStatements(Collection<Statement> matchedStatements)
Returns a reference to this object so that method calls can be chained together.
matchedStatements - A list of the statements in the input policies that determine the
result for this scenario. Remember that even if multiple statements
allow the action on the resource, if only one statement denies that
action, then the explicit deny overrides any allow, and the deny
statement is the only entry included in the result.public List<String> getMissingContextValues()
If the response includes any keys in this list, then the reported results might be untrustworthy because the simulation could not completely evaluate all of the conditions specified in the policies that would occur in a real world request.
If the response includes any keys in this list, then the reported results might be untrustworthy because the simulation could not completely evaluate all of the conditions specified in the policies that would occur in a real world request.
public void setMissingContextValues(Collection<String> missingContextValues)
If the response includes any keys in this list, then the reported results might be untrustworthy because the simulation could not completely evaluate all of the conditions specified in the policies that would occur in a real world request.
missingContextValues - A list of context keys that are required by the included input
policies but that were not provided by one of the input parameters. To
discover the context keys used by a set of policies, you can call
GetContextKeysForCustomPolicy or
GetContextKeysForPrincipalPolicy. If the response includes any keys in this list, then the reported results might be untrustworthy because the simulation could not completely evaluate all of the conditions specified in the policies that would occur in a real world request.
public EvaluationResult withMissingContextValues(String... missingContextValues)
If the response includes any keys in this list, then the reported results might be untrustworthy because the simulation could not completely evaluate all of the conditions specified in the policies that would occur in a real world request.
NOTE: This method appends the values to the existing list (if
any). Use setMissingContextValues(java.util.Collection) or
withMissingContextValues(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.
missingContextValues - A list of context keys that are required by the included input
policies but that were not provided by one of the input parameters. To
discover the context keys used by a set of policies, you can call
GetContextKeysForCustomPolicy or
GetContextKeysForPrincipalPolicy. If the response includes any keys in this list, then the reported results might be untrustworthy because the simulation could not completely evaluate all of the conditions specified in the policies that would occur in a real world request.
public EvaluationResult withMissingContextValues(Collection<String> missingContextValues)
If the response includes any keys in this list, then the reported results might be untrustworthy because the simulation could not completely evaluate all of the conditions specified in the policies that would occur in a real world request.
Returns a reference to this object so that method calls can be chained together.
missingContextValues - A list of context keys that are required by the included input
policies but that were not provided by one of the input parameters. To
discover the context keys used by a set of policies, you can call
GetContextKeysForCustomPolicy or
GetContextKeysForPrincipalPolicy. If the response includes any keys in this list, then the reported results might be untrustworthy because the simulation could not completely evaluate all of the conditions specified in the policies that would occur in a real world request.
public String toString()
toString in class ObjectObject.toString()public EvaluationResult clone()
Copyright © 2015. All rights reserved.