Deletes a model version.
You can delete models and model versions in Amazon Fraud Detector, provided that they are not associated with a detector version.
When you delete a model version, Amazon Fraud Detector permanently deletes that model version and the data is no longer stored in Amazon Fraud Detector.
Parameters:
-
model_id
(modelIdentifier)
–
The model ID of the model version to delete.
-
model_type
(ModelTypeEnum)
–
The model type of the model version to delete.
-
model_version_number
(floatVersionString)
–
The model version number of the model version to delete.
Raises:
-
AccessDeniedException
–
An exception indicating Amazon Fraud Detector does not have the needed permissions. This can occur if you submit a request, such as PutExternalModel, that specifies a role that is not in your account.
-
ConflictException
–
An exception indicating there was a conflict during a delete operation.
-
InternalServerException
–
An exception indicating an internal server error.
-
ThrottlingException
–
An exception indicating a throttling error.
-
ValidationException
–
An exception indicating a specified value is not allowed.
-
UnknownServiceError
–
The service returned an error code this client does not model.
Source code in docs_src/capo_frauddetector/_services/async_fraud_detector.py
| async def delete_model_version(
self,
model_id: "capo_frauddetector.types.model_identifier.modelIdentifier",
model_type: "capo_frauddetector.types.model_type_enum.ModelTypeEnum",
model_version_number: "capo_frauddetector.types.float_version_string.floatVersionString",
*,
config_overrides: Optional[AsyncFraudDetectorClientConfig] = None,
) -> (
"capo_frauddetector.types.delete_model_version_result.DeleteModelVersionResult"
):
"""<p>Deletes a model version.</p> <p>You can delete models and model versions in Amazon Fraud Detector, provided that they are not associated with a detector version.</p> <p> When you delete a model version, Amazon Fraud Detector permanently deletes that model version and the data is no longer stored in Amazon Fraud Detector.</p>
Args:
model_id: <p>The model ID of the model version to delete.</p>
model_type: <p>The model type of the model version to delete.</p>
model_version_number: <p>The model version number of the model version to delete.</p>
Raises:
capo_frauddetector.errors.access_denied_exception.AccessDeniedException: <p>An exception indicating Amazon Fraud Detector does not have the needed permissions. This can occur if you submit a request, such as <code>PutExternalModel</code>, that specifies a role that is not in your account.</p>
capo_frauddetector.errors.conflict_exception.ConflictException: <p>An exception indicating there was a conflict during a delete operation.</p>
capo_frauddetector.errors.internal_server_exception.InternalServerException: <p>An exception indicating an internal server error.</p>
capo_frauddetector.errors.throttling_exception.ThrottlingException: <p>An exception indicating a throttling error.</p>
capo_frauddetector.errors.validation_exception.ValidationException: <p>An exception indicating a specified value is not allowed.</p>
capo_frauddetector.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_frauddetector.types.delete_model_version_request.DeleteModelVersionRequest]",
) -> AsyncOperationResponse[
"capo_frauddetector.types.delete_model_version_result.DeleteModelVersionResult"
]:
import capo_frauddetector._operations.aws_hawks_nest_service_facade.delete_model_version
(
output,
http_response,
) = await capo_frauddetector._operations.aws_hawks_nest_service_facade.delete_model_version.async_delete_model_version(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DeleteModelVersion")
)
input_: capo_frauddetector.types.delete_model_version_request.DeleteModelVersionRequest = {
"model_id": model_id,
"model_type": model_type,
"model_version_number": model_version_number,
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|