Skip to content

delete_agent_runtime_endpoint async

delete_agent_runtime_endpoint(
    agent_runtime_id: AgentRuntimeId,
    endpoint_name: EndpointName,
    *,
    config_overrides: Optional[AsyncBedrockAgentCoreControlClientConfig] = None,
    client_token: Optional[ClientToken] = None,
) -> DeleteAgentRuntimeEndpointResponse

Deletes an AgentCore Runtime endpoint.

Parameters:

  • agent_runtime_id (AgentRuntimeId) –

    The unique identifier of the AgentCore Runtime associated with the endpoint.

  • endpoint_name (EndpointName) –

    The name of the AgentCore Runtime endpoint to delete.

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

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

Raises:

Source code in docs_src/capo_bedrock_agentcore_control/_services/async_bedrock_agent_core_control.py
async def delete_agent_runtime_endpoint(
    self,
    agent_runtime_id: "capo_bedrock_agentcore_control.types.agent_runtime_id.AgentRuntimeId",
    endpoint_name: "capo_bedrock_agentcore_control.types.endpoint_name.EndpointName",
    *,
    config_overrides: Optional[AsyncBedrockAgentCoreControlClientConfig] = None,
    client_token: Optional[
        "capo_bedrock_agentcore_control.types.client_token.ClientToken"
    ] = None,
) -> "capo_bedrock_agentcore_control.types.delete_agent_runtime_endpoint_response.DeleteAgentRuntimeEndpointResponse":
    """<p>Deletes an AgentCore Runtime endpoint.</p>

    Args:
        agent_runtime_id: <p>The unique identifier of the AgentCore Runtime associated with the endpoint.</p>
        endpoint_name: <p>The name of the AgentCore Runtime endpoint to delete.</p>
        client_token: <p>A unique, case-sensitive identifier to ensure idempotency of the request.</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.throttling_exception.ThrottlingException: <p>This exception is thrown when the number of requests exceeds the limit</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.delete_agent_runtime_endpoint_request.DeleteAgentRuntimeEndpointRequest]",
    ) -> AsyncOperationResponse[
        "capo_bedrock_agentcore_control.types.delete_agent_runtime_endpoint_response.DeleteAgentRuntimeEndpointResponse"
    ]:
        import capo_bedrock_agentcore_control._operations.amazon_bedrock_agent_core_control.delete_agent_runtime_endpoint

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

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

        return capo_bedrock_agentcore_control.types.delete_agent_runtime_endpoint_request.redact_sensitive(
            input_
        )

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

        return capo_bedrock_agentcore_control.types.delete_agent_runtime_endpoint_response.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "DeleteAgentRuntimeEndpoint",
            redact_input=_redact_input,
            redact_output=_redact_output,
        ),
    )
    input_: capo_bedrock_agentcore_control.types.delete_agent_runtime_endpoint_request.DeleteAgentRuntimeEndpointRequest = {
        "agent_runtime_id": agent_runtime_id,
        "endpoint_name": endpoint_name,
    }
    if client_token is None:
        client_token = str(uuid.uuid4())
    input_["client_token"] = client_token

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