async def delete_entity(
self,
workspace_id: "capo_iottwinmaker.types.id.Id",
entity_id: "capo_iottwinmaker.types.entity_id.EntityId",
*,
config_overrides: Optional[AsyncIoTTwinMakerClientConfig] = None,
is_recursive: Optional["capo_iottwinmaker.types.boolean.Boolean"] = None,
) -> "capo_iottwinmaker.types.delete_entity_response.DeleteEntityResponse":
"""<p>Deletes an entity.</p>
Args:
workspace_id: <p>The ID of the workspace that contains the entity to delete.</p>
entity_id: <p>The ID of the entity to delete.</p>
is_recursive: <p>A Boolean value that specifies whether the operation deletes child entities.</p>
Raises:
capo_iottwinmaker.errors.internal_server_exception.InternalServerException: <p>An unexpected error has occurred.</p>
capo_iottwinmaker.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource wasn't found.</p>
capo_iottwinmaker.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The service quota was exceeded.</p>
capo_iottwinmaker.errors.throttling_exception.ThrottlingException: <p>The rate exceeds the limit.</p>
capo_iottwinmaker.errors.validation_exception.ValidationException: <p>Failed</p>
capo_iottwinmaker.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_iottwinmaker.types.delete_entity_request.DeleteEntityRequest]",
) -> AsyncOperationResponse[
"capo_iottwinmaker.types.delete_entity_response.DeleteEntityResponse"
]:
import capo_iottwinmaker._operations.aws_io_t_twin_maker.delete_entity
(
output,
http_response,
) = await capo_iottwinmaker._operations.aws_io_t_twin_maker.delete_entity.async_delete_entity(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DeleteEntity")
)
input_: capo_iottwinmaker.types.delete_entity_request.DeleteEntityRequest = {
"workspace_id": workspace_id,
"entity_id": entity_id,
}
if is_recursive is not None:
input_["is_recursive"] = is_recursive
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output