/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.identitymanagement.model; import java.io.Serializable; import javax.annotation.Generated; /** *
* Contains the results of a simulation. *
*
* This data type is used by the return parameter of SimulateCustomPolicy
and
* SimulatePrincipalPolicy
.
*
* The name of the API operation tested on the indicated resource. *
*/ private String evalActionName; /** ** The ARN of the resource that the indicated API operation was tested on. *
*/ private String evalResourceName; /** ** The result of the simulation. *
*/ private String evalDecision; /** ** A list of the statements in the input policies that determine the result for this scenario. Remember that even if * multiple statements allow the operation on the resource, if only one statement denies that operation, then the * explicit deny overrides any allow. In addition, the deny statement is the only entry included in the result. *
*/ private com.amazonaws.internal.SdkInternalList
* A list of context keys that are required by the included input policies but that were not provided by one of the
* input parameters. This list is used when the resource in a simulation is "*", either explicitly, or when the
* ResourceArns
parameter blank. If you include a list of resources, then any missing context values
* are instead included under the ResourceSpecificResults
section. To discover the context keys used by
* a set of policies, you can call GetContextKeysForCustomPolicy or GetContextKeysForPrincipalPolicy.
*
* A structure that details how Organizations and its service control policies affect the results of the simulation. * Only applies if the simulated user's account is part of an organization. *
*/ private OrganizationsDecisionDetail organizationsDecisionDetail; /** ** Contains information about the effect that a permissions boundary has on a policy simulation when the boundary is * applied to an IAM entity. *
*/ private PermissionsBoundaryDecisionDetail permissionsBoundaryDecisionDetail; /** ** Additional details about the results of the cross-account evaluation decision. This parameter is populated for * only cross-account simulations. It contains a brief summary of how each policy type contributes to the final * evaluation decision. *
*
* If the simulation evaluates policies within the same account and includes a resource ARN, then the parameter is
* present but the response is empty. If the simulation evaluates policies within the same account and specifies all
* resources (*
), then the parameter is not returned.
*
* When you make a cross-account request, Amazon Web Services evaluates the request in the trusting account and the
* trusted account. The request is allowed only if both evaluations return true
. For more information
* about how policies are evaluated, see Evaluating policies within a single account.
*
* If an Organizations SCP included in the evaluation denies access, the simulation ends. In this case, policy * evaluation does not proceed any further and this parameter is not returned. *
*/ private com.amazonaws.internal.SdkInternalMap* The individual results of the simulation of the API operation specified in EvalActionName on each resource. *
*/ private com.amazonaws.internal.SdkInternalList* The name of the API operation tested on the indicated resource. *
* * @param evalActionName * The name of the API operation tested on the indicated resource. */ public void setEvalActionName(String evalActionName) { this.evalActionName = evalActionName; } /** ** The name of the API operation tested on the indicated resource. *
* * @return The name of the API operation tested on the indicated resource. */ public String getEvalActionName() { return this.evalActionName; } /** ** The name of the API operation tested on the indicated resource. *
* * @param evalActionName * The name of the API operation tested on the indicated resource. * @return Returns a reference to this object so that method calls can be chained together. */ public EvaluationResult withEvalActionName(String evalActionName) { setEvalActionName(evalActionName); return this; } /** ** The ARN of the resource that the indicated API operation was tested on. *
* * @param evalResourceName * The ARN of the resource that the indicated API operation was tested on. */ public void setEvalResourceName(String evalResourceName) { this.evalResourceName = evalResourceName; } /** ** The ARN of the resource that the indicated API operation was tested on. *
* * @return The ARN of the resource that the indicated API operation was tested on. */ public String getEvalResourceName() { return this.evalResourceName; } /** ** The ARN of the resource that the indicated API operation was tested on. *
* * @param evalResourceName * The ARN of the resource that the indicated API operation was tested on. * @return Returns a reference to this object so that method calls can be chained together. */ public EvaluationResult withEvalResourceName(String evalResourceName) { setEvalResourceName(evalResourceName); return this; } /** ** The result of the simulation. *
* * @param evalDecision * The result of the simulation. * @see PolicyEvaluationDecisionType */ public void setEvalDecision(String evalDecision) { this.evalDecision = evalDecision; } /** ** The result of the simulation. *
* * @return The result of the simulation. * @see PolicyEvaluationDecisionType */ public String getEvalDecision() { return this.evalDecision; } /** ** The result of the simulation. *
* * @param evalDecision * The result of the simulation. * @return Returns a reference to this object so that method calls can be chained together. * @see PolicyEvaluationDecisionType */ public EvaluationResult withEvalDecision(String evalDecision) { setEvalDecision(evalDecision); return this; } /** ** The result of the simulation. *
* * @param evalDecision * The result of the simulation. * @see PolicyEvaluationDecisionType */ public void setEvalDecision(PolicyEvaluationDecisionType evalDecision) { withEvalDecision(evalDecision); } /** ** The result of the simulation. *
* * @param evalDecision * The result of the simulation. * @return Returns a reference to this object so that method calls can be chained together. * @see PolicyEvaluationDecisionType */ public EvaluationResult withEvalDecision(PolicyEvaluationDecisionType evalDecision) { this.evalDecision = evalDecision.toString(); return this; } /** ** A list of the statements in the input policies that determine the result for this scenario. Remember that even if * multiple statements allow the operation on the resource, if only one statement denies that operation, then the * explicit deny overrides any allow. In addition, the deny statement is the only entry included in the result. *
* * @return A list of the statements in the input policies that determine the result for this scenario. Remember that * even if multiple statements allow the operation on the resource, if only one statement denies that * operation, then the explicit deny overrides any allow. In addition, the deny statement is the only entry * included in the result. */ public java.util.List* A list of the statements in the input policies that determine the result for this scenario. Remember that even if * multiple statements allow the operation on the resource, if only one statement denies that operation, then the * explicit deny overrides any allow. In addition, the deny statement is the only entry included in the result. *
* * @param 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 operation on the resource, if only one statement denies that * operation, then the explicit deny overrides any allow. In addition, the deny statement is the only entry * included in the result. */ public void setMatchedStatements(java.util.Collection* A list of the statements in the input policies that determine the result for this scenario. Remember that even if * multiple statements allow the operation on the resource, if only one statement denies that operation, then the * explicit deny overrides any allow. In addition, the deny statement is the only entry included in the result. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setMatchedStatements(java.util.Collection)} or {@link #withMatchedStatements(java.util.Collection)} if * you want to override the existing values. *
* * @param 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 operation on the resource, if only one statement denies that * operation, then the explicit deny overrides any allow. In addition, the deny statement is the only entry * included in the result. * @return Returns a reference to this object so that method calls can be chained together. */ public EvaluationResult withMatchedStatements(Statement... matchedStatements) { if (this.matchedStatements == null) { setMatchedStatements(new com.amazonaws.internal.SdkInternalList* A list of the statements in the input policies that determine the result for this scenario. Remember that even if * multiple statements allow the operation on the resource, if only one statement denies that operation, then the * explicit deny overrides any allow. In addition, the deny statement is the only entry included in the result. *
* * @param 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 operation on the resource, if only one statement denies that * operation, then the explicit deny overrides any allow. In addition, the deny statement is the only entry * included in the result. * @return Returns a reference to this object so that method calls can be chained together. */ public EvaluationResult withMatchedStatements(java.util.Collection
* A list of context keys that are required by the included input policies but that were not provided by one of the
* input parameters. This list is used when the resource in a simulation is "*", either explicitly, or when the
* ResourceArns
parameter blank. If you include a list of resources, then any missing context values
* are instead included under the ResourceSpecificResults
section. To discover the context keys used by
* a set of policies, you can call GetContextKeysForCustomPolicy or GetContextKeysForPrincipalPolicy.
*
ResourceArns
parameter blank. If you include a list of resources, then any
* missing context values are instead included under the ResourceSpecificResults
section. To
* discover the context keys used by a set of policies, you can call GetContextKeysForCustomPolicy or
* GetContextKeysForPrincipalPolicy.
*/
public java.util.List
* A list of context keys that are required by the included input policies but that were not provided by one of the
* input parameters. This list is used when the resource in a simulation is "*", either explicitly, or when the
* ResourceArns
parameter blank. If you include a list of resources, then any missing context values
* are instead included under the ResourceSpecificResults
section. To discover the context keys used by
* a set of policies, you can call GetContextKeysForCustomPolicy or GetContextKeysForPrincipalPolicy.
*
ResourceArns
parameter blank. If you include a list of resources, then any missing
* context values are instead included under the ResourceSpecificResults
section. To discover
* the context keys used by a set of policies, you can call GetContextKeysForCustomPolicy or
* GetContextKeysForPrincipalPolicy.
*/
public void setMissingContextValues(java.util.Collection
* A list of context keys that are required by the included input policies but that were not provided by one of the
* input parameters. This list is used when the resource in a simulation is "*", either explicitly, or when the
* ResourceArns
parameter blank. If you include a list of resources, then any missing context values
* are instead included under the ResourceSpecificResults
section. To discover the context keys used by
* a set of policies, you can call GetContextKeysForCustomPolicy or GetContextKeysForPrincipalPolicy.
*
* NOTE: This method appends the values to the existing list (if any). Use * {@link #setMissingContextValues(java.util.Collection)} or {@link #withMissingContextValues(java.util.Collection)} * if you want to override the existing values. *
* * @param 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. This list is used when the resource in a simulation is "*", either explicitly, or * when theResourceArns
parameter blank. If you include a list of resources, then any missing
* context values are instead included under the ResourceSpecificResults
section. To discover
* the context keys used by a set of policies, you can call GetContextKeysForCustomPolicy or
* GetContextKeysForPrincipalPolicy.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public EvaluationResult withMissingContextValues(String... missingContextValues) {
if (this.missingContextValues == null) {
setMissingContextValues(new com.amazonaws.internal.SdkInternalList
* A list of context keys that are required by the included input policies but that were not provided by one of the
* input parameters. This list is used when the resource in a simulation is "*", either explicitly, or when the
* ResourceArns
parameter blank. If you include a list of resources, then any missing context values
* are instead included under the ResourceSpecificResults
section. To discover the context keys used by
* a set of policies, you can call GetContextKeysForCustomPolicy or GetContextKeysForPrincipalPolicy.
*
ResourceArns
parameter blank. If you include a list of resources, then any missing
* context values are instead included under the ResourceSpecificResults
section. To discover
* the context keys used by a set of policies, you can call GetContextKeysForCustomPolicy or
* GetContextKeysForPrincipalPolicy.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public EvaluationResult withMissingContextValues(java.util.Collection* A structure that details how Organizations and its service control policies affect the results of the simulation. * Only applies if the simulated user's account is part of an organization. *
* * @param organizationsDecisionDetail * A structure that details how Organizations and its service control policies affect the results of the * simulation. Only applies if the simulated user's account is part of an organization. */ public void setOrganizationsDecisionDetail(OrganizationsDecisionDetail organizationsDecisionDetail) { this.organizationsDecisionDetail = organizationsDecisionDetail; } /** ** A structure that details how Organizations and its service control policies affect the results of the simulation. * Only applies if the simulated user's account is part of an organization. *
* * @return A structure that details how Organizations and its service control policies affect the results of the * simulation. Only applies if the simulated user's account is part of an organization. */ public OrganizationsDecisionDetail getOrganizationsDecisionDetail() { return this.organizationsDecisionDetail; } /** ** A structure that details how Organizations and its service control policies affect the results of the simulation. * Only applies if the simulated user's account is part of an organization. *
* * @param organizationsDecisionDetail * A structure that details how Organizations and its service control policies affect the results of the * simulation. Only applies if the simulated user's account is part of an organization. * @return Returns a reference to this object so that method calls can be chained together. */ public EvaluationResult withOrganizationsDecisionDetail(OrganizationsDecisionDetail organizationsDecisionDetail) { setOrganizationsDecisionDetail(organizationsDecisionDetail); return this; } /** ** Contains information about the effect that a permissions boundary has on a policy simulation when the boundary is * applied to an IAM entity. *
* * @param permissionsBoundaryDecisionDetail * Contains information about the effect that a permissions boundary has on a policy simulation when the * boundary is applied to an IAM entity. */ public void setPermissionsBoundaryDecisionDetail(PermissionsBoundaryDecisionDetail permissionsBoundaryDecisionDetail) { this.permissionsBoundaryDecisionDetail = permissionsBoundaryDecisionDetail; } /** ** Contains information about the effect that a permissions boundary has on a policy simulation when the boundary is * applied to an IAM entity. *
* * @return Contains information about the effect that a permissions boundary has on a policy simulation when the * boundary is applied to an IAM entity. */ public PermissionsBoundaryDecisionDetail getPermissionsBoundaryDecisionDetail() { return this.permissionsBoundaryDecisionDetail; } /** ** Contains information about the effect that a permissions boundary has on a policy simulation when the boundary is * applied to an IAM entity. *
* * @param permissionsBoundaryDecisionDetail * Contains information about the effect that a permissions boundary has on a policy simulation when the * boundary is applied to an IAM entity. * @return Returns a reference to this object so that method calls can be chained together. */ public EvaluationResult withPermissionsBoundaryDecisionDetail(PermissionsBoundaryDecisionDetail permissionsBoundaryDecisionDetail) { setPermissionsBoundaryDecisionDetail(permissionsBoundaryDecisionDetail); return this; } /** ** Additional details about the results of the cross-account evaluation decision. This parameter is populated for * only cross-account simulations. It contains a brief summary of how each policy type contributes to the final * evaluation decision. *
*
* If the simulation evaluates policies within the same account and includes a resource ARN, then the parameter is
* present but the response is empty. If the simulation evaluates policies within the same account and specifies all
* resources (*
), then the parameter is not returned.
*
* When you make a cross-account request, Amazon Web Services evaluates the request in the trusting account and the
* trusted account. The request is allowed only if both evaluations return true
. For more information
* about how policies are evaluated, see Evaluating policies within a single account.
*
* If an Organizations SCP included in the evaluation denies access, the simulation ends. In this case, policy * evaluation does not proceed any further and this parameter is not returned. *
* * @return Additional details about the results of the cross-account evaluation decision. This parameter is * populated for only cross-account simulations. It contains a brief summary of how each policy type * contributes to the final evaluation decision. *
* If the simulation evaluates policies within the same account and includes a resource ARN, then the
* parameter is present but the response is empty. If the simulation evaluates policies within the same
* account and specifies all resources (*
), then the parameter is not returned.
*
* When you make a cross-account request, Amazon Web Services evaluates the request in the trusting account
* and the trusted account. The request is allowed only if both evaluations return true
. For
* more information about how policies are evaluated, see Evaluating policies within a single account.
*
* If an Organizations SCP included in the evaluation denies access, the simulation ends. In this case,
* policy evaluation does not proceed any further and this parameter is not returned.
*/
public java.util.Map
* Additional details about the results of the cross-account evaluation decision. This parameter is populated for
* only cross-account simulations. It contains a brief summary of how each policy type contributes to the final
* evaluation decision.
*
* If the simulation evaluates policies within the same account and includes a resource ARN, then the parameter is
* present but the response is empty. If the simulation evaluates policies within the same account and specifies all
* resources (
* When you make a cross-account request, Amazon Web Services evaluates the request in the trusting account and the
* trusted account. The request is allowed only if both evaluations return
* If an Organizations SCP included in the evaluation denies access, the simulation ends. In this case, policy
* evaluation does not proceed any further and this parameter is not returned.
* *
), then the parameter is not returned.
* true
. For more information
* about how policies are evaluated, see Evaluating policies within a single account.
*
* If the simulation evaluates policies within the same account and includes a resource ARN, then the
* parameter is present but the response is empty. If the simulation evaluates policies within the same
* account and specifies all resources (*
), then the parameter is not returned.
*
* When you make a cross-account request, Amazon Web Services evaluates the request in the trusting account
* and the trusted account. The request is allowed only if both evaluations return true
. For
* more information about how policies are evaluated, see Evaluating policies within a single account.
*
* If an Organizations SCP included in the evaluation denies access, the simulation ends. In this case,
* policy evaluation does not proceed any further and this parameter is not returned.
*/
public void setEvalDecisionDetails(java.util.Map
* Additional details about the results of the cross-account evaluation decision. This parameter is populated for
* only cross-account simulations. It contains a brief summary of how each policy type contributes to the final
* evaluation decision.
*
* If the simulation evaluates policies within the same account and includes a resource ARN, then the parameter is
* present but the response is empty. If the simulation evaluates policies within the same account and specifies all
* resources (
* When you make a cross-account request, Amazon Web Services evaluates the request in the trusting account and the
* trusted account. The request is allowed only if both evaluations return
* If an Organizations SCP included in the evaluation denies access, the simulation ends. In this case, policy
* evaluation does not proceed any further and this parameter is not returned.
* *
), then the parameter is not returned.
* true
. For more information
* about how policies are evaluated, see Evaluating policies within a single account.
*
* If the simulation evaluates policies within the same account and includes a resource ARN, then the
* parameter is present but the response is empty. If the simulation evaluates policies within the same
* account and specifies all resources (*
), then the parameter is not returned.
*
* When you make a cross-account request, Amazon Web Services evaluates the request in the trusting account
* and the trusted account. The request is allowed only if both evaluations return true
. For
* more information about how policies are evaluated, see Evaluating policies within a single account.
*
* If an Organizations SCP included in the evaluation denies access, the simulation ends. In this case,
* policy evaluation does not proceed any further and this parameter is not returned.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public EvaluationResult withEvalDecisionDetails(java.util.Map
* The individual results of the simulation of the API operation specified in EvalActionName on each resource.
*
* The individual results of the simulation of the API operation specified in EvalActionName on each resource.
*
* The individual results of the simulation of the API operation specified in EvalActionName on each resource.
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setResourceSpecificResults(java.util.Collection)} or
* {@link #withResourceSpecificResults(java.util.Collection)} if you want to override the existing values.
*
* The individual results of the simulation of the API operation specified in EvalActionName on each resource.
*