CfnPolicyProps
Struct External
Properties for defining a CfnPolicy.
| Source | |
|---|---|
| Type last changed |
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_bedrockagentcore as bedrockagentcore } from 'aws-cdk-lib';
const cfnPolicyProps: bedrockagentcore.CfnPolicyProps = {
definition: {
cedar: {
statement: 'statement',
},
policy: {
statement: 'statement',
},
},
name: 'name',
policyEngineId: 'policyEngineId',
// the properties below are optional
description: 'description',
enforcementMode: 'enforcementMode',
validationMode: 'validationMode',
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_bedrockagentcore as bedrockagentcore
cfn_policy_props = bedrockagentcore.CfnPolicyProps(
definition=bedrockagentcore.CfnPolicy.PolicyDefinitionProperty(
cedar=bedrockagentcore.CfnPolicy.CedarPolicyProperty(
statement="statement"
),
policy=bedrockagentcore.CfnPolicy.PolicyStatementProperty(
statement="statement"
)
),
name="name",
policy_engine_id="policyEngineId",
# the properties below are optional
description="description",
enforcement_mode="enforcementMode",
validation_mode="validationMode"
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.bedrockagentcore.*;
CfnPolicyProps cfnPolicyProps = CfnPolicyProps.builder()
.definition(PolicyDefinitionProperty.builder()
.cedar(CedarPolicyProperty.builder()
.statement("statement")
.build())
.policy(PolicyStatementProperty.builder()
.statement("statement")
.build())
.build())
.name("name")
.policyEngineId("policyEngineId")
// the properties below are optional
.description("description")
.enforcementMode("enforcementMode")
.validationMode("validationMode")
.build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.BedrockAgentCore;
var cfnPolicyProps = new CfnPolicyProps {
Definition = new PolicyDefinitionProperty {
Cedar = new CedarPolicyProperty {
Statement = "statement"
},
Policy = new PolicyStatementProperty {
Statement = "statement"
}
},
Name = "name",
PolicyEngineId = "policyEngineId",
// the properties below are optional
Description = "description",
EnforcementMode = "enforcementMode",
ValidationMode = "validationMode"
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
cfnPolicyProps := &CfnPolicyProps{
Definition: &PolicyDefinitionProperty{
Cedar: &CedarPolicyProperty{
Statement: jsii.String("statement"),
},
Policy: &PolicyStatementProperty{
Statement: jsii.String("statement"),
},
},
Name: jsii.String("name"),
PolicyEngineId: jsii.String("policyEngineId"),
// the properties below are optional
Description: jsii.String("description"),
EnforcementMode: jsii.String("enforcementMode"),
ValidationMode: jsii.String("validationMode"),
}
Properties
definitionIResolvable | CfnPolicy.definitiontyping.Union[IResolvable, PolicyDefinitionProperty]definitionIResolvableDefinitionIResolvableDefinitioninterface{} required #The definition structure for policies.
Encapsulates different policy formats.
descriptionoptionalstringdescriptionoptionalstrdescriptionoptionalStringDescriptionoptionalstringDescriptionoptional*string #A human-readable description of the policy's purpose and functionality.
enforcementModeoptionalstringenforcement_modeoptionalstrenforcementModeoptionalStringEnforcementModeoptionalstringEnforcementModeoptional*string = "ACTIVE" #Whether the policy contributes to the enforce decision returned to Gateway.
LOG_ONLY policies are still evaluated but their decisions are observed only, allowing customers to validate a policy against real traffic before promoting it.
The customer-assigned immutable name for the policy.
Must be unique within the policy engine.
policyEngineIdstringpolicy_engine_idstrpolicyEngineIdStringPolicyEngineIdstringPolicyEngineId*string required #The identifier of the policy engine which contains this policy.
validationModeoptionalstringvalidation_modeoptionalstrvalidationModeoptionalStringValidationModeoptionalstringValidationModeoptional*string #The validation mode for the policy.
Determines how Cedar analyzer validation results are handled.