lib/oci/network_load_balancer/network_load_balancer_client.rb
def update_listener(network_load_balancer_id, update_listener_details, listener_name, opts = {})
      logger.debug 'Calling operation NetworkLoadBalancerClient#update_listener.' if logger

      raise "Missing the required parameter 'network_load_balancer_id' when calling update_listener." if network_load_balancer_id.nil?
      raise "Missing the required parameter 'update_listener_details' when calling update_listener." if update_listener_details.nil?
      raise "Missing the required parameter 'listener_name' when calling update_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

      # rubocop:disable Style/NegatedIf
      # Query Params
      query_params = {}

      # Header 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[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
      header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
      # rubocop:enable Style/NegatedIf
      header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

      post_body = @api_client.object_to_http_body(update_listener_details)

      # rubocop:disable Metrics/BlockLength
      OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'NetworkLoadBalancerClient#update_listener') do
        @api_client.call_api(
          :PUT,
          path,
          endpoint,
          header_params: header_params,
          query_params: query_params,
          operation_signing_strategy: operation_signing_strategy,
          body: post_body
        )
      end
      # rubocop:enable Metrics/BlockLength
    end
# Updates a listener for a given 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 [OCI::NetworkLoadBalancer::Models::UpdateListenerDetails] update_listener_details Details to update a listener.
# @param [String] listener_name The name of the listener to update.
#
#   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] :opc_retry_token A token that uniquely identifies a request so that it can be retried in case of a timeout or
#   server error without risk of rerunning that same action. Retry tokens expire after 24
#   hours but they can be invalidated before then due to conflicting operations. For example, if a resource
#   has been deleted and purged from the system, then a retry of the original creation request
#   might be rejected.
#
# @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/update_listener.rb.html) to see an example of how to use update_listener API.
Updates a listener for a given network load balancer.
Updates a listener for a given network load balancer .
def update_listener(network_load_balancer_id, update_listener_details, listener_name, opts = {})
      logger.debug 'Calling operation NetworkLoadBalancerClient#update_listener.' if logger
      raise "Missing the required parameter 'network_load_balancer_id' when calling update_listener." if network_load_balancer_id.nil?
      raise "Missing the required parameter 'update_listener_details' when calling update_listener." if update_listener_details.nil?
      raise "Missing the required parameter 'listener_name' when calling update_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[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
      header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
      header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token
      post_body = @api_client.object_to_http_body(update_listener_details)
      OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'NetworkLoadBalancerClient#update_listener') do
        @api_client.call_api(
          :PUT,
          path,
          endpoint,
          header_params: header_params,
          query_params: query_params,
          operation_signing_strategy: operation_signing_strategy,
          body: post_body
        )
      end
    end
def update_listener ( network_load_balancer_id , update_listener_details , listener_name , opts = { } ) logger . debug 'Calling operation NetworkLoadBalancerClient#update_listener.' if logger raise "Missing the required parameter 'network_load_balancer_id' when calling update_listener." if network_load_balancer_id . nil? raise "Missing the required parameter 'update_listener_details' when calling update_listener." if update_listener_details . nil? raise "Missing the required parameter 'listener_name' when calling update_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 [ :' opc-retry-token ' ] = opts [ :opc_retry_token ] if opts [ :opc_retry_token ] header_params [ :' if-match ' ] = opts [ :if_match ] if opts [ :if_match ] header_params [ :' opc-retry-token ' ] ||= OCI :: Retry . generate_opc_retry_token post_body = @api_client . object_to_http_body ( update_listener_details ) OCI :: Retry . make_retrying_call ( applicable_retry_config ( opts ) , call_name : 'NetworkLoadBalancerClient#update_listener' ) do @api_client . call_api ( :PUT , path , endpoint , header_params : header_params , query_params : query_params , operation_signing_strategy : operation_signing_strategy , body : post_body ) end end
Updates a listener for a given network load balancer.
Updates a listener for a given 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
update_listener_details
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 update_listener API.
Click [ here ] to see an example of how to use update_listener API .