/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include A structure that contains Cedar policy validation settings for the policy
* store. The validation mode determines which validation failures that Cedar
* considers serious enough to block acceptance of a new or edited static policy or
* policy template. This data type is used as a request parameter in the CreatePolicyStore
* and UpdatePolicyStore
* operations.See Also:
AWS
* API Reference
The validation mode currently configured for this policy store. The valid * values are:
OFF – Neither Verified Permissions nor * Cedar perform any validation on policies. No validation errors are reported by * either service.
STRICT – Requires a schema to be * present in the policy store. Cedar performs validation on all submitted new or * updated static policies and policy templates. Any that fail validation are * rejected and Cedar doesn't store them in the policy store.
If Mode=STRICT
and the policy store doesn't contain
* a schema, Verified Permissions rejects all static policies and policy templates
* because there is no schema to validate against.
To submit a static * policy or policy template without a schema, you must turn off validation.
* */ inline const ValidationMode& GetMode() const{ return m_mode; } /** *The validation mode currently configured for this policy store. The valid * values are:
OFF – Neither Verified Permissions nor * Cedar perform any validation on policies. No validation errors are reported by * either service.
STRICT – Requires a schema to be * present in the policy store. Cedar performs validation on all submitted new or * updated static policies and policy templates. Any that fail validation are * rejected and Cedar doesn't store them in the policy store.
If Mode=STRICT
and the policy store doesn't contain
* a schema, Verified Permissions rejects all static policies and policy templates
* because there is no schema to validate against.
To submit a static * policy or policy template without a schema, you must turn off validation.
* */ inline bool ModeHasBeenSet() const { return m_modeHasBeenSet; } /** *The validation mode currently configured for this policy store. The valid * values are:
OFF – Neither Verified Permissions nor * Cedar perform any validation on policies. No validation errors are reported by * either service.
STRICT – Requires a schema to be * present in the policy store. Cedar performs validation on all submitted new or * updated static policies and policy templates. Any that fail validation are * rejected and Cedar doesn't store them in the policy store.
If Mode=STRICT
and the policy store doesn't contain
* a schema, Verified Permissions rejects all static policies and policy templates
* because there is no schema to validate against.
To submit a static * policy or policy template without a schema, you must turn off validation.
* */ inline void SetMode(const ValidationMode& value) { m_modeHasBeenSet = true; m_mode = value; } /** *The validation mode currently configured for this policy store. The valid * values are:
OFF – Neither Verified Permissions nor * Cedar perform any validation on policies. No validation errors are reported by * either service.
STRICT – Requires a schema to be * present in the policy store. Cedar performs validation on all submitted new or * updated static policies and policy templates. Any that fail validation are * rejected and Cedar doesn't store them in the policy store.
If Mode=STRICT
and the policy store doesn't contain
* a schema, Verified Permissions rejects all static policies and policy templates
* because there is no schema to validate against.
To submit a static * policy or policy template without a schema, you must turn off validation.
* */ inline void SetMode(ValidationMode&& value) { m_modeHasBeenSet = true; m_mode = std::move(value); } /** *The validation mode currently configured for this policy store. The valid * values are:
OFF – Neither Verified Permissions nor * Cedar perform any validation on policies. No validation errors are reported by * either service.
STRICT – Requires a schema to be * present in the policy store. Cedar performs validation on all submitted new or * updated static policies and policy templates. Any that fail validation are * rejected and Cedar doesn't store them in the policy store.
If Mode=STRICT
and the policy store doesn't contain
* a schema, Verified Permissions rejects all static policies and policy templates
* because there is no schema to validate against.
To submit a static * policy or policy template without a schema, you must turn off validation.
* */ inline ValidationSettings& WithMode(const ValidationMode& value) { SetMode(value); return *this;} /** *The validation mode currently configured for this policy store. The valid * values are:
OFF – Neither Verified Permissions nor * Cedar perform any validation on policies. No validation errors are reported by * either service.
STRICT – Requires a schema to be * present in the policy store. Cedar performs validation on all submitted new or * updated static policies and policy templates. Any that fail validation are * rejected and Cedar doesn't store them in the policy store.
If Mode=STRICT
and the policy store doesn't contain
* a schema, Verified Permissions rejects all static policies and policy templates
* because there is no schema to validate against.
To submit a static * policy or policy template without a schema, you must turn off validation.
* */ inline ValidationSettings& WithMode(ValidationMode&& value) { SetMode(std::move(value)); return *this;} private: ValidationMode m_mode; bool m_modeHasBeenSet = false; }; } // namespace Model } // namespace VerifiedPermissions } // namespace Aws