Class PolicyValidationMode
(experimental) Validation mode for Cedar policy definitions.
Namespace: Amazon.CDK.AWS.Bedrock.Agentcore.Alpha
Assembly: Amazon.CDK.AWS.Bedrock.Agentcore.Alpha.dll
Syntax (csharp)
public class PolicyValidationMode : DeputyBase
Syntax (vb)
Public Class PolicyValidationMode Inherits DeputyBase
Remarks
Stability: Experimental
ExampleMetadata: fixture=default infused
Examples
var gateway = new Gateway(this, "MyGateway", new GatewayProps {
GatewayName = "my-gateway"
});
var policyEngine = new PolicyEngine(this, "MyPolicyEngine", new PolicyEngineProps {
PolicyEngineName = "my_policy_engine"
});
var allowAllPolicy = new Policy(this, "AllowAllPolicy", new PolicyProps {
PolicyEngine = policyEngine,
PolicyName = "allow_all",
Statement = PolicyStatement.Permit().ForAllPrincipals().OnAllActions().OnResource("AgentCore::Gateway", gateway.GatewayArn),
Description = "Allow all actions on specific gateway (development only)",
ValidationMode = PolicyValidationMode.IGNORE_ALL_FINDINGS
});
Synopsis
Constructors
| PolicyValidationMode(string) | (experimental) Validation mode for Cedar policy definitions. |
Properties
| FAIL_ON_ANY_FINDINGS | (experimental) Fail policy creation if any validation findings are detected. |
| IGNORE_ALL_FINDINGS | (experimental) Ignore all validation findings and create the policy anyway. |
| Value | (experimental) The string value of the validation mode. |
Constructors
PolicyValidationMode(string)
(experimental) Validation mode for Cedar policy definitions.
public PolicyValidationMode(string value)
Parameters
- value string
Remarks
Stability: Experimental
Properties
FAIL_ON_ANY_FINDINGS
(experimental) Fail policy creation if any validation findings are detected.
public static PolicyValidationMode FAIL_ON_ANY_FINDINGS { get; }
Property Value
Remarks
This is the safer default - catches policy errors early.
Stability: Experimental
IGNORE_ALL_FINDINGS
(experimental) Ignore all validation findings and create the policy anyway.
public static PolicyValidationMode IGNORE_ALL_FINDINGS { get; }
Property Value
Remarks
Use with caution - may result in runtime authorization errors.
Stability: Experimental
Value
(experimental) The string value of the validation mode.
public virtual string Value { get; }
Property Value
Remarks
Stability: Experimental