Skip to content

delete_sol_network_instance

delete_sol_network_instance(
    ns_instance_id: NsInstanceId, *, config_overrides: Optional[tnbClientConfig] = None
) -> None

Deletes a network instance.

A network instance is a single network created in Amazon Web Services TNB that can be deployed and on which life-cycle operations (like terminate, update, and delete) can be performed.

To delete a network instance, the instance must be in a stopped or terminated state. To terminate a network instance, see TerminateSolNetworkInstance.

Parameters:

Raises:

Examples:

Delete a Sol Network Instance.

>>> client.delete_sol_network_instance(ns_instance_id='ni-07aa863e53460a2a6')
Source code in docs_src/capo_tnb/_services/tnb.py
def delete_sol_network_instance(
    self,
    ns_instance_id: "capo_tnb.types.ns_instance_id.NsInstanceId",
    *,
    config_overrides: Optional[tnbClientConfig] = None,
) -> None:
    """<p>Deletes a network instance.</p> <p>A network instance is a single network created in Amazon Web Services TNB that can be deployed and on which life-cycle operations (like terminate, update, and delete) can be performed.</p> <p>To delete a network instance, the instance must be in a stopped or terminated state. To terminate a network instance, see <a href="https://docs.aws.amazon.com/tnb/latest/APIReference/API_TerminateSolNetworkInstance.html">TerminateSolNetworkInstance</a>.</p>

    Args:
        ns_instance_id: <p>Network instance ID.</p>

    Raises:
        capo_tnb.errors.access_denied_exception.AccessDeniedException: <p>Insufficient permissions to make request.</p>
        capo_tnb.errors.internal_server_exception.InternalServerException: <p>Unexpected error occurred. Problem on the server.</p>
        capo_tnb.errors.resource_not_found_exception.ResourceNotFoundException: <p>Request references a resource that doesn't exist.</p>
        capo_tnb.errors.throttling_exception.ThrottlingException: <p>Exception caused by throttling.</p>
        capo_tnb.errors.validation_exception.ValidationException: <p>Unable to process the request because the client provided input failed to satisfy request constraints.</p>
        capo_tnb.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        Delete a Sol Network Instance.

        >>> client.delete_sol_network_instance(ns_instance_id='ni-07aa863e53460a2a6')
    """

    def _handler(
        req: "OperationRequest[capo_tnb.types.delete_sol_network_instance_input.DeleteSolNetworkInstanceInput]",
    ) -> OperationResponse[None]:
        import capo_tnb._operations.tnb.delete_sol_network_instance

        output, http_response = (
            capo_tnb._operations.tnb.delete_sol_network_instance.delete_sol_network_instance(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeleteSolNetworkInstance")
    )
    input_: capo_tnb.types.delete_sol_network_instance_input.DeleteSolNetworkInstanceInput = {
        "ns_instance_id": ns_instance_id
    }

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output