Class: Fastly::WafFirewallVersionsApi
- Inherits:
-
Object
- Object
- Fastly::WafFirewallVersionsApi
- Defined in:
- lib/fastly/api/waf_firewall_versions_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#clone_waf_firewall_version(opts = {}) ⇒ WafFirewallVersionResponse
Clone a firewall version Clone a specific, existing firewall version into a new, draft firewall version.
-
#clone_waf_firewall_version_with_http_info(opts = {}) ⇒ Array<(WafFirewallVersionResponse, Integer, Hash)>
Clone a firewall version Clone a specific, existing firewall version into a new, draft firewall version.
-
#create_waf_firewall_version(opts = {}) ⇒ WafFirewallVersionResponse
Create a firewall version Create a new, draft firewall version.
-
#create_waf_firewall_version_with_http_info(opts = {}) ⇒ Array<(WafFirewallVersionResponse, Integer, Hash)>
Create a firewall version Create a new, draft firewall version.
-
#deploy_activate_waf_firewall_version(opts = {}) ⇒ Object
Deploy or activate a firewall version Deploy or activate a specific firewall version.
-
#deploy_activate_waf_firewall_version_with_http_info(opts = {}) ⇒ Array<(Object, Integer, Hash)>
Deploy or activate a firewall version Deploy or activate a specific firewall version.
-
#get_waf_firewall_version(opts = {}) ⇒ WafFirewallVersionResponse
Get a firewall version Get details about a specific firewall version.
-
#get_waf_firewall_version_with_http_info(opts = {}) ⇒ Array<(WafFirewallVersionResponse, Integer, Hash)>
Get a firewall version Get details about a specific firewall version.
-
#initialize(api_client = ApiClient.default) ⇒ WafFirewallVersionsApi
constructor
A new instance of WafFirewallVersionsApi.
-
#list_waf_firewall_versions(opts = {}) ⇒ WafFirewallVersionsResponse
List firewall versions Get a list of firewall versions associated with a specific firewall.
-
#list_waf_firewall_versions_with_http_info(opts = {}) ⇒ Array<(WafFirewallVersionsResponse, Integer, Hash)>
List firewall versions Get a list of firewall versions associated with a specific firewall.
-
#update_waf_firewall_version(opts = {}) ⇒ WafFirewallVersionResponse
Update a firewall version Update a specific firewall version.
-
#update_waf_firewall_version_with_http_info(opts = {}) ⇒ Array<(WafFirewallVersionResponse, Integer, Hash)>
Update a firewall version Update a specific firewall version.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ WafFirewallVersionsApi
Returns a new instance of WafFirewallVersionsApi.
17 18 19 |
# File 'lib/fastly/api/waf_firewall_versions_api.rb', line 17 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
15 16 17 |
# File 'lib/fastly/api/waf_firewall_versions_api.rb', line 15 def api_client @api_client end |
Instance Method Details
#clone_waf_firewall_version(opts = {}) ⇒ WafFirewallVersionResponse
Clone a firewall version Clone a specific, existing firewall version into a new, draft firewall version.
25 26 27 28 |
# File 'lib/fastly/api/waf_firewall_versions_api.rb', line 25 def clone_waf_firewall_version(opts = {}) data, _status_code, _headers = clone_waf_firewall_version_with_http_info(opts) data end |
#clone_waf_firewall_version_with_http_info(opts = {}) ⇒ Array<(WafFirewallVersionResponse, Integer, Hash)>
Clone a firewall version Clone a specific, existing firewall version into a new, draft firewall version.
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/fastly/api/waf_firewall_versions_api.rb', line 35 def clone_waf_firewall_version_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: WafFirewallVersionsApi.clone_waf_firewall_version ...' end # unbox the parameters from the hash firewall_id = opts[:'firewall_id'] firewall_version_number = opts[:'firewall_version_number'] # 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 WafFirewallVersionsApi.clone_waf_firewall_version" end # verify the required parameter 'firewall_version_number' is set if @api_client.config.client_side_validation && firewall_version_number.nil? fail ArgumentError, "Missing the required parameter 'firewall_version_number' when calling WafFirewallVersionsApi.clone_waf_firewall_version" end # resource path local_var_path = '/waf/firewalls/{firewall_id}/versions/{firewall_version_number}/clone'.sub('{' + 'firewall_id' + '}', CGI.escape(firewall_id.to_s)).sub('{' + 'firewall_version_number' + '}', CGI.escape(firewall_version_number.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] || 'WafFirewallVersionResponse' # auth_names auth_names = opts[:debug_auth_names] || ['token'] = opts.merge( :operation => :"WafFirewallVersionsApi.clone_waf_firewall_version", :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(:PUT, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: WafFirewallVersionsApi#clone_waf_firewall_version\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_waf_firewall_version(opts = {}) ⇒ WafFirewallVersionResponse
Create a firewall version Create a new, draft firewall version.
95 96 97 98 |
# File 'lib/fastly/api/waf_firewall_versions_api.rb', line 95 def create_waf_firewall_version(opts = {}) data, _status_code, _headers = create_waf_firewall_version_with_http_info(opts) data end |
#create_waf_firewall_version_with_http_info(opts = {}) ⇒ Array<(WafFirewallVersionResponse, Integer, Hash)>
Create a firewall version Create a new, draft firewall version.
105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 |
# File 'lib/fastly/api/waf_firewall_versions_api.rb', line 105 def create_waf_firewall_version_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: WafFirewallVersionsApi.create_waf_firewall_version ...' 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 WafFirewallVersionsApi.create_waf_firewall_version" end # resource path local_var_path = '/waf/firewalls/{firewall_id}/versions'.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[:'waf_firewall_version']) # return_type return_type = opts[:debug_return_type] || 'WafFirewallVersionResponse' # auth_names auth_names = opts[:debug_auth_names] || ['token'] = opts.merge( :operation => :"WafFirewallVersionsApi.create_waf_firewall_version", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: WafFirewallVersionsApi#create_waf_firewall_version\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#deploy_activate_waf_firewall_version(opts = {}) ⇒ Object
Deploy or activate a firewall version Deploy or activate a specific firewall version. If a firewall has been disabled, deploying a firewall version will automatically enable the firewall again.
165 166 167 168 |
# File 'lib/fastly/api/waf_firewall_versions_api.rb', line 165 def deploy_activate_waf_firewall_version(opts = {}) data, _status_code, _headers = deploy_activate_waf_firewall_version_with_http_info(opts) data end |
#deploy_activate_waf_firewall_version_with_http_info(opts = {}) ⇒ Array<(Object, Integer, Hash)>
Deploy or activate a firewall version Deploy or activate a specific firewall version. If a firewall has been disabled, deploying a firewall version will automatically enable the firewall again.
175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 |
# File 'lib/fastly/api/waf_firewall_versions_api.rb', line 175 def deploy_activate_waf_firewall_version_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: WafFirewallVersionsApi.deploy_activate_waf_firewall_version ...' end # unbox the parameters from the hash firewall_id = opts[:'firewall_id'] firewall_version_number = opts[:'firewall_version_number'] # 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 WafFirewallVersionsApi.deploy_activate_waf_firewall_version" end # verify the required parameter 'firewall_version_number' is set if @api_client.config.client_side_validation && firewall_version_number.nil? fail ArgumentError, "Missing the required parameter 'firewall_version_number' when calling WafFirewallVersionsApi.deploy_activate_waf_firewall_version" end # resource path local_var_path = '/waf/firewalls/{firewall_id}/versions/{firewall_version_number}/activate'.sub('{' + 'firewall_id' + '}', CGI.escape(firewall_id.to_s)).sub('{' + 'firewall_version_number' + '}', CGI.escape(firewall_version_number.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'] = opts.merge( :operation => :"WafFirewallVersionsApi.deploy_activate_waf_firewall_version", :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(:PUT, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: WafFirewallVersionsApi#deploy_activate_waf_firewall_version\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_waf_firewall_version(opts = {}) ⇒ WafFirewallVersionResponse
Get a firewall version Get details about a specific firewall version.
236 237 238 239 |
# File 'lib/fastly/api/waf_firewall_versions_api.rb', line 236 def get_waf_firewall_version(opts = {}) data, _status_code, _headers = get_waf_firewall_version_with_http_info(opts) data end |
#get_waf_firewall_version_with_http_info(opts = {}) ⇒ Array<(WafFirewallVersionResponse, Integer, Hash)>
Get a firewall version Get details about a specific firewall version.
247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 |
# File 'lib/fastly/api/waf_firewall_versions_api.rb', line 247 def get_waf_firewall_version_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: WafFirewallVersionsApi.get_waf_firewall_version ...' end # unbox the parameters from the hash firewall_id = opts[:'firewall_id'] firewall_version_number = opts[:'firewall_version_number'] # 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 WafFirewallVersionsApi.get_waf_firewall_version" end # verify the required parameter 'firewall_version_number' is set if @api_client.config.client_side_validation && firewall_version_number.nil? fail ArgumentError, "Missing the required parameter 'firewall_version_number' when calling WafFirewallVersionsApi.get_waf_firewall_version" end # resource path local_var_path = '/waf/firewalls/{firewall_id}/versions/{firewall_version_number}'.sub('{' + 'firewall_id' + '}', CGI.escape(firewall_id.to_s)).sub('{' + 'firewall_version_number' + '}', CGI.escape(firewall_version_number.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] || 'WafFirewallVersionResponse' # auth_names auth_names = opts[:debug_auth_names] || ['token'] = opts.merge( :operation => :"WafFirewallVersionsApi.get_waf_firewall_version", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: WafFirewallVersionsApi#get_waf_firewall_version\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_waf_firewall_versions(opts = {}) ⇒ WafFirewallVersionsResponse
List firewall versions Get a list of firewall versions associated with a specific firewall.
310 311 312 313 |
# File 'lib/fastly/api/waf_firewall_versions_api.rb', line 310 def list_waf_firewall_versions(opts = {}) data, _status_code, _headers = list_waf_firewall_versions_with_http_info(opts) data end |
#list_waf_firewall_versions_with_http_info(opts = {}) ⇒ Array<(WafFirewallVersionsResponse, Integer, Hash)>
List firewall versions Get a list of firewall versions associated with a specific firewall.
322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 |
# File 'lib/fastly/api/waf_firewall_versions_api.rb', line 322 def list_waf_firewall_versions_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: WafFirewallVersionsApi.list_waf_firewall_versions ...' end # unbox the parameters from the hash firewall_id = opts[:'firewall_id'] 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 WafFirewallVersionsApi.list_waf_firewall_versions, 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 WafFirewallVersionsApi.list_waf_firewall_versions, must be greater than or equal to 1.' 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 WafFirewallVersionsApi.list_waf_firewall_versions" end # resource path local_var_path = '/waf/firewalls/{firewall_id}/versions'.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? query_params[:'page[number]'] = opts[:'page_number'] if !opts[:'page_number'].nil? query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].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] || 'WafFirewallVersionsResponse' # auth_names auth_names = opts[:debug_auth_names] || ['token'] = opts.merge( :operation => :"WafFirewallVersionsApi.list_waf_firewall_versions", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: WafFirewallVersionsApi#list_waf_firewall_versions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_waf_firewall_version(opts = {}) ⇒ WafFirewallVersionResponse
Update a firewall version Update a specific firewall version.
389 390 391 392 |
# File 'lib/fastly/api/waf_firewall_versions_api.rb', line 389 def update_waf_firewall_version(opts = {}) data, _status_code, _headers = update_waf_firewall_version_with_http_info(opts) data end |
#update_waf_firewall_version_with_http_info(opts = {}) ⇒ Array<(WafFirewallVersionResponse, Integer, Hash)>
Update a firewall version Update a specific firewall version.
400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 |
# File 'lib/fastly/api/waf_firewall_versions_api.rb', line 400 def update_waf_firewall_version_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: WafFirewallVersionsApi.update_waf_firewall_version ...' end # unbox the parameters from the hash firewall_id = opts[:'firewall_id'] firewall_version_number = opts[:'firewall_version_number'] # 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 WafFirewallVersionsApi.update_waf_firewall_version" end # verify the required parameter 'firewall_version_number' is set if @api_client.config.client_side_validation && firewall_version_number.nil? fail ArgumentError, "Missing the required parameter 'firewall_version_number' when calling WafFirewallVersionsApi.update_waf_firewall_version" end # resource path local_var_path = '/waf/firewalls/{firewall_id}/versions/{firewall_version_number}'.sub('{' + 'firewall_id' + '}', CGI.escape(firewall_id.to_s)).sub('{' + 'firewall_version_number' + '}', CGI.escape(firewall_version_number.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[:'waf_firewall_version']) # return_type return_type = opts[:debug_return_type] || 'WafFirewallVersionResponse' # auth_names auth_names = opts[:debug_auth_names] || ['token'] = opts.merge( :operation => :"WafFirewallVersionsApi.update_waf_firewall_version", :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: WafFirewallVersionsApi#update_waf_firewall_version\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |