create_gateway
¶
create_gateway(
name: GatewayName,
role_arn: RoleArn,
authorizer_type: AuthorizerType,
*,
config_overrides: Optional[BedrockAgentCoreControlClientConfig] = None,
description: Optional[GatewayDescription] = None,
client_token: Optional[ClientToken] = None,
protocol_type: Optional[GatewayProtocolType] = None,
protocol_configuration: Optional[GatewayProtocolConfiguration] = None,
authorizer_configuration: Optional[AuthorizerConfiguration] = None,
kms_key_arn: Optional[KmsKeyArn] = None,
interceptor_configurations: Optional[GatewayInterceptorConfigurations] = None,
policy_engine_configuration: Optional[GatewayPolicyEngineConfiguration] = None,
exception_level: Optional[ExceptionLevel] = None,
tags: Optional[TagsMap] = None,
) -> CreateGatewayResponse
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(GatewayName) –The name of the gateway. The name must be unique within your account.
-
description(Optional[GatewayDescription], default:None) –The description of the gateway.
-
client_token(Optional[ClientToken], default: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.
-
role_arn(RoleArn) –The Amazon Resource Name (ARN) of the IAM role that provides permissions for the gateway to access Amazon Web Services services.
-
protocol_type(Optional[GatewayProtocolType], default:None) –The protocol type for the gateway.
-
protocol_configuration(Optional[GatewayProtocolConfiguration], default:None) –The configuration settings for the protocol specified in the
protocolTypeparameter. -
authorizer_type(AuthorizerType) –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
-
-
authorizer_configuration(Optional[AuthorizerConfiguration], default:None) –The authorizer configuration for the gateway. Required if
authorizerTypeisCUSTOM_JWT. -
kms_key_arn(Optional[KmsKeyArn], default:None) –The Amazon Resource Name (ARN) of the KMS key used to encrypt data associated with the gateway.
-
interceptor_configurations(Optional[GatewayInterceptorConfigurations], default:None) –A list of configuration settings for a gateway interceptor. Gateway interceptors allow custom code to be invoked during gateway invocations.
-
policy_engine_configuration(Optional[GatewayPolicyEngineConfiguration], default: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.
-
exception_level(Optional[ExceptionLevel], default: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.
-
-
tags(Optional[TagsMap], default:None) –A map of key-value pairs to associate with the gateway as metadata tags.
Raises:
-
AccessDeniedException–This exception is thrown when a request is denied per access permissions
-
ConflictException–This exception is thrown when there is a conflict performing an operation
-
InternalServerException–This exception is thrown if there was an unexpected error during processing of request
-
ServiceQuotaExceededException–This exception is thrown when a request is made beyond the service quota
-
ThrottlingException–This exception is thrown when the number of requests exceeds the limit
-
ValidationException–The input fails to satisfy the constraints specified by the service.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_bedrock_agentcore_control/_services/bedrock_agent_core_control.py
6463 6464 6465 6466 6467 6468 6469 6470 6471 6472 6473 6474 6475 6476 6477 6478 6479 6480 6481 6482 6483 6484 6485 6486 6487 6488 6489 6490 6491 6492 6493 6494 6495 6496 6497 6498 6499 6500 6501 6502 6503 6504 6505 6506 6507 6508 6509 6510 6511 6512 6513 6514 6515 6516 6517 6518 6519 6520 6521 6522 6523 6524 6525 6526 6527 6528 6529 6530 6531 6532 6533 6534 6535 6536 6537 6538 6539 6540 6541 6542 6543 6544 6545 6546 6547 6548 6549 6550 6551 6552 6553 6554 6555 6556 6557 6558 6559 6560 6561 6562 6563 6564 6565 6566 6567 6568 6569 6570 6571 6572 6573 6574 6575 6576 6577 6578 6579 6580 6581 6582 6583 6584 6585 6586 6587 6588 6589 6590 6591 6592 6593 6594 6595 6596 6597 6598 6599 | |