create_gateway
async
¶
create_gateway(
name: GatewayName,
role_arn: RoleArn,
authorizer_type: AuthorizerType,
*,
config_overrides: Optional[AsyncBedrockAgentCoreControlClientConfig] = 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/async_bedrock_agent_core_control.py
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 6600 6601 6602 6603 6604 6605 6606 6607 6608 6609 6610 6611 6612 6613 6614 6615 6616 6617 6618 6619 6620 6621 6622 6623 6624 6625 6626 6627 6628 6629 6630 6631 6632 6633 6634 6635 6636 6637 6638 6639 6640 6641 6642 6643 6644 6645 6646 6647 6648 6649 6650 6651 6652 6653 6654 6655 6656 6657 6658 6659 6660 6661 6662 6663 6664 6665 6666 6667 6668 6669 6670 6671 6672 6673 6674 6675 6676 | |