interface IGateway
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.Bedrock.Agentcore.Alpha.IGateway |
Go | github.com/aws/aws-cdk-go/awsbedrockagentcorealpha/v2#IGateway |
Java | software.amazon.awscdk.services.bedrock.agentcore.alpha.IGateway |
Python | aws_cdk.aws_bedrock_agentcore_alpha.IGateway |
TypeScript (source) | @aws-cdk/aws-bedrock-agentcore-alpha ยป IGateway |
Implemented by
Gateway
Obtainable from
Gateway.fromGatewayAttributes()
Interface for Gateway resources.
Properties
| Name | Type | Description |
|---|---|---|
| authorizer | IGateway | The authorizer configuration for the gateway. |
| env | Resource | The environment this resource belongs to. |
| gateway | string | The ARN of the gateway resource. |
| gateway | string | The id of the gateway. |
| name | string | The name of the gateway. |
| node | Node | The tree node. |
| protocol | IGateway | The protocol configuration for the gateway. |
| role | IRole | The IAM role that provides permissions for the gateway to access AWS services. |
| stack | Stack | The stack in which this resource is defined. |
| created | string | Timestamp when the gateway was created. |
| description? | string | The description of the gateway. |
| exception | Gateway | The exception level for the gateway. |
| gateway | string | The URL endpoint for the gateway. |
| kms | IKey | The KMS key used for encryption. |
| status? | string | The status of the gateway. |
| status | string[] | The status reasons for the gateway. |
| updated | string | Timestamp when the gateway was last updated. |
authorizerConfiguration
Type:
IGateway
The authorizer configuration for the gateway.
env
Type:
Resource
The environment this resource belongs to.
For resources that are created and managed in a Stack (those created by
creating new class instances like new Role(), new Bucket(), etc.), this
is always the same as the environment of the stack they belong to.
For referenced resources (those obtained from referencing methods like
Role.fromRoleArn(), Bucket.fromBucketName(), etc.), they might be
different than the stack they were imported into.
gatewayArn
Type:
string
The ARN of the gateway resource.
gatewayId
Type:
string
The id of the gateway.
name
Type:
string
The name of the gateway.
node
Type:
Node
The tree node.
protocolConfiguration
Type:
IGateway
The protocol configuration for the gateway.
role
Type:
IRole
The IAM role that provides permissions for the gateway to access AWS services.
stack
Type:
Stack
The stack in which this resource is defined.
createdAt?
Type:
string
(optional)
Timestamp when the gateway was created.
description?
Type:
string
(optional)
The description of the gateway.
exceptionLevel?
Type:
Gateway
(optional)
The exception level for the gateway.
gatewayUrl?
Type:
string
(optional)
The URL endpoint for the gateway.
kmsKey?
Type:
IKey
(optional)
The KMS key used for encryption.
status?
Type:
string
(optional)
The status of the gateway.
statusReason?
Type:
string[]
(optional)
The status reasons for the gateway.
updatedAt?
Type:
string
(optional)
Timestamp when the gateway was last updated.
Methods
| Name | Description |
|---|---|
| apply | Apply the given removal policy to this resource. |
| grant(grantee, ...actions) | Grants IAM actions to the IAM Principal. |
| grant | Grants permission to invoke this Gateway. |
| grant | Grants Create, Update, and Delete actions on the Gateway. |
| grant | Grants Get and List actions on the Gateway. |
| metric(metricName, dimensions, props?) | Return the given named metric for this gateway. |
| metric | Return a metric measuring the duration of requests for this gateway. |
| metric | Return a metric containing the total number of invocations for this gateway. |
| metric | Return a metric measuring the latency of requests for this gateway. |
| metric | Return a metric containing the number of system errors (5xx status code) for this gateway. |
| metric | Return a metric measuring the target execution time for this gateway. |
| metric | Return a metric containing the number of requests served by each target type for this gateway. |
| metric | Return a metric containing the number of throttled requests (429 status code) for this gateway. |
| metric | Return a metric containing the number of user errors (4xx status code, excluding 429) for this gateway. |
applyRemovalPolicy(policy)
public applyRemovalPolicy(policy: RemovalPolicy): void
Parameters
- policy
RemovalPolicy
Apply the given removal policy to this resource.
The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced.
The resource can be deleted (RemovalPolicy.DESTROY), or left in your AWS
account for data recovery and cleanup later (RemovalPolicy.RETAIN).
grant(grantee, ...actions)
public grant(grantee: IGrantable, ...actions: string[]): Grant
Parameters
- grantee
IGrantable - actions
string
Returns
Grants IAM actions to the IAM Principal.
grantInvoke(grantee)
public grantInvoke(grantee: IGrantable): Grant
Parameters
- grantee
IGrantable
Returns
Grants permission to invoke this Gateway.
grantManage(grantee)
public grantManage(grantee: IGrantable): Grant
Parameters
- grantee
IGrantable
Returns
Grants Create, Update, and Delete actions on the Gateway.
grantRead(grantee)
public grantRead(grantee: IGrantable): Grant
Parameters
- grantee
IGrantable
Returns
Grants Get and List actions on the Gateway.
metric(metricName, dimensions, props?)
public metric(metricName: string, dimensions: { [string]: string }, props?: MetricOptions): Metric
Parameters
- metricName
stringโ The name of the metric. - dimensions
{ [string]: string }โ Additional dimensions for the metric. - props
Metricโ Optional metric configuration.Options
Returns
Return the given named metric for this gateway.
metricDuration(props?)
public metricDuration(props?: MetricOptions): Metric
Parameters
- props
Metricโ Optional metric configuration.Options
Returns
Return a metric measuring the duration of requests for this gateway.
The duration metric represents the total time elapsed between receiving the request and sending the final response token, representing complete end-to-end processing time.
metricInvocations(props?)
public metricInvocations(props?: MetricOptions): Metric
Parameters
- props
Metricโ Optional metric configuration.Options
Returns
Return a metric containing the total number of invocations for this gateway.
This metric tracks all successful invocations of the gateway.
metricLatency(props?)
public metricLatency(props?: MetricOptions): Metric
Parameters
- props
Metricโ Optional metric configuration.Options
Returns
Return a metric measuring the latency of requests for this gateway.
The latency metric represents the time elapsed between when the service receives the request and when it begins sending the first response token.
metricSystemErrors(props?)
public metricSystemErrors(props?: MetricOptions): Metric
Parameters
- props
Metricโ Optional metric configuration.Options
Returns
Return a metric containing the number of system errors (5xx status code) for this gateway.
This metric tracks internal server errors and system failures.
metricTargetExecutionTime(props?)
public metricTargetExecutionTime(props?: MetricOptions): Metric
Parameters
- props
Metricโ Optional metric configuration.Options
Returns
Return a metric measuring the target execution time for this gateway.
This metric helps determine the contribution of the target (Lambda, OpenAPI, etc.) to the total latency.
metricTargetType(targetType, props?)
public metricTargetType(targetType: string, props?: MetricOptions): Metric
Parameters
- targetType
stringโ The type of target (e.g., 'Lambda', 'OpenAPI', 'Smithy'). - props
Metricโ Optional metric configuration.Options
Returns
Return a metric containing the number of requests served by each target type for this gateway.
metricThrottles(props?)
public metricThrottles(props?: MetricOptions): Metric
Parameters
- props
Metricโ Optional metric configuration.Options
Returns
Return a metric containing the number of throttled requests (429 status code) for this gateway.
This metric helps identify when the gateway is rate limiting requests.
metricUserErrors(props?)
public metricUserErrors(props?: MetricOptions): Metric
Parameters
- props
Metricโ Optional metric configuration.Options
Returns
Return a metric containing the number of user errors (4xx status code, excluding 429) for this gateway.
This metric tracks client errors like bad requests, unauthorized access, etc.

.NET
Go
Java
Python
TypeScript (