Class: OCI::Waas::WaasClient

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/waas/waas_client.rb

Overview

OCI Web Application Acceleration and Security Services

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(config: nil, region: nil, endpoint: nil, signer: nil, proxy_settings: nil, retry_config: nil) ⇒ WaasClient

Creates a new WaasClient. Notes: If a config is not specified, then the global OCI.config will be used.

This client is not thread-safe

Either a region or an endpoint must be specified. If an endpoint is specified, it will be used instead of the region. A region may be specified in the config or via or the region parameter. If specified in both, then the region parameter will be used.

Parameters:

  • config (Config) (defaults to: nil)

    A Config object.

  • region (String) (defaults to: nil)

    A region used to determine the service endpoint. This will usually correspond to a value in Regions::REGION_ENUM, but may be an arbitrary string.

  • endpoint (String) (defaults to: nil)

    The fully qualified endpoint URL

  • signer (OCI::BaseSigner) (defaults to: nil)

    A signer implementation which can be used by this client. If this is not provided then a signer will be constructed via the provided config. One use case of this parameter is instance principals authentication, so that the instance principals signer can be provided to the client

  • proxy_settings (OCI::ApiClientProxySettings) (defaults to: nil)

    If your environment requires you to use a proxy server for outgoing HTTP requests the details for the proxy can be provided in this parameter

  • retry_config (OCI::Retry::RetryConfig) (defaults to: nil)

    The retry configuration for this service client. This represents the default retry configuration to apply across all operations. This can be overridden on a per-operation basis. The default retry configuration value is nil, which means that an operation will not perform any retries



55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# File 'lib/oci/waas/waas_client.rb', line 55

def initialize(config: nil, region: nil, endpoint: nil, signer: nil, proxy_settings: nil, retry_config: nil)
  # If the signer is an InstancePrincipalsSecurityTokenSigner or SecurityTokenSigner and no config was supplied (they are self-sufficient signers)
  # then create a dummy config to pass to the ApiClient constructor. If customers wish to create a client which uses instance principals
  # and has config (either populated programmatically or loaded from a file), they must construct that config themselves and then
  # pass it to this constructor.
  #
  # If there is no signer (or the signer is not an instance principals signer) and no config was supplied, this is not valid
  # so try and load the config from the default file.
  config = OCI::Config.validate_and_build_config_with_signer(config, signer)

  signer = OCI::Signer.config_file_auth_builder(config) if signer.nil?

  @api_client = OCI::ApiClient.new(config, signer, proxy_settings: proxy_settings)
  @retry_config = retry_config

  if endpoint
    @endpoint = endpoint + '/20181116'
  else
    region ||= config.region
    region ||= signer.region if signer.respond_to?(:region)
    self.region = region
  end
  logger.info "WaasClient endpoint set to '#{@endpoint}'." if logger
end

Instance Attribute Details

#api_clientOCI::ApiClient (readonly)

Client used to make HTTP requests.

Returns:



15
16
17
# File 'lib/oci/waas/waas_client.rb', line 15

def api_client
  @api_client
end

#endpointString (readonly)

Fully qualified endpoint URL

Returns:

  • (String)


19
20
21
# File 'lib/oci/waas/waas_client.rb', line 19

def endpoint
  @endpoint
end

#regionString

The region, which will usually correspond to a value in Regions::REGION_ENUM.

Returns:

  • (String)


29
30
31
# File 'lib/oci/waas/waas_client.rb', line 29

def region
  @region
end

#retry_configOCI::Retry::RetryConfig (readonly)

The default retry configuration to apply to all operations in this service client. This can be overridden on a per-operation basis. The default retry configuration value is nil, which means that an operation will not perform any retries



25
26
27
# File 'lib/oci/waas/waas_client.rb', line 25

def retry_config
  @retry_config
end

Instance Method Details

#accept_recommendations(waas_policy_id, protection_rule_keys, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use accept_recommendations API.

Accepts a list of recommended Web Application Firewall protection rules. Web Application Firewall protection rule recommendations are sets of rules generated by observed traffic patterns through the Web Application Firewall and are meant to optimize the Web Application Firewall's security profile. Only the rules specified in the request body will be updated; all other rules will remain unchanged.

Use the GET /waasPolicies/{waasPolicyId}/wafConfig/recommendations method to view a list of recommended Web Application Firewall protection rules. For more information, see {WAF Protection Rules}[https://docs.cloud.oracle.com/iaas/Content/WAF/Tasks/wafprotectionrules.htm].

Parameters:

  • waas_policy_id (String)

    The OCID of the WAAS policy.

  • protection_rule_keys (Array<String>)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    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

  • :opc_request_id (String)

    The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

  • :if_match (String)

    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 provided matches the resource's current etag value.

Returns:

  • (Response)

    A Response object with data of type nil



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
# File 'lib/oci/waas/waas_client.rb', line 115

def accept_recommendations(waas_policy_id, protection_rule_keys, opts = {})
  logger.debug 'Calling operation WaasClient#accept_recommendations.' if logger

  raise "Missing the required parameter 'waas_policy_id' when calling accept_recommendations." if waas_policy_id.nil?
  raise "Missing the required parameter 'protection_rule_keys' when calling accept_recommendations." if protection_rule_keys.nil?
  raise "Parameter value for 'waas_policy_id' must not be blank" if OCI::Internal::Util.blank_string?(waas_policy_id)

  path = '/waasPolicies/{waasPolicyId}/actions/acceptWafConfigRecommendations'.sub('{waasPolicyId}', waas_policy_id.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[:'if-match'] = opts[:if_match] if opts[:if_match]
  # rubocop:enable Style/NegatedIf

  post_body = @api_client.object_to_http_body(protection_rule_keys)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'WaasClient#accept_recommendations') do
    @api_client.call_api(
      :POST,
      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

#cancel_work_request(work_request_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use cancel_work_request API.

Cancels a specified work request.

Parameters:

  • work_request_id (String)

    The OCID of the work request. This number is generated when work request is created.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    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

  • :opc_request_id (String)

    The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations Example: If a resource has been deleted and purged from the system, then a retry of the original delete request may be rejected.

  • :if_match (String)

    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 provided matches the resource's current etag value.

Returns:

  • (Response)

    A Response object with data of type nil



173
174
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
# File 'lib/oci/waas/waas_client.rb', line 173

def cancel_work_request(work_request_id, opts = {})
  logger.debug 'Calling operation WaasClient#cancel_work_request.' if logger

  raise "Missing the required parameter 'work_request_id' when calling cancel_work_request." if work_request_id.nil?
  raise "Parameter value for 'work_request_id' must not be blank" if OCI::Internal::Util.blank_string?(work_request_id)

  path = '/workRequests/{workRequestId}'.sub('{workRequestId}', work_request_id.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 = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'WaasClient#cancel_work_request') 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
  # rubocop:enable Metrics/BlockLength
end

#change_address_list_compartment(address_list_id, change_address_list_compartment_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use change_address_list_compartment API.

Moves address list into a different compartment. When provided, If-Match is checked against ETag values of the address list. For information about moving resources between compartments, see Moving Resources to a Different Compartment.

Parameters:

  • address_list_id (String)

    The OCID of the address list. This number is generated when the address list is added to the compartment.

  • change_address_list_compartment_details (OCI::Waas::Models::ChangeAddressListCompartmentDetails)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    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

  • :if_match (String)

    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 provided matches the resource's current etag value.

  • :opc_request_id (String)

    The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations Example: If a resource has been deleted and purged from the system, then a retry of the original delete request may be rejected.

Returns:

  • (Response)

    A Response object with data of type nil



236
237
238
239
240
241
242
243
244
245
246
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
# File 'lib/oci/waas/waas_client.rb', line 236

def change_address_list_compartment(address_list_id, change_address_list_compartment_details, opts = {})
  logger.debug 'Calling operation WaasClient#change_address_list_compartment.' if logger

  raise "Missing the required parameter 'address_list_id' when calling change_address_list_compartment." if address_list_id.nil?
  raise "Missing the required parameter 'change_address_list_compartment_details' when calling change_address_list_compartment." if change_address_list_compartment_details.nil?
  raise "Parameter value for 'address_list_id' must not be blank" if OCI::Internal::Util.blank_string?(address_list_id)

  path = '/addressLists/{addressListId}/actions/changeCompartment'.sub('{addressListId}', address_list_id.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[:'if-match'] = opts[:if_match] if opts[:if_match]
  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]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(change_address_list_compartment_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'WaasClient#change_address_list_compartment') do
    @api_client.call_api(
      :POST,
      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

#change_certificate_compartment(certificate_id, change_certificate_compartment_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use change_certificate_compartment API.

Moves certificate into a different compartment. When provided, If-Match is checked against ETag values of the certificate. For information about moving resources between compartments, see Moving Resources to a Different Compartment.

Parameters:

  • certificate_id (String)

    The OCID of the SSL certificate used in the WAAS policy. This number is generated when the certificate is added to the policy.

  • change_certificate_compartment_details (OCI::Waas::Models::ChangeCertificateCompartmentDetails)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    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

  • :if_match (String)

    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 provided matches the resource's current etag value.

  • :opc_request_id (String)

    The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations Example: If a resource has been deleted and purged from the system, then a retry of the original delete request may be rejected.

Returns:

  • (Response)

    A Response object with data of type nil



299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
# File 'lib/oci/waas/waas_client.rb', line 299

def change_certificate_compartment(certificate_id, change_certificate_compartment_details, opts = {})
  logger.debug 'Calling operation WaasClient#change_certificate_compartment.' if logger

  raise "Missing the required parameter 'certificate_id' when calling change_certificate_compartment." if certificate_id.nil?
  raise "Missing the required parameter 'change_certificate_compartment_details' when calling change_certificate_compartment." if change_certificate_compartment_details.nil?
  raise "Parameter value for 'certificate_id' must not be blank" if OCI::Internal::Util.blank_string?(certificate_id)

  path = '/certificates/{certificateId}/actions/changeCompartment'.sub('{certificateId}', certificate_id.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[:'if-match'] = opts[:if_match] if opts[:if_match]
  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]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(change_certificate_compartment_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'WaasClient#change_certificate_compartment') do
    @api_client.call_api(
      :POST,
      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

#change_custom_protection_rule_compartment(custom_protection_rule_id, change_custom_protection_rule_compartment_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use change_custom_protection_rule_compartment API.

Moves a custom protection rule into a different compartment within the same tenancy. When provided, If-Match is checked against ETag values of the custom protection rule. For information about moving resources between compartments, see Moving Resources to a Different Compartment.

Parameters:

  • custom_protection_rule_id (String)

    The OCID of the custom protection rule. This number is generated when the custom protection rule is added to the compartment.

  • change_custom_protection_rule_compartment_details (OCI::Waas::Models::ChangeCustomProtectionRuleCompartmentDetails)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    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

  • :if_match (String)

    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 provided matches the resource's current etag value.

  • :opc_request_id (String)

    The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations Example: If a resource has been deleted and purged from the system, then a retry of the original delete request may be rejected.

Returns:

  • (Response)

    A Response object with data of type nil



360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
# File 'lib/oci/waas/waas_client.rb', line 360

def change_custom_protection_rule_compartment(custom_protection_rule_id, change_custom_protection_rule_compartment_details, opts = {})
  logger.debug 'Calling operation WaasClient#change_custom_protection_rule_compartment.' if logger

  raise "Missing the required parameter 'custom_protection_rule_id' when calling change_custom_protection_rule_compartment." if custom_protection_rule_id.nil?
  raise "Missing the required parameter 'change_custom_protection_rule_compartment_details' when calling change_custom_protection_rule_compartment." if change_custom_protection_rule_compartment_details.nil?
  raise "Parameter value for 'custom_protection_rule_id' must not be blank" if OCI::Internal::Util.blank_string?(custom_protection_rule_id)

  path = '/customProtectionRules/{customProtectionRuleId}/actions/changeCompartment'.sub('{customProtectionRuleId}', custom_protection_rule_id.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[:'if-match'] = opts[:if_match] if opts[:if_match]
  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]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(change_custom_protection_rule_compartment_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'WaasClient#change_custom_protection_rule_compartment') do
    @api_client.call_api(
      :POST,
      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

#change_waas_policy_compartment(waas_policy_id, change_waas_policy_compartment_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use change_waas_policy_compartment API.

Moves WAAS policy into a different compartment. When provided, If-Match is checked against ETag values of the WAAS policy. For information about moving resources between compartments, see Moving Resources to a Different Compartment.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    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

  • :if_match (String)

    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 provided matches the resource's current etag value.

  • :opc_request_id (String)

    The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations Example: If a resource has been deleted and purged from the system, then a retry of the original delete request may be rejected.

Returns:

  • (Response)

    A Response object with data of type nil



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
459
460
461
462
# File 'lib/oci/waas/waas_client.rb', line 423

def change_waas_policy_compartment(waas_policy_id, change_waas_policy_compartment_details, opts = {})
  logger.debug 'Calling operation WaasClient#change_waas_policy_compartment.' if logger

  raise "Missing the required parameter 'waas_policy_id' when calling change_waas_policy_compartment." if waas_policy_id.nil?
  raise "Missing the required parameter 'change_waas_policy_compartment_details' when calling change_waas_policy_compartment." if change_waas_policy_compartment_details.nil?
  raise "Parameter value for 'waas_policy_id' must not be blank" if OCI::Internal::Util.blank_string?(waas_policy_id)

  path = '/waasPolicies/{waasPolicyId}/actions/changeCompartment'.sub('{waasPolicyId}', waas_policy_id.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[:'if-match'] = opts[:if_match] if opts[:if_match]
  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]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(change_waas_policy_compartment_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'WaasClient#change_waas_policy_compartment') do
    @api_client.call_api(
      :POST,
      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

#create_address_list(create_address_list_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use create_address_list API.

Creates an address list in a set compartment and allows it to be used in a WAAS policy and referenced by access rules. Addresses can be IP addresses and CIDR notations.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    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

  • :opc_request_id (String)

    The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations Example: If a resource has been deleted and purged from the system, then a retry of the original delete request may be rejected.

Returns:



482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
# File 'lib/oci/waas/waas_client.rb', line 482

def create_address_list(create_address_list_details, opts = {})
  logger.debug 'Calling operation WaasClient#create_address_list.' if logger

  raise "Missing the required parameter 'create_address_list_details' when calling create_address_list." if create_address_list_details.nil?

  path = '/addressLists'
  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]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(create_address_list_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'WaasClient#create_address_list') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Waas::Models::AddressList'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#create_certificate(create_certificate_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use create_certificate API.

Allows an SSL certificate to be added to a WAAS policy. The Web Application Firewall terminates SSL connections to inspect requests in runtime, and then re-encrypts requests before sending them to the origin for fulfillment.

For more information, see WAF Settings.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    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

  • :opc_request_id (String)

    The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations Example: If a resource has been deleted and purged from the system, then a retry of the original delete request may be rejected.

Returns:



541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
# File 'lib/oci/waas/waas_client.rb', line 541

def create_certificate(create_certificate_details, opts = {})
  logger.debug 'Calling operation WaasClient#create_certificate.' if logger

  raise "Missing the required parameter 'create_certificate_details' when calling create_certificate." if create_certificate_details.nil?

  path = '/certificates'
  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]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(create_certificate_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'WaasClient#create_certificate') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Waas::Models::Certificate'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#create_custom_protection_rule(create_custom_protection_rule_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use create_custom_protection_rule API.

Creates a new custom protection rule in the specified compartment.

Custom protection rules allow you to create rules in addition to the rulesets provided by the Web Application Firewall service, including rules from ModSecurity. The syntax for custom rules is based on the ModSecurity syntax. For more information about custom protection rules, see Custom Protection Rules.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    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

  • :opc_request_id (String)

    The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations Example: If a resource has been deleted and purged from the system, then a retry of the original delete request may be rejected.

Returns:



600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
# File 'lib/oci/waas/waas_client.rb', line 600

def create_custom_protection_rule(create_custom_protection_rule_details, opts = {})
  logger.debug 'Calling operation WaasClient#create_custom_protection_rule.' if logger

  raise "Missing the required parameter 'create_custom_protection_rule_details' when calling create_custom_protection_rule." if create_custom_protection_rule_details.nil?

  path = '/customProtectionRules'
  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]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(create_custom_protection_rule_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'WaasClient#create_custom_protection_rule') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Waas::Models::CustomProtectionRule'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#create_waas_policy(create_waas_policy_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use create_waas_policy API.

Creates a new Web Application Acceleration and Security (WAAS) policy in the specified compartment. A WAAS policy must be established before creating Web Application Firewall (WAF) rules. To use WAF rules, your web application's origin servers must defined in the WaasPolicy schema.

A domain name must be specified when creating a WAAS policy. The domain name should be different from the origins specified in your WaasPolicy. Once domain name is entered and stored, it is unchangeable.

Use the record data returned in the cname field of the WaasPolicy object to create a CNAME record in your DNS configuration that will direct your domain's traffic through the WAF.

For the purposes of access control, you must provide the OCID of the compartment where you want the service to reside. For information about access control and compartments, see Overview of the IAM Service.

You must specify a display name and domain for the WAAS policy. The display name does not have to be unique and can be changed. The domain name should be different from every origin specified in WaasPolicy.

All Oracle Cloud Infrastructure resources, including WAAS policies, receive a unique, Oracle-assigned ID called an Oracle Cloud Identifier (OCID). When a resource is created, you can find its OCID in the response. You can also retrieve a resource's OCID by using a list API operation for that resource type, or by viewing the resource in the Console. Fore more information, see Resource Identifiers.

Note: After sending the POST request, the new object's state will temporarily be CREATING. Ensure that the resource's state has changed to ACTIVE before use.

Parameters:

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    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

  • :opc_request_id (String)

    The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations Example: If a resource has been deleted and purged from the system, then a retry of the original delete request may be rejected.

Returns:

  • (Response)

    A Response object with data of type nil



669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
# File 'lib/oci/waas/waas_client.rb', line 669

def create_waas_policy(create_waas_policy_details, opts = {})
  logger.debug 'Calling operation WaasClient#create_waas_policy.' if logger

  raise "Missing the required parameter 'create_waas_policy_details' when calling create_waas_policy." if create_waas_policy_details.nil?

  path = '/waasPolicies'
  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]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(create_waas_policy_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'WaasClient#create_waas_policy') do
    @api_client.call_api(
      :POST,
      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

#delete_address_list(address_list_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use delete_address_list API.

Deletes the address list from the compartment if it is not used.

Parameters:

  • address_list_id (String)

    The OCID of the address list. This number is generated when the address list is added to the compartment.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    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

  • :opc_request_id (String)

    The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations Example: If a resource has been deleted and purged from the system, then a retry of the original delete request may be rejected.

  • :if_match (String)

    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 provided matches the resource's current etag value.

Returns:

  • (Response)

    A Response object with data of type nil



726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
# File 'lib/oci/waas/waas_client.rb', line 726

def delete_address_list(address_list_id, opts = {})
  logger.debug 'Calling operation WaasClient#delete_address_list.' if logger

  raise "Missing the required parameter 'address_list_id' when calling delete_address_list." if address_list_id.nil?
  raise "Parameter value for 'address_list_id' must not be blank" if OCI::Internal::Util.blank_string?(address_list_id)

  path = '/addressLists/{addressListId}'.sub('{addressListId}', address_list_id.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 = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'WaasClient#delete_address_list') 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
  # rubocop:enable Metrics/BlockLength
end

#delete_certificate(certificate_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use delete_certificate API.

Deletes an SSL certificate from the WAAS service.

Parameters:

  • certificate_id (String)

    The OCID of the SSL certificate used in the WAAS policy. This number is generated when the certificate is added to the policy.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    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

  • :opc_request_id (String)

    The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations Example: If a resource has been deleted and purged from the system, then a retry of the original delete request may be rejected.

  • :if_match (String)

    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 provided matches the resource's current etag value.

Returns:

  • (Response)

    A Response object with data of type nil



785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
# File 'lib/oci/waas/waas_client.rb', line 785

def delete_certificate(certificate_id, opts = {})
  logger.debug 'Calling operation WaasClient#delete_certificate.' if logger

  raise "Missing the required parameter 'certificate_id' when calling delete_certificate." if certificate_id.nil?
  raise "Parameter value for 'certificate_id' must not be blank" if OCI::Internal::Util.blank_string?(certificate_id)

  path = '/certificates/{certificateId}'.sub('{certificateId}', certificate_id.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 = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'WaasClient#delete_certificate') 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
  # rubocop:enable Metrics/BlockLength
end

#delete_custom_protection_rule(custom_protection_rule_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use delete_custom_protection_rule API.

Deletes a Custom Protection rule.

Parameters:

  • custom_protection_rule_id (String)

    The OCID of the custom protection rule. This number is generated when the custom protection rule is added to the compartment.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    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

  • :opc_request_id (String)

    The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations Example: If a resource has been deleted and purged from the system, then a retry of the original delete request may be rejected.

  • :if_match (String)

    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 provided matches the resource's current etag value.

Returns:

  • (Response)

    A Response object with data of type nil



844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
# File 'lib/oci/waas/waas_client.rb', line 844

def delete_custom_protection_rule(custom_protection_rule_id, opts = {})
  logger.debug 'Calling operation WaasClient#delete_custom_protection_rule.' if logger

  raise "Missing the required parameter 'custom_protection_rule_id' when calling delete_custom_protection_rule." if custom_protection_rule_id.nil?
  raise "Parameter value for 'custom_protection_rule_id' must not be blank" if OCI::Internal::Util.blank_string?(custom_protection_rule_id)

  path = '/customProtectionRules/{customProtectionRuleId}'.sub('{customProtectionRuleId}', custom_protection_rule_id.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 = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'WaasClient#delete_custom_protection_rule') 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
  # rubocop:enable Metrics/BlockLength
end

#delete_waas_policy(waas_policy_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use delete_waas_policy API.

Deletes a policy.

Parameters:

  • waas_policy_id (String)

    The OCID of the WAAS policy.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    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

  • :opc_request_id (String)

    The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations Example: If a resource has been deleted and purged from the system, then a retry of the original delete request may be rejected.

  • :if_match (String)

    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 provided matches the resource's current etag value.

Returns:

  • (Response)

    A Response object with data of type nil



903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
# File 'lib/oci/waas/waas_client.rb', line 903

def delete_waas_policy(waas_policy_id, opts = {})
  logger.debug 'Calling operation WaasClient#delete_waas_policy.' if logger

  raise "Missing the required parameter 'waas_policy_id' when calling delete_waas_policy." if waas_policy_id.nil?
  raise "Parameter value for 'waas_policy_id' must not be blank" if OCI::Internal::Util.blank_string?(waas_policy_id)

  path = '/waasPolicies/{waasPolicyId}'.sub('{waasPolicyId}', waas_policy_id.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 = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'WaasClient#delete_waas_policy') 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
  # rubocop:enable Metrics/BlockLength
end

#get_address_list(address_list_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use get_address_list API.

Gets the details of an address list.

Parameters:

  • address_list_id (String)

    The OCID of the address list. This number is generated when the address list is added to the compartment.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    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

  • :opc_request_id (String)

    The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

Returns:



959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
# File 'lib/oci/waas/waas_client.rb', line 959

def get_address_list(address_list_id, opts = {})
  logger.debug 'Calling operation WaasClient#get_address_list.' if logger

  raise "Missing the required parameter 'address_list_id' when calling get_address_list." if address_list_id.nil?
  raise "Parameter value for 'address_list_id' must not be blank" if OCI::Internal::Util.blank_string?(address_list_id)

  path = '/addressLists/{addressListId}'.sub('{addressListId}', address_list_id.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]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'WaasClient#get_address_list') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Waas::Models::AddressList'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_certificate(certificate_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use get_certificate API.

Gets the details of an SSL certificate.

Parameters:

  • certificate_id (String)

    The OCID of the SSL certificate used in the WAAS policy. This number is generated when the certificate is added to the policy.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    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

  • :opc_request_id (String)

    The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

Returns:



1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
# File 'lib/oci/waas/waas_client.rb', line 1013

def get_certificate(certificate_id, opts = {})
  logger.debug 'Calling operation WaasClient#get_certificate.' if logger

  raise "Missing the required parameter 'certificate_id' when calling get_certificate." if certificate_id.nil?
  raise "Parameter value for 'certificate_id' must not be blank" if OCI::Internal::Util.blank_string?(certificate_id)

  path = '/certificates/{certificateId}'.sub('{certificateId}', certificate_id.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]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'WaasClient#get_certificate') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Waas::Models::Certificate'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_custom_protection_rule(custom_protection_rule_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use get_custom_protection_rule API.

Gets the details of a custom protection rule.

Parameters:

  • custom_protection_rule_id (String)

    The OCID of the custom protection rule. This number is generated when the custom protection rule is added to the compartment.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    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

  • :opc_request_id (String)

    The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

Returns:



1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
# File 'lib/oci/waas/waas_client.rb', line 1067

def get_custom_protection_rule(custom_protection_rule_id, opts = {})
  logger.debug 'Calling operation WaasClient#get_custom_protection_rule.' if logger

  raise "Missing the required parameter 'custom_protection_rule_id' when calling get_custom_protection_rule." if custom_protection_rule_id.nil?
  raise "Parameter value for 'custom_protection_rule_id' must not be blank" if OCI::Internal::Util.blank_string?(custom_protection_rule_id)

  path = '/customProtectionRules/{customProtectionRuleId}'.sub('{customProtectionRuleId}', custom_protection_rule_id.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]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'WaasClient#get_custom_protection_rule') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Waas::Models::CustomProtectionRule'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_device_fingerprint_challenge(waas_policy_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use get_device_fingerprint_challenge API.

Gets the device fingerprint challenge settings in the Web Application Firewall configuration for a WAAS policy.

Parameters:

  • waas_policy_id (String)

    The OCID of the WAAS policy.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    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

  • :opc_request_id (String)

    The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

Returns:



1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
# File 'lib/oci/waas/waas_client.rb', line 1121

def get_device_fingerprint_challenge(waas_policy_id, opts = {})
  logger.debug 'Calling operation WaasClient#get_device_fingerprint_challenge.' if logger

  raise "Missing the required parameter 'waas_policy_id' when calling get_device_fingerprint_challenge." if waas_policy_id.nil?
  raise "Parameter value for 'waas_policy_id' must not be blank" if OCI::Internal::Util.blank_string?(waas_policy_id)

  path = '/waasPolicies/{waasPolicyId}/wafConfig/deviceFingerprintChallenge'.sub('{waasPolicyId}', waas_policy_id.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]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'WaasClient#get_device_fingerprint_challenge') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Waas::Models::DeviceFingerprintChallenge'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_human_interaction_challenge(waas_policy_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use get_human_interaction_challenge API.

Gets the human interaction challenge settings in the Web Application Firewall configuration for a WAAS policy.

Parameters:

  • waas_policy_id (String)

    The OCID of the WAAS policy.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    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

  • :opc_request_id (String)

    The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

Returns:



1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
# File 'lib/oci/waas/waas_client.rb', line 1175

def get_human_interaction_challenge(waas_policy_id, opts = {})
  logger.debug 'Calling operation WaasClient#get_human_interaction_challenge.' if logger

  raise "Missing the required parameter 'waas_policy_id' when calling get_human_interaction_challenge." if waas_policy_id.nil?
  raise "Parameter value for 'waas_policy_id' must not be blank" if OCI::Internal::Util.blank_string?(waas_policy_id)

  path = '/waasPolicies/{waasPolicyId}/wafConfig/humanInteractionChallenge'.sub('{waasPolicyId}', waas_policy_id.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]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'WaasClient#get_human_interaction_challenge') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Waas::Models::HumanInteractionChallenge'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_js_challenge(waas_policy_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use get_js_challenge API.

Gets the JavaScript challenge settings in the Web Application Firewall configuration for a WAAS policy.

Parameters:

  • waas_policy_id (String)

    The OCID of the WAAS policy.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    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

  • :opc_request_id (String)

    The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

Returns:



1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
# File 'lib/oci/waas/waas_client.rb', line 1229

def get_js_challenge(waas_policy_id, opts = {})
  logger.debug 'Calling operation WaasClient#get_js_challenge.' if logger

  raise "Missing the required parameter 'waas_policy_id' when calling get_js_challenge." if waas_policy_id.nil?
  raise "Parameter value for 'waas_policy_id' must not be blank" if OCI::Internal::Util.blank_string?(waas_policy_id)

  path = '/waasPolicies/{waasPolicyId}/wafConfig/jsChallenge'.sub('{waasPolicyId}', waas_policy_id.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]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'WaasClient#get_js_challenge') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Waas::Models::JsChallenge'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_policy_config(waas_policy_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use get_policy_config API.

Gets the configuration of a WAAS policy.

Parameters:

  • waas_policy_id (String)

    The OCID of the WAAS policy.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    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

  • :opc_request_id (String)

    The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

Returns:



1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
# File 'lib/oci/waas/waas_client.rb', line 1283

def get_policy_config(waas_policy_id, opts = {})
  logger.debug 'Calling operation WaasClient#get_policy_config.' if logger

  raise "Missing the required parameter 'waas_policy_id' when calling get_policy_config." if waas_policy_id.nil?
  raise "Parameter value for 'waas_policy_id' must not be blank" if OCI::Internal::Util.blank_string?(waas_policy_id)

  path = '/waasPolicies/{waasPolicyId}/policyConfig'.sub('{waasPolicyId}', waas_policy_id.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]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'WaasClient#get_policy_config') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Waas::Models::PolicyConfig'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_protection_rule(waas_policy_id, protection_rule_key, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use get_protection_rule API.

Gets the details of a protection rule in the Web Application Firewall configuration for a WAAS policy.

Parameters:

  • waas_policy_id (String)

    The OCID of the WAAS policy.

  • protection_rule_key (String)

    The protection rule key.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    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

  • :opc_request_id (String)

    The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

Returns:



1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
# File 'lib/oci/waas/waas_client.rb', line 1338

def get_protection_rule(waas_policy_id, protection_rule_key, opts = {})
  logger.debug 'Calling operation WaasClient#get_protection_rule.' if logger

  raise "Missing the required parameter 'waas_policy_id' when calling get_protection_rule." if waas_policy_id.nil?
  raise "Missing the required parameter 'protection_rule_key' when calling get_protection_rule." if protection_rule_key.nil?
  raise "Parameter value for 'waas_policy_id' must not be blank" if OCI::Internal::Util.blank_string?(waas_policy_id)
  raise "Parameter value for 'protection_rule_key' must not be blank" if OCI::Internal::Util.blank_string?(protection_rule_key)

  path = '/waasPolicies/{waasPolicyId}/wafConfig/protectionRules/{protectionRuleKey}'.sub('{waasPolicyId}', waas_policy_id.to_s).sub('{protectionRuleKey}', protection_rule_key.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]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'WaasClient#get_protection_rule') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Waas::Models::ProtectionRule'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_protection_settings(waas_policy_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use get_protection_settings API.

Gets the protection settings in the Web Application Firewall configuration for a WAAS policy.

Parameters:

  • waas_policy_id (String)

    The OCID of the WAAS policy.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    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

  • :opc_request_id (String)

    The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

Returns:



1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
# File 'lib/oci/waas/waas_client.rb', line 1394

def get_protection_settings(waas_policy_id, opts = {})
  logger.debug 'Calling operation WaasClient#get_protection_settings.' if logger

  raise "Missing the required parameter 'waas_policy_id' when calling get_protection_settings." if waas_policy_id.nil?
  raise "Parameter value for 'waas_policy_id' must not be blank" if OCI::Internal::Util.blank_string?(waas_policy_id)

  path = '/waasPolicies/{waasPolicyId}/wafConfig/protectionSettings'.sub('{waasPolicyId}', waas_policy_id.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]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'WaasClient#get_protection_settings') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Waas::Models::ProtectionSettings'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_waas_policy(waas_policy_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use get_waas_policy API.

Gets the details of a WAAS policy.

Parameters:

  • waas_policy_id (String)

    The OCID of the WAAS policy.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    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

  • :opc_request_id (String)

    The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

Returns:



1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
# File 'lib/oci/waas/waas_client.rb', line 1448

def get_waas_policy(waas_policy_id, opts = {})
  logger.debug 'Calling operation WaasClient#get_waas_policy.' if logger

  raise "Missing the required parameter 'waas_policy_id' when calling get_waas_policy." if waas_policy_id.nil?
  raise "Parameter value for 'waas_policy_id' must not be blank" if OCI::Internal::Util.blank_string?(waas_policy_id)

  path = '/waasPolicies/{waasPolicyId}'.sub('{waasPolicyId}', waas_policy_id.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]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'WaasClient#get_waas_policy') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Waas::Models::WaasPolicy'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_waf_address_rate_limiting(waas_policy_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use get_waf_address_rate_limiting API.

Gets the address rate limiting settings of the Web Application Firewall configuration for a WAAS policy.

Parameters:

  • waas_policy_id (String)

    The OCID of the WAAS policy.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    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

  • :opc_request_id (String)

    The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

Returns:



1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
# File 'lib/oci/waas/waas_client.rb', line 1502

def get_waf_address_rate_limiting(waas_policy_id, opts = {})
  logger.debug 'Calling operation WaasClient#get_waf_address_rate_limiting.' if logger

  raise "Missing the required parameter 'waas_policy_id' when calling get_waf_address_rate_limiting." if waas_policy_id.nil?
  raise "Parameter value for 'waas_policy_id' must not be blank" if OCI::Internal::Util.blank_string?(waas_policy_id)

  path = '/waasPolicies/{waasPolicyId}/wafConfig/addressRateLimiting'.sub('{waasPolicyId}', waas_policy_id.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]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'WaasClient#get_waf_address_rate_limiting') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Waas::Models::AddressRateLimiting'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_waf_config(waas_policy_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use get_waf_config API.

Gets the Web Application Firewall configuration details for a WAAS policy.

Parameters:

  • waas_policy_id (String)

    The OCID of the WAAS policy.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    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

  • :opc_request_id (String)

    The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

Returns:



1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
# File 'lib/oci/waas/waas_client.rb', line 1556

def get_waf_config(waas_policy_id, opts = {})
  logger.debug 'Calling operation WaasClient#get_waf_config.' if logger

  raise "Missing the required parameter 'waas_policy_id' when calling get_waf_config." if waas_policy_id.nil?
  raise "Parameter value for 'waas_policy_id' must not be blank" if OCI::Internal::Util.blank_string?(waas_policy_id)

  path = '/waasPolicies/{waasPolicyId}/wafConfig'.sub('{waasPolicyId}', waas_policy_id.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]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'WaasClient#get_waf_config') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Waas::Models::WafConfig'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#get_work_request(work_request_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use get_work_request API.

Gets the details of a specified work request.

Parameters:

  • work_request_id (String)

    The OCID of the work request. This number is generated when work request is created.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    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

  • :opc_request_id (String)

    The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

Returns:



1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
# File 'lib/oci/waas/waas_client.rb', line 1610

def get_work_request(work_request_id, opts = {})
  logger.debug 'Calling operation WaasClient#get_work_request.' if logger

  raise "Missing the required parameter 'work_request_id' when calling get_work_request." if work_request_id.nil?
  raise "Parameter value for 'work_request_id' must not be blank" if OCI::Internal::Util.blank_string?(work_request_id)

  path = '/workRequests/{workRequestId}'.sub('{workRequestId}', work_request_id.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]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'WaasClient#get_work_request') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Waas::Models::WorkRequest'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_access_rules(waas_policy_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use list_access_rules API.

Gets the currently configured access rules for the Web Application Firewall configuration of a specified WAAS policy. The order of the access rules is important. The rules will be checked in the order they are specified and the first matching rule will be used.

Parameters:

  • waas_policy_id (String)

    The OCID of the WAAS policy.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    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

  • :opc_request_id (String)

    The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

  • :limit (Integer)

    The maximum number of items to return in a paginated call. If unspecified, defaults to 10. (default to 10)

  • :page (String)

    The value of the opc-next-page response header from the previous paginated call.

Returns:



1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
# File 'lib/oci/waas/waas_client.rb', line 1667

def list_access_rules(waas_policy_id, opts = {})
  logger.debug 'Calling operation WaasClient#list_access_rules.' if logger

  raise "Missing the required parameter 'waas_policy_id' when calling list_access_rules." if waas_policy_id.nil?
  raise "Parameter value for 'waas_policy_id' must not be blank" if OCI::Internal::Util.blank_string?(waas_policy_id)

  path = '/waasPolicies/{waasPolicyId}/wafConfig/accessRules'.sub('{waasPolicyId}', waas_policy_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]

  # 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]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'WaasClient#list_access_rules') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'Array<OCI::Waas::Models::AccessRule>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_address_lists(compartment_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use list_address_lists API.

Gets a list of address lists that can be used in a WAAS policy.

Parameters:

  • compartment_id (String)

    The OCID of the compartment. This number is generated when the compartment is created.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    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

  • :opc_request_id (String)

    The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

  • :limit (Integer)

    The maximum number of items to return in a paginated call. If unspecified, defaults to 10. (default to 10)

  • :page (String)

    The value of the opc-next-page response header from the previous paginated call.

  • :sort_by (String)

    The value by which address lists are sorted in a paginated 'List' call. If unspecified, defaults to timeCreated. Allowed values are: id, name, timeCreated

  • :sort_order (String)

    The value of the sorting direction of resources in a paginated 'List' call. If unspecified, defaults to DESC. Allowed values are: ASC, DESC

  • :id (Array<String>)

    Filter address lists using a list of address lists OCIDs.

  • :name (Array<String>)

    Filter address lists using a list of names.

  • :lifecycle_state (Array<String>)

    Filter address lists using a list of lifecycle states. Allowed values are: CREATING, ACTIVE, FAILED, UPDATING, DELETING, DELETED

  • :time_created_greater_than_or_equal_to (DateTime)

    A filter that matches address lists created on or after the specified date-time.

  • :time_created_less_than (DateTime)

    A filter that matches address lists created before the specified date-time.

Returns:



1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
# File 'lib/oci/waas/waas_client.rb', line 1735

def list_address_lists(compartment_id, opts = {})
  logger.debug 'Calling operation WaasClient#list_address_lists.' if logger

  raise "Missing the required parameter 'compartment_id' when calling list_address_lists." if compartment_id.nil?

  if opts[:sort_by] && !%w[id name timeCreated].include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of id, name, timeCreated.'
  end

  if opts[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of ASC, DESC.'
  end


  lifecycle_state_allowable_values = %w[CREATING ACTIVE FAILED UPDATING DELETING DELETED]
  if opts[:lifecycle_state] && !opts[:lifecycle_state].empty?
    opts[:lifecycle_state].each do |val_to_check|
      unless lifecycle_state_allowable_values.include?(val_to_check)
        raise 'Invalid value for "lifecycle_state", must be one of CREATING, ACTIVE, FAILED, UPDATING, DELETING, DELETED.'
      end
    end
  end

  path = '/addressLists'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:id] = OCI::ApiClient.build_collection_params(opts[:id], :multi) if opts[:id] && !opts[:id].empty?
  query_params[:name] = OCI::ApiClient.build_collection_params(opts[:name], :multi) if opts[:name] && !opts[:name].empty?
  query_params[:lifecycleState] = OCI::ApiClient.build_collection_params(opts[:lifecycle_state], :multi) if opts[:lifecycle_state] && !opts[:lifecycle_state].empty?
  query_params[:timeCreatedGreaterThanOrEqualTo] = opts[:time_created_greater_than_or_equal_to] if opts[:time_created_greater_than_or_equal_to]
  query_params[:timeCreatedLessThan] = opts[:time_created_less_than] if opts[:time_created_less_than]

  # 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]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'WaasClient#list_address_lists') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'Array<OCI::Waas::Models::AddressListSummary>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_caching_rules(waas_policy_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use list_caching_rules API.

Gets the currently configured caching rules for the Web Application Firewall configuration of a specified WAAS policy. The rules are processed in the order they are specified in and the first matching rule will be used when processing a request.

Parameters:

  • waas_policy_id (String)

    The OCID of the WAAS policy.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    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

  • :opc_request_id (String)

    The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

  • :limit (Integer)

    The maximum number of items to return in a paginated call. If unspecified, defaults to 10. (default to 10)

  • :page (String)

    The value of the opc-next-page response header from the previous paginated call.

Returns:



1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
# File 'lib/oci/waas/waas_client.rb', line 1819

def list_caching_rules(waas_policy_id, opts = {})
  logger.debug 'Calling operation WaasClient#list_caching_rules.' if logger

  raise "Missing the required parameter 'waas_policy_id' when calling list_caching_rules." if waas_policy_id.nil?
  raise "Parameter value for 'waas_policy_id' must not be blank" if OCI::Internal::Util.blank_string?(waas_policy_id)

  path = '/waasPolicies/{waasPolicyId}/wafConfig/cachingRules'.sub('{waasPolicyId}', waas_policy_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]

  # 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]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'WaasClient#list_caching_rules') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'Array<OCI::Waas::Models::CachingRuleSummary>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_captchas(waas_policy_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use list_captchas API.

Gets the list of currently configured CAPTCHA challenges in the Web Application Firewall configuration of a WAAS policy.

The order of the CAPTCHA challenges is important. The URL for each CAPTCHA will be checked in the order they are created.

Parameters:

  • waas_policy_id (String)

    The OCID of the WAAS policy.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    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

  • :opc_request_id (String)

    The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

  • :limit (Integer)

    The maximum number of items to return in a paginated call. If unspecified, defaults to 10. (default to 10)

  • :page (String)

    The value of the opc-next-page response header from the previous paginated call.

Returns:



1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
# File 'lib/oci/waas/waas_client.rb', line 1882

def list_captchas(waas_policy_id, opts = {})
  logger.debug 'Calling operation WaasClient#list_captchas.' if logger

  raise "Missing the required parameter 'waas_policy_id' when calling list_captchas." if waas_policy_id.nil?
  raise "Parameter value for 'waas_policy_id' must not be blank" if OCI::Internal::Util.blank_string?(waas_policy_id)

  path = '/waasPolicies/{waasPolicyId}/wafConfig/captchas'.sub('{waasPolicyId}', waas_policy_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]

  # 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]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'WaasClient#list_captchas') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'Array<OCI::Waas::Models::Captcha>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_certificates(compartment_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use list_certificates API.

Gets a list of SSL certificates that can be used in a WAAS policy.

Parameters:

  • compartment_id (String)

    The OCID of the compartment. This number is generated when the compartment is created.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    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

  • :opc_request_id (String)

    The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

  • :limit (Integer)

    The maximum number of items to return in a paginated call. If unspecified, defaults to 10. (default to 10)

  • :page (String)

    The value of the opc-next-page response header from the previous paginated call.

  • :sort_by (String)

    The value by which certificate summaries are sorted in a paginated 'List' call. If unspecified, defaults to timeCreated. Allowed values are: id, compartmentId, displayName, notValidAfter, timeCreated

  • :sort_order (String)

    The value of the sorting direction of resources in a paginated 'List' call. If unspecified, defaults to DESC. Allowed values are: ASC, DESC

  • :id (Array<String>)

    Filter certificates using a list of certificates OCIDs.

  • :display_name (Array<String>)

    Filter certificates using a list of display names.

  • :lifecycle_state (Array<String>)

    Filter certificates using a list of lifecycle states. Allowed values are: CREATING, ACTIVE, FAILED, UPDATING, DELETING, DELETED

  • :time_created_greater_than_or_equal_to (DateTime)

    A filter that matches certificates created on or after the specified date-time.

  • :time_created_less_than (DateTime)

    A filter that matches certificates created before the specified date-time.

Returns:



1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
# File 'lib/oci/waas/waas_client.rb', line 1950

def list_certificates(compartment_id, opts = {})
  logger.debug 'Calling operation WaasClient#list_certificates.' if logger

  raise "Missing the required parameter 'compartment_id' when calling list_certificates." if compartment_id.nil?

  if opts[:sort_by] && !%w[id compartmentId displayName notValidAfter timeCreated].include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of id, compartmentId, displayName, notValidAfter, timeCreated.'
  end

  if opts[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of ASC, DESC.'
  end


  lifecycle_state_allowable_values = %w[CREATING ACTIVE FAILED UPDATING DELETING DELETED]
  if opts[:lifecycle_state] && !opts[:lifecycle_state].empty?
    opts[:lifecycle_state].each do |val_to_check|
      unless lifecycle_state_allowable_values.include?(val_to_check)
        raise 'Invalid value for "lifecycle_state", must be one of CREATING, ACTIVE, FAILED, UPDATING, DELETING, DELETED.'
      end
    end
  end

  path = '/certificates'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:id] = OCI::ApiClient.build_collection_params(opts[:id], :multi) if opts[:id] && !opts[:id].empty?
  query_params[:displayName] = OCI::ApiClient.build_collection_params(opts[:display_name], :multi) if opts[:display_name] && !opts[:display_name].empty?
  query_params[:lifecycleState] = OCI::ApiClient.build_collection_params(opts[:lifecycle_state], :multi) if opts[:lifecycle_state] && !opts[:lifecycle_state].empty?
  query_params[:timeCreatedGreaterThanOrEqualTo] = opts[:time_created_greater_than_or_equal_to] if opts[:time_created_greater_than_or_equal_to]
  query_params[:timeCreatedLessThan] = opts[:time_created_less_than] if opts[:time_created_less_than]

  # 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]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'WaasClient#list_certificates') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'Array<OCI::Waas::Models::CertificateSummary>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_custom_protection_rules(compartment_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use list_custom_protection_rules API.

Gets a list of custom protection rules for the specified Web Application Firewall.

Parameters:

  • compartment_id (String)

    The OCID of the compartment. This number is generated when the compartment is created.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    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

  • :opc_request_id (String)

    The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

  • :limit (Integer)

    The maximum number of items to return in a paginated call. If unspecified, defaults to 10. (default to 10)

  • :page (String)

    The value of the opc-next-page response header from the previous paginated call.

  • :sort_by (String)

    The value by which custom protection rules are sorted in a paginated 'List' call. If unspecified, defaults to timeCreated. Allowed values are: id, compartmentId, displayName, modSecurityRuleId, timeCreated

  • :sort_order (String)

    The value of the sorting direction of resources in a paginated 'List' call. If unspecified, defaults to DESC. Allowed values are: ASC, DESC

  • :id (Array<String>)

    Filter custom protection rules using a list of custom protection rule OCIDs.

  • :display_name (Array<String>)

    Filter custom protection rules using a list of display names.

  • :lifecycle_state (Array<String>)

    Filter Custom Protection rules using a list of lifecycle states. Allowed values are: CREATING, ACTIVE, FAILED, UPDATING, DELETING, DELETED

  • :time_created_greater_than_or_equal_to (DateTime)

    A filter that matches Custom Protection rules created on or after the specified date-time.

  • :time_created_less_than (DateTime)

    A filter that matches custom protection rules created before the specified date-time.

Returns:



2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
# File 'lib/oci/waas/waas_client.rb', line 2043

def list_custom_protection_rules(compartment_id, opts = {})
  logger.debug 'Calling operation WaasClient#list_custom_protection_rules.' if logger

  raise "Missing the required parameter 'compartment_id' when calling list_custom_protection_rules." if compartment_id.nil?

  if opts[:sort_by] && !%w[id compartmentId displayName modSecurityRuleId timeCreated].include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of id, compartmentId, displayName, modSecurityRuleId, timeCreated.'
  end

  if opts[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of ASC, DESC.'
  end


  lifecycle_state_allowable_values = %w[CREATING ACTIVE FAILED UPDATING DELETING DELETED]
  if opts[:lifecycle_state] && !opts[:lifecycle_state].empty?
    opts[:lifecycle_state].each do |val_to_check|
      unless lifecycle_state_allowable_values.include?(val_to_check)
        raise 'Invalid value for "lifecycle_state", must be one of CREATING, ACTIVE, FAILED, UPDATING, DELETING, DELETED.'
      end
    end
  end

  path = '/customProtectionRules'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:id] = OCI::ApiClient.build_collection_params(opts[:id], :multi) if opts[:id] && !opts[:id].empty?
  query_params[:displayName] = OCI::ApiClient.build_collection_params(opts[:display_name], :multi) if opts[:display_name] && !opts[:display_name].empty?
  query_params[:lifecycleState] = OCI::ApiClient.build_collection_params(opts[:lifecycle_state], :multi) if opts[:lifecycle_state] && !opts[:lifecycle_state].empty?
  query_params[:timeCreatedGreaterThanOrEqualTo] = opts[:time_created_greater_than_or_equal_to] if opts[:time_created_greater_than_or_equal_to]
  query_params[:timeCreatedLessThan] = opts[:time_created_less_than] if opts[:time_created_less_than]

  # 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]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'WaasClient#list_custom_protection_rules') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'Array<OCI::Waas::Models::CustomProtectionRuleSummary>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_edge_subnets(opts = {}) ⇒ Response

Note:

Click here to see an example of how to use list_edge_subnets API.

Return the list of the tenant's edge node subnets. Use these CIDR blocks to restrict incoming traffic to your origin. These subnets are owned by OCI and forward traffic to customer origins. They are not associated with specific regions or compartments.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    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

  • :opc_request_id (String)

    The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

  • :limit (Integer)

    The maximum number of items to return in a paginated call. If unspecified, defaults to 10. (default to 10)

  • :page (String)

    The value of the opc-next-page response header from the previous paginated call.

  • :sort_by (String)

    The value by which edge node subnets are sorted in a paginated 'List' call. If unspecified, defaults to timeModified. Allowed values are: cidr, region, timeModified

  • :sort_order (String)

    The value of the sorting direction of resources in a paginated 'List' call. If unspecified, defaults to DESC. Allowed values are: ASC, DESC

Returns:



2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
# File 'lib/oci/waas/waas_client.rb', line 2129

def list_edge_subnets(opts = {})
  logger.debug 'Calling operation WaasClient#list_edge_subnets.' if logger


  if opts[:sort_by] && !%w[cidr region timeModified].include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of cidr, region, timeModified.'
  end

  if opts[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of ASC, DESC.'
  end

  path = '/edgeSubnets'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]

  # 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]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'WaasClient#list_edge_subnets') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'Array<OCI::Waas::Models::EdgeSubnet>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_good_bots(waas_policy_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use list_good_bots API.

Gets the list of good bots defined in the Web Application Firewall configuration for a WAAS policy.

The list is sorted by key, in ascending order.

Parameters:

  • waas_policy_id (String)

    The OCID of the WAAS policy.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    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

  • :opc_request_id (String)

    The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

  • :limit (Integer)

    The maximum number of items to return in a paginated call. If unspecified, defaults to 10. (default to 10)

  • :page (String)

    The value of the opc-next-page response header from the previous paginated call.

Returns:



2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
# File 'lib/oci/waas/waas_client.rb', line 2198

def list_good_bots(waas_policy_id, opts = {})
  logger.debug 'Calling operation WaasClient#list_good_bots.' if logger

  raise "Missing the required parameter 'waas_policy_id' when calling list_good_bots." if waas_policy_id.nil?
  raise "Parameter value for 'waas_policy_id' must not be blank" if OCI::Internal::Util.blank_string?(waas_policy_id)

  path = '/waasPolicies/{waasPolicyId}/wafConfig/goodBots'.sub('{waasPolicyId}', waas_policy_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]

  # 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]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'WaasClient#list_good_bots') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'Array<OCI::Waas::Models::GoodBot>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_protection_rules(waas_policy_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use list_protection_rules API.

Gets the list of available protection rules for a WAAS policy. Use the GetWafConfig operation to view a list of currently configured protection rules for the Web Application Firewall, or use the ListRecommendations operation to get a list of recommended protection rules for the Web Application Firewall. The list is sorted by key, in ascending order.

Parameters:

  • waas_policy_id (String)

    The OCID of the WAAS policy.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    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

  • :opc_request_id (String)

    The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

  • :limit (Integer)

    The maximum number of items to return in a paginated call. If unspecified, defaults to 10. (default to 10)

  • :page (String)

    The value of the opc-next-page response header from the previous paginated call.

  • :mod_security_rule_id (Array<String>)

    Filter rules using a list of ModSecurity rule IDs.

  • :action (Array<String>)

    Filter rules using a list of actions. Allowed values are: OFF, DETECT, BLOCK

Returns:



2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
# File 'lib/oci/waas/waas_client.rb', line 2260

def list_protection_rules(waas_policy_id, opts = {})
  logger.debug 'Calling operation WaasClient#list_protection_rules.' if logger

  raise "Missing the required parameter 'waas_policy_id' when calling list_protection_rules." if waas_policy_id.nil?


  action_allowable_values = %w[OFF DETECT BLOCK]
  if opts[:action] && !opts[:action].empty?
    opts[:action].each do |val_to_check|
      unless action_allowable_values.include?(val_to_check)
        raise 'Invalid value for "action", must be one of OFF, DETECT, BLOCK.'
      end
    end
  end
  raise "Parameter value for 'waas_policy_id' must not be blank" if OCI::Internal::Util.blank_string?(waas_policy_id)

  path = '/waasPolicies/{waasPolicyId}/wafConfig/protectionRules'.sub('{waasPolicyId}', waas_policy_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:modSecurityRuleId] = OCI::ApiClient.build_collection_params(opts[:mod_security_rule_id], :multi) if opts[:mod_security_rule_id] && !opts[:mod_security_rule_id].empty?
  query_params[:action] = OCI::ApiClient.build_collection_params(opts[:action], :multi) if opts[:action] && !opts[:action].empty?

  # 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]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'WaasClient#list_protection_rules') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'Array<OCI::Waas::Models::ProtectionRule>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_recommendations(waas_policy_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use list_recommendations API.

Gets the list of recommended Web Application Firewall protection rules.

Use the POST /waasPolicies/{waasPolicyId}/actions/acceptWafConfigRecommendations method to accept recommended Web Application Firewall protection rules. For more information, see {WAF Protection Rules}[https://docs.cloud.oracle.com/iaas/Content/WAF/Tasks/wafprotectionrules.htm]. The list is sorted by key, in ascending order.

Parameters:

  • waas_policy_id (String)

    The OCID of the WAAS policy.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    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

  • :opc_request_id (String)

    The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

  • :recommended_action (String)

    A filter that matches recommended protection rules based on the selected action. If unspecified, rules with any action type are returned. Allowed values are: DETECT, BLOCK

  • :limit (Integer)

    The maximum number of items to return in a paginated call. If unspecified, defaults to 10. (default to 10)

  • :page (String)

    The value of the opc-next-page response header from the previous paginated call.

Returns:



2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
# File 'lib/oci/waas/waas_client.rb', line 2335

def list_recommendations(waas_policy_id, opts = {})
  logger.debug 'Calling operation WaasClient#list_recommendations.' if logger

  raise "Missing the required parameter 'waas_policy_id' when calling list_recommendations." if waas_policy_id.nil?

  if opts[:recommended_action] && !%w[DETECT BLOCK].include?(opts[:recommended_action])
    raise 'Invalid value for "recommended_action", must be one of DETECT, BLOCK.'
  end
  raise "Parameter value for 'waas_policy_id' must not be blank" if OCI::Internal::Util.blank_string?(waas_policy_id)

  path = '/waasPolicies/{waasPolicyId}/wafConfig/recommendations'.sub('{waasPolicyId}', waas_policy_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:recommendedAction] = opts[:recommended_action] if opts[:recommended_action]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]

  # 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]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'WaasClient#list_recommendations') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'Array<OCI::Waas::Models::Recommendation>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_threat_feeds(waas_policy_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use list_threat_feeds API.

Gets the list of available web application threat intelligence feeds and the actions set for each feed. The list is sorted by key, in ascending order.

Parameters:

  • waas_policy_id (String)

    The OCID of the WAAS policy.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    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

  • :opc_request_id (String)

    The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

  • :limit (Integer)

    The maximum number of items to return in a paginated call. If unspecified, defaults to 10. (default to 10)

  • :page (String)

    The value of the opc-next-page response header from the previous paginated call.

Returns:



2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
# File 'lib/oci/waas/waas_client.rb', line 2401

def list_threat_feeds(waas_policy_id, opts = {})
  logger.debug 'Calling operation WaasClient#list_threat_feeds.' if logger

  raise "Missing the required parameter 'waas_policy_id' when calling list_threat_feeds." if waas_policy_id.nil?
  raise "Parameter value for 'waas_policy_id' must not be blank" if OCI::Internal::Util.blank_string?(waas_policy_id)

  path = '/waasPolicies/{waasPolicyId}/wafConfig/threatFeeds'.sub('{waasPolicyId}', waas_policy_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]

  # 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]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'WaasClient#list_threat_feeds') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'Array<OCI::Waas::Models::ThreatFeed>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_waas_policies(compartment_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use list_waas_policies API.

Gets a list of WAAS policies.

Parameters:

  • compartment_id (String)

    The OCID of the compartment. This number is generated when the compartment is created.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    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

  • :opc_request_id (String)

    The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

  • :limit (Integer)

    The maximum number of items to return in a paginated call. If unspecified, defaults to 10. (default to 10)

  • :page (String)

    The value of the opc-next-page response header from the previous paginated call.

  • :sort_by (String)

    The value by which policies are sorted in a paginated 'List' call. If unspecified, defaults to timeCreated. Allowed values are: id, displayName, timeCreated

  • :sort_order (String)

    The value of the sorting direction of resources in a paginated 'List' call. If unspecified, defaults to DESC. Allowed values are: ASC, DESC

  • :id (Array<String>)

    Filter policies using a list of policy OCIDs.

  • :display_name (Array<String>)

    Filter policies using a list of display names.

  • :lifecycle_state (Array<String>)

    Filter policies using a list of lifecycle states. Allowed values are: CREATING, ACTIVE, FAILED, UPDATING, DELETING, DELETED

  • :time_created_greater_than_or_equal_to (DateTime)

    A filter that matches policies created on or after the specified date and time.

  • :time_created_less_than (DateTime)

    A filter that matches policies created before the specified date-time.

Returns:



2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
# File 'lib/oci/waas/waas_client.rb', line 2469

def list_waas_policies(compartment_id, opts = {})
  logger.debug 'Calling operation WaasClient#list_waas_policies.' if logger

  raise "Missing the required parameter 'compartment_id' when calling list_waas_policies." if compartment_id.nil?

  if opts[:sort_by] && !%w[id displayName timeCreated].include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of id, displayName, timeCreated.'
  end

  if opts[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of ASC, DESC.'
  end


  lifecycle_state_allowable_values = %w[CREATING ACTIVE FAILED UPDATING DELETING DELETED]
  if opts[:lifecycle_state] && !opts[:lifecycle_state].empty?
    opts[:lifecycle_state].each do |val_to_check|
      unless lifecycle_state_allowable_values.include?(val_to_check)
        raise 'Invalid value for "lifecycle_state", must be one of CREATING, ACTIVE, FAILED, UPDATING, DELETING, DELETED.'
      end
    end
  end

  path = '/waasPolicies'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:id] = OCI::ApiClient.build_collection_params(opts[:id], :multi) if opts[:id] && !opts[:id].empty?
  query_params[:displayName] = OCI::ApiClient.build_collection_params(opts[:display_name], :multi) if opts[:display_name] && !opts[:display_name].empty?
  query_params[:lifecycleState] = OCI::ApiClient.build_collection_params(opts[:lifecycle_state], :multi) if opts[:lifecycle_state] && !opts[:lifecycle_state].empty?
  query_params[:timeCreatedGreaterThanOrEqualTo] = opts[:time_created_greater_than_or_equal_to] if opts[:time_created_greater_than_or_equal_to]
  query_params[:timeCreatedLessThan] = opts[:time_created_less_than] if opts[:time_created_less_than]

  # 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]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'WaasClient#list_waas_policies') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'Array<OCI::Waas::Models::WaasPolicySummary>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_waas_policy_custom_protection_rules(waas_policy_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use list_waas_policy_custom_protection_rules API.

Gets the list of currently configured custom protection rules for a WAAS policy.

Parameters:

  • waas_policy_id (String)

    The OCID of the WAAS policy.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    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

  • :opc_request_id (String)

    The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

  • :limit (Integer)

    The maximum number of items to return in a paginated call. If unspecified, defaults to 10. (default to 10)

  • :page (String)

    The value of the opc-next-page response header from the previous paginated call.

  • :mod_security_rule_id (Array<String>)

    Filter rules using a list of ModSecurity rule IDs.

  • :action (Array<String>)

    Filter rules using a list of actions. Allowed values are: DETECT, BLOCK

Returns:



2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
# File 'lib/oci/waas/waas_client.rb', line 2555

def list_waas_policy_custom_protection_rules(waas_policy_id, opts = {})
  logger.debug 'Calling operation WaasClient#list_waas_policy_custom_protection_rules.' if logger

  raise "Missing the required parameter 'waas_policy_id' when calling list_waas_policy_custom_protection_rules." if waas_policy_id.nil?


  action_allowable_values = %w[DETECT BLOCK]
  if opts[:action] && !opts[:action].empty?
    opts[:action].each do |val_to_check|
      unless action_allowable_values.include?(val_to_check)
        raise 'Invalid value for "action", must be one of DETECT, BLOCK.'
      end
    end
  end
  raise "Parameter value for 'waas_policy_id' must not be blank" if OCI::Internal::Util.blank_string?(waas_policy_id)

  path = '/waasPolicies/{waasPolicyId}/wafConfig/customProtectionRules'.sub('{waasPolicyId}', waas_policy_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:modSecurityRuleId] = OCI::ApiClient.build_collection_params(opts[:mod_security_rule_id], :multi) if opts[:mod_security_rule_id] && !opts[:mod_security_rule_id].empty?
  query_params[:action] = OCI::ApiClient.build_collection_params(opts[:action], :multi) if opts[:action] && !opts[:action].empty?

  # 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]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'WaasClient#list_waas_policy_custom_protection_rules') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'Array<OCI::Waas::Models::WaasPolicyCustomProtectionRuleSummary>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_waf_blocked_requests(waas_policy_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use list_waf_blocked_requests API.

Gets the number of blocked requests by a Web Application Firewall feature in five minute blocks, sorted by timeObserved in ascending order (starting from oldest data).

Parameters:

  • waas_policy_id (String)

    The OCID of the WAAS policy.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    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

  • :opc_request_id (String)

    The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

  • :time_observed_greater_than_or_equal_to (DateTime)

    A filter that limits returned events to those occurring on or after a date and time, specified in RFC 3339 format. If unspecified, defaults to 30 minutes before receipt of the request.

  • :time_observed_less_than (DateTime)

    A filter that limits returned events to those occurring before a date and time, specified in RFC 3339 format.

  • :limit (Integer)

    The maximum number of items to return in a paginated call. If unspecified, defaults to 10. (default to 10)

  • :page (String)

    The value of the opc-next-page response header from the previous paginated call.

  • :waf_feature (Array<String>)

    Filter stats by the Web Application Firewall feature that triggered the block action. If unspecified, data for all WAF features will be returned. Allowed values are: PROTECTION_RULES, JS_CHALLENGE, ACCESS_RULES, THREAT_FEEDS, HUMAN_INTERACTION_CHALLENGE, DEVICE_FINGERPRINT_CHALLENGE, CAPTCHA, ADDRESS_RATE_LIMITING

Returns:



2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
# File 'lib/oci/waas/waas_client.rb', line 2629

def list_waf_blocked_requests(waas_policy_id, opts = {})
  logger.debug 'Calling operation WaasClient#list_waf_blocked_requests.' if logger

  raise "Missing the required parameter 'waas_policy_id' when calling list_waf_blocked_requests." if waas_policy_id.nil?


  waf_feature_allowable_values = %w[PROTECTION_RULES JS_CHALLENGE ACCESS_RULES THREAT_FEEDS HUMAN_INTERACTION_CHALLENGE DEVICE_FINGERPRINT_CHALLENGE CAPTCHA ADDRESS_RATE_LIMITING]
  if opts[:waf_feature] && !opts[:waf_feature].empty?
    opts[:waf_feature].each do |val_to_check|
      unless waf_feature_allowable_values.include?(val_to_check)
        raise 'Invalid value for "waf_feature", must be one of PROTECTION_RULES, JS_CHALLENGE, ACCESS_RULES, THREAT_FEEDS, HUMAN_INTERACTION_CHALLENGE, DEVICE_FINGERPRINT_CHALLENGE, CAPTCHA, ADDRESS_RATE_LIMITING.'
      end
    end
  end
  raise "Parameter value for 'waas_policy_id' must not be blank" if OCI::Internal::Util.blank_string?(waas_policy_id)

  path = '/waasPolicies/{waasPolicyId}/reports/waf/blocked'.sub('{waasPolicyId}', waas_policy_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:timeObservedGreaterThanOrEqualTo] = opts[:time_observed_greater_than_or_equal_to] if opts[:time_observed_greater_than_or_equal_to]
  query_params[:timeObservedLessThan] = opts[:time_observed_less_than] if opts[:time_observed_less_than]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:wafFeature] = OCI::ApiClient.build_collection_params(opts[:waf_feature], :multi) if opts[:waf_feature] && !opts[:waf_feature].empty?

  # 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]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'WaasClient#list_waf_blocked_requests') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'Array<OCI::Waas::Models::WafBlockedRequest>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_waf_logs(waas_policy_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use list_waf_logs API.

Gets structured Web Application Firewall event logs for a WAAS policy. Sorted by the timeObserved in ascending order (starting from the oldest recorded event).

Parameters:

  • waas_policy_id (String)

    The OCID of the WAAS policy.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    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

  • :opc_request_id (String)

    The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

  • :limit (Integer)

    The maximum number of items to return in a paginated call. If unspecified, defaults to 20. (default to 20)

  • :page (String)

    The value of the opc-next-page response header from the previous paginated call.

  • :time_observed_greater_than_or_equal_to (DateTime)

    A filter that matches log entries where the observed event occurred on or after a date and time specified in RFC 3339 format. If unspecified, defaults to two hours before receipt of the request.

  • :time_observed_less_than (DateTime)

    A filter that matches log entries where the observed event occurred before a date and time, specified in RFC 3339 format.

  • :text_contains (String)

    A full text search for logs.

  • :access_rule_key (Array<String>)

    Filters logs by access rule key.

  • :action (Array<String>)

    Filters logs by Web Application Firewall action. Allowed values are: BLOCK, DETECT, BYPASS, LOG, REDIRECTED

  • :client_address (Array<String>)

    Filters logs by client IP address.

  • :country_code (Array<String>)

    Filters logs by country code. Country codes are in ISO 3166-1 alpha-2 format. For a list of codes, see ISO’s website.

  • :country_name (Array<String>)

    Filter logs by country name.

  • :fingerprint (Array<String>)

    Filter logs by device fingerprint.

  • :http_method (Array<String>)

    Filter logs by HTTP method. Allowed values are: OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, CONNECT

  • :incident_key (Array<String>)

    Filter logs by incident key.

  • :log_type (Array<String>)

    Filter by log type. For more information about WAF logs, see Logs. Allowed values are: ACCESS, PROTECTION_RULES, JS_CHALLENGE, CAPTCHA, ACCESS_RULES, THREAT_FEEDS, HUMAN_INTERACTION_CHALLENGE, DEVICE_FINGERPRINT_CHALLENGE, ADDRESS_RATE_LIMITING

  • :origin_address (Array<String>)

    Filter by origin IP address.

  • :referrer (Array<String>)

    Filter by referrer.

  • :request_url (Array<String>)

    Filter by request URL.

  • :response_code (Array<Integer>)

    Filter by response code.

  • :threat_feed_key (Array<String>)

    Filter by threat feed key.

  • :user_agent (Array<String>)

    Filter by user agent.

  • :protection_rule_key (Array<String>)

    Filter by protection rule key.

Returns:



2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
# File 'lib/oci/waas/waas_client.rb', line 2725

def list_waf_logs(waas_policy_id, opts = {})
  logger.debug 'Calling operation WaasClient#list_waf_logs.' if logger

  raise "Missing the required parameter 'waas_policy_id' when calling list_waf_logs." if waas_policy_id.nil?


  action_allowable_values = %w[BLOCK DETECT BYPASS LOG REDIRECTED]
  if opts[:action] && !opts[:action].empty?
    opts[:action].each do |val_to_check|
      unless action_allowable_values.include?(val_to_check)
        raise 'Invalid value for "action", must be one of BLOCK, DETECT, BYPASS, LOG, REDIRECTED.'
      end
    end
  end


  http_method_allowable_values = %w[OPTIONS GET HEAD POST PUT DELETE TRACE CONNECT]
  if opts[:http_method] && !opts[:http_method].empty?
    opts[:http_method].each do |val_to_check|
      unless http_method_allowable_values.include?(val_to_check)
        raise 'Invalid value for "http_method", must be one of OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, CONNECT.'
      end
    end
  end


  log_type_allowable_values = %w[ACCESS PROTECTION_RULES JS_CHALLENGE CAPTCHA ACCESS_RULES THREAT_FEEDS HUMAN_INTERACTION_CHALLENGE DEVICE_FINGERPRINT_CHALLENGE ADDRESS_RATE_LIMITING]
  if opts[:log_type] && !opts[:log_type].empty?
    opts[:log_type].each do |val_to_check|
      unless log_type_allowable_values.include?(val_to_check)
        raise 'Invalid value for "log_type", must be one of ACCESS, PROTECTION_RULES, JS_CHALLENGE, CAPTCHA, ACCESS_RULES, THREAT_FEEDS, HUMAN_INTERACTION_CHALLENGE, DEVICE_FINGERPRINT_CHALLENGE, ADDRESS_RATE_LIMITING.'
      end
    end
  end
  raise "Parameter value for 'waas_policy_id' must not be blank" if OCI::Internal::Util.blank_string?(waas_policy_id)

  path = '/waasPolicies/{waasPolicyId}/wafLogs'.sub('{waasPolicyId}', waas_policy_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:timeObservedGreaterThanOrEqualTo] = opts[:time_observed_greater_than_or_equal_to] if opts[:time_observed_greater_than_or_equal_to]
  query_params[:timeObservedLessThan] = opts[:time_observed_less_than] if opts[:time_observed_less_than]
  query_params[:textContains] = opts[:text_contains] if opts[:text_contains]
  query_params[:accessRuleKey] = OCI::ApiClient.build_collection_params(opts[:access_rule_key], :multi) if opts[:access_rule_key] && !opts[:access_rule_key].empty?
  query_params[:action] = OCI::ApiClient.build_collection_params(opts[:action], :multi) if opts[:action] && !opts[:action].empty?
  query_params[:clientAddress] = OCI::ApiClient.build_collection_params(opts[:client_address], :multi) if opts[:client_address] && !opts[:client_address].empty?
  query_params[:countryCode] = OCI::ApiClient.build_collection_params(opts[:country_code], :multi) if opts[:country_code] && !opts[:country_code].empty?
  query_params[:countryName] = OCI::ApiClient.build_collection_params(opts[:country_name], :multi) if opts[:country_name] && !opts[:country_name].empty?
  query_params[:fingerprint] = OCI::ApiClient.build_collection_params(opts[:fingerprint], :multi) if opts[:fingerprint] && !opts[:fingerprint].empty?
  query_params[:httpMethod] = OCI::ApiClient.build_collection_params(opts[:http_method], :multi) if opts[:http_method] && !opts[:http_method].empty?
  query_params[:incidentKey] = OCI::ApiClient.build_collection_params(opts[:incident_key], :multi) if opts[:incident_key] && !opts[:incident_key].empty?
  query_params[:logType] = OCI::ApiClient.build_collection_params(opts[:log_type], :multi) if opts[:log_type] && !opts[:log_type].empty?
  query_params[:originAddress] = OCI::ApiClient.build_collection_params(opts[:origin_address], :multi) if opts[:origin_address] && !opts[:origin_address].empty?
  query_params[:referrer] = OCI::ApiClient.build_collection_params(opts[:referrer], :multi) if opts[:referrer] && !opts[:referrer].empty?
  query_params[:requestUrl] = OCI::ApiClient.build_collection_params(opts[:request_url], :multi) if opts[:request_url] && !opts[:request_url].empty?
  query_params[:responseCode] = OCI::ApiClient.build_collection_params(opts[:response_code], :multi) if opts[:response_code] && !opts[:response_code].empty?
  query_params[:threatFeedKey] = OCI::ApiClient.build_collection_params(opts[:threat_feed_key], :multi) if opts[:threat_feed_key] && !opts[:threat_feed_key].empty?
  query_params[:userAgent] = OCI::ApiClient.build_collection_params(opts[:user_agent], :multi) if opts[:user_agent] && !opts[:user_agent].empty?
  query_params[:protectionRuleKey] = OCI::ApiClient.build_collection_params(opts[:protection_rule_key], :multi) if opts[:protection_rule_key] && !opts[:protection_rule_key].empty?

  # 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]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'WaasClient#list_waf_logs') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'Array<OCI::Waas::Models::WafLog>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_waf_requests(waas_policy_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use list_waf_requests API.

Gets the number of requests managed by a Web Application Firewall over a specified period of time, including blocked requests. Sorted by timeObserved in ascending order (starting from oldest requests).

Parameters:

  • waas_policy_id (String)

    The OCID of the WAAS policy.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    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

  • :opc_request_id (String)

    The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

  • :time_observed_greater_than_or_equal_to (DateTime)

    A filter that limits returned events to those occurring on or after a date and time, specified in RFC 3339 format. If unspecified, defaults to 30 minutes before receipt of the request.

  • :time_observed_less_than (DateTime)

    A filter that limits returned events to those occurring before a date and time, specified in RFC 3339 format.

  • :limit (Integer)

    The maximum number of items to return in a paginated call. If unspecified, defaults to 10. (default to 10)

  • :page (String)

    The value of the opc-next-page response header from the previous paginated call.

Returns:



2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
# File 'lib/oci/waas/waas_client.rb', line 2837

def list_waf_requests(waas_policy_id, opts = {})
  logger.debug 'Calling operation WaasClient#list_waf_requests.' if logger

  raise "Missing the required parameter 'waas_policy_id' when calling list_waf_requests." if waas_policy_id.nil?
  raise "Parameter value for 'waas_policy_id' must not be blank" if OCI::Internal::Util.blank_string?(waas_policy_id)

  path = '/waasPolicies/{waasPolicyId}/reports/waf/requests'.sub('{waasPolicyId}', waas_policy_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:timeObservedGreaterThanOrEqualTo] = opts[:time_observed_greater_than_or_equal_to] if opts[:time_observed_greater_than_or_equal_to]
  query_params[:timeObservedLessThan] = opts[:time_observed_less_than] if opts[:time_observed_less_than]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]

  # 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]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'WaasClient#list_waf_requests') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'Array<OCI::Waas::Models::WafRequest>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_waf_traffic(waas_policy_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use list_waf_traffic API.

Gets the Web Application Firewall traffic data for a WAAS policy. Sorted by timeObserved in ascending order (starting from oldest data).

Parameters:

  • waas_policy_id (String)

    The OCID of the WAAS policy.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    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

  • :opc_request_id (String)

    The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

  • :time_observed_greater_than_or_equal_to (DateTime)

    A filter that limits returned events to those occurring on or after a date and time, specified in RFC 3339 format. If unspecified, defaults to 30 minutes before receipt of the request.

  • :time_observed_less_than (DateTime)

    A filter that limits returned events to those occurring before a date and time, specified in RFC 3339 format.

  • :limit (Integer)

    The maximum number of items to return in a paginated call. If unspecified, defaults to 10. (default to 10)

  • :page (String)

    The value of the opc-next-page response header from the previous paginated call.

Returns:



2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
# File 'lib/oci/waas/waas_client.rb', line 2901

def list_waf_traffic(waas_policy_id, opts = {})
  logger.debug 'Calling operation WaasClient#list_waf_traffic.' if logger

  raise "Missing the required parameter 'waas_policy_id' when calling list_waf_traffic." if waas_policy_id.nil?
  raise "Parameter value for 'waas_policy_id' must not be blank" if OCI::Internal::Util.blank_string?(waas_policy_id)

  path = '/waasPolicies/{waasPolicyId}/reports/waf/traffic'.sub('{waasPolicyId}', waas_policy_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:timeObservedGreaterThanOrEqualTo] = opts[:time_observed_greater_than_or_equal_to] if opts[:time_observed_greater_than_or_equal_to]
  query_params[:timeObservedLessThan] = opts[:time_observed_less_than] if opts[:time_observed_less_than]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]

  # 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]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'WaasClient#list_waf_traffic') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'Array<OCI::Waas::Models::WafTrafficDatum>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_whitelists(waas_policy_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use list_whitelists API.

Gets the list of whitelists defined in the Web Application Firewall configuration for a WAAS policy.

Parameters:

  • waas_policy_id (String)

    The OCID of the WAAS policy.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    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

  • :opc_request_id (String)

    The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

  • :limit (Integer)

    The maximum number of items to return in a paginated call. If unspecified, defaults to 10. (default to 10)

  • :page (String)

    The value of the opc-next-page response header from the previous paginated call.

Returns:



2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
# File 'lib/oci/waas/waas_client.rb', line 2961

def list_whitelists(waas_policy_id, opts = {})
  logger.debug 'Calling operation WaasClient#list_whitelists.' if logger

  raise "Missing the required parameter 'waas_policy_id' when calling list_whitelists." if waas_policy_id.nil?
  raise "Parameter value for 'waas_policy_id' must not be blank" if OCI::Internal::Util.blank_string?(waas_policy_id)

  path = '/waasPolicies/{waasPolicyId}/wafConfig/whitelists'.sub('{waasPolicyId}', waas_policy_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]

  # 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]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'WaasClient#list_whitelists') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'Array<OCI::Waas::Models::Whitelist>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#list_work_requests(waas_policy_id, compartment_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use list_work_requests API.

Gets a list of subnets (CIDR notation) from which the WAAS EDGE may make requests. The subnets are owned by OCI and forward traffic to your origins. Allow traffic from these subnets to your origins. They are not associated with specific regions or compartments.

Parameters:

  • waas_policy_id (String)

    The OCID of the policy.

  • compartment_id (String)

    The OCID of the compartment. This number is generated when the compartment is created.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    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

  • :opc_request_id (String)

    The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

  • :limit (Integer)

    The maximum number of items to return in a paginated call. If unspecified, defaults to 10. (default to 10)

  • :page (String)

    The value of the opc-next-page response header from the previous paginated call.

  • :sort_by (String)

    The value by which work requests are sorted in a paginated 'List' call. If unspecified, defaults to timeAccepted. Allowed values are: id, status, timeAccepted, timeStarted, timeFinished, operationType

  • :sort_order (String)

    The value of the sorting direction of resources in a paginated 'List' call. If unspecified, defaults to DESC. Allowed values are: ASC, DESC

Returns:



3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
# File 'lib/oci/waas/waas_client.rb', line 3024

def list_work_requests(waas_policy_id, compartment_id, opts = {})
  logger.debug 'Calling operation WaasClient#list_work_requests.' if logger

  raise "Missing the required parameter 'waas_policy_id' when calling list_work_requests." if waas_policy_id.nil?
  raise "Missing the required parameter 'compartment_id' when calling list_work_requests." if compartment_id.nil?

  if opts[:sort_by] && !%w[id status timeAccepted timeStarted timeFinished operationType].include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of id, status, timeAccepted, timeStarted, timeFinished, operationType.'
  end

  if opts[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of ASC, DESC.'
  end

  path = '/workRequests'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:waasPolicyId] = waas_policy_id
  query_params[:compartmentId] = compartment_id
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]

  # 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]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'WaasClient#list_work_requests') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'Array<OCI::Waas::Models::WorkRequestSummary>'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#loggerLogger

Returns The logger for this client. May be nil.

Returns:

  • (Logger)

    The logger for this client. May be nil.



94
95
96
# File 'lib/oci/waas/waas_client.rb', line 94

def logger
  @api_client.config.logger
end

#purge_cache(waas_policy_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use purge_cache API.

Performs a purge of the cache for each specified resource. If no resources are passed, the cache for the entire Web Application Firewall will be purged. For more information, see Caching Rules.

Parameters:

  • waas_policy_id (String)

    The OCID of the WAAS policy.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    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

  • :opc_request_id (String)

    The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

  • :if_match (String)

    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 provided matches the resource's current etag value.

  • :purge_cache (OCI::Waas::Models::PurgeCache)

Returns:

  • (Response)

    A Response object with data of type nil



3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
# File 'lib/oci/waas/waas_client.rb', line 3095

def purge_cache(waas_policy_id, opts = {})
  logger.debug 'Calling operation WaasClient#purge_cache.' if logger

  raise "Missing the required parameter 'waas_policy_id' when calling purge_cache." if waas_policy_id.nil?
  raise "Parameter value for 'waas_policy_id' must not be blank" if OCI::Internal::Util.blank_string?(waas_policy_id)

  path = '/waasPolicies/{waasPolicyId}/actions/purgeCache'.sub('{waasPolicyId}', waas_policy_id.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[:'if-match'] = opts[:if_match] if opts[:if_match]
  # rubocop:enable Style/NegatedIf

  post_body = @api_client.object_to_http_body(opts[:purge_cache])

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'WaasClient#purge_cache') do
    @api_client.call_api(
      :POST,
      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

#update_access_rules(waas_policy_id, access_rules, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use update_access_rules API.

Updates the list of access rules in the Web Application Firewall configuration for a specified WAAS policy. Access rules allow explicit actions to be defined and executed for requests that meet various conditions. A rule action can be set to allow, detect, or block requests. The detect setting allows the request to pass through the Web Application Firewall and is tagged with a DETECT flag in the Web Application Firewall's log.

This operation can create, delete, update, and/or reorder access rules depending on the structure of the request body.

Access rules can be updated by changing the properties of the access rule object with the rule's key specified in the key field. Access rules can be reordered by changing the order of the access rules in the list when updating.

Access rules can be created by adding a new access rule object to the list without a key property specified. A key will be generated for the new access rule upon update.

Any existing access rules that are not specified with a key in the list of access rules will be deleted upon update.

Parameters:

  • waas_policy_id (String)

    The OCID of the WAAS policy.

  • access_rules (Array<OCI::Waas::Models::OCI::Waas::Models::AccessRule>)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    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

  • :opc_request_id (String)

    The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations Example: If a resource has been deleted and purged from the system, then a retry of the original delete request may be rejected.

  • :if_match (String)

    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 provided matches the resource's current etag value.

Returns:

  • (Response)

    A Response object with data of type nil



3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
# File 'lib/oci/waas/waas_client.rb', line 3161

def update_access_rules(waas_policy_id, access_rules, opts = {})
  logger.debug 'Calling operation WaasClient#update_access_rules.' if logger

  raise "Missing the required parameter 'waas_policy_id' when calling update_access_rules." if waas_policy_id.nil?
  raise "Missing the required parameter 'access_rules' when calling update_access_rules." if access_rules.nil?
  raise "Parameter value for 'waas_policy_id' must not be blank" if OCI::Internal::Util.blank_string?(waas_policy_id)

  path = '/waasPolicies/{waasPolicyId}/wafConfig/accessRules'.sub('{waasPolicyId}', waas_policy_id.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(access_rules)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'WaasClient#update_access_rules') 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

#update_address_list(address_list_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use update_address_list API.

Updates the details of an address list. Only the fields specified in the request body will be updated; all other properties will remain unchanged.

Parameters:

  • address_list_id (String)

    The OCID of the address list. This number is generated when the address list is added to the compartment.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    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

  • :opc_request_id (String)

    The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

  • :if_match (String)

    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 provided matches the resource's current etag value.

  • :update_address_list_details (OCI::Waas::Models::UpdateAddressListDetails)

    The details of the address list to update.

Returns:



3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
# File 'lib/oci/waas/waas_client.rb', line 3220

def update_address_list(address_list_id, opts = {})
  logger.debug 'Calling operation WaasClient#update_address_list.' if logger

  raise "Missing the required parameter 'address_list_id' when calling update_address_list." if address_list_id.nil?
  raise "Parameter value for 'address_list_id' must not be blank" if OCI::Internal::Util.blank_string?(address_list_id)

  path = '/addressLists/{addressListId}'.sub('{addressListId}', address_list_id.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[:'if-match'] = opts[:if_match] if opts[:if_match]
  # rubocop:enable Style/NegatedIf

  post_body = @api_client.object_to_http_body(opts[:update_address_list_details])

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'WaasClient#update_address_list') 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,
      return_type: 'OCI::Waas::Models::AddressList'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#update_caching_rules(waas_policy_id, caching_rules_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use update_caching_rules API.

Updates the configuration for each specified caching rule.

Caching rules WAF policies allow you to selectively cache content on Oracle Cloud Infrastructure's edge servers, such as webpages or certain file types. For more information about caching rules, see Caching Rules.

This operation can create, delete, update, and/or reorder caching rules depending on the structure of the request body. Caching rules can be updated by changing the properties of the caching rule object with the rule's key specified in the key field. Any existing caching rules that are not specified with a key in the list of access rules will be deleted upon update.

The order the caching rules are specified in is important. The rules are processed in the order they are specified and the first matching rule will be used when processing a request. Use ListCachingRules to view a list of all available caching rules in a compartment.

Parameters:

  • waas_policy_id (String)

    The OCID of the WAAS policy.

  • caching_rules_details (Array<OCI::Waas::Models::OCI::Waas::Models::CachingRule>)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    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

  • :opc_request_id (String)

    The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations Example: If a resource has been deleted and purged from the system, then a retry of the original delete request may be rejected.

  • :if_match (String)

    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 provided matches the resource's current etag value.

Returns:

  • (Response)

    A Response object with data of type nil



3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
# File 'lib/oci/waas/waas_client.rb', line 3285

def update_caching_rules(waas_policy_id, caching_rules_details, opts = {})
  logger.debug 'Calling operation WaasClient#update_caching_rules.' if logger

  raise "Missing the required parameter 'waas_policy_id' when calling update_caching_rules." if waas_policy_id.nil?
  raise "Missing the required parameter 'caching_rules_details' when calling update_caching_rules." if caching_rules_details.nil?
  raise "Parameter value for 'waas_policy_id' must not be blank" if OCI::Internal::Util.blank_string?(waas_policy_id)

  path = '/waasPolicies/{waasPolicyId}/wafConfig/cachingRules'.sub('{waasPolicyId}', waas_policy_id.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(caching_rules_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'WaasClient#update_caching_rules') 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

#update_captchas(waas_policy_id, captchas, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use update_captchas API.

Updates the list of CAPTCHA challenges in the Web Application Firewall configuration for a WAAS policy. This operation can create, update, or delete CAPTCHAs depending on the structure of the request body. CAPTCHA challenges can be updated by changing the properties of the CAPTCHA object with the rule's key specified in the key field. CAPTCHA challenges can be reordered by changing the order of the CAPTCHA challenges in the list when updating.

CAPTCHA challenges can be created by adding a new access rule object to the list without a key property specified. A key will be generated for the new CAPTCHA challenges upon update.

Any existing CAPTCHA challenges that are not specified with a key in the list of CAPTCHA challenges will be deleted upon update.

Query parameters are allowed in CAPTCHA URL.

Parameters:

  • waas_policy_id (String)

    The OCID of the WAAS policy.

  • captchas (Array<OCI::Waas::Models::OCI::Waas::Models::Captcha>)

    A list of CAPTCHA details.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    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

  • :opc_request_id (String)

    The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations Example: If a resource has been deleted and purged from the system, then a retry of the original delete request may be rejected.

  • :if_match (String)

    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 provided matches the resource's current etag value.

Returns:

  • (Response)

    A Response object with data of type nil



3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
# File 'lib/oci/waas/waas_client.rb', line 3354

def update_captchas(waas_policy_id, captchas, opts = {})
  logger.debug 'Calling operation WaasClient#update_captchas.' if logger

  raise "Missing the required parameter 'waas_policy_id' when calling update_captchas." if waas_policy_id.nil?
  raise "Missing the required parameter 'captchas' when calling update_captchas." if captchas.nil?
  raise "Parameter value for 'waas_policy_id' must not be blank" if OCI::Internal::Util.blank_string?(waas_policy_id)

  path = '/waasPolicies/{waasPolicyId}/wafConfig/captchas'.sub('{waasPolicyId}', waas_policy_id.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(captchas)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'WaasClient#update_captchas') 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

#update_certificate(certificate_id, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use update_certificate API.

It is not possible to update a certificate, only create and delete. Therefore, this operation can only update the display name, freeform tags, and defined tags of a certificate.

Parameters:

  • certificate_id (String)

    The OCID of the SSL certificate used in the WAAS policy. This number is generated when the certificate is added to the policy.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    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

  • :opc_request_id (String)

    The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

  • :if_match (String)

    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 provided matches the resource's current etag value.

  • :update_certificate_details (OCI::Waas::Models::UpdateCertificateDetails)

    The new display name, freeform tags, and defined tags to apply to a certificate.

Returns:



3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
# File 'lib/oci/waas/waas_client.rb', line 3413

def update_certificate(certificate_id, opts = {})
  logger.debug 'Calling operation WaasClient#update_certificate.' if logger

  raise "Missing the required parameter 'certificate_id' when calling update_certificate." if certificate_id.nil?
  raise "Parameter value for 'certificate_id' must not be blank" if OCI::Internal::Util.blank_string?(certificate_id)

  path = '/certificates/{certificateId}'.sub('{certificateId}', certificate_id.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[:'if-match'] = opts[:if_match] if opts[:if_match]
  # rubocop:enable Style/NegatedIf

  post_body = @api_client.object_to_http_body(opts[:update_certificate_details])

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'WaasClient#update_certificate') 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,
      return_type: 'OCI::Waas::Models::Certificate'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#update_custom_protection_rule(custom_protection_rule_id, update_custom_protection_rule_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use update_custom_protection_rule API.

Updates the configuration of a custom protection rule. Only the fields specified in the request body will be updated; all other properties will remain unchanged.

Parameters:

  • custom_protection_rule_id (String)

    The OCID of the custom protection rule. This number is generated when the custom protection rule is added to the compartment.

  • update_custom_protection_rule_details (OCI::Waas::Models::UpdateCustomProtectionRuleDetails)

    The details of the custom protection rule to update.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    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

  • :opc_request_id (String)

    The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations Example: If a resource has been deleted and purged from the system, then a retry of the original delete request may be rejected.

  • :if_match (String)

    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 provided matches the resource's current etag value.

Returns:



3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
# File 'lib/oci/waas/waas_client.rb', line 3472

def update_custom_protection_rule(custom_protection_rule_id, update_custom_protection_rule_details, opts = {})
  logger.debug 'Calling operation WaasClient#update_custom_protection_rule.' if logger

  raise "Missing the required parameter 'custom_protection_rule_id' when calling update_custom_protection_rule." if custom_protection_rule_id.nil?
  raise "Missing the required parameter 'update_custom_protection_rule_details' when calling update_custom_protection_rule." if update_custom_protection_rule_details.nil?
  raise "Parameter value for 'custom_protection_rule_id' must not be blank" if OCI::Internal::Util.blank_string?(custom_protection_rule_id)

  path = '/customProtectionRules/{customProtectionRuleId}'.sub('{customProtectionRuleId}', custom_protection_rule_id.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_custom_protection_rule_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'WaasClient#update_custom_protection_rule') 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,
      return_type: 'OCI::Waas::Models::CustomProtectionRule'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

#update_device_fingerprint_challenge(waas_policy_id, update_device_fingerprint_challenge_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use update_device_fingerprint_challenge API.

Updates the Device Fingerprint Challenge (DFC) settings in the Web Application Firewall configuration for a policy. The DFC generates a hashed signature of both virtual and real browsers based on 50+ attributes. These proprietary signatures are then leveraged for real-time correlation to identify and block malicious bots.

The signature is based on a library of attributes detected via JavaScript listeners; the attributes include OS, screen resolution, fonts, UserAgent, IP address, etc. We are constantly making improvements and considering new libraries to include in our DFC build. We can also exclude attributes from the signature as needed.

DFC collects attributes to generate a hashed signature about a client - if a fingerprint is not possible, then it will result in a block or alert action. Actions can be enforced across multiple devices if they share they have the same fingerprint.

Parameters:

  • waas_policy_id (String)

    The OCID of the WAAS policy.

  • update_device_fingerprint_challenge_details (OCI::Waas::Models::DeviceFingerprintChallenge)

    The device fingerprint challenge settings to be updated.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    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

  • :opc_request_id (String)

    The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations Example: If a resource has been deleted and purged from the system, then a retry of the original delete request may be rejected.

  • :if_match (String)

    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 provided matches the resource's current etag value.

Returns:

  • (Response)

    A Response object with data of type nil



3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
# File 'lib/oci/waas/waas_client.rb', line 3538

def update_device_fingerprint_challenge(waas_policy_id, update_device_fingerprint_challenge_details, opts = {})
  logger.debug 'Calling operation WaasClient#update_device_fingerprint_challenge.' if logger

  raise "Missing the required parameter 'waas_policy_id' when calling update_device_fingerprint_challenge." if waas_policy_id.nil?
  raise "Missing the required parameter 'update_device_fingerprint_challenge_details' when calling update_device_fingerprint_challenge." if update_device_fingerprint_challenge_details.nil?
  raise "Parameter value for 'waas_policy_id' must not be blank" if OCI::Internal::Util.blank_string?(waas_policy_id)

  path = '/waasPolicies/{waasPolicyId}/wafConfig/deviceFingerprintChallenge'.sub('{waasPolicyId}', waas_policy_id.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_device_fingerprint_challenge_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'WaasClient#update_device_fingerprint_challenge') 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

#update_good_bots(waas_policy_id, good_bots, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use update_good_bots API.

Updates the list of good bots in the Web Application Firewall configuration for a policy. Only the fields specified in the request body will be updated, all other configuration properties will remain unchanged.

Good bots allows you to manage access for bots from known providers, such as Google or Baidu. For more information about good bots, see Bot Management.

Parameters:

  • waas_policy_id (String)

    The OCID of the WAAS policy.

  • good_bots (Array<OCI::Waas::Models::OCI::Waas::Models::GoodBot>)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    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

  • :opc_request_id (String)

    The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations Example: If a resource has been deleted and purged from the system, then a retry of the original delete request may be rejected.

  • :if_match (String)

    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 provided matches the resource's current etag value.

Returns:

  • (Response)

    A Response object with data of type nil



3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
# File 'lib/oci/waas/waas_client.rb', line 3601

def update_good_bots(waas_policy_id, good_bots, opts = {})
  logger.debug 'Calling operation WaasClient#update_good_bots.' if logger

  raise "Missing the required parameter 'waas_policy_id' when calling update_good_bots." if waas_policy_id.nil?
  raise "Missing the required parameter 'good_bots' when calling update_good_bots." if good_bots.nil?
  raise "Parameter value for 'waas_policy_id' must not be blank" if OCI::Internal::Util.blank_string?(waas_policy_id)

  path = '/waasPolicies/{waasPolicyId}/wafConfig/goodBots'.sub('{waasPolicyId}', waas_policy_id.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(good_bots)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'WaasClient#update_good_bots') 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

#update_human_interaction_challenge(waas_policy_id, update_human_interaction_challenge_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use update_human_interaction_challenge API.

Updates the Human Interaction Challenge (HIC) settings in the Web Application Firewall configuration for a WAAS policy. HIC is a countermeasure that allows the proxy to check the user's browser for various behaviors that distinguish a human presence from a bot.

Parameters:

  • waas_policy_id (String)

    The OCID of the WAAS policy.

  • update_human_interaction_challenge_details (OCI::Waas::Models::HumanInteractionChallenge)

    The human interaction challenge settings.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    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

  • :opc_request_id (String)

    The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations Example: If a resource has been deleted and purged from the system, then a retry of the original delete request may be rejected.

  • :if_match (String)

    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 provided matches the resource's current etag value.

Returns:

  • (Response)

    A Response object with data of type nil



3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
# File 'lib/oci/waas/waas_client.rb', line 3662

def update_human_interaction_challenge(waas_policy_id, update_human_interaction_challenge_details, opts = {})
  logger.debug 'Calling operation WaasClient#update_human_interaction_challenge.' if logger

  raise "Missing the required parameter 'waas_policy_id' when calling update_human_interaction_challenge." if waas_policy_id.nil?
  raise "Missing the required parameter 'update_human_interaction_challenge_details' when calling update_human_interaction_challenge." if update_human_interaction_challenge_details.nil?
  raise "Parameter value for 'waas_policy_id' must not be blank" if OCI::Internal::Util.blank_string?(waas_policy_id)

  path = '/waasPolicies/{waasPolicyId}/wafConfig/humanInteractionChallenge'.sub('{waasPolicyId}', waas_policy_id.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_human_interaction_challenge_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'WaasClient#update_human_interaction_challenge') 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

#update_js_challenge(waas_policy_id, update_js_challenge_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use update_js_challenge API.

Updates the JavaScript challenge settings in the Web Application Firewall configuration for a WAAS policy. JavaScript Challenge validates that the client can accept JavaScript with a binary decision. For more information, see Bot Management.

Parameters:

  • waas_policy_id (String)

    The OCID of the WAAS policy.

  • update_js_challenge_details (OCI::Waas::Models::JsChallenge)

    The JavaScript challenge settings to be updated.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    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

  • :opc_request_id (String)

    The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations Example: If a resource has been deleted and purged from the system, then a retry of the original delete request may be rejected.

  • :if_match (String)

    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 provided matches the resource's current etag value.

Returns:

  • (Response)

    A Response object with data of type nil



3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
# File 'lib/oci/waas/waas_client.rb', line 3723

def update_js_challenge(waas_policy_id, update_js_challenge_details, opts = {})
  logger.debug 'Calling operation WaasClient#update_js_challenge.' if logger

  raise "Missing the required parameter 'waas_policy_id' when calling update_js_challenge." if waas_policy_id.nil?
  raise "Missing the required parameter 'update_js_challenge_details' when calling update_js_challenge." if update_js_challenge_details.nil?
  raise "Parameter value for 'waas_policy_id' must not be blank" if OCI::Internal::Util.blank_string?(waas_policy_id)

  path = '/waasPolicies/{waasPolicyId}/wafConfig/jsChallenge'.sub('{waasPolicyId}', waas_policy_id.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_js_challenge_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'WaasClient#update_js_challenge') 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

#update_policy_config(waas_policy_id, update_policy_config_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use update_policy_config API.

Updates the configuration for a WAAS policy. Only the fields specified in the request body will be updated; all other properties will remain unchanged.

Parameters:

  • waas_policy_id (String)

    The OCID of the WAAS policy.

  • update_policy_config_details (OCI::Waas::Models::PolicyConfig)

    The new configuration to apply to a WAAS policy.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    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

  • :opc_request_id (String)

    The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations Example: If a resource has been deleted and purged from the system, then a retry of the original delete request may be rejected.

  • :if_match (String)

    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 provided matches the resource's current etag value.

Returns:

  • (Response)

    A Response object with data of type nil



3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
# File 'lib/oci/waas/waas_client.rb', line 3784

def update_policy_config(waas_policy_id, update_policy_config_details, opts = {})
  logger.debug 'Calling operation WaasClient#update_policy_config.' if logger

  raise "Missing the required parameter 'waas_policy_id' when calling update_policy_config." if waas_policy_id.nil?
  raise "Missing the required parameter 'update_policy_config_details' when calling update_policy_config." if update_policy_config_details.nil?
  raise "Parameter value for 'waas_policy_id' must not be blank" if OCI::Internal::Util.blank_string?(waas_policy_id)

  path = '/waasPolicies/{waasPolicyId}/policyConfig'.sub('{waasPolicyId}', waas_policy_id.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_policy_config_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'WaasClient#update_policy_config') 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

#update_protection_rules(waas_policy_id, protection_rules, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use update_protection_rules API.

Updates the action for each specified protection rule. Requests can either be allowed, blocked, or trigger an alert if they meet the parameters of an applied rule. For more information on protection rules, see WAF Protection Rules. This operation can update or disable protection rules depending on the structure of the request body. Protection rules can be updated by changing the properties of the protection rule object with the rule's key specified in the key field.

Parameters:

  • waas_policy_id (String)

    The OCID of the WAAS policy.

  • protection_rules (Array<OCI::Waas::Models::OCI::Waas::Models::ProtectionRuleAction>)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    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

  • :opc_request_id (String)

    The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

  • :if_match (String)

    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 provided matches the resource's current etag value.

Returns:

  • (Response)

    A Response object with data of type nil



3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
# File 'lib/oci/waas/waas_client.rb', line 3845

def update_protection_rules(waas_policy_id, protection_rules, opts = {})
  logger.debug 'Calling operation WaasClient#update_protection_rules.' if logger

  raise "Missing the required parameter 'waas_policy_id' when calling update_protection_rules." if waas_policy_id.nil?
  raise "Missing the required parameter 'protection_rules' when calling update_protection_rules." if protection_rules.nil?
  raise "Parameter value for 'waas_policy_id' must not be blank" if OCI::Internal::Util.blank_string?(waas_policy_id)

  path = '/waasPolicies/{waasPolicyId}/wafConfig/protectionRules'.sub('{waasPolicyId}', waas_policy_id.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[:'if-match'] = opts[:if_match] if opts[:if_match]
  # rubocop:enable Style/NegatedIf

  post_body = @api_client.object_to_http_body(protection_rules)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'WaasClient#update_protection_rules') 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

#update_protection_settings(waas_policy_id, update_protection_settings_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use update_protection_settings API.

Updates the protection settings in the Web Application Firewall configuration for a WAAS policy. Protection settings allow you define what action is taken when a request is blocked by the Web Application Firewall, such as returning a response code or block page. Only the fields specified in the request body will be updated; all other fields will remain unchanged.

Parameters:

  • waas_policy_id (String)

    The OCID of the WAAS policy.

  • update_protection_settings_details (OCI::Waas::Models::ProtectionSettings)

    The details of the protection settings to be updated.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    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

  • :opc_request_id (String)

    The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations Example: If a resource has been deleted and purged from the system, then a retry of the original delete request may be rejected.

  • :if_match (String)

    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 provided matches the resource's current etag value.

Returns:

  • (Response)

    A Response object with data of type nil



3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
# File 'lib/oci/waas/waas_client.rb', line 3904

def update_protection_settings(waas_policy_id, update_protection_settings_details, opts = {})
  logger.debug 'Calling operation WaasClient#update_protection_settings.' if logger

  raise "Missing the required parameter 'waas_policy_id' when calling update_protection_settings." if waas_policy_id.nil?
  raise "Missing the required parameter 'update_protection_settings_details' when calling update_protection_settings." if update_protection_settings_details.nil?
  raise "Parameter value for 'waas_policy_id' must not be blank" if OCI::Internal::Util.blank_string?(waas_policy_id)

  path = '/waasPolicies/{waasPolicyId}/wafConfig/protectionSettings'.sub('{waasPolicyId}', waas_policy_id.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_protection_settings_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'WaasClient#update_protection_settings') 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

#update_threat_feeds(waas_policy_id, threat_feeds, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use update_threat_feeds API.

Updates the action to take when a request's IP address matches an address in the specified threat intelligence feed. Threat intelligence feeds are compiled lists of IP addresses with malicious reputations based on internet intelligence. Only the threat feeds specified in the request body will be updated; all other threat feeds will remain unchanged.

Parameters:

  • waas_policy_id (String)

    The OCID of the WAAS policy.

  • threat_feeds (Array<OCI::Waas::Models::OCI::Waas::Models::ThreatFeedAction>)

    A list of threat feeds for which to update the actions.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    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

  • :opc_request_id (String)

    The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

  • :if_match (String)

    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 provided matches the resource's current etag value.

Returns:

  • (Response)

    A Response object with data of type nil



3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
# File 'lib/oci/waas/waas_client.rb', line 3963

def update_threat_feeds(waas_policy_id, threat_feeds, opts = {})
  logger.debug 'Calling operation WaasClient#update_threat_feeds.' if logger

  raise "Missing the required parameter 'waas_policy_id' when calling update_threat_feeds." if waas_policy_id.nil?
  raise "Missing the required parameter 'threat_feeds' when calling update_threat_feeds." if threat_feeds.nil?
  raise "Parameter value for 'waas_policy_id' must not be blank" if OCI::Internal::Util.blank_string?(waas_policy_id)

  path = '/waasPolicies/{waasPolicyId}/wafConfig/threatFeeds'.sub('{waasPolicyId}', waas_policy_id.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[:'if-match'] = opts[:if_match] if opts[:if_match]
  # rubocop:enable Style/NegatedIf

  post_body = @api_client.object_to_http_body(threat_feeds)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'WaasClient#update_threat_feeds') 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

#update_waas_policy(waas_policy_id, update_waas_policy_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use update_waas_policy API.

Updates the details of a WAAS policy, including origins and tags. Only the fields specified in the request body will be updated; all other properties will remain unchanged. To update platform provided resources such as GoodBots, ProtectionRules, and ThreatFeeds, first retrieve the list of available resources with the related list operation such as GetThreatFeeds or GetProtectionRules. The returned list will contain objects with key properties that can be used to update the resource during the UpdateWaasPolicy request.

Parameters:

  • waas_policy_id (String)

    The OCID of the WAAS policy.

  • update_waas_policy_details (OCI::Waas::Models::UpdateWaasPolicyDetails)

    The details of the WAAS policy to update.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    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

  • :opc_request_id (String)

    The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations Example: If a resource has been deleted and purged from the system, then a retry of the original delete request may be rejected.

  • :if_match (String)

    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 provided matches the resource's current etag value.

Returns:

  • (Response)

    A Response object with data of type nil



4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
# File 'lib/oci/waas/waas_client.rb', line 4024

def update_waas_policy(waas_policy_id, update_waas_policy_details, opts = {})
  logger.debug 'Calling operation WaasClient#update_waas_policy.' if logger

  raise "Missing the required parameter 'waas_policy_id' when calling update_waas_policy." if waas_policy_id.nil?
  raise "Missing the required parameter 'update_waas_policy_details' when calling update_waas_policy." if update_waas_policy_details.nil?
  raise "Parameter value for 'waas_policy_id' must not be blank" if OCI::Internal::Util.blank_string?(waas_policy_id)

  path = '/waasPolicies/{waasPolicyId}'.sub('{waasPolicyId}', waas_policy_id.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_waas_policy_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'WaasClient#update_waas_policy') 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

#update_waas_policy_custom_protection_rules(waas_policy_id, update_custom_protection_rules_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use update_waas_policy_custom_protection_rules API.

Updates the action for each specified custom protection rule. Only the DETECT and BLOCK actions can be set. Disabled rules should not be included in the list. For more information on protection rules, see WAF Protection Rules.

Parameters:

  • waas_policy_id (String)

    The OCID of the WAAS policy.

  • update_custom_protection_rules_details (Array<OCI::Waas::Models::OCI::Waas::Models::CustomProtectionRuleSetting>)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    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

  • :opc_request_id (String)

    The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations Example: If a resource has been deleted and purged from the system, then a retry of the original delete request may be rejected.

  • :if_match (String)

    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 provided matches the resource's current etag value.

Returns:

  • (Response)

    A Response object with data of type nil



4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
# File 'lib/oci/waas/waas_client.rb', line 4085

def update_waas_policy_custom_protection_rules(waas_policy_id, update_custom_protection_rules_details, opts = {})
  logger.debug 'Calling operation WaasClient#update_waas_policy_custom_protection_rules.' if logger

  raise "Missing the required parameter 'waas_policy_id' when calling update_waas_policy_custom_protection_rules." if waas_policy_id.nil?
  raise "Missing the required parameter 'update_custom_protection_rules_details' when calling update_waas_policy_custom_protection_rules." if update_custom_protection_rules_details.nil?
  raise "Parameter value for 'waas_policy_id' must not be blank" if OCI::Internal::Util.blank_string?(waas_policy_id)

  path = '/waasPolicies/{waasPolicyId}/wafConfig/customProtectionRules'.sub('{waasPolicyId}', waas_policy_id.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_custom_protection_rules_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'WaasClient#update_waas_policy_custom_protection_rules') 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

#update_waf_address_rate_limiting(waas_policy_id, update_waf_address_rate_limiting_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use update_waf_address_rate_limiting API.

Updates the address rate limiting settings in the Web Application Firewall configuration for a policy. Rate limiting allows you to configure a threshold for the number of requests from a unique IP address for the given period. You can also define the response code for the requests from the same address that exceed the threshold.

Parameters:

  • waas_policy_id (String)

    The OCID of the WAAS policy.

  • update_waf_address_rate_limiting_details (OCI::Waas::Models::AddressRateLimiting)

    The address rate limiting settings.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    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

  • :opc_request_id (String)

    The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations Example: If a resource has been deleted and purged from the system, then a retry of the original delete request may be rejected.

  • :if_match (String)

    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 provided matches the resource's current etag value.

Returns:

  • (Response)

    A Response object with data of type nil



4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
# File 'lib/oci/waas/waas_client.rb', line 4146

def update_waf_address_rate_limiting(waas_policy_id, update_waf_address_rate_limiting_details, opts = {})
  logger.debug 'Calling operation WaasClient#update_waf_address_rate_limiting.' if logger

  raise "Missing the required parameter 'waas_policy_id' when calling update_waf_address_rate_limiting." if waas_policy_id.nil?
  raise "Missing the required parameter 'update_waf_address_rate_limiting_details' when calling update_waf_address_rate_limiting." if update_waf_address_rate_limiting_details.nil?
  raise "Parameter value for 'waas_policy_id' must not be blank" if OCI::Internal::Util.blank_string?(waas_policy_id)

  path = '/waasPolicies/{waasPolicyId}/wafConfig/addressRateLimiting'.sub('{waasPolicyId}', waas_policy_id.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_waf_address_rate_limiting_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'WaasClient#update_waf_address_rate_limiting') 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

#update_waf_config(waas_policy_id, update_waf_config_details, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use update_waf_config API.

Updates the Web Application Firewall configuration for a specified WAAS policy.

To update platform provided resources such as GoodBots, ProtectionRules, and ThreatFeeds, first retrieve the list of available resources with the related list operation, such as GetThreatFeeds or GetProtectionRules.

The returned list will contain objects with key properties that can be used to update the resource during the UpdateWafConfig request.

Parameters:

  • waas_policy_id (String)

    The OCID of the WAAS policy.

  • update_waf_config_details (OCI::Waas::Models::WafConfig)

    The new Web Application Firewall configuration to apply to a WAAS policy.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    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

  • :opc_request_id (String)

    The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations Example: If a resource has been deleted and purged from the system, then a retry of the original delete request may be rejected.

  • :if_match (String)

    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 provided matches the resource's current etag value.

Returns:

  • (Response)

    A Response object with data of type nil



4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
# File 'lib/oci/waas/waas_client.rb', line 4215

def update_waf_config(waas_policy_id, update_waf_config_details, opts = {})
  logger.debug 'Calling operation WaasClient#update_waf_config.' if logger

  raise "Missing the required parameter 'waas_policy_id' when calling update_waf_config." if waas_policy_id.nil?
  raise "Missing the required parameter 'update_waf_config_details' when calling update_waf_config." if update_waf_config_details.nil?
  raise "Parameter value for 'waas_policy_id' must not be blank" if OCI::Internal::Util.blank_string?(waas_policy_id)

  path = '/waasPolicies/{waasPolicyId}/wafConfig'.sub('{waasPolicyId}', waas_policy_id.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_waf_config_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'WaasClient#update_waf_config') 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

#update_whitelists(waas_policy_id, whitelists, opts = {}) ⇒ Response

Note:

Click here to see an example of how to use update_whitelists API.

Updates the list of IP addresses that bypass the Web Application Firewall for a WAAS policy. Supports single IP addresses, subnet masks (CIDR notation) and Address Lists.

This operation can create, delete, update, and/or reorder whitelists depending on the structure of the request body.

Whitelists can be updated by changing the properties of the whitelist object with the rule's key specified in the key field. Whitelists can be reordered by changing the order of the whitelists in the list of objects when updating.

Whitelists can be created by adding a new whitelist object to the list without a key property specified. A key will be generated for the new whitelist upon update.

Whitelists can be deleted by removing the existing whitelist object from the list. Any existing whitelists that are not specified with a key in the list of access rules will be deleted upon update.

Parameters:

  • waas_policy_id (String)

    The OCID of the WAAS policy.

  • whitelists (Array<OCI::Waas::Models::OCI::Waas::Models::Whitelist>)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :retry_config (OCI::Retry::RetryConfig)

    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

  • :opc_request_id (String)

    The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.

  • :opc_retry_token (String)

    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations Example: If a resource has been deleted and purged from the system, then a retry of the original delete request may be rejected.

  • :if_match (String)

    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 provided matches the resource's current etag value.

Returns:

  • (Response)

    A Response object with data of type nil



4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
# File 'lib/oci/waas/waas_client.rb', line 4284

def update_whitelists(waas_policy_id, whitelists, opts = {})
  logger.debug 'Calling operation WaasClient#update_whitelists.' if logger

  raise "Missing the required parameter 'waas_policy_id' when calling update_whitelists." if waas_policy_id.nil?
  raise "Missing the required parameter 'whitelists' when calling update_whitelists." if whitelists.nil?
  raise "Parameter value for 'waas_policy_id' must not be blank" if OCI::Internal::Util.blank_string?(waas_policy_id)

  path = '/waasPolicies/{waasPolicyId}/wafConfig/whitelists'.sub('{waasPolicyId}', waas_policy_id.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(whitelists)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'WaasClient#update_whitelists') 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