Skip to content
v2.278.0

ContextualGroundingPolicyConfigProperty Struct ​

The policy configuration details for the guardrails contextual grounding policy.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_bedrock as bedrock } from 'aws-cdk-lib';
const contextualGroundingPolicyConfigProperty: bedrock.CfnGuardrail.ContextualGroundingPolicyConfigProperty = {
  filtersConfig: [{
    threshold: 123,
    type: 'type',

    // the properties below are optional
    action: 'action',
    enabled: false,
  }],
};
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_bedrock as bedrock

contextual_grounding_policy_config_property = bedrock.CfnGuardrail.ContextualGroundingPolicyConfigProperty(
    filters_config=[bedrock.CfnGuardrail.ContextualGroundingFilterConfigProperty(
        threshold=123,
        type="type",

        # the properties below are optional
        action="action",
        enabled=False
    )]
)
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.bedrock.*;

ContextualGroundingPolicyConfigProperty contextualGroundingPolicyConfigProperty = ContextualGroundingPolicyConfigProperty.builder()
        .filtersConfig(List.of(ContextualGroundingFilterConfigProperty.builder()
                .threshold(123)
                .type("type")

                // the properties below are optional
                .action("action")
                .enabled(false)
                .build()))
        .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.Bedrock;

var contextualGroundingPolicyConfigProperty = new ContextualGroundingPolicyConfigProperty {
    FiltersConfig = new [] { new ContextualGroundingFilterConfigProperty {
        Threshold = 123,
        Type = "type",

        // the properties below are optional
        Action = "action",
        Enabled = false
    } }
};
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"

contextualGroundingPolicyConfigProperty := &ContextualGroundingPolicyConfigProperty{
	FiltersConfig: []interface{}{
		&ContextualGroundingFilterConfigProperty{
			Threshold: jsii.Number(123),
			Type: jsii.String("type"),

			// the properties below are optional
			Action: jsii.String("action"),
			Enabled: jsii.Boolean(false),
		},
	},
}

Properties ​

filtersConfigIResolvable | IResolvable | CfnGuardrail.ContextualGroundingFilterConfigProperty[]filters_configtyping.Union[IResolvable, typing.List[typing.Union[IResolvable, ContextualGroundingFilterConfigProperty]]]filtersConfigIResolvableFiltersConfigIResolvableFiltersConfiginterface{} required #
List of contextual grounding filter configs.