def delete_association(
self,
*,
config_overrides: Optional[SageMakerClientConfig] = None,
source_arn: Optional[
"capo_sagemaker.types.association_entity_arn.AssociationEntityArn"
] = None,
destination_arn: Optional[
"capo_sagemaker.types.association_entity_arn.AssociationEntityArn"
] = None,
) -> "capo_sagemaker.types.delete_association_response.DeleteAssociationResponse":
"""<p>Deletes an association.</p>
Args:
source_arn: <p>The ARN of the source.</p>
destination_arn: <p>The Amazon Resource Name (ARN) of the destination.</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.
"""
def _handler(
req: "OperationRequest[capo_sagemaker.types.delete_association_request.DeleteAssociationRequest]",
) -> OperationResponse[
"capo_sagemaker.types.delete_association_response.DeleteAssociationResponse"
]:
import capo_sagemaker._operations.sage_maker.delete_association
output, http_response = (
capo_sagemaker._operations.sage_maker.delete_association.delete_association(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DeleteAssociation")
)
input_: capo_sagemaker.types.delete_association_request.DeleteAssociationRequest = {}
if source_arn is not None:
input_["source_arn"] = source_arn
if destination_arn is not None:
input_["destination_arn"] = destination_arn
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output