/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include #include #include #include namespace Aws { namespace Utils { namespace Xml { class XmlNode; } // namespace Xml } // namespace Utils namespace IAM { namespace Model { /** *

Contains the result of the simulation of a single API operation call on a * single resource.

This data type is used by a member of the * EvaluationResult data type.

See Also:

AWS * API Reference

*/ class ResourceSpecificResult { public: AWS_IAM_API ResourceSpecificResult(); AWS_IAM_API ResourceSpecificResult(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_IAM_API ResourceSpecificResult& operator=(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_IAM_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const; AWS_IAM_API void OutputToStream(Aws::OStream& oStream, const char* location) const; /** *

The name of the simulated resource, in Amazon Resource Name (ARN) format.

*/ inline const Aws::String& GetEvalResourceName() const{ return m_evalResourceName; } /** *

The name of the simulated resource, in Amazon Resource Name (ARN) format.

*/ inline bool EvalResourceNameHasBeenSet() const { return m_evalResourceNameHasBeenSet; } /** *

The name of the simulated resource, in Amazon Resource Name (ARN) format.

*/ inline void SetEvalResourceName(const Aws::String& value) { m_evalResourceNameHasBeenSet = true; m_evalResourceName = value; } /** *

The name of the simulated resource, in Amazon Resource Name (ARN) format.

*/ inline void SetEvalResourceName(Aws::String&& value) { m_evalResourceNameHasBeenSet = true; m_evalResourceName = std::move(value); } /** *

The name of the simulated resource, in Amazon Resource Name (ARN) format.

*/ inline void SetEvalResourceName(const char* value) { m_evalResourceNameHasBeenSet = true; m_evalResourceName.assign(value); } /** *

The name of the simulated resource, in Amazon Resource Name (ARN) format.

*/ inline ResourceSpecificResult& WithEvalResourceName(const Aws::String& value) { SetEvalResourceName(value); return *this;} /** *

The name of the simulated resource, in Amazon Resource Name (ARN) format.

*/ inline ResourceSpecificResult& WithEvalResourceName(Aws::String&& value) { SetEvalResourceName(std::move(value)); return *this;} /** *

The name of the simulated resource, in Amazon Resource Name (ARN) format.

*/ inline ResourceSpecificResult& WithEvalResourceName(const char* value) { SetEvalResourceName(value); return *this;} /** *

The result of the simulation of the simulated API operation on the resource * specified in EvalResourceName.

*/ inline const PolicyEvaluationDecisionType& GetEvalResourceDecision() const{ return m_evalResourceDecision; } /** *

The result of the simulation of the simulated API operation on the resource * specified in EvalResourceName.

*/ inline bool EvalResourceDecisionHasBeenSet() const { return m_evalResourceDecisionHasBeenSet; } /** *

The result of the simulation of the simulated API operation on the resource * specified in EvalResourceName.

*/ inline void SetEvalResourceDecision(const PolicyEvaluationDecisionType& value) { m_evalResourceDecisionHasBeenSet = true; m_evalResourceDecision = value; } /** *

The result of the simulation of the simulated API operation on the resource * specified in EvalResourceName.

*/ inline void SetEvalResourceDecision(PolicyEvaluationDecisionType&& value) { m_evalResourceDecisionHasBeenSet = true; m_evalResourceDecision = std::move(value); } /** *

The result of the simulation of the simulated API operation on the resource * specified in EvalResourceName.

*/ inline ResourceSpecificResult& WithEvalResourceDecision(const PolicyEvaluationDecisionType& value) { SetEvalResourceDecision(value); return *this;} /** *

The result of the simulation of the simulated API operation on the resource * specified in EvalResourceName.

*/ inline ResourceSpecificResult& WithEvalResourceDecision(PolicyEvaluationDecisionType&& value) { SetEvalResourceDecision(std::move(value)); return *this;} /** *

A list of the statements in the input policies that determine the result for * this part of the simulation. Remember that even if multiple statements allow the * operation on the resource, if any statement denies that operation, then * the explicit deny overrides any allow. In addition, the deny statement is the * only entry included in the result.

*/ inline const Aws::Vector& GetMatchedStatements() const{ return m_matchedStatements; } /** *

A list of the statements in the input policies that determine the result for * this part of the simulation. Remember that even if multiple statements allow the * operation on the resource, if any statement denies that operation, then * the explicit deny overrides any allow. In addition, the deny statement is the * only entry included in the result.

*/ inline bool MatchedStatementsHasBeenSet() const { return m_matchedStatementsHasBeenSet; } /** *

A list of the statements in the input policies that determine the result for * this part of the simulation. Remember that even if multiple statements allow the * operation on the resource, if any statement denies that operation, then * the explicit deny overrides any allow. In addition, the deny statement is the * only entry included in the result.

*/ inline void SetMatchedStatements(const Aws::Vector& value) { m_matchedStatementsHasBeenSet = true; m_matchedStatements = value; } /** *

A list of the statements in the input policies that determine the result for * this part of the simulation. Remember that even if multiple statements allow the * operation on the resource, if any statement denies that operation, then * the explicit deny overrides any allow. In addition, the deny statement is the * only entry included in the result.

*/ inline void SetMatchedStatements(Aws::Vector&& value) { m_matchedStatementsHasBeenSet = true; m_matchedStatements = std::move(value); } /** *

A list of the statements in the input policies that determine the result for * this part of the simulation. Remember that even if multiple statements allow the * operation on the resource, if any statement denies that operation, then * the explicit deny overrides any allow. In addition, the deny statement is the * only entry included in the result.

*/ inline ResourceSpecificResult& WithMatchedStatements(const Aws::Vector& value) { SetMatchedStatements(value); return *this;} /** *

A list of the statements in the input policies that determine the result for * this part of the simulation. Remember that even if multiple statements allow the * operation on the resource, if any statement denies that operation, then * the explicit deny overrides any allow. In addition, the deny statement is the * only entry included in the result.

*/ inline ResourceSpecificResult& WithMatchedStatements(Aws::Vector&& value) { SetMatchedStatements(std::move(value)); return *this;} /** *

A list of the statements in the input policies that determine the result for * this part of the simulation. Remember that even if multiple statements allow the * operation on the resource, if any statement denies that operation, then * the explicit deny overrides any allow. In addition, the deny statement is the * only entry included in the result.

*/ inline ResourceSpecificResult& AddMatchedStatements(const Statement& value) { m_matchedStatementsHasBeenSet = true; m_matchedStatements.push_back(value); return *this; } /** *

A list of the statements in the input policies that determine the result for * this part of the simulation. Remember that even if multiple statements allow the * operation on the resource, if any statement denies that operation, then * the explicit deny overrides any allow. In addition, the deny statement is the * only entry included in the result.

*/ inline ResourceSpecificResult& AddMatchedStatements(Statement&& value) { m_matchedStatementsHasBeenSet = true; m_matchedStatements.push_back(std::move(value)); return *this; } /** *

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 a * list of ARNs is included in the ResourceArns parameter instead of * "*". If you do not specify individual resources, by setting * ResourceArns to "*" or by not including the * ResourceArns parameter, then any missing context values are instead * included under the EvaluationResults section. To discover the * context keys used by a set of policies, you can call * GetContextKeysForCustomPolicy or * GetContextKeysForPrincipalPolicy.

*/ inline const Aws::Vector& GetMissingContextValues() const{ return m_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 a * list of ARNs is included in the ResourceArns parameter instead of * "*". If you do not specify individual resources, by setting * ResourceArns to "*" or by not including the * ResourceArns parameter, then any missing context values are instead * included under the EvaluationResults section. To discover the * context keys used by a set of policies, you can call * GetContextKeysForCustomPolicy or * GetContextKeysForPrincipalPolicy.

*/ inline bool MissingContextValuesHasBeenSet() const { return m_missingContextValuesHasBeenSet; } /** *

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 a * list of ARNs is included in the ResourceArns parameter instead of * "*". If you do not specify individual resources, by setting * ResourceArns to "*" or by not including the * ResourceArns parameter, then any missing context values are instead * included under the EvaluationResults section. To discover the * context keys used by a set of policies, you can call * GetContextKeysForCustomPolicy or * GetContextKeysForPrincipalPolicy.

*/ inline void SetMissingContextValues(const Aws::Vector& value) { m_missingContextValuesHasBeenSet = true; m_missingContextValues = value; } /** *

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 a * list of ARNs is included in the ResourceArns parameter instead of * "*". If you do not specify individual resources, by setting * ResourceArns to "*" or by not including the * ResourceArns parameter, then any missing context values are instead * included under the EvaluationResults section. To discover the * context keys used by a set of policies, you can call * GetContextKeysForCustomPolicy or * GetContextKeysForPrincipalPolicy.

*/ inline void SetMissingContextValues(Aws::Vector&& value) { m_missingContextValuesHasBeenSet = true; m_missingContextValues = std::move(value); } /** *

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 a * list of ARNs is included in the ResourceArns parameter instead of * "*". If you do not specify individual resources, by setting * ResourceArns to "*" or by not including the * ResourceArns parameter, then any missing context values are instead * included under the EvaluationResults section. To discover the * context keys used by a set of policies, you can call * GetContextKeysForCustomPolicy or * GetContextKeysForPrincipalPolicy.

*/ inline ResourceSpecificResult& WithMissingContextValues(const Aws::Vector& value) { SetMissingContextValues(value); return *this;} /** *

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 a * list of ARNs is included in the ResourceArns parameter instead of * "*". If you do not specify individual resources, by setting * ResourceArns to "*" or by not including the * ResourceArns parameter, then any missing context values are instead * included under the EvaluationResults section. To discover the * context keys used by a set of policies, you can call * GetContextKeysForCustomPolicy or * GetContextKeysForPrincipalPolicy.

*/ inline ResourceSpecificResult& WithMissingContextValues(Aws::Vector&& value) { SetMissingContextValues(std::move(value)); return *this;} /** *

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 a * list of ARNs is included in the ResourceArns parameter instead of * "*". If you do not specify individual resources, by setting * ResourceArns to "*" or by not including the * ResourceArns parameter, then any missing context values are instead * included under the EvaluationResults section. To discover the * context keys used by a set of policies, you can call * GetContextKeysForCustomPolicy or * GetContextKeysForPrincipalPolicy.

*/ inline ResourceSpecificResult& AddMissingContextValues(const Aws::String& value) { m_missingContextValuesHasBeenSet = true; m_missingContextValues.push_back(value); return *this; } /** *

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 a * list of ARNs is included in the ResourceArns parameter instead of * "*". If you do not specify individual resources, by setting * ResourceArns to "*" or by not including the * ResourceArns parameter, then any missing context values are instead * included under the EvaluationResults section. To discover the * context keys used by a set of policies, you can call * GetContextKeysForCustomPolicy or * GetContextKeysForPrincipalPolicy.

*/ inline ResourceSpecificResult& AddMissingContextValues(Aws::String&& value) { m_missingContextValuesHasBeenSet = true; m_missingContextValues.push_back(std::move(value)); return *this; } /** *

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 a * list of ARNs is included in the ResourceArns parameter instead of * "*". If you do not specify individual resources, by setting * ResourceArns to "*" or by not including the * ResourceArns parameter, then any missing context values are instead * included under the EvaluationResults section. To discover the * context keys used by a set of policies, you can call * GetContextKeysForCustomPolicy or * GetContextKeysForPrincipalPolicy.

*/ inline ResourceSpecificResult& AddMissingContextValues(const char* value) { m_missingContextValuesHasBeenSet = true; m_missingContextValues.push_back(value); return *this; } /** *

Additional details about the results of the evaluation decision on a single * resource. This parameter is returned only for cross-account simulations. This * parameter explains how each policy type contributes to the resource-specific * evaluation decision.

*/ inline const Aws::Map& GetEvalDecisionDetails() const{ return m_evalDecisionDetails; } /** *

Additional details about the results of the evaluation decision on a single * resource. This parameter is returned only for cross-account simulations. This * parameter explains how each policy type contributes to the resource-specific * evaluation decision.

*/ inline bool EvalDecisionDetailsHasBeenSet() const { return m_evalDecisionDetailsHasBeenSet; } /** *

Additional details about the results of the evaluation decision on a single * resource. This parameter is returned only for cross-account simulations. This * parameter explains how each policy type contributes to the resource-specific * evaluation decision.

*/ inline void SetEvalDecisionDetails(const Aws::Map& value) { m_evalDecisionDetailsHasBeenSet = true; m_evalDecisionDetails = value; } /** *

Additional details about the results of the evaluation decision on a single * resource. This parameter is returned only for cross-account simulations. This * parameter explains how each policy type contributes to the resource-specific * evaluation decision.

*/ inline void SetEvalDecisionDetails(Aws::Map&& value) { m_evalDecisionDetailsHasBeenSet = true; m_evalDecisionDetails = std::move(value); } /** *

Additional details about the results of the evaluation decision on a single * resource. This parameter is returned only for cross-account simulations. This * parameter explains how each policy type contributes to the resource-specific * evaluation decision.

*/ inline ResourceSpecificResult& WithEvalDecisionDetails(const Aws::Map& value) { SetEvalDecisionDetails(value); return *this;} /** *

Additional details about the results of the evaluation decision on a single * resource. This parameter is returned only for cross-account simulations. This * parameter explains how each policy type contributes to the resource-specific * evaluation decision.

*/ inline ResourceSpecificResult& WithEvalDecisionDetails(Aws::Map&& value) { SetEvalDecisionDetails(std::move(value)); return *this;} /** *

Additional details about the results of the evaluation decision on a single * resource. This parameter is returned only for cross-account simulations. This * parameter explains how each policy type contributes to the resource-specific * evaluation decision.

*/ inline ResourceSpecificResult& AddEvalDecisionDetails(const Aws::String& key, const PolicyEvaluationDecisionType& value) { m_evalDecisionDetailsHasBeenSet = true; m_evalDecisionDetails.emplace(key, value); return *this; } /** *

Additional details about the results of the evaluation decision on a single * resource. This parameter is returned only for cross-account simulations. This * parameter explains how each policy type contributes to the resource-specific * evaluation decision.

*/ inline ResourceSpecificResult& AddEvalDecisionDetails(Aws::String&& key, const PolicyEvaluationDecisionType& value) { m_evalDecisionDetailsHasBeenSet = true; m_evalDecisionDetails.emplace(std::move(key), value); return *this; } /** *

Additional details about the results of the evaluation decision on a single * resource. This parameter is returned only for cross-account simulations. This * parameter explains how each policy type contributes to the resource-specific * evaluation decision.

*/ inline ResourceSpecificResult& AddEvalDecisionDetails(const Aws::String& key, PolicyEvaluationDecisionType&& value) { m_evalDecisionDetailsHasBeenSet = true; m_evalDecisionDetails.emplace(key, std::move(value)); return *this; } /** *

Additional details about the results of the evaluation decision on a single * resource. This parameter is returned only for cross-account simulations. This * parameter explains how each policy type contributes to the resource-specific * evaluation decision.

*/ inline ResourceSpecificResult& AddEvalDecisionDetails(Aws::String&& key, PolicyEvaluationDecisionType&& value) { m_evalDecisionDetailsHasBeenSet = true; m_evalDecisionDetails.emplace(std::move(key), std::move(value)); return *this; } /** *

Additional details about the results of the evaluation decision on a single * resource. This parameter is returned only for cross-account simulations. This * parameter explains how each policy type contributes to the resource-specific * evaluation decision.

*/ inline ResourceSpecificResult& AddEvalDecisionDetails(const char* key, PolicyEvaluationDecisionType&& value) { m_evalDecisionDetailsHasBeenSet = true; m_evalDecisionDetails.emplace(key, std::move(value)); return *this; } /** *

Additional details about the results of the evaluation decision on a single * resource. This parameter is returned only for cross-account simulations. This * parameter explains how each policy type contributes to the resource-specific * evaluation decision.

*/ inline ResourceSpecificResult& AddEvalDecisionDetails(const char* key, const PolicyEvaluationDecisionType& value) { m_evalDecisionDetailsHasBeenSet = true; m_evalDecisionDetails.emplace(key, value); return *this; } /** *

Contains information about the effect that a permissions boundary has on a * policy simulation when that boundary is applied to an IAM entity.

*/ inline const PermissionsBoundaryDecisionDetail& GetPermissionsBoundaryDecisionDetail() const{ return m_permissionsBoundaryDecisionDetail; } /** *

Contains information about the effect that a permissions boundary has on a * policy simulation when that boundary is applied to an IAM entity.

*/ inline bool PermissionsBoundaryDecisionDetailHasBeenSet() const { return m_permissionsBoundaryDecisionDetailHasBeenSet; } /** *

Contains information about the effect that a permissions boundary has on a * policy simulation when that boundary is applied to an IAM entity.

*/ inline void SetPermissionsBoundaryDecisionDetail(const PermissionsBoundaryDecisionDetail& value) { m_permissionsBoundaryDecisionDetailHasBeenSet = true; m_permissionsBoundaryDecisionDetail = value; } /** *

Contains information about the effect that a permissions boundary has on a * policy simulation when that boundary is applied to an IAM entity.

*/ inline void SetPermissionsBoundaryDecisionDetail(PermissionsBoundaryDecisionDetail&& value) { m_permissionsBoundaryDecisionDetailHasBeenSet = true; m_permissionsBoundaryDecisionDetail = std::move(value); } /** *

Contains information about the effect that a permissions boundary has on a * policy simulation when that boundary is applied to an IAM entity.

*/ inline ResourceSpecificResult& WithPermissionsBoundaryDecisionDetail(const PermissionsBoundaryDecisionDetail& value) { SetPermissionsBoundaryDecisionDetail(value); return *this;} /** *

Contains information about the effect that a permissions boundary has on a * policy simulation when that boundary is applied to an IAM entity.

*/ inline ResourceSpecificResult& WithPermissionsBoundaryDecisionDetail(PermissionsBoundaryDecisionDetail&& value) { SetPermissionsBoundaryDecisionDetail(std::move(value)); return *this;} private: Aws::String m_evalResourceName; bool m_evalResourceNameHasBeenSet = false; PolicyEvaluationDecisionType m_evalResourceDecision; bool m_evalResourceDecisionHasBeenSet = false; Aws::Vector m_matchedStatements; bool m_matchedStatementsHasBeenSet = false; Aws::Vector m_missingContextValues; bool m_missingContextValuesHasBeenSet = false; Aws::Map m_evalDecisionDetails; bool m_evalDecisionDetailsHasBeenSet = false; PermissionsBoundaryDecisionDetail m_permissionsBoundaryDecisionDetail; bool m_permissionsBoundaryDecisionDetailHasBeenSet = false; }; } // namespace Model } // namespace IAM } // namespace Aws