Deletes the specified provisioning artifact (also known as a version) for the specified product.
You cannot delete a provisioning artifact associated with a product that was shared with you. You cannot delete the last provisioning artifact for a product, because a product must have at least one provisioning artifact.
Parameters:
-
accept_language
(Optional[AcceptLanguage], default:
None
)
–
The language code.
-
jp - Japanese
-
zh - Chinese
-
product_id
(Id)
–
-
provisioning_artifact_id
(Id)
–
The identifier of the provisioning artifact.
Raises:
Source code in docs_src/capo_service_catalog/_services/service_catalog.py
| def delete_provisioning_artifact(
self,
product_id: "capo_service_catalog.types.id.Id",
provisioning_artifact_id: "capo_service_catalog.types.id.Id",
*,
config_overrides: Optional[ServiceCatalogClientConfig] = None,
accept_language: Optional[
"capo_service_catalog.types.accept_language.AcceptLanguage"
] = None,
) -> "capo_service_catalog.types.delete_provisioning_artifact_output.DeleteProvisioningArtifactOutput":
"""<p>Deletes the specified provisioning artifact (also known as a version) for the specified product.</p> <p>You cannot delete a provisioning artifact associated with a product that was shared with you. You cannot delete the last provisioning artifact for a product, because a product must have at least one provisioning artifact.</p>
Args:
accept_language: <p>The language code.</p> <ul> <li> <p> <code>jp</code> - Japanese</p> </li> <li> <p> <code>zh</code> - Chinese</p> </li> </ul>
product_id: <p>The product identifier.</p>
provisioning_artifact_id: <p>The identifier of the provisioning artifact.</p>
Raises:
capo_service_catalog.errors.invalid_parameters_exception.InvalidParametersException: <p>One or more parameters provided to the operation are not valid.</p>
capo_service_catalog.errors.resource_in_use_exception.ResourceInUseException: <p>A resource that is currently in use. Ensure that the resource is not in use and retry the operation.</p>
capo_service_catalog.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource was not found.</p>
capo_service_catalog.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_service_catalog.types.delete_provisioning_artifact_input.DeleteProvisioningArtifactInput]",
) -> OperationResponse[
"capo_service_catalog.types.delete_provisioning_artifact_output.DeleteProvisioningArtifactOutput"
]:
import capo_service_catalog._operations.aws242_service_catalog_service.delete_provisioning_artifact
output, http_response = (
capo_service_catalog._operations.aws242_service_catalog_service.delete_provisioning_artifact.delete_provisioning_artifact(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DeleteProvisioningArtifact")
)
input_: capo_service_catalog.types.delete_provisioning_artifact_input.DeleteProvisioningArtifactInput = {
"product_id": product_id,
"provisioning_artifact_id": provisioning_artifact_id,
}
if accept_language is not None:
input_["accept_language"] = accept_language
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|