async def delete_context(
self,
*,
config_overrides: Optional[AsyncSageMakerClientConfig] = None,
context_name: Optional["capo_sagemaker.types.context_name.ContextName"] = None,
) -> "capo_sagemaker.types.delete_context_response.DeleteContextResponse":
"""<p>Deletes an context.</p>
Args:
context_name: <p>The name of the context to delete.</p>
Raises:
capo_sagemaker.errors.resource_not_found.ResourceNotFound: <p>Resource being access is not found.</p>
capo_sagemaker.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_sagemaker.types.delete_context_request.DeleteContextRequest]",
) -> AsyncOperationResponse[
"capo_sagemaker.types.delete_context_response.DeleteContextResponse"
]:
import capo_sagemaker._operations.sage_maker.delete_context
(
output,
http_response,
) = await capo_sagemaker._operations.sage_maker.delete_context.async_delete_context(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DeleteContext")
)
input_: capo_sagemaker.types.delete_context_request.DeleteContextRequest = {}
if context_name is not None:
input_["context_name"] = context_name
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output