Skip to content

create_agent_runtime_endpoint async

create_agent_runtime_endpoint(
    agent_runtime_id: AgentRuntimeId,
    name: EndpointName,
    *,
    config_overrides: Optional[AsyncBedrockAgentCoreControlClientConfig] = None,
    agent_runtime_version: Optional[AgentRuntimeVersion] = None,
    description: Optional[AgentEndpointDescription] = None,
    client_token: Optional[ClientToken] = None,
    tags: Optional[TagsMap] = None,
) -> CreateAgentRuntimeEndpointResponse

Creates an AgentCore Runtime endpoint.

Parameters:

  • agent_runtime_id (AgentRuntimeId) –

    The unique identifier of the AgentCore Runtime to create an endpoint for.

  • name (EndpointName) –

    The name of the AgentCore Runtime endpoint.

  • agent_runtime_version (Optional[AgentRuntimeVersion], default: None ) –

    The version of the AgentCore Runtime to use for the endpoint.

  • description (Optional[AgentEndpointDescription], default: None ) –

    The description of the AgentCore Runtime endpoint.

  • client_token (Optional[ClientToken], default: None ) –

    A unique, case-sensitive identifier to ensure idempotency of the request.

  • tags (Optional[TagsMap], default: None ) –

    A map of tag keys and values to assign to the agent runtime endpoint. Tags enable you to categorize your resources in different ways, for example, by purpose, owner, or environment.

Raises:

Source code in docs_src/capo_bedrock_agentcore_control/_services/async_bedrock_agent_core_control.py
async def create_agent_runtime_endpoint(
    self,
    agent_runtime_id: "capo_bedrock_agentcore_control.types.agent_runtime_id.AgentRuntimeId",
    name: "capo_bedrock_agentcore_control.types.endpoint_name.EndpointName",
    *,
    config_overrides: Optional[AsyncBedrockAgentCoreControlClientConfig] = None,
    agent_runtime_version: Optional[
        "capo_bedrock_agentcore_control.types.agent_runtime_version.AgentRuntimeVersion"
    ] = None,
    description: Optional[
        "capo_bedrock_agentcore_control.types.agent_endpoint_description.AgentEndpointDescription"
    ] = None,
    client_token: Optional[
        "capo_bedrock_agentcore_control.types.client_token.ClientToken"
    ] = None,
    tags: Optional["capo_bedrock_agentcore_control.types.tags_map.TagsMap"] = None,
) -> "capo_bedrock_agentcore_control.types.create_agent_runtime_endpoint_response.CreateAgentRuntimeEndpointResponse":
    """<p>Creates an AgentCore Runtime endpoint.</p>

    Args:
        agent_runtime_id: <p>The unique identifier of the AgentCore Runtime to create an endpoint for.</p>
        name: <p>The name of the AgentCore Runtime endpoint.</p>
        agent_runtime_version: <p>The version of the AgentCore Runtime to use for the endpoint.</p>
        description: <p>The description of the AgentCore Runtime endpoint.</p>
        client_token: <p>A unique, case-sensitive identifier to ensure idempotency of the request.</p>
        tags: <p>A map of tag keys and values to assign to the agent runtime endpoint. Tags enable you to categorize your resources in different ways, for example, by purpose, owner, or environment.</p>

    Raises:
        capo_bedrock_agentcore_control.errors.access_denied_exception.AccessDeniedException: <p>This exception is thrown when a request is denied per access permissions</p>
        capo_bedrock_agentcore_control.errors.conflict_exception.ConflictException: <p>This exception is thrown when there is a conflict performing an operation</p>
        capo_bedrock_agentcore_control.errors.internal_server_exception.InternalServerException: <p>This exception is thrown if there was an unexpected error during processing of request</p>
        capo_bedrock_agentcore_control.errors.resource_not_found_exception.ResourceNotFoundException: <p>This exception is thrown when a resource referenced by the operation does not exist</p>
        capo_bedrock_agentcore_control.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>This exception is thrown when a request is made beyond the service quota</p>
        capo_bedrock_agentcore_control.errors.throttling_exception.ThrottlingException: <p>This exception is thrown when the number of requests exceeds the limit</p>
        capo_bedrock_agentcore_control.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by the service.</p>
        capo_bedrock_agentcore_control.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_bedrock_agentcore_control.types.create_agent_runtime_endpoint_request.CreateAgentRuntimeEndpointRequest]",
    ) -> AsyncOperationResponse[
        "capo_bedrock_agentcore_control.types.create_agent_runtime_endpoint_response.CreateAgentRuntimeEndpointResponse"
    ]:
        import capo_bedrock_agentcore_control._operations.amazon_bedrock_agent_core_control.create_agent_runtime_endpoint

        (
            output,
            http_response,
        ) = await capo_bedrock_agentcore_control._operations.amazon_bedrock_agent_core_control.create_agent_runtime_endpoint.async_create_agent_runtime_endpoint(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    def _redact_input(
        input_: "capo_bedrock_agentcore_control.types.create_agent_runtime_endpoint_request.CreateAgentRuntimeEndpointRequest",
    ) -> dict[str, Any]:
        import capo_bedrock_agentcore_control.types.create_agent_runtime_endpoint_request

        return capo_bedrock_agentcore_control.types.create_agent_runtime_endpoint_request.redact_sensitive(
            input_
        )

    def _redact_output(
        output: "capo_bedrock_agentcore_control.types.create_agent_runtime_endpoint_response.CreateAgentRuntimeEndpointResponse",
    ) -> dict[str, Any]:
        import capo_bedrock_agentcore_control.types.create_agent_runtime_endpoint_response

        return capo_bedrock_agentcore_control.types.create_agent_runtime_endpoint_response.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "CreateAgentRuntimeEndpoint",
            redact_input=_redact_input,
            redact_output=_redact_output,
        ),
    )
    input_: capo_bedrock_agentcore_control.types.create_agent_runtime_endpoint_request.CreateAgentRuntimeEndpointRequest = {
        "agent_runtime_id": agent_runtime_id,
        "name": name,
    }
    if agent_runtime_version is not None:
        input_["agent_runtime_version"] = agent_runtime_version
    if description is not None:
        input_["description"] = description
    if client_token is None:
        client_token = str(uuid.uuid4())
    input_["client_token"] = client_token
    if tags is not None:
        input_["tags"] = tags

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output