Class: OCI::Waas::WaasClient
- Inherits:
-
Object
- Object
- OCI::Waas::WaasClient
- Defined in:
- lib/oci/waas/waas_client.rb
Overview
OCI Web Application Acceleration and Security Services
Instance Attribute Summary collapse
-
#api_client ⇒ OCI::ApiClient
readonly
Client used to make HTTP requests.
-
#endpoint ⇒ String
readonly
Fully qualified endpoint URL.
-
#region ⇒ String
The region, which will usually correspond to a value in Regions::REGION_ENUM.
-
#retry_config ⇒ OCI::Retry::RetryConfig
readonly
The default retry configuration to apply to all operations in this service client.
Instance Method Summary collapse
-
#accept_recommendations(waas_policy_id, protection_rule_keys, opts = {}) ⇒ Response
Accepts a list of recommended Web Application Firewall protection rules.
-
#cancel_work_request(work_request_id, opts = {}) ⇒ Response
Cancels a specified work request.
-
#change_address_list_compartment(address_list_id, change_address_list_compartment_details, opts = {}) ⇒ Response
Moves address list into a different compartment.
-
#change_certificate_compartment(certificate_id, change_certificate_compartment_details, opts = {}) ⇒ Response
Moves certificate into a different compartment.
-
#change_custom_protection_rule_compartment(custom_protection_rule_id, change_custom_protection_rule_compartment_details, opts = {}) ⇒ Response
Moves a custom protection rule into a different compartment within the same tenancy.
-
#change_waas_policy_compartment(waas_policy_id, change_waas_policy_compartment_details, opts = {}) ⇒ Response
Moves WAAS policy into a different compartment.
-
#create_address_list(create_address_list_details, opts = {}) ⇒ Response
Creates an address list in a set compartment and allows it to be used in a WAAS policy and referenced by access rules.
-
#create_certificate(create_certificate_details, opts = {}) ⇒ Response
Allows an SSL certificate to be added to a WAAS policy.
-
#create_custom_protection_rule(create_custom_protection_rule_details, opts = {}) ⇒ Response
Creates a new custom protection rule in the specified compartment.
-
#create_waas_policy(create_waas_policy_details, opts = {}) ⇒ Response
Creates a new Web Application Acceleration and Security (WAAS) policy in the specified compartment.
-
#delete_address_list(address_list_id, opts = {}) ⇒ Response
Deletes the address list from the compartment if it is not used.
-
#delete_certificate(certificate_id, opts = {}) ⇒ Response
Deletes an SSL certificate from the WAAS service.
-
#delete_custom_protection_rule(custom_protection_rule_id, opts = {}) ⇒ Response
Deletes a Custom Protection rule.
-
#delete_waas_policy(waas_policy_id, opts = {}) ⇒ Response
Deletes a policy.
-
#get_address_list(address_list_id, opts = {}) ⇒ Response
Gets the details of an address list.
-
#get_certificate(certificate_id, opts = {}) ⇒ Response
Gets the details of an SSL certificate.
-
#get_custom_protection_rule(custom_protection_rule_id, opts = {}) ⇒ Response
Gets the details of a custom protection rule.
-
#get_device_fingerprint_challenge(waas_policy_id, opts = {}) ⇒ Response
Gets the device fingerprint challenge settings in the Web Application Firewall configuration for a WAAS policy.
-
#get_human_interaction_challenge(waas_policy_id, opts = {}) ⇒ Response
Gets the human interaction challenge settings in the Web Application Firewall configuration for a WAAS policy.
-
#get_js_challenge(waas_policy_id, opts = {}) ⇒ Response
Gets the JavaScript challenge settings in the Web Application Firewall configuration for a WAAS policy.
-
#get_policy_config(waas_policy_id, opts = {}) ⇒ Response
Gets the configuration of a WAAS policy.
-
#get_protection_rule(waas_policy_id, protection_rule_key, opts = {}) ⇒ Response
Gets the details of a protection rule in the Web Application Firewall configuration for a WAAS policy.
-
#get_protection_settings(waas_policy_id, opts = {}) ⇒ Response
Gets the protection settings in the Web Application Firewall configuration for a WAAS policy.
-
#get_waas_policy(waas_policy_id, opts = {}) ⇒ Response
Gets the details of a WAAS policy.
-
#get_waf_address_rate_limiting(waas_policy_id, opts = {}) ⇒ Response
Gets the address rate limiting settings of the Web Application Firewall configuration for a WAAS policy.
-
#get_waf_config(waas_policy_id, opts = {}) ⇒ Response
Gets the Web Application Firewall configuration details for a WAAS policy.
-
#get_work_request(work_request_id, opts = {}) ⇒ Response
Gets the details of a specified work request.
-
#initialize(config: nil, region: nil, endpoint: nil, signer: nil, proxy_settings: nil, retry_config: nil) ⇒ WaasClient
constructor
Creates a new WaasClient.
-
#list_access_rules(waas_policy_id, opts = {}) ⇒ Response
Gets the currently configured access rules for the Web Application Firewall configuration of a specified WAAS policy.
-
#list_address_lists(compartment_id, opts = {}) ⇒ Response
Gets a list of address lists that can be used in a WAAS policy.
-
#list_caching_rules(waas_policy_id, opts = {}) ⇒ Response
Gets the currently configured caching rules for the Web Application Firewall configuration of a specified WAAS policy.
-
#list_captchas(waas_policy_id, opts = {}) ⇒ Response
Gets the list of currently configured CAPTCHA challenges in the Web Application Firewall configuration of a WAAS policy.
-
#list_certificates(compartment_id, opts = {}) ⇒ Response
Gets a list of SSL certificates that can be used in a WAAS policy.
-
#list_custom_protection_rules(compartment_id, opts = {}) ⇒ Response
Gets a list of custom protection rules for the specified Web Application Firewall.
-
#list_edge_subnets(opts = {}) ⇒ Response
Return the list of the tenant’s edge node subnets.
-
#list_good_bots(waas_policy_id, opts = {}) ⇒ Response
Gets the list of good bots defined in the Web Application Firewall configuration for a WAAS policy.
-
#list_protection_rules(waas_policy_id, opts = {}) ⇒ Response
Gets the list of available protection rules for a WAAS policy.
-
#list_recommendations(waas_policy_id, opts = {}) ⇒ Response
Gets the list of recommended Web Application Firewall protection rules.
-
#list_threat_feeds(waas_policy_id, opts = {}) ⇒ Response
Gets the list of available web application threat intelligence feeds and the actions set for each feed.
-
#list_waas_policies(compartment_id, opts = {}) ⇒ Response
Gets a list of WAAS policies.
-
#list_waas_policy_custom_protection_rules(waas_policy_id, opts = {}) ⇒ Response
Gets the list of currently configured custom protection rules for a WAAS policy.
-
#list_waf_blocked_requests(waas_policy_id, opts = {}) ⇒ Response
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).
-
#list_waf_logs(waas_policy_id, opts = {}) ⇒ Response
Gets structured Web Application Firewall event logs for a WAAS policy.
-
#list_waf_requests(waas_policy_id, opts = {}) ⇒ Response
Gets the number of requests managed by a Web Application Firewall over a specified period of time, including blocked requests.
-
#list_waf_traffic(waas_policy_id, opts = {}) ⇒ Response
Gets the Web Application Firewall traffic data for a WAAS policy.
-
#list_whitelists(waas_policy_id, opts = {}) ⇒ Response
Gets the list of whitelists defined in the Web Application Firewall configuration for a WAAS policy.
-
#list_work_requests(waas_policy_id, compartment_id, opts = {}) ⇒ Response
Gets a list of subnets (CIDR notation) from which the WAAS EDGE may make requests.
-
#logger ⇒ Logger
The logger for this client.
-
#purge_cache(waas_policy_id, opts = {}) ⇒ Response
Performs a purge of the cache for each specified resource.
-
#update_access_rules(waas_policy_id, access_rules, opts = {}) ⇒ Response
Updates the list of access rules in the Web Application Firewall configuration for a specified WAAS policy.
-
#update_address_list(address_list_id, opts = {}) ⇒ Response
Updates the details of an address list.
-
#update_caching_rules(waas_policy_id, caching_rules_details, opts = {}) ⇒ Response
Updates the configuration for each specified caching rule.
-
#update_captchas(waas_policy_id, captchas, opts = {}) ⇒ Response
Updates the list of CAPTCHA challenges in the Web Application Firewall configuration for a WAAS policy.
-
#update_certificate(certificate_id, opts = {}) ⇒ Response
It is not possible to update a certificate, only create and delete.
-
#update_custom_protection_rule(custom_protection_rule_id, update_custom_protection_rule_details, opts = {}) ⇒ Response
Updates the configuration of a custom protection rule.
-
#update_device_fingerprint_challenge(waas_policy_id, update_device_fingerprint_challenge_details, opts = {}) ⇒ Response
Updates the Device Fingerprint Challenge (DFC) settings in the Web Application Firewall configuration for a policy.
-
#update_good_bots(waas_policy_id, good_bots, opts = {}) ⇒ Response
Updates the list of good bots in the Web Application Firewall configuration for a policy.
-
#update_human_interaction_challenge(waas_policy_id, update_human_interaction_challenge_details, opts = {}) ⇒ Response
Updates the Human Interaction Challenge (HIC) settings in the Web Application Firewall configuration for a WAAS policy.
-
#update_js_challenge(waas_policy_id, update_js_challenge_details, opts = {}) ⇒ Response
Updates the JavaScript challenge settings in the Web Application Firewall configuration for a WAAS policy.
-
#update_policy_config(waas_policy_id, update_policy_config_details, opts = {}) ⇒ Response
Updates the configuration for a WAAS policy.
-
#update_protection_rules(waas_policy_id, protection_rules, opts = {}) ⇒ Response
Updates the action for each specified protection rule.
-
#update_protection_settings(waas_policy_id, update_protection_settings_details, opts = {}) ⇒ Response
Updates the protection settings in the Web Application Firewall configuration for a WAAS policy.
-
#update_threat_feeds(waas_policy_id, threat_feeds, opts = {}) ⇒ Response
Updates the action to take when a request’s IP address matches an address in the specified threat intelligence feed.
-
#update_waas_policy(waas_policy_id, update_waas_policy_details, opts = {}) ⇒ Response
Updates the details of a WAAS policy, including origins and tags.
-
#update_waas_policy_custom_protection_rules(waas_policy_id, update_custom_protection_rules_details, opts = {}) ⇒ Response
Updates the action for each specified custom protection rule.
-
#update_waf_address_rate_limiting(waas_policy_id, update_waf_address_rate_limiting_details, opts = {}) ⇒ Response
Updates the address rate limiting settings in the Web Application Firewall configuration for a policy.
-
#update_waf_config(waas_policy_id, update_waf_config_details, opts = {}) ⇒ Response
Updates the Web Application Firewall configuration for a specified WAAS policy.
-
#update_whitelists(waas_policy_id, whitelists, opts = {}) ⇒ Response
Updates the list of IP addresses that bypass the Web Application Firewall for a WAAS policy.
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.
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 |
# File 'lib/oci/waas/waas_client.rb', line 52 def initialize(config: nil, region: nil, endpoint: nil, signer: nil, proxy_settings: nil, retry_config: nil) # If the signer is an InstancePrincipalsSecurityTokenSigner and no config was supplied (which is valid for instance principals) # 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 unless signer.is_a?(OCI::Auth::Signers::InstancePrincipalsSecurityTokenSigner) config ||= OCI::Config.new if signer.is_a?(OCI::Auth::Signers::InstancePrincipalsSecurityTokenSigner) config.validate unless signer.is_a?(OCI::Auth::Signers::InstancePrincipalsSecurityTokenSigner) if signer.nil? signer = OCI::Signer.new( config.user, config.fingerprint, config.tenancy, config.key_file, pass_phrase: config.pass_phrase, private_key_content: config.key_content ) end @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_client ⇒ OCI::ApiClient (readonly)
Client used to make HTTP requests.
12 13 14 |
# File 'lib/oci/waas/waas_client.rb', line 12 def api_client @api_client end |
#endpoint ⇒ String (readonly)
Fully qualified endpoint URL
16 17 18 |
# File 'lib/oci/waas/waas_client.rb', line 16 def endpoint @endpoint end |
#region ⇒ String
The region, which will usually correspond to a value in Regions::REGION_ENUM.
26 27 28 |
# File 'lib/oci/waas/waas_client.rb', line 26 def region @region end |
#retry_config ⇒ OCI::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
22 23 24 |
# File 'lib/oci/waas/waas_client.rb', line 22 def retry_config @retry_config end |
Instance Method Details
#accept_recommendations(waas_policy_id, protection_rule_keys, opts = {}) ⇒ Response
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](docs.cloud.oracle.com/iaas/Content/WAF/Tasks/wafprotectionrules.htm).
122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 |
# File 'lib/oci/waas/waas_client.rb', line 122 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.(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
Cancels a specified work request.
179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 |
# File 'lib/oci/waas/waas_client.rb', line 179 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.(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
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](docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes).
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 276 277 278 279 280 |
# File 'lib/oci/waas/waas_client.rb', line 241 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.(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
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](docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes).
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 339 340 341 342 |
# File 'lib/oci/waas/waas_client.rb', line 303 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.(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
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](docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes).
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 400 401 402 |
# File 'lib/oci/waas/waas_client.rb', line 363 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.(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
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](docs.cloud.oracle.com/iaas/Content/Identity/Tasks/managingcompartments.htm#moveRes).
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 463 464 |
# File 'lib/oci/waas/waas_client.rb', line 425 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.(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
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.
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 520 |
# File 'lib/oci/waas/waas_client.rb', line 483 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.(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
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](docs.cloud.oracle.com/iaas/Content/WAF/Tasks/wafsettings.htm).
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.(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
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](modsecurity.org/). The syntax for custom rules is based on the ModSecurity syntax. For more information about custom protection rules, see [Custom Protection Rules](docs.cloud.oracle.com/iaas/Content/WAF/Tasks/customprotectionrules.htm).
599 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 |
# File 'lib/oci/waas/waas_client.rb', line 599 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.(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
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](docs.cloud.oracle.com/iaas/Content/Identity/Concepts/overview.htm).
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](docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm).
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.
667 668 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 |
# File 'lib/oci/waas/waas_client.rb', line 667 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.(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
Deletes the address list from the compartment if it is not used.
723 724 725 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 |
# File 'lib/oci/waas/waas_client.rb', line 723 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.(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
Deletes an SSL certificate from the WAAS service.
781 782 783 784 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 |
# File 'lib/oci/waas/waas_client.rb', line 781 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.(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
Deletes a Custom Protection rule.
839 840 841 842 843 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 |
# File 'lib/oci/waas/waas_client.rb', line 839 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.(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
Deletes a policy.
897 898 899 900 901 902 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 |
# File 'lib/oci/waas/waas_client.rb', line 897 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.(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
Gets the details of an address list.
952 953 954 955 956 957 958 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 |
# File 'lib/oci/waas/waas_client.rb', line 952 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.(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
Gets the details of an SSL certificate.
1005 1006 1007 1008 1009 1010 1011 1012 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 |
# File 'lib/oci/waas/waas_client.rb', line 1005 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.(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
Gets the details of a custom protection rule.
1058 1059 1060 1061 1062 1063 1064 1065 1066 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 |
# File 'lib/oci/waas/waas_client.rb', line 1058 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.(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
Gets the device fingerprint challenge settings in the Web Application Firewall configuration for a WAAS policy.
1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 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 |
# File 'lib/oci/waas/waas_client.rb', line 1111 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.(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
Gets the human interaction challenge settings in the Web Application Firewall configuration for a WAAS policy.
1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 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 |
# File 'lib/oci/waas/waas_client.rb', line 1164 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.(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
Gets the JavaScript challenge settings in the Web Application Firewall configuration for a WAAS policy.
1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 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 |
# File 'lib/oci/waas/waas_client.rb', line 1217 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.(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
Gets the configuration of a WAAS policy.
1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 |
# File 'lib/oci/waas/waas_client.rb', line 1270 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.(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
Gets the details of a protection rule in the Web Application Firewall configuration for a WAAS policy.
1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 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 |
# File 'lib/oci/waas/waas_client.rb', line 1324 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.(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
Gets the protection settings in the Web Application Firewall configuration for a WAAS policy.
1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 |
# File 'lib/oci/waas/waas_client.rb', line 1379 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.(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
Gets the details of a WAAS policy.
1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 |
# File 'lib/oci/waas/waas_client.rb', line 1432 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.(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
Gets the address rate limiting settings of the Web Application Firewall configuration for a WAAS policy.
1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 |
# File 'lib/oci/waas/waas_client.rb', line 1485 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.(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
Gets the Web Application Firewall configuration details for a WAAS policy.
1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 |
# File 'lib/oci/waas/waas_client.rb', line 1538 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.(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
Gets the details of a specified work request.
1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 |
# File 'lib/oci/waas/waas_client.rb', line 1591 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.(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
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.
1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 |
# File 'lib/oci/waas/waas_client.rb', line 1647 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.(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
Gets a list of address lists that can be used in a WAAS policy.
1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 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 |
# File 'lib/oci/waas/waas_client.rb', line 1714 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.(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
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.
1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 |
# File 'lib/oci/waas/waas_client.rb', line 1797 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.(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
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.
1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 |
# File 'lib/oci/waas/waas_client.rb', line 1859 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.(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
Gets a list of SSL certificates that can be used in a WAAS policy.
1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 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 |
# File 'lib/oci/waas/waas_client.rb', line 1926 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.(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
Gets a list of custom protection rules for the specified Web Application Firewall.
2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 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 |
# File 'lib/oci/waas/waas_client.rb', line 2018 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.(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
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.
2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 |
# File 'lib/oci/waas/waas_client.rb', line 2103 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.(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
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.
2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 |
# File 'lib/oci/waas/waas_client.rb', line 2171 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.(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
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.
2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 |
# File 'lib/oci/waas/waas_client.rb', line 2232 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.(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
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](docs.cloud.oracle.com/iaas/Content/WAF/Tasks/wafprotectionrules.htm). The list is sorted by `key`, in ascending order.
2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 |
# File 'lib/oci/waas/waas_client.rb', line 2306 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.(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
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.
2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 |
# File 'lib/oci/waas/waas_client.rb', line 2371 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.(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
Gets a list of WAAS policies.
2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 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 |
# File 'lib/oci/waas/waas_client.rb', line 2438 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.(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
Gets the list of currently configured custom protection rules for a WAAS policy.
2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 |
# File 'lib/oci/waas/waas_client.rb', line 2523 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.(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
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).
2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 |
# File 'lib/oci/waas/waas_client.rb', line 2596 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.(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
Gets structured Web Application Firewall event logs for a WAAS policy. Sorted by the ‘timeObserved` in ascending order (starting from the oldest recorded event).
2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 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 |
# File 'lib/oci/waas/waas_client.rb', line 2691 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.(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
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).
2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 |
# File 'lib/oci/waas/waas_client.rb', line 2802 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.(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
Gets the Web Application Firewall traffic data for a WAAS policy. Sorted by ‘timeObserved` in ascending order (starting from oldest data).
2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 |
# File 'lib/oci/waas/waas_client.rb', line 2865 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.(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
Gets the list of whitelists defined in the Web Application Firewall configuration for a WAAS policy.
2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 |
# File 'lib/oci/waas/waas_client.rb', line 2924 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.(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
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.
2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 |
# File 'lib/oci/waas/waas_client.rb', line 2986 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.(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 |
#logger ⇒ Logger
Returns The logger for this client. May be nil.
102 103 104 |
# File 'lib/oci/waas/waas_client.rb', line 102 def logger @api_client.config.logger end |
#purge_cache(waas_policy_id, opts = {}) ⇒ Response
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](docs.cloud.oracle.com/iaas/Content/WAF/Tasks/cachingrules.htm#purge).
3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 |
# File 'lib/oci/waas/waas_client.rb', line 3056 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.(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
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.
3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 |
# File 'lib/oci/waas/waas_client.rb', line 3121 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.(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
Updates the details of an address list. Only the fields specified in the request body will be updated; all other properties will remain unchanged.
3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 |
# File 'lib/oci/waas/waas_client.rb', line 3179 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.(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
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](docs.cloud.oracle.com/iaas/Content/WAF/Tasks/cachingrules.htm).
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.
3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 |
# File 'lib/oci/waas/waas_client.rb', line 3243 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.(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
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.
3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 |
# File 'lib/oci/waas/waas_client.rb', line 3309 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.(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
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.
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 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 |
# File 'lib/oci/waas/waas_client.rb', line 3367 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.(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
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.
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 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 |
# File 'lib/oci/waas/waas_client.rb', line 3425 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.(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
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 u2013 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.
3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 |
# File 'lib/oci/waas/waas_client.rb', line 3490 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.(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
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](docs.cloud.oracle.com/iaas/Content/WAF/Tasks/botmanagement.htm).
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 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 |
# File 'lib/oci/waas/waas_client.rb', line 3552 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.(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
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.
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 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 |
# File 'lib/oci/waas/waas_client.rb', line 3612 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.(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
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](docs.cloud.oracle.com/iaas/Content/WAF/Tasks/botmanagement.htm).
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 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 |
# File 'lib/oci/waas/waas_client.rb', line 3672 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.(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
Updates the configuration for a WAAS policy. Only the fields specified in the request body will be updated; all other properties will remain unchanged.
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 3763 3764 3765 3766 3767 3768 3769 3770 3771 |
# File 'lib/oci/waas/waas_client.rb', line 3732 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.(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
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](docs.cloud.oracle.com/iaas/Content/WAF/Tasks/wafprotectionrules.htm). 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.
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 3824 3825 3826 3827 3828 3829 |
# File 'lib/oci/waas/waas_client.rb', line 3792 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.(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
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.
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 3883 3884 3885 3886 3887 3888 3889 |
# File 'lib/oci/waas/waas_client.rb', line 3850 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.(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
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.
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 3944 3945 |
# File 'lib/oci/waas/waas_client.rb', line 3908 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.(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
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.
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 4001 4002 4003 4004 4005 4006 4007 |
# File 'lib/oci/waas/waas_client.rb', line 3968 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.(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
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](docs.cloud.oracle.com/iaas/Content/WAF/Tasks/wafprotectionrules.htm).
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 4064 4065 4066 4067 |
# File 'lib/oci/waas/waas_client.rb', line 4028 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.(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
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.
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 4125 4126 4127 |
# File 'lib/oci/waas/waas_client.rb', line 4088 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.(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
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.
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 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 |
# File 'lib/oci/waas/waas_client.rb', line 4156 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.(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
Updates the list of IP addresses that bypass the Web Application Firewall for a WAAS policy. Supports both single IP addresses or subnet masks (CIDR notation).
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.
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 4255 4256 4257 4258 4259 4260 4261 4262 4263 |
# File 'lib/oci/waas/waas_client.rb', line 4224 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.(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 |