The host to be deleted. Before you delete a host, all connections associated to the host must be deleted.
A host cannot be deleted if it is in the VPC_CONFIG_INITIALIZING or VPC_CONFIG_DELETING state.
Parameters:
-
host_arn
(HostArn)
–
The Amazon Resource Name (ARN) of the host to be deleted.
Raises:
Source code in docs_src/capo_codeconnections/_services/code_connections.py
| def delete_host(
self,
host_arn: "capo_codeconnections.types.host_arn.HostArn",
*,
config_overrides: Optional[CodeConnectionsClientConfig] = None,
) -> "capo_codeconnections.types.delete_host_output.DeleteHostOutput":
"""<p>The host to be deleted. Before you delete a host, all connections associated to the host must be deleted.</p> <note> <p>A host cannot be deleted if it is in the VPC_CONFIG_INITIALIZING or VPC_CONFIG_DELETING state.</p> </note>
Args:
host_arn: <p>The Amazon Resource Name (ARN) of the host to be deleted.</p>
Raises:
capo_codeconnections.errors.resource_not_found_exception.ResourceNotFoundException: <p>Resource not found. Verify the connection resource ARN and try again.</p>
capo_codeconnections.errors.resource_unavailable_exception.ResourceUnavailableException: <p>Resource not found. Verify the ARN for the host resource and try again.</p>
capo_codeconnections.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_codeconnections.types.delete_host_input.DeleteHostInput]",
) -> OperationResponse[
"capo_codeconnections.types.delete_host_output.DeleteHostOutput"
]:
import capo_codeconnections._operations.code_connections_20231201.delete_host
output, http_response = (
capo_codeconnections._operations.code_connections_20231201.delete_host.delete_host(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DeleteHost")
)
input_: capo_codeconnections.types.delete_host_input.DeleteHostInput = {
"host_arn": host_arn
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|