Delete a hub content reference in order to remove a model from a private hub.
Parameters:
-
hub_name
(Optional[HubNameOrArn], default:
None
)
–
The name of the hub to delete the hub content reference from.
-
hub_content_type
(Optional[HubContentType], default:
None
)
–
The type of hub content reference to delete. The only supported type of hub content reference to delete is ModelReference.
-
hub_content_name
(Optional[HubContentName], default:
None
)
–
The name of the hub content to delete.
Raises:
Source code in docs_src/capo_sagemaker/_services/async_sage_maker.py
| async def delete_hub_content_reference(
self,
*,
config_overrides: Optional[AsyncSageMakerClientConfig] = None,
hub_name: Optional["capo_sagemaker.types.hub_name_or_arn.HubNameOrArn"] = None,
hub_content_type: Optional[
"capo_sagemaker.types.hub_content_type.HubContentType"
] = None,
hub_content_name: Optional[
"capo_sagemaker.types.hub_content_name.HubContentName"
] = None,
) -> None:
"""<p>Delete a hub content reference in order to remove a model from a private hub.</p>
Args:
hub_name: <p>The name of the hub to delete the hub content reference from.</p>
hub_content_type: <p>The type of hub content reference to delete. The only supported type of hub content reference to delete is <code>ModelReference</code>.</p>
hub_content_name: <p>The name of the hub content 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_hub_content_reference_request.DeleteHubContentReferenceRequest]",
) -> AsyncOperationResponse[None]:
import capo_sagemaker._operations.sage_maker.delete_hub_content_reference
(
output,
http_response,
) = await capo_sagemaker._operations.sage_maker.delete_hub_content_reference.async_delete_hub_content_reference(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DeleteHubContentReference")
)
input_: capo_sagemaker.types.delete_hub_content_reference_request.DeleteHubContentReferenceRequest = {}
if hub_name is not None:
input_["hub_name"] = hub_name
if hub_content_type is not None:
input_["hub_content_type"] = hub_content_type
if hub_content_name is not None:
input_["hub_content_name"] = hub_content_name
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|