class Fastly::LegacyWafFirewallApi
Attributes
Public Class Methods
# File lib/fastly/api/legacy_waf_firewall_api.rb, line 17 def initialize(api_client = ApiClient.default) @api_client = api_client end
Public Instance Methods
Create a firewall Create a firewall object for a particular service and version. @option opts [String] :service_id Alphanumeric string identifying the service. (required) @option opts [Integer] :version_id Integer identifying a service version. (required) @option opts [Hash<String, Object>] :request_body @return [Object]
# File lib/fastly/api/legacy_waf_firewall_api.rb, line 26 def create_legacy_waf_firewall_service(opts = {}) data, _status_code, _headers = create_legacy_waf_firewall_service_with_http_info(opts) data end
Create a firewall Create a firewall object for a particular service and version. @option opts [String] :service_id Alphanumeric string identifying the service. (required) @option opts [Integer] :version_id Integer identifying a service version. (required) @option opts [Hash<String, Object>] :request_body @return [Array<(Object
, Integer, Hash)>] Object
data, response status code and response headers
# File lib/fastly/api/legacy_waf_firewall_api.rb, line 37 def create_legacy_waf_firewall_service_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LegacyWafFirewallApi.create_legacy_waf_firewall_service ...' end # unbox the parameters from the hash service_id = opts[:'service_id'] version_id = opts[:'version_id'] # verify the required parameter 'service_id' is set if @api_client.config.client_side_validation && service_id.nil? fail ArgumentError, "Missing the required parameter 'service_id' when calling LegacyWafFirewallApi.create_legacy_waf_firewall_service" end # verify the required parameter 'version_id' is set if @api_client.config.client_side_validation && version_id.nil? fail ArgumentError, "Missing the required parameter 'version_id' when calling LegacyWafFirewallApi.create_legacy_waf_firewall_service" end # resource path local_var_path = '/service/{service_id}/version/{version_id}/wafs'.sub('{' + 'service_id' + '}', CGI.escape(service_id.to_s)).sub('{' + 'version_id' + '}', CGI.escape(version_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/vnd.api+json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'request_body']) # return_type return_type = opts[:debug_return_type] || 'Object' # auth_names auth_names = opts[:debug_auth_names] || ['token'] new_options = opts.merge( :operation => :"LegacyWafFirewallApi.create_legacy_waf_firewall_service", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: LegacyWafFirewallApi#create_legacy_waf_firewall_service\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Disable a firewall Disable a firewall for a particular service and version. This endpoint is intended to be used in an emergency. Disabling a firewall object for a specific service and version replaces your existing WAF ruleset with an empty ruleset. While disabled, your WAF ruleset will not be applied to your origin traffic. This endpoint is only available to users assigned the role of superuser or above. This is an asynchronous action. To check on the completion of this action, use the related link returned in the response to check on the Update Status of the action. @option opts [String] :firewall_id Alphanumeric string identifying a Firewall. (required) @option opts [Hash<String, Object>] :request_body @return [Object]
# File lib/fastly/api/legacy_waf_firewall_api.rb, line 102 def disable_legacy_waf_firewall(opts = {}) data, _status_code, _headers = disable_legacy_waf_firewall_with_http_info(opts) data end
Disable a firewall Disable a firewall for a particular service and version. This endpoint is intended to be used in an emergency. Disabling a firewall object for a specific service and version replaces your existing WAF ruleset with an empty ruleset. While disabled, your WAF ruleset will not be applied to your origin traffic. This endpoint is only available to users assigned the role of superuser or above. This is an asynchronous action. To check on the completion of this action, use the related link returned in the response to check on the Update Status of the action. @option opts [String] :firewall_id Alphanumeric string identifying a Firewall. (required) @option opts [Hash<String, Object>] :request_body @return [Array<(Object
, Integer, Hash)>] Object
data, response status code and response headers
# File lib/fastly/api/legacy_waf_firewall_api.rb, line 112 def disable_legacy_waf_firewall_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LegacyWafFirewallApi.disable_legacy_waf_firewall ...' end # unbox the parameters from the hash firewall_id = opts[:'firewall_id'] # verify the required parameter 'firewall_id' is set if @api_client.config.client_side_validation && firewall_id.nil? fail ArgumentError, "Missing the required parameter 'firewall_id' when calling LegacyWafFirewallApi.disable_legacy_waf_firewall" end # resource path local_var_path = '/wafs/{firewall_id}/disable'.sub('{' + 'firewall_id' + '}', CGI.escape(firewall_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/vnd.api+json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'request_body']) # return_type return_type = opts[:debug_return_type] || 'Object' # auth_names auth_names = opts[:debug_auth_names] || ['token'] new_options = opts.merge( :operation => :"LegacyWafFirewallApi.disable_legacy_waf_firewall", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: LegacyWafFirewallApi#disable_legacy_waf_firewall\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Enable a firewall Re-enable a firewall object for a particular service and version after it has been disabled. This endpoint is intended to be used in an emergency. When a firewall object is re-enabled, a newly generated WAF ruleset VCL based on the current WAF configuration is used to replace the empty ruleset. This endpoint is only available to users assigned the role of superuser or above. This is an asynchronous action. To check on the completion of this action, use the related link returned in the response to check on the Update Status of the action. @option opts [String] :firewall_id Alphanumeric string identifying a Firewall. (required) @option opts [Hash<String, Object>] :request_body @return [Object]
# File lib/fastly/api/legacy_waf_firewall_api.rb, line 172 def enable_legacy_waf_firewall(opts = {}) data, _status_code, _headers = enable_legacy_waf_firewall_with_http_info(opts) data end
Enable a firewall Re-enable a firewall object for a particular service and version after it has been disabled. This endpoint is intended to be used in an emergency. When a firewall object is re-enabled, a newly generated WAF ruleset VCL based on the current WAF configuration is used to replace the empty ruleset. This endpoint is only available to users assigned the role of superuser or above. This is an asynchronous action. To check on the completion of this action, use the related link returned in the response to check on the Update Status of the action. @option opts [String] :firewall_id Alphanumeric string identifying a Firewall. (required) @option opts [Hash<String, Object>] :request_body @return [Array<(Object
, Integer, Hash)>] Object
data, response status code and response headers
# File lib/fastly/api/legacy_waf_firewall_api.rb, line 182 def enable_legacy_waf_firewall_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LegacyWafFirewallApi.enable_legacy_waf_firewall ...' end # unbox the parameters from the hash firewall_id = opts[:'firewall_id'] # verify the required parameter 'firewall_id' is set if @api_client.config.client_side_validation && firewall_id.nil? fail ArgumentError, "Missing the required parameter 'firewall_id' when calling LegacyWafFirewallApi.enable_legacy_waf_firewall" end # resource path local_var_path = '/wafs/{firewall_id}/enable'.sub('{' + 'firewall_id' + '}', CGI.escape(firewall_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/vnd.api+json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'request_body']) # return_type return_type = opts[:debug_return_type] || 'Object' # auth_names auth_names = opts[:debug_auth_names] || ['token'] new_options = opts.merge( :operation => :"LegacyWafFirewallApi.enable_legacy_waf_firewall", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: LegacyWafFirewallApi#enable_legacy_waf_firewall\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Get a firewall object Get a specific firewall object. @option opts [String] :firewall_id Alphanumeric string identifying a Firewall. (required) @option opts [String] :include Include relationships. Optional, comma separated values. Permitted values: `configuration_set`, `owasp`, `rules`, `rule_statuses`. @return [Object]
# File lib/fastly/api/legacy_waf_firewall_api.rb, line 242 def get_legacy_waf_firewall(opts = {}) data, _status_code, _headers = get_legacy_waf_firewall_with_http_info(opts) data end
Get a firewall Get a specific firewall object. @option opts [String] :service_id Alphanumeric string identifying the service. (required) @option opts [Integer] :version_id Integer identifying a service version. (required) @option opts [String] :firewall_id Alphanumeric string identifying a Firewall. (required) @return [Object]
# File lib/fastly/api/legacy_waf_firewall_api.rb, line 309 def get_legacy_waf_firewall_service(opts = {}) data, _status_code, _headers = get_legacy_waf_firewall_service_with_http_info(opts) data end
Get a firewall Get a specific firewall object. @option opts [String] :service_id Alphanumeric string identifying the service. (required) @option opts [Integer] :version_id Integer identifying a service version. (required) @option opts [String] :firewall_id Alphanumeric string identifying a Firewall. (required) @return [Array<(Object
, Integer, Hash)>] Object
data, response status code and response headers
# File lib/fastly/api/legacy_waf_firewall_api.rb, line 320 def get_legacy_waf_firewall_service_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LegacyWafFirewallApi.get_legacy_waf_firewall_service ...' end # unbox the parameters from the hash service_id = opts[:'service_id'] version_id = opts[:'version_id'] firewall_id = opts[:'firewall_id'] # verify the required parameter 'service_id' is set if @api_client.config.client_side_validation && service_id.nil? fail ArgumentError, "Missing the required parameter 'service_id' when calling LegacyWafFirewallApi.get_legacy_waf_firewall_service" end # verify the required parameter 'version_id' is set if @api_client.config.client_side_validation && version_id.nil? fail ArgumentError, "Missing the required parameter 'version_id' when calling LegacyWafFirewallApi.get_legacy_waf_firewall_service" end # verify the required parameter 'firewall_id' is set if @api_client.config.client_side_validation && firewall_id.nil? fail ArgumentError, "Missing the required parameter 'firewall_id' when calling LegacyWafFirewallApi.get_legacy_waf_firewall_service" end # resource path local_var_path = '/service/{service_id}/version/{version_id}/wafs/{firewall_id}'.sub('{' + 'service_id' + '}', CGI.escape(service_id.to_s)).sub('{' + 'version_id' + '}', CGI.escape(version_id.to_s)).sub('{' + 'firewall_id' + '}', CGI.escape(firewall_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Object' # auth_names auth_names = opts[:debug_auth_names] || ['token'] new_options = opts.merge( :operation => :"LegacyWafFirewallApi.get_legacy_waf_firewall_service", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: LegacyWafFirewallApi#get_legacy_waf_firewall_service\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Get a firewall object Get a specific firewall object. @option opts [String] :firewall_id Alphanumeric string identifying a Firewall. (required) @option opts [String] :include Include relationships. Optional, comma separated values. Permitted values: `configuration_set`, `owasp`, `rules`, `rule_statuses`. @return [Array<(Object
, Integer, Hash)>] Object
data, response status code and response headers
# File lib/fastly/api/legacy_waf_firewall_api.rb, line 252 def get_legacy_waf_firewall_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LegacyWafFirewallApi.get_legacy_waf_firewall ...' end # unbox the parameters from the hash firewall_id = opts[:'firewall_id'] # verify the required parameter 'firewall_id' is set if @api_client.config.client_side_validation && firewall_id.nil? fail ArgumentError, "Missing the required parameter 'firewall_id' when calling LegacyWafFirewallApi.get_legacy_waf_firewall" end # resource path local_var_path = '/wafs/{firewall_id}'.sub('{' + 'firewall_id' + '}', CGI.escape(firewall_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'include'] = opts[:'include'] if !opts[:'include'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Object' # auth_names auth_names = opts[:debug_auth_names] || ['token'] new_options = opts.merge( :operation => :"LegacyWafFirewallApi.get_legacy_waf_firewall", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: LegacyWafFirewallApi#get_legacy_waf_firewall\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
List active firewalls List all active firewall objects. @option opts [String] :filter_rules_rule_id Limit the returned firewalls to a specific rule ID. @option opts [Integer] :page_number Current page. @option opts [Integer] :page_size Number of records per page. (default to 20) @option opts [String] :include Include relationships. Optional, comma separated values. Permitted values: `configuration_set`, `owasp`. @return [Object]
# File lib/fastly/api/legacy_waf_firewall_api.rb, line 387 def list_legacy_waf_firewalls(opts = {}) data, _status_code, _headers = list_legacy_waf_firewalls_with_http_info(opts) data end
List firewalls List all firewall objects for a particular service and version. @option opts [String] :service_id Alphanumeric string identifying the service. (required) @option opts [Integer] :version_id Integer identifying a service version. (required) @option opts [Integer] :page_number Current page. @option opts [Integer] :page_size Number of records per page. (default to 20) @option opts [String] :include Include relationships. Optional, comma separated values. Permitted values: `configuration_set`, `owasp`. @return [Object]
# File lib/fastly/api/legacy_waf_firewall_api.rb, line 464 def list_legacy_waf_firewalls_service(opts = {}) data, _status_code, _headers = list_legacy_waf_firewalls_service_with_http_info(opts) data end
List firewalls List all firewall objects for a particular service and version. @option opts [String] :service_id Alphanumeric string identifying the service. (required) @option opts [Integer] :version_id Integer identifying a service version. (required) @option opts [Integer] :page_number Current page. @option opts [Integer] :page_size Number of records per page. (default to 20) @option opts [String] :include Include relationships. Optional, comma separated values. Permitted values: `configuration_set`, `owasp`. @return [Array<(Object
, Integer, Hash)>] Object
data, response status code and response headers
# File lib/fastly/api/legacy_waf_firewall_api.rb, line 477 def list_legacy_waf_firewalls_service_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LegacyWafFirewallApi.list_legacy_waf_firewalls_service ...' end # unbox the parameters from the hash service_id = opts[:'service_id'] version_id = opts[:'version_id'] # verify the required parameter 'service_id' is set if @api_client.config.client_side_validation && service_id.nil? fail ArgumentError, "Missing the required parameter 'service_id' when calling LegacyWafFirewallApi.list_legacy_waf_firewalls_service" end # verify the required parameter 'version_id' is set if @api_client.config.client_side_validation && version_id.nil? fail ArgumentError, "Missing the required parameter 'version_id' when calling LegacyWafFirewallApi.list_legacy_waf_firewalls_service" end if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 100 fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling LegacyWafFirewallApi.list_legacy_waf_firewalls_service, must be smaller than or equal to 100.' end if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1 fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling LegacyWafFirewallApi.list_legacy_waf_firewalls_service, must be greater than or equal to 1.' end # resource path local_var_path = '/service/{service_id}/version/{version_id}/wafs'.sub('{' + 'service_id' + '}', CGI.escape(service_id.to_s)).sub('{' + 'version_id' + '}', CGI.escape(version_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'page[number]'] = opts[:'page_number'] if !opts[:'page_number'].nil? query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil? query_params[:'include'] = opts[:'include'] if !opts[:'include'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Object' # auth_names auth_names = opts[:debug_auth_names] || ['token'] new_options = opts.merge( :operation => :"LegacyWafFirewallApi.list_legacy_waf_firewalls_service", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: LegacyWafFirewallApi#list_legacy_waf_firewalls_service\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
List active firewalls List all active firewall objects. @option opts [String] :filter_rules_rule_id Limit the returned firewalls to a specific rule ID. @option opts [Integer] :page_number Current page. @option opts [Integer] :page_size Number of records per page. (default to 20) @option opts [String] :include Include relationships. Optional, comma separated values. Permitted values: `configuration_set`, `owasp`. @return [Array<(Object
, Integer, Hash)>] Object
data, response status code and response headers
# File lib/fastly/api/legacy_waf_firewall_api.rb, line 399 def list_legacy_waf_firewalls_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LegacyWafFirewallApi.list_legacy_waf_firewalls ...' end # unbox the parameters from the hash if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 100 fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling LegacyWafFirewallApi.list_legacy_waf_firewalls, must be smaller than or equal to 100.' end if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1 fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling LegacyWafFirewallApi.list_legacy_waf_firewalls, must be greater than or equal to 1.' end # resource path local_var_path = '/wafs' # query parameters query_params = opts[:query_params] || {} query_params[:'filter[rules][rule_id]'] = opts[:'filter_rules_rule_id'] if !opts[:'filter_rules_rule_id'].nil? query_params[:'page[number]'] = opts[:'page_number'] if !opts[:'page_number'].nil? query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil? query_params[:'include'] = opts[:'include'] if !opts[:'include'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Object' # auth_names auth_names = opts[:debug_auth_names] || ['token'] new_options = opts.merge( :operation => :"LegacyWafFirewallApi.list_legacy_waf_firewalls", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: LegacyWafFirewallApi#list_legacy_waf_firewalls\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Update a firewall Update a firewall object for a particular service and version. @option opts [String] :service_id Alphanumeric string identifying the service. (required) @option opts [Integer] :version_id Integer identifying a service version. (required) @option opts [String] :firewall_id Alphanumeric string identifying a Firewall. (required) @option opts [Hash<String, Object>] :request_body @return [Object]
# File lib/fastly/api/legacy_waf_firewall_api.rb, line 550 def update_legacy_waf_firewall_service(opts = {}) data, _status_code, _headers = update_legacy_waf_firewall_service_with_http_info(opts) data end
Update a firewall Update a firewall object for a particular service and version. @option opts [String] :service_id Alphanumeric string identifying the service. (required) @option opts [Integer] :version_id Integer identifying a service version. (required) @option opts [String] :firewall_id Alphanumeric string identifying a Firewall. (required) @option opts [Hash<String, Object>] :request_body @return [Array<(Object
, Integer, Hash)>] Object
data, response status code and response headers
# File lib/fastly/api/legacy_waf_firewall_api.rb, line 562 def update_legacy_waf_firewall_service_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LegacyWafFirewallApi.update_legacy_waf_firewall_service ...' end # unbox the parameters from the hash service_id = opts[:'service_id'] version_id = opts[:'version_id'] firewall_id = opts[:'firewall_id'] # verify the required parameter 'service_id' is set if @api_client.config.client_side_validation && service_id.nil? fail ArgumentError, "Missing the required parameter 'service_id' when calling LegacyWafFirewallApi.update_legacy_waf_firewall_service" end # verify the required parameter 'version_id' is set if @api_client.config.client_side_validation && version_id.nil? fail ArgumentError, "Missing the required parameter 'version_id' when calling LegacyWafFirewallApi.update_legacy_waf_firewall_service" end # verify the required parameter 'firewall_id' is set if @api_client.config.client_side_validation && firewall_id.nil? fail ArgumentError, "Missing the required parameter 'firewall_id' when calling LegacyWafFirewallApi.update_legacy_waf_firewall_service" end # resource path local_var_path = '/service/{service_id}/version/{version_id}/wafs/{firewall_id}'.sub('{' + 'service_id' + '}', CGI.escape(service_id.to_s)).sub('{' + 'version_id' + '}', CGI.escape(version_id.to_s)).sub('{' + 'firewall_id' + '}', CGI.escape(firewall_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/vnd.api+json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'request_body']) # return_type return_type = opts[:debug_return_type] || 'Object' # auth_names auth_names = opts[:debug_auth_names] || ['token'] new_options = opts.merge( :operation => :"LegacyWafFirewallApi.update_legacy_waf_firewall_service", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: LegacyWafFirewallApi#update_legacy_waf_firewall_service\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end