create_gateway¶
Operation¶
create_gateway
async
¶
create_gateway(input: CreateGatewayInput, plugins: list[Plugin] | None = None) -> CreateGatewayOutput
Creates a gateway for Amazon Bedrock Agent. A gateway serves as an integration point between your agent and external services.
If you specify CUSTOM_JWT as the authorizerType, you must provide an
authorizerConfiguration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
input
|
CreateGatewayInput
|
An instance of |
required |
plugins
|
list[Plugin] | None
|
A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations. |
None
|
Returns:
| Type | Description |
|---|---|
CreateGatewayOutput
|
An instance of |
Input¶
CreateGatewayInput
dataclass
¶
Dataclass for CreateGatewayInput structure.
Attributes¶
authorizer_configuration
class-attribute
instance-attribute
¶
authorizer_configuration: AuthorizerConfiguration | None = None
The authorizer configuration for the gateway. Required if
authorizerType is CUSTOM_JWT.
authorizer_type
class-attribute
instance-attribute
¶
authorizer_type: AuthorizerType | None = None
The type of authorizer to use for the gateway.
-
CUSTOM_JWT- Authorize with a bearer token. -
AWS_IAM- Authorize with your Amazon Web Services IAM credentials. -
NONE- No authorization
client_token
class-attribute
instance-attribute
¶
client_token: str | None = None
A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If you don't specify this field, a value is randomly generated for you. If this token matches a previous request, the service ignores the request, but doesn't return an error. For more information, see Ensuring idempotency.
description
class-attribute
instance-attribute
¶
description: str | None = field(repr=False, default=None)
The description of the gateway.
exception_level
class-attribute
instance-attribute
¶
exception_level: ExceptionLevel | None = None
The level of detail in error messages returned when invoking the gateway.
-
If the value is
DEBUG, granular exception messages are returned to help a user debug the gateway. -
If the value is omitted, a generic error message is returned to the end user.
interceptor_configurations
class-attribute
instance-attribute
¶
interceptor_configurations: list[GatewayInterceptorConfiguration] | None = None
A list of configuration settings for a gateway interceptor. Gateway interceptors allow custom code to be invoked during gateway invocations.
kms_key_arn
class-attribute
instance-attribute
¶
kms_key_arn: str | None = None
The Amazon Resource Name (ARN) of the KMS key used to encrypt data associated with the gateway.
name
class-attribute
instance-attribute
¶
name: str | None = None
The name of the gateway. The name must be unique within your account.
policy_engine_configuration
class-attribute
instance-attribute
¶
policy_engine_configuration: GatewayPolicyEngineConfiguration | None = None
The policy engine configuration for the gateway. A policy engine is a collection of policies that evaluates and authorizes agent tool calls. When associated with a gateway, the policy engine intercepts all agent requests and determines whether to allow or deny each action based on the defined policies.
protocol_configuration
class-attribute
instance-attribute
¶
protocol_configuration: GatewayProtocolConfiguration | None = None
The configuration settings for the protocol specified in the
protocolType parameter.
protocol_type
class-attribute
instance-attribute
¶
protocol_type: GatewayProtocolType = GatewayProtocolType('MCP')
The protocol type for the gateway.
role_arn
class-attribute
instance-attribute
¶
role_arn: str | None = None
The Amazon Resource Name (ARN) of the IAM role that provides permissions for the gateway to access Amazon Web Services services.
tags
class-attribute
instance-attribute
¶
tags: dict[str, str] | None = None
A map of key-value pairs to associate with the gateway as metadata tags.
Output¶
CreateGatewayOutput
dataclass
¶
Dataclass for CreateGatewayOutput structure.
Attributes¶
authorizer_configuration
class-attribute
instance-attribute
¶
authorizer_configuration: AuthorizerConfiguration | None = None
The authorizer configuration for the created gateway.
authorizer_type
instance-attribute
¶
authorizer_type: AuthorizerType
The type of authorizer used by the gateway.
custom_transform_configuration
class-attribute
instance-attribute
¶
custom_transform_configuration: CustomTransformConfiguration | None = None
The custom transformation configuration for the gateway. This configuration defines how the gateway transforms requests and responses.
description
class-attribute
instance-attribute
¶
description: str | None = field(repr=False, default=None)
The description of the gateway.
exception_level
class-attribute
instance-attribute
¶
exception_level: ExceptionLevel | None = None
The level of detail in error messages returned when invoking the gateway.
-
If the value is
DEBUG, granular exception messages are returned to help a user debug the gateway. -
If the value is omitted, a generic error message is returned to the end user.
gateway_arn
instance-attribute
¶
gateway_arn: str
The Amazon Resource Name (ARN) of the created gateway.
gateway_url
class-attribute
instance-attribute
¶
gateway_url: str | None = None
The URL endpoint for the created gateway.
interceptor_configurations
class-attribute
instance-attribute
¶
interceptor_configurations: list[GatewayInterceptorConfiguration] | None = None
The list of interceptor configurations for the created gateway.
kms_key_arn
class-attribute
instance-attribute
¶
kms_key_arn: str | None = None
The Amazon Resource Name (ARN) of the KMS key used to encrypt data associated with the gateway.
policy_engine_configuration
class-attribute
instance-attribute
¶
policy_engine_configuration: GatewayPolicyEngineConfiguration | None = None
The policy engine configuration for the created gateway.
protocol_configuration
class-attribute
instance-attribute
¶
protocol_configuration: GatewayProtocolConfiguration | None = None
The configuration settings for the protocol used by the gateway.
protocol_type
class-attribute
instance-attribute
¶
protocol_type: GatewayProtocolType = GatewayProtocolType('MCP')
The protocol type of the gateway.
role_arn
class-attribute
instance-attribute
¶
role_arn: str | None = None
The Amazon Resource Name (ARN) of the IAM role associated with the gateway.
status_reasons
class-attribute
instance-attribute
¶
status_reasons: list[str] | None = None
The reasons for the current status of the gateway.
updated_at
instance-attribute
¶
updated_at: datetime
The timestamp when the gateway was last updated.
waf_configuration
class-attribute
instance-attribute
¶
waf_configuration: WafConfiguration | None = None
The Amazon Web Services WAF configuration for the gateway.
web_acl_arn
class-attribute
instance-attribute
¶
web_acl_arn: str | None = None
The Amazon Resource Name (ARN) of the Amazon Web Services WAF web ACL associated with the gateway.
workload_identity_details
class-attribute
instance-attribute
¶
workload_identity_details: WorkloadIdentityDetails | None = None
The workload identity details for the created gateway.