class GatewayExceptionLevel
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.BedrockAgentCore.GatewayExceptionLevel |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awsbedrockagentcore#GatewayExceptionLevel |
Java | software.amazon.awscdk.services.bedrockagentcore.GatewayExceptionLevel |
Python | aws_cdk.aws_bedrockagentcore.GatewayExceptionLevel |
TypeScript (source) | aws-cdk-lib » aws_bedrockagentcore » GatewayExceptionLevel |
Exception levels for gateway.
Example
// Create a KMS key for encryption
const encryptionKey = new kms.Key(this, "GatewayEncryptionKey", {
enableKeyRotation: true,
description: "KMS key for gateway encryption",
});
// Create gateway with KMS encryption
const gateway = new agentcore.Gateway(this, "MyGateway", {
gatewayName: "my-encrypted-gateway",
description: "Gateway with KMS encryption",
protocolConfiguration: new agentcore.McpProtocolConfiguration({
instructions: "Use this gateway to connect to external MCP tools",
searchType: agentcore.McpGatewaySearchType.SEMANTIC,
supportedVersions: [agentcore.MCPProtocolVersion.MCP_2025_03_26],
}),
authorizerConfiguration: agentcore.GatewayAuthorizer.usingCustomJwt({
discoveryUrl: "https://auth.example.com/.well-known/openid-configuration",
allowedAudience: ["my-app"],
allowedClients: ["my-client-id"],
allowedScopes: ["read", "write"],
}),
kmsKey: encryptionKey,
exceptionLevel: agentcore.GatewayExceptionLevel.DEBUG,
});
Properties
| Name | Type | Description |
|---|---|---|
| value | string | The exception level string value. |
| static DEBUG | Gateway | Debug mode for granular exception messages. |
value
Type:
string
The exception level string value.
static DEBUG
Type:
Gateway
Debug mode for granular exception messages.
Allows the return of specific error messages related to the gateway target configuration to help you with debugging.
Methods
| Name | Description |
|---|---|
| to | Returns the string value. |
| static of(value) | Use a custom exception level not yet defined in this class. |
toString()
public toString(): string
Returns
string
Returns the string value.
static of(value)
public static of(value: string): GatewayExceptionLevel
Parameters
- value
string— The exception level string value.
Returns
Use a custom exception level not yet defined in this class.

.NET
Go
Java
Python
TypeScript (