> **Experimental**
>
> `@aws-cdk/aws-bedrock-agentcore-alpha` is an [**experimental**](/stability) (alpha) package: its API may change in any release, without a major version bump.
# GatewayProps

Properties for defining a Gateway.

Extends: GatewayProps
Used as props by: Gateway

- Source: [`lib/gateway/gateway.ts`](https://github.com/aws/aws-cdk/blob/v2.277.0-alpha.0/packages/@aws-cdk/aws-bedrock-agentcore-alpha/lib/gateway/gateway.ts#L285)

## Example

```ts

// Create a Policy engine
const policyEngine = new agentcore.PolicyEngine(this, "MyPolicyEngine", {
  policyEngineName: "my_policy_engine",
  description: "Policy engine for access control",
});

const gateway = new agentcore.Gateway(this, "MyGateway", {
  gatewayName: "my-gateway",
  policyEngineConfiguration: {
    policyEngine: policyEngine,
    mode: agentcore.PolicyEngineMode.ENFORCE, // Default is LOG_ONLY
  },
});

// Add policy to policy engine
policyEngine.addPolicy("AllowAllActions", {
  definition: `
    permit(
      principal,
      action,
      resource == AgentCore::Gateway::"${gateway.gatewayArn}"
    );
  `,
  description: "Allow all actions on specific gateway (development)",
  validationMode: agentcore.PolicyValidationMode.IGNORE_ALL_FINDINGS, // This will ignore all cedar warnings
});

// you can add multiple policies to the policy engine
policyEngine.addPolicy("SpecificToolPolicy", {
  definition: `
    permit(
      principal is AgentCore::OAuthUser,
      action == AgentCore::Action::"WeatherTool__get_forecast",
      resource == AgentCore::Gateway::"${gateway.gatewayArn}"
    );
  `,
  description: "Allow specific weather tool access",
  validationMode: agentcore.PolicyValidationMode.FAIL_ON_ANY_FINDINGS, // This will fail policy creation for any cedar warning
});
```

## Properties

- `authorizerConfiguration`: [IGatewayAuthorizerConfig](/cdk/api/v2/docs/@aws-cdk_aws-bedrock-agentcore-alpha.IGatewayAuthorizerConfig.html) — The authorizer configuration for the gateway.

  **Default:** A default authorizer will be created using Cognito

- `description`: string — Optional description for the gateway Valid characters are a-z, A-Z, 0-9, _ (underscore), - (hyphen) and spaces The description can have up to 200 characters.

  **Default:** No description

- `exceptionLevel`: [GatewayExceptionLevel](/cdk/api/v2/docs/@aws-cdk_aws-bedrock-agentcore-alpha.GatewayExceptionLevel.html) — The verbosity of exception messages Use DEBUG mode to see granular exception messages from a Gateway.

  **Default:** Exception messages are sanitized for presentation to end users

- `gatewayName`: string — The name of the gateway Valid characters are a-z, A-Z, 0-9, _ (underscore) and - (hyphen) The name must be unique within your account.

  **Default:** auto generate

- `interceptorConfigurations`: [IInterceptor](/cdk/api/v2/docs/@aws-cdk_aws-bedrock-agentcore-alpha.IInterceptor.html)[] — Interceptor configurations for the gateway.

  **Default:** No interceptors

  Interceptors allow you to run custom code during each gateway invocation:
  - REQUEST interceptors execute before the gateway calls the target
  - RESPONSE interceptors execute after the target responds

  A gateway can have at most one REQUEST interceptor and one RESPONSE interceptor.

- `kmsKey`: [IKey](/cdk/api/v2/docs/aws-cdk-lib.aws_kms.IKey.html) — The AWS KMS key used to encrypt data associated with the gateway.

  **Default:** No encryption

- `policyEngineConfiguration`: [GatewayPolicyEngineConfig](/cdk/api/v2/docs/@aws-cdk_aws-bedrock-agentcore-alpha.GatewayPolicyEngineConfig.html) — The policy engine configuration for this gateway.

  **Default:** No policy engine (requests are not subject to Cedar policy authorization)

  When provided, the specified policy engine will be associated with this gateway.
  All agent requests through this gateway will be evaluated against the Cedar policies
  defined in the policy engine.

- `protocolConfiguration`: [IGatewayProtocolConfig](/cdk/api/v2/docs/@aws-cdk_aws-bedrock-agentcore-alpha.IGatewayProtocolConfig.html) — The protocol configuration for the gateway.

  **Default:** A default protocol configuration will be created using MCP with following params supportedVersions: [MCPProtocolVersion.MCP_2025_03_26], searchType: McpGatewaySearchType.SEMANTIC, instructions: "Default gateway to connect to external MCP tools",

- `role`: [IRole](/cdk/api/v2/docs/aws-cdk-lib.aws_iam.IRole.html) — The IAM role that provides permissions for the gateway to access AWS services.

  **Default:** A new role will be created

- `tags`: { [key: string]: string } — Tags for the gateway A list of key:value pairs of tags to apply to this Gateway resource.

  **Default:** No tags
