Deletes a Domain and all associated resources.
Parameters:
-
domain_id
(DomainId)
–
The id of the Domain to delete
Raises:
Source code in docs_src/capo_connecthealth/_services/async_connect_health.py
| async def delete_domain(
self,
domain_id: "capo_connecthealth.types.domain_id.DomainId",
*,
config_overrides: Optional[AsyncConnectHealthClientConfig] = None,
) -> "capo_connecthealth.types.delete_domain_output.DeleteDomainOutput":
"""<p>Deletes a Domain and all associated resources.</p>
Args:
domain_id: <p>The id of the Domain to delete</p>
Raises:
capo_connecthealth.errors.resource_not_found_exception.ResourceNotFoundException: <p>This error is thrown when the requested resource is not found.</p>
capo_connecthealth.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_connecthealth.types.delete_domain_input.DeleteDomainInput]",
) -> AsyncOperationResponse[
"capo_connecthealth.types.delete_domain_output.DeleteDomainOutput"
]:
import capo_connecthealth._operations.connect_health.delete_domain
(
output,
http_response,
) = await capo_connecthealth._operations.connect_health.delete_domain.async_delete_domain(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DeleteDomain")
)
input_: capo_connecthealth.types.delete_domain_input.DeleteDomainInput = {
"domain_id": domain_id
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|