Deletes the specified AI workload configuration. You cannot delete a configuration that is referenced by an active benchmark job.
Parameters:
-
ai_workload_config_name
(Optional[AIEntityName], default:
None
)
–
The name of the AI workload configuration to delete.
Raises:
Source code in docs_src/capo_sagemaker/_services/async_sage_maker.py
| async def delete_ai_workload_config(
self,
*,
config_overrides: Optional[AsyncSageMakerClientConfig] = None,
ai_workload_config_name: Optional[
"capo_sagemaker.types.ai_entity_name.AIEntityName"
] = None,
) -> "capo_sagemaker.types.delete_ai_workload_config_response.DeleteAIWorkloadConfigResponse":
"""<p>Deletes the specified AI workload configuration. You cannot delete a configuration that is referenced by an active benchmark job.</p>
Args:
ai_workload_config_name: <p>The name of the AI workload configuration to delete.</p>
Raises:
capo_sagemaker.errors.resource_in_use.ResourceInUse: <p>Resource being accessed is in use.</p>
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_ai_workload_config_request.DeleteAIWorkloadConfigRequest]",
) -> AsyncOperationResponse[
"capo_sagemaker.types.delete_ai_workload_config_response.DeleteAIWorkloadConfigResponse"
]:
import capo_sagemaker._operations.sage_maker.delete_ai_workload_config
(
output,
http_response,
) = await capo_sagemaker._operations.sage_maker.delete_ai_workload_config.async_delete_ai_workload_config(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DeleteAIWorkloadConfig")
)
input_: capo_sagemaker.types.delete_ai_workload_config_request.DeleteAIWorkloadConfigRequest = {}
if ai_workload_config_name is not None:
input_["ai_workload_config_name"] = ai_workload_config_name
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|