Deletes one or more versions of a recipe at a time.
The entire request will be rejected if:
-
The recipe does not exist.
-
There is an invalid version identifier in the list of versions.
-
The version list is empty.
-
The version list size exceeds 50.
-
The version list contains duplicate entries.
The request will complete successfully, but with partial failures, if:
-
A version does not exist.
-
A version is being used by a job.
-
You specify LATEST_WORKING, but it's being used by a project.
-
The version fails to be deleted.
The LATEST_WORKING version will only be deleted if the recipe has no other versions. If you try to delete LATEST_WORKING while other versions exist (or if they can't be deleted), then LATEST_WORKING will be listed as partial failure in the response.
Parameters:
-
name
(RecipeName)
–
The name of the recipe whose versions are to be deleted.
-
recipe_versions
(RecipeVersionList)
–
An array of version identifiers, for the recipe versions to be deleted. You can specify numeric versions (X.Y) or LATEST_WORKING. LATEST_PUBLISHED is not supported.
Raises:
Source code in docs_src/capo_databrew/_services/data_brew.py
| def batch_delete_recipe_version(
self,
name: "capo_databrew.types.recipe_name.RecipeName",
recipe_versions: "capo_databrew.types.recipe_version_list.RecipeVersionList",
*,
config_overrides: Optional[DataBrewClientConfig] = None,
) -> "capo_databrew.types.batch_delete_recipe_version_response.BatchDeleteRecipeVersionResponse":
"""<p>Deletes one or more versions of a recipe at a time.</p> <p>The entire request will be rejected if:</p> <ul> <li> <p>The recipe does not exist.</p> </li> <li> <p>There is an invalid version identifier in the list of versions.</p> </li> <li> <p>The version list is empty.</p> </li> <li> <p>The version list size exceeds 50.</p> </li> <li> <p>The version list contains duplicate entries.</p> </li> </ul> <p>The request will complete successfully, but with partial failures, if:</p> <ul> <li> <p>A version does not exist.</p> </li> <li> <p>A version is being used by a job.</p> </li> <li> <p>You specify <code>LATEST_WORKING</code>, but it's being used by a project.</p> </li> <li> <p>The version fails to be deleted.</p> </li> </ul> <p>The <code>LATEST_WORKING</code> version will only be deleted if the recipe has no other versions. If you try to delete <code>LATEST_WORKING</code> while other versions exist (or if they can't be deleted), then <code>LATEST_WORKING</code> will be listed as partial failure in the response.</p>
Args:
name: <p>The name of the recipe whose versions are to be deleted.</p>
recipe_versions: <p>An array of version identifiers, for the recipe versions to be deleted. You can specify numeric versions (<code>X.Y</code>) or <code>LATEST_WORKING</code>. <code>LATEST_PUBLISHED</code> is not supported.</p>
Raises:
capo_databrew.errors.conflict_exception.ConflictException: <p>Updating or deleting a resource can cause an inconsistent state.</p>
capo_databrew.errors.resource_not_found_exception.ResourceNotFoundException: <p>One or more resources can't be found.</p>
capo_databrew.errors.validation_exception.ValidationException: <p>The input parameters for this request failed validation.</p>
capo_databrew.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_databrew.types.batch_delete_recipe_version_request.BatchDeleteRecipeVersionRequest]",
) -> OperationResponse[
"capo_databrew.types.batch_delete_recipe_version_response.BatchDeleteRecipeVersionResponse"
]:
import capo_databrew._operations.aws_glue_data_brew.batch_delete_recipe_version
output, http_response = (
capo_databrew._operations.aws_glue_data_brew.batch_delete_recipe_version.batch_delete_recipe_version(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("BatchDeleteRecipeVersion")
)
input_: capo_databrew.types.batch_delete_recipe_version_request.BatchDeleteRecipeVersionRequest = {
"name": name,
"recipe_versions": recipe_versions,
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|