Skip to content

delete_source_network

delete_source_network(
    source_network_id: SourceNetworkID,
    *,
    config_overrides: Optional[drsClientConfig] = None,
) -> DeleteSourceNetworkResponse

Delete Source Network resource.

Parameters:

  • source_network_id (SourceNetworkID) –

    ID of the Source Network to delete.

Raises:

Source code in docs_src/capo_drs/_services/drs.py
def delete_source_network(
    self,
    source_network_id: "capo_drs.types.source_network_id.SourceNetworkID",
    *,
    config_overrides: Optional[drsClientConfig] = None,
) -> "capo_drs.types.delete_source_network_response.DeleteSourceNetworkResponse":
    """<p>Delete Source Network resource.</p>

    Args:
        source_network_id: <p>ID of the Source Network to delete.</p>

    Raises:
        capo_drs.errors.conflict_exception.ConflictException: <p>The request could not be completed due to a conflict with the current state of the target resource.</p>
        capo_drs.errors.internal_server_exception.InternalServerException: <p>The request processing has failed because of an unknown error, exception or failure.</p>
        capo_drs.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource for this operation was not found.</p>
        capo_drs.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
        capo_drs.errors.uninitialized_account_exception.UninitializedAccountException: <p>The account performing the request has not been initialized.</p>
        capo_drs.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_drs.types.delete_source_network_request.DeleteSourceNetworkRequest]",
    ) -> OperationResponse[
        "capo_drs.types.delete_source_network_response.DeleteSourceNetworkResponse"
    ]:
        import capo_drs._operations.elastic_disaster_recovery_service.delete_source_network

        output, http_response = (
            capo_drs._operations.elastic_disaster_recovery_service.delete_source_network.delete_source_network(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeleteSourceNetwork")
    )
    input_: capo_drs.types.delete_source_network_request.DeleteSourceNetworkRequest = {
        "source_network_id": source_network_id
    }

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