lib/oci/network_load_balancer/network_load_balancer_client.rb
# Deletes a listener from a network load balancer.
# @param [String] network_load_balancer_id The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the network load balancer to update.
# @param [String] listener_name The name of the listener to delete.
#
#   Example: `example_listener`
#
# @param [Hash] opts the optional parameters
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
#   retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
# @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you must contact Oracle about a
#   particular request, then provide the request identifier.
#
# @option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call
#   for a resource, set the `if-match` parameter to the value of the
#   etag from a previous GET or POST response for that resource.
#   The resource will be updated or deleted only if the etag you
#   provide matches the current etag value of the resource.
#    (default to )
# @return [Response] A Response object with data of type nil
# @note Click [here](https://docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/networkloadbalancer/delete_listener.rb.html) to see an example of how to use delete_listener API.
Deletes a listener from a network load balancer.
Deletes a listener from a network load balancer .
def delete_listener(network_load_balancer_id, listener_name, opts = {})
      logger.debug 'Calling operation NetworkLoadBalancerClient#delete_listener.' if logger
      raise "Missing the required parameter 'network_load_balancer_id' when calling delete_listener." if network_load_balancer_id.nil?
      raise "Missing the required parameter 'listener_name' when calling delete_listener." if listener_name.nil?
      raise "Parameter value for 'network_load_balancer_id' must not be blank" if OCI::Internal::Util.blank_string?(network_load_balancer_id)
      raise "Parameter value for 'listener_name' must not be blank" if OCI::Internal::Util.blank_string?(listener_name)
      path = '/networkLoadBalancers/{networkLoadBalancerId}/listeners/{listenerName}'.sub('{networkLoadBalancerId}', network_load_balancer_id.to_s).sub('{listenerName}', listener_name.to_s)
      operation_signing_strategy = :standard
      query_params = {}
      header_params = {}
      header_params[:accept] = 'application/json'
      header_params[:'content-type'] = 'application/json'
      header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
      header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
      post_body = nil
      OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'NetworkLoadBalancerClient#delete_listener') do
        @api_client.call_api(
          :DELETE,
          path,
          endpoint,
          header_params: header_params,
          query_params: query_params,
          operation_signing_strategy: operation_signing_strategy,
          body: post_body
        )
      end
    end
def delete_listener ( network_load_balancer_id , listener_name , opts = { } ) logger . debug 'Calling operation NetworkLoadBalancerClient#delete_listener.' if logger raise "Missing the required parameter 'network_load_balancer_id' when calling delete_listener." if network_load_balancer_id . nil? raise "Missing the required parameter 'listener_name' when calling delete_listener." if listener_name . nil? raise "Parameter value for 'network_load_balancer_id' must not be blank" if OCI :: Internal :: Util . blank_string? ( network_load_balancer_id ) raise "Parameter value for 'listener_name' must not be blank" if OCI :: Internal :: Util . blank_string? ( listener_name ) path = '/networkLoadBalancers/{networkLoadBalancerId}/listeners/{listenerName}' . sub ( '{networkLoadBalancerId}' , network_load_balancer_id . to_s ) . sub ( '{listenerName}' , listener_name . to_s ) operation_signing_strategy = :standard query_params = { } header_params = { } header_params [ :accept ] = 'application/json' header_params [ :' content-type ' ] = 'application/json' header_params [ :' opc-request-id ' ] = opts [ :opc_request_id ] if opts [ :opc_request_id ] header_params [ :' if-match ' ] = opts [ :if_match ] if opts [ :if_match ] post_body = nil OCI :: Retry . make_retrying_call ( applicable_retry_config ( opts ) , call_name : 'NetworkLoadBalancerClient#delete_listener' ) do @api_client . call_api ( :DELETE , path , endpoint , header_params : header_params , query_params : query_params , operation_signing_strategy : operation_signing_strategy , body : post_body ) end end
Deletes a listener from a network load balancer.
Deletes a listener from a network load balancer .
# rubocop:disable Style/NegatedIf # Query Params # Header Params # rubocop:enable Style/NegatedIf # rubocop:disable Metrics/BlockLength # rubocop:enable Metrics/BlockLength
A Response object with data of type nil
A Response object with data of type nil
Response
network_load_balancer_id
listener_name
opts
:if_match For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the current etag value of the resource. (default to )
: if_match For optimistic concurrency control . In the PUT or DELETE call for a resource set the ` if - match ` parameter to the value of the etag from a previous GET or POST response for that resource . The resource will be updated or deleted only if the etag you provide matches the current etag value of the resource . ( default to )
opts the optional parameters
opts the optional parameters
note
Click [here] to see an example of how to use delete_listener API.
Click [ here ] to see an example of how to use delete_listener API .