Enables you to programmatically delete an Amazon Web Services Supply Chain instance by deleting the KMS keys and relevant information associated with the API without using the Amazon Web Services console.
This is an asynchronous operation. Upon receiving a DeleteInstance request, Amazon Web Services Supply Chain immediately returns a response with the instance resource, delete state while cleaning up all Amazon Web Services resources created during the instance creation process. You can use the GetInstance action to check the instance status.
Parameters:
-
instance_id
(UUID)
–
The AWS Supply Chain instance identifier.
Raises:
Examples:
Successful DeleteInstance request
>>> await client.delete_instance(instance_id='9e193580-7cc5-45f7-9609-c43ba0ada793')
Source code in docs_src/capo_supplychain/_services/async_supply_chain.py
| async def delete_instance(
self,
instance_id: "capo_supplychain.types.uuid.UUID",
*,
config_overrides: Optional[AsyncSupplyChainClientConfig] = None,
) -> "capo_supplychain.types.delete_instance_response.DeleteInstanceResponse":
"""<p>Enables you to programmatically delete an Amazon Web Services Supply Chain instance by deleting the KMS keys and relevant information associated with the API without using the Amazon Web Services console.</p> <p>This is an asynchronous operation. Upon receiving a DeleteInstance request, Amazon Web Services Supply Chain immediately returns a response with the instance resource, delete state while cleaning up all Amazon Web Services resources created during the instance creation process. You can use the GetInstance action to check the instance status.</p>
Args:
instance_id: <p>The AWS Supply Chain instance identifier.</p>
Raises:
capo_supplychain.errors.access_denied_exception.AccessDeniedException: <p>You do not have the required privileges to perform this action.</p>
capo_supplychain.errors.conflict_exception.ConflictException: <p>Updating or deleting a resource can cause an inconsistent state.</p>
capo_supplychain.errors.internal_server_exception.InternalServerException: <p>Unexpected error during processing of request.</p>
capo_supplychain.errors.resource_not_found_exception.ResourceNotFoundException: <p>Request references a resource which does not exist.</p>
capo_supplychain.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>Request would cause a service quota to be exceeded.</p>
capo_supplychain.errors.throttling_exception.ThrottlingException: <p>Request was denied due to request throttling.</p>
capo_supplychain.errors.validation_exception.ValidationException: <p>The input does not satisfy the constraints specified by an AWS service.</p>
capo_supplychain.errors.UnknownServiceError: The service returned an error code this client does not model.
Examples:
Successful DeleteInstance request
>>> await client.delete_instance(instance_id='9e193580-7cc5-45f7-9609-c43ba0ada793')
"""
async def _handler(
req: "AsyncOperationRequest[capo_supplychain.types.delete_instance_request.DeleteInstanceRequest]",
) -> AsyncOperationResponse[
"capo_supplychain.types.delete_instance_response.DeleteInstanceResponse"
]:
import capo_supplychain._operations.galaxy_public_api_gateway.delete_instance
(
output,
http_response,
) = await capo_supplychain._operations.galaxy_public_api_gateway.delete_instance.async_delete_instance(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DeleteInstance")
)
input_: capo_supplychain.types.delete_instance_request.DeleteInstanceRequest = {
"instance_id": instance_id
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|