enum ModalityType
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.Bedrock.Alpha.ModalityType |
Go | github.com/aws/aws-cdk-go/awsbedrockalpha/v2#ModalityType |
Java | software.amazon.awscdk.services.bedrock.alpha.ModalityType |
Python | aws_cdk.aws_bedrock_alpha.ModalityType |
TypeScript (source) | @aws-cdk/aws-bedrock-alpha » ModalityType |
The type of modality that can be used in content filters.
Example
const guardrail = new bedrock.Guardrail(this, 'bedrockGuardrails', {
guardrailName: 'my-BedrockGuardrails',
// Configure tier for content filters (optional)
contentFiltersTierConfig: bedrock.TierConfig.STANDARD,
});
guardrail.addContentFilter({
type: bedrock.ContentFilterType.SEXUAL,
inputStrength: bedrock.ContentFilterStrength.HIGH,
outputStrength: bedrock.ContentFilterStrength.MEDIUM,
// props below are optional
inputAction: bedrock.GuardrailAction.BLOCK,
inputEnabled: true,
outputAction: bedrock.GuardrailAction.NONE,
outputEnabled: true,
inputModalities: [bedrock.ModalityType.TEXT, bedrock.ModalityType.IMAGE],
outputModalities: [bedrock.ModalityType.TEXT],
});
Members
| Name | Description |
|---|---|
| TEXT | Text modality for content filters. |
| IMAGE | Image modality for content filters. |
TEXT
Text modality for content filters.
IMAGE
Image modality for content filters.

.NET
Go
Java
Python
TypeScript (