Deletes a SageMaker Partner AI App.
Parameters:
-
arn
(Optional[PartnerAppArn], default:
None
)
–
The ARN of the SageMaker Partner AI App to delete.
-
client_token
(Optional[ClientToken], default:
None
)
–
A unique token that guarantees that the call to this API is idempotent.
Raises:
-
ConflictException
–
There was a conflict when you attempted to modify a SageMaker entity such as an Experiment or Artifact.
-
ResourceNotFound
–
Resource being access is not found.
-
UnknownServiceError
–
The service returned an error code this client does not model.
Source code in docs_src/capo_sagemaker/_services/sage_maker.py
| def delete_partner_app(
self,
*,
config_overrides: Optional[SageMakerClientConfig] = None,
arn: Optional["capo_sagemaker.types.partner_app_arn.PartnerAppArn"] = None,
client_token: Optional["capo_sagemaker.types.client_token.ClientToken"] = None,
) -> "capo_sagemaker.types.delete_partner_app_response.DeletePartnerAppResponse":
"""<p>Deletes a SageMaker Partner AI App.</p>
Args:
arn: <p>The ARN of the SageMaker Partner AI App to delete.</p>
client_token: <p>A unique token that guarantees that the call to this API is idempotent.</p>
Raises:
capo_sagemaker.errors.conflict_exception.ConflictException: <p>There was a conflict when you attempted to modify a SageMaker entity such as an <code>Experiment</code> or <code>Artifact</code>.</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.
"""
def _handler(
req: "OperationRequest[capo_sagemaker.types.delete_partner_app_request.DeletePartnerAppRequest]",
) -> OperationResponse[
"capo_sagemaker.types.delete_partner_app_response.DeletePartnerAppResponse"
]:
import capo_sagemaker._operations.sage_maker.delete_partner_app
output, http_response = (
capo_sagemaker._operations.sage_maker.delete_partner_app.delete_partner_app(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DeletePartnerApp")
)
input_: capo_sagemaker.types.delete_partner_app_request.DeletePartnerAppRequest = {}
if arn is not None:
input_["arn"] = arn
if client_token is None:
client_token = str(uuid.uuid4())
input_["client_token"] = client_token
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|