oci 2.4.6 → 2.4.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +3 -1
- data/lib/oci.rb +2 -0
- data/lib/oci/database/database.rb +1 -0
- data/lib/oci/database/models/database.rb +18 -4
- data/lib/oci/database/models/database_connection_strings.rb +182 -0
- data/lib/oci/database/models/database_summary.rb +18 -4
- data/lib/oci/dns/dns.rb +23 -0
- data/lib/oci/dns/dns_client.rb +802 -75
- data/lib/oci/dns/dns_client_composite_operations.rb +238 -0
- data/lib/oci/dns/models/create_steering_policy_attachment_details.rb +205 -0
- data/lib/oci/dns/models/create_steering_policy_details.rb +333 -0
- data/lib/oci/dns/models/steering_policy.rb +418 -0
- data/lib/oci/dns/models/steering_policy_answer.rb +205 -0
- data/lib/oci/dns/models/steering_policy_attachment.rb +308 -0
- data/lib/oci/dns/models/steering_policy_attachment_summary.rb +304 -0
- data/lib/oci/dns/models/steering_policy_filter_answer_data.rb +168 -0
- data/lib/oci/dns/models/steering_policy_filter_rule.rb +178 -0
- data/lib/oci/dns/models/steering_policy_filter_rule_case.rb +165 -0
- data/lib/oci/dns/models/steering_policy_health_rule.rb +160 -0
- data/lib/oci/dns/models/steering_policy_health_rule_case.rb +152 -0
- data/lib/oci/dns/models/steering_policy_limit_rule.rb +179 -0
- data/lib/oci/dns/models/steering_policy_limit_rule_case.rb +162 -0
- data/lib/oci/dns/models/steering_policy_priority_answer_data.rb +161 -0
- data/lib/oci/dns/models/steering_policy_priority_rule.rb +178 -0
- data/lib/oci/dns/models/steering_policy_priority_rule_case.rb +165 -0
- data/lib/oci/dns/models/steering_policy_rule.rb +237 -0
- data/lib/oci/dns/models/steering_policy_summary.rb +391 -0
- data/lib/oci/dns/models/steering_policy_weighted_answer_data.rb +161 -0
- data/lib/oci/dns/models/steering_policy_weighted_rule.rb +178 -0
- data/lib/oci/dns/models/steering_policy_weighted_rule_case.rb +165 -0
- data/lib/oci/dns/models/update_steering_policy_attachment_details.rb +156 -0
- data/lib/oci/dns/models/update_steering_policy_details.rb +319 -0
- data/lib/oci/email/email.rb +1 -0
- data/lib/oci/email/email_client.rb +87 -16
- data/lib/oci/email/email_client_composite_operations.rb +40 -0
- data/lib/oci/email/models/create_sender_details.rb +40 -6
- data/lib/oci/email/models/create_suppression_details.rb +2 -2
- data/lib/oci/email/models/sender.rb +53 -5
- data/lib/oci/email/models/sender_summary.rb +38 -4
- data/lib/oci/email/models/suppression.rb +20 -3
- data/lib/oci/email/models/update_sender_details.rb +174 -0
- data/lib/oci/healthchecks/health_checks_client.rb +1137 -0
- data/lib/oci/healthchecks/health_checks_client_composite_operations.rb +24 -0
- data/lib/oci/healthchecks/healthchecks.rb +41 -0
- data/lib/oci/healthchecks/models/connection.rb +159 -0
- data/lib/oci/healthchecks/models/create_http_monitor_details.rb +359 -0
- data/lib/oci/healthchecks/models/create_on_demand_http_probe_details.rb +278 -0
- data/lib/oci/healthchecks/models/create_on_demand_ping_probe_details.rb +229 -0
- data/lib/oci/healthchecks/models/create_ping_monitor_details.rb +310 -0
- data/lib/oci/healthchecks/models/dns.rb +165 -0
- data/lib/oci/healthchecks/models/geolocation.rb +239 -0
- data/lib/oci/healthchecks/models/health_checks_vantage_point_summary.rb +211 -0
- data/lib/oci/healthchecks/models/http_monitor.rb +395 -0
- data/lib/oci/healthchecks/models/http_monitor_summary.rb +290 -0
- data/lib/oci/healthchecks/models/http_probe.rb +314 -0
- data/lib/oci/healthchecks/models/http_probe_method.rb +10 -0
- data/lib/oci/healthchecks/models/http_probe_protocol.rb +10 -0
- data/lib/oci/healthchecks/models/http_probe_result_summary.rb +542 -0
- data/lib/oci/healthchecks/models/ping_monitor.rb +340 -0
- data/lib/oci/healthchecks/models/ping_monitor_summary.rb +290 -0
- data/lib/oci/healthchecks/models/ping_probe.rb +259 -0
- data/lib/oci/healthchecks/models/ping_probe_protocol.rb +10 -0
- data/lib/oci/healthchecks/models/ping_probe_result_summary.rb +418 -0
- data/lib/oci/healthchecks/models/routing.rb +192 -0
- data/lib/oci/healthchecks/models/tcp_connection.rb +189 -0
- data/lib/oci/healthchecks/models/update_http_monitor_details.rb +339 -0
- data/lib/oci/healthchecks/models/update_ping_monitor_details.rb +292 -0
- data/lib/oci/healthchecks/util.rb +2 -0
- data/lib/oci/regions.rb +3 -1
- data/lib/oci/version.rb +1 -1
- data/lib/oci/waas/models/access_rule.rb +283 -0
- data/lib/oci/waas/models/access_rule_criteria.rb +206 -0
- data/lib/oci/waas/models/address_rate_limiting.rb +195 -0
- data/lib/oci/waas/models/block_challenge_settings.rb +288 -0
- data/lib/oci/waas/models/captcha.rb +231 -0
- data/lib/oci/waas/models/certificate.rb +383 -0
- data/lib/oci/waas/models/certificate_extensions.rb +170 -0
- data/lib/oci/waas/models/certificate_public_key_info.rb +170 -0
- data/lib/oci/waas/models/certificate_subject_name.rb +218 -0
- data/lib/oci/waas/models/certificate_summary.rb +274 -0
- data/lib/oci/waas/models/create_certificate_details.rb +241 -0
- data/lib/oci/waas/models/create_waas_policy_details.rb +257 -0
- data/lib/oci/waas/models/device_fingerprint_challenge.rb +268 -0
- data/lib/oci/waas/models/edge_subnet.rb +173 -0
- data/lib/oci/waas/models/good_bot.rb +183 -0
- data/lib/oci/waas/models/header.rb +159 -0
- data/lib/oci/waas/models/human_interaction_challenge.rb +282 -0
- data/lib/oci/waas/models/js_challenge.rb +240 -0
- data/lib/oci/waas/models/lifecycle_states.rb +14 -0
- data/lib/oci/waas/models/origin.rb +191 -0
- data/lib/oci/waas/models/policy_config.rb +181 -0
- data/lib/oci/waas/models/protection_rule.rb +237 -0
- data/lib/oci/waas/models/protection_rule_action.rb +185 -0
- data/lib/oci/waas/models/protection_rule_exclusion.rb +182 -0
- data/lib/oci/waas/models/protection_settings.rb +404 -0
- data/lib/oci/waas/models/recommendation.rb +210 -0
- data/lib/oci/waas/models/threat_feed.rb +202 -0
- data/lib/oci/waas/models/threat_feed_action.rb +175 -0
- data/lib/oci/waas/models/update_certificate_details.rb +183 -0
- data/lib/oci/waas/models/update_waas_policy_details.rb +233 -0
- data/lib/oci/waas/models/waas_policy.rb +331 -0
- data/lib/oci/waas/models/waas_policy_summary.rb +271 -0
- data/lib/oci/waas/models/waf_blocked_request.rb +219 -0
- data/lib/oci/waas/models/waf_config.rb +295 -0
- data/lib/oci/waas/models/waf_config_details.rb +253 -0
- data/lib/oci/waas/models/waf_log.rb +510 -0
- data/lib/oci/waas/models/waf_meter_datum.rb +279 -0
- data/lib/oci/waas/models/waf_request.rb +177 -0
- data/lib/oci/waas/models/waf_traffic_datum.rb +223 -0
- data/lib/oci/waas/models/whitelist.rb +159 -0
- data/lib/oci/waas/models/work_request.rb +322 -0
- data/lib/oci/waas/models/work_request_error.rb +170 -0
- data/lib/oci/waas/models/work_request_log_entry.rb +159 -0
- data/lib/oci/waas/models/work_request_operation_types.rb +12 -0
- data/lib/oci/waas/models/work_request_resource.rb +217 -0
- data/lib/oci/waas/models/work_request_status_values.rb +14 -0
- data/lib/oci/waas/models/work_request_summary.rb +302 -0
- data/lib/oci/waas/util.rb +2 -0
- data/lib/oci/waas/waas.rb +66 -0
- data/lib/oci/waas/waas_client.rb +3044 -0
- data/lib/oci/waas/waas_client_composite_operations.rb +990 -0
- metadata +105 -2
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
|
|
2
|
+
|
|
3
|
+
module OCI
|
|
4
|
+
module Waas::Models
|
|
5
|
+
WORK_REQUEST_STATUS_VALUES_ENUM = [
|
|
6
|
+
WORK_REQUEST_STATUS_VALUES_ACCEPTED = 'ACCEPTED'.freeze,
|
|
7
|
+
WORK_REQUEST_STATUS_VALUES_IN_PROGRESS = 'IN_PROGRESS'.freeze,
|
|
8
|
+
WORK_REQUEST_STATUS_VALUES_FAILED = 'FAILED'.freeze,
|
|
9
|
+
WORK_REQUEST_STATUS_VALUES_SUCCEEDED = 'SUCCEEDED'.freeze,
|
|
10
|
+
WORK_REQUEST_STATUS_VALUES_CANCELING = 'CANCELING'.freeze,
|
|
11
|
+
WORK_REQUEST_STATUS_VALUES_CANCELED = 'CANCELED'.freeze
|
|
12
|
+
].freeze
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -0,0 +1,302 @@
|
|
|
1
|
+
# Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
|
|
2
|
+
|
|
3
|
+
require 'date'
|
|
4
|
+
require 'logger'
|
|
5
|
+
|
|
6
|
+
# rubocop:disable Lint/UnneededCopDisableDirective
|
|
7
|
+
module OCI
|
|
8
|
+
# The summarized details of a work request.
|
|
9
|
+
class Waas::Models::WorkRequestSummary # rubocop:disable Metrics/LineLength
|
|
10
|
+
OPERATION_TYPE_ENUM = [
|
|
11
|
+
OPERATION_TYPE_CREATE_WAAS_POLICY = 'CREATE_WAAS_POLICY'.freeze,
|
|
12
|
+
OPERATION_TYPE_UPDATE_WAAS_POLICY = 'UPDATE_WAAS_POLICY'.freeze,
|
|
13
|
+
OPERATION_TYPE_DELETE_WAAS_POLICY = 'DELETE_WAAS_POLICY'.freeze,
|
|
14
|
+
OPERATION_TYPE_PURGE_WAAS_POLICY = 'PURGE_WAAS_POLICY'.freeze,
|
|
15
|
+
OPERATION_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
|
|
16
|
+
].freeze
|
|
17
|
+
|
|
18
|
+
STATUS_ENUM = [
|
|
19
|
+
STATUS_ACCEPTED = 'ACCEPTED'.freeze,
|
|
20
|
+
STATUS_IN_PROGRESS = 'IN_PROGRESS'.freeze,
|
|
21
|
+
STATUS_FAILED = 'FAILED'.freeze,
|
|
22
|
+
STATUS_SUCCEEDED = 'SUCCEEDED'.freeze,
|
|
23
|
+
STATUS_CANCELING = 'CANCELING'.freeze,
|
|
24
|
+
STATUS_CANCELED = 'CANCELED'.freeze,
|
|
25
|
+
STATUS_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
|
|
26
|
+
].freeze
|
|
27
|
+
|
|
28
|
+
# **[Required]** The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the work request.
|
|
29
|
+
# @return [String]
|
|
30
|
+
attr_accessor :id
|
|
31
|
+
|
|
32
|
+
# **[Required]** A description of the operation requested by the work request.
|
|
33
|
+
# @return [String]
|
|
34
|
+
attr_reader :operation_type
|
|
35
|
+
|
|
36
|
+
# **[Required]** The current status of the work request.
|
|
37
|
+
# @return [String]
|
|
38
|
+
attr_reader :status
|
|
39
|
+
|
|
40
|
+
# **[Required]** The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the compartment that contains the work request.
|
|
41
|
+
# @return [String]
|
|
42
|
+
attr_accessor :compartment_id
|
|
43
|
+
|
|
44
|
+
# The resources being used to complete the work request operation.
|
|
45
|
+
# @return [Array<OCI::Waas::Models::WorkRequestResource>]
|
|
46
|
+
attr_accessor :resources
|
|
47
|
+
|
|
48
|
+
# The percentage of work completed by the work request.
|
|
49
|
+
# @return [Integer]
|
|
50
|
+
attr_accessor :percent_complete
|
|
51
|
+
|
|
52
|
+
# **[Required]** The date and time the work request was created, expressed in RFC 3339 timestamp format.
|
|
53
|
+
# @return [DateTime]
|
|
54
|
+
attr_accessor :time_accepted
|
|
55
|
+
|
|
56
|
+
# **[Required]** The date and time the work request moved from the `ACCEPTED` state to the `IN_PROGRESS` state, expressed in RFC 3339 timestamp format.
|
|
57
|
+
# @return [DateTime]
|
|
58
|
+
attr_accessor :time_started
|
|
59
|
+
|
|
60
|
+
# **[Required]** The date and time the work request was fulfilled or terminated, in the format defined by RFC3339.
|
|
61
|
+
# @return [DateTime]
|
|
62
|
+
attr_accessor :time_finished
|
|
63
|
+
|
|
64
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
65
|
+
def self.attribute_map
|
|
66
|
+
{
|
|
67
|
+
# rubocop:disable Style/SymbolLiteral
|
|
68
|
+
'id': :'id',
|
|
69
|
+
'operation_type': :'operationType',
|
|
70
|
+
'status': :'status',
|
|
71
|
+
'compartment_id': :'compartmentId',
|
|
72
|
+
'resources': :'resources',
|
|
73
|
+
'percent_complete': :'percentComplete',
|
|
74
|
+
'time_accepted': :'timeAccepted',
|
|
75
|
+
'time_started': :'timeStarted',
|
|
76
|
+
'time_finished': :'timeFinished'
|
|
77
|
+
# rubocop:enable Style/SymbolLiteral
|
|
78
|
+
}
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
# Attribute type mapping.
|
|
82
|
+
def self.swagger_types
|
|
83
|
+
{
|
|
84
|
+
# rubocop:disable Style/SymbolLiteral
|
|
85
|
+
'id': :'String',
|
|
86
|
+
'operation_type': :'String',
|
|
87
|
+
'status': :'String',
|
|
88
|
+
'compartment_id': :'String',
|
|
89
|
+
'resources': :'Array<OCI::Waas::Models::WorkRequestResource>',
|
|
90
|
+
'percent_complete': :'Integer',
|
|
91
|
+
'time_accepted': :'DateTime',
|
|
92
|
+
'time_started': :'DateTime',
|
|
93
|
+
'time_finished': :'DateTime'
|
|
94
|
+
# rubocop:enable Style/SymbolLiteral
|
|
95
|
+
}
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
99
|
+
# rubocop:disable Metrics/LineLength, Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
# Initializes the object
|
|
103
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
104
|
+
# @option attributes [String] :id The value to assign to the {#id} property
|
|
105
|
+
# @option attributes [String] :operation_type The value to assign to the {#operation_type} property
|
|
106
|
+
# @option attributes [String] :status The value to assign to the {#status} property
|
|
107
|
+
# @option attributes [String] :compartment_id The value to assign to the {#compartment_id} property
|
|
108
|
+
# @option attributes [Array<OCI::Waas::Models::WorkRequestResource>] :resources The value to assign to the {#resources} property
|
|
109
|
+
# @option attributes [Integer] :percent_complete The value to assign to the {#percent_complete} property
|
|
110
|
+
# @option attributes [DateTime] :time_accepted The value to assign to the {#time_accepted} property
|
|
111
|
+
# @option attributes [DateTime] :time_started The value to assign to the {#time_started} property
|
|
112
|
+
# @option attributes [DateTime] :time_finished The value to assign to the {#time_finished} property
|
|
113
|
+
def initialize(attributes = {})
|
|
114
|
+
return unless attributes.is_a?(Hash)
|
|
115
|
+
|
|
116
|
+
# convert string to symbol for hash key
|
|
117
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
|
118
|
+
|
|
119
|
+
self.id = attributes[:'id'] if attributes[:'id']
|
|
120
|
+
|
|
121
|
+
self.operation_type = attributes[:'operationType'] if attributes[:'operationType']
|
|
122
|
+
|
|
123
|
+
raise 'You cannot provide both :operationType and :operation_type' if attributes.key?(:'operationType') && attributes.key?(:'operation_type')
|
|
124
|
+
|
|
125
|
+
self.operation_type = attributes[:'operation_type'] if attributes[:'operation_type']
|
|
126
|
+
|
|
127
|
+
self.status = attributes[:'status'] if attributes[:'status']
|
|
128
|
+
|
|
129
|
+
self.compartment_id = attributes[:'compartmentId'] if attributes[:'compartmentId']
|
|
130
|
+
|
|
131
|
+
raise 'You cannot provide both :compartmentId and :compartment_id' if attributes.key?(:'compartmentId') && attributes.key?(:'compartment_id')
|
|
132
|
+
|
|
133
|
+
self.compartment_id = attributes[:'compartment_id'] if attributes[:'compartment_id']
|
|
134
|
+
|
|
135
|
+
self.resources = attributes[:'resources'] if attributes[:'resources']
|
|
136
|
+
|
|
137
|
+
self.percent_complete = attributes[:'percentComplete'] if attributes[:'percentComplete']
|
|
138
|
+
|
|
139
|
+
raise 'You cannot provide both :percentComplete and :percent_complete' if attributes.key?(:'percentComplete') && attributes.key?(:'percent_complete')
|
|
140
|
+
|
|
141
|
+
self.percent_complete = attributes[:'percent_complete'] if attributes[:'percent_complete']
|
|
142
|
+
|
|
143
|
+
self.time_accepted = attributes[:'timeAccepted'] if attributes[:'timeAccepted']
|
|
144
|
+
|
|
145
|
+
raise 'You cannot provide both :timeAccepted and :time_accepted' if attributes.key?(:'timeAccepted') && attributes.key?(:'time_accepted')
|
|
146
|
+
|
|
147
|
+
self.time_accepted = attributes[:'time_accepted'] if attributes[:'time_accepted']
|
|
148
|
+
|
|
149
|
+
self.time_started = attributes[:'timeStarted'] if attributes[:'timeStarted']
|
|
150
|
+
|
|
151
|
+
raise 'You cannot provide both :timeStarted and :time_started' if attributes.key?(:'timeStarted') && attributes.key?(:'time_started')
|
|
152
|
+
|
|
153
|
+
self.time_started = attributes[:'time_started'] if attributes[:'time_started']
|
|
154
|
+
|
|
155
|
+
self.time_finished = attributes[:'timeFinished'] if attributes[:'timeFinished']
|
|
156
|
+
|
|
157
|
+
raise 'You cannot provide both :timeFinished and :time_finished' if attributes.key?(:'timeFinished') && attributes.key?(:'time_finished')
|
|
158
|
+
|
|
159
|
+
self.time_finished = attributes[:'time_finished'] if attributes[:'time_finished']
|
|
160
|
+
end
|
|
161
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
162
|
+
# rubocop:enable Metrics/LineLength, Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
|
|
163
|
+
|
|
164
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
165
|
+
# @param [Object] operation_type Object to be assigned
|
|
166
|
+
def operation_type=(operation_type)
|
|
167
|
+
# rubocop:disable Style/ConditionalAssignment
|
|
168
|
+
if operation_type && !OPERATION_TYPE_ENUM.include?(operation_type)
|
|
169
|
+
# rubocop: disable Metrics/LineLength
|
|
170
|
+
OCI.logger.debug("Unknown value for 'operation_type' [" + operation_type + "]. Mapping to 'OPERATION_TYPE_UNKNOWN_ENUM_VALUE'") if OCI.logger
|
|
171
|
+
# rubocop: enable Metrics/LineLength
|
|
172
|
+
@operation_type = OPERATION_TYPE_UNKNOWN_ENUM_VALUE
|
|
173
|
+
else
|
|
174
|
+
@operation_type = operation_type
|
|
175
|
+
end
|
|
176
|
+
# rubocop:enable Style/ConditionalAssignment
|
|
177
|
+
end
|
|
178
|
+
|
|
179
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
180
|
+
# @param [Object] status Object to be assigned
|
|
181
|
+
def status=(status)
|
|
182
|
+
# rubocop:disable Style/ConditionalAssignment
|
|
183
|
+
if status && !STATUS_ENUM.include?(status)
|
|
184
|
+
# rubocop: disable Metrics/LineLength
|
|
185
|
+
OCI.logger.debug("Unknown value for 'status' [" + status + "]. Mapping to 'STATUS_UNKNOWN_ENUM_VALUE'") if OCI.logger
|
|
186
|
+
# rubocop: enable Metrics/LineLength
|
|
187
|
+
@status = STATUS_UNKNOWN_ENUM_VALUE
|
|
188
|
+
else
|
|
189
|
+
@status = status
|
|
190
|
+
end
|
|
191
|
+
# rubocop:enable Style/ConditionalAssignment
|
|
192
|
+
end
|
|
193
|
+
|
|
194
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Metrics/LineLength, Layout/EmptyLines
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
# Checks equality by comparing each attribute.
|
|
198
|
+
# @param [Object] other the other object to be compared
|
|
199
|
+
def ==(other)
|
|
200
|
+
return true if equal?(other)
|
|
201
|
+
|
|
202
|
+
self.class == other.class &&
|
|
203
|
+
id == other.id &&
|
|
204
|
+
operation_type == other.operation_type &&
|
|
205
|
+
status == other.status &&
|
|
206
|
+
compartment_id == other.compartment_id &&
|
|
207
|
+
resources == other.resources &&
|
|
208
|
+
percent_complete == other.percent_complete &&
|
|
209
|
+
time_accepted == other.time_accepted &&
|
|
210
|
+
time_started == other.time_started &&
|
|
211
|
+
time_finished == other.time_finished
|
|
212
|
+
end
|
|
213
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Metrics/LineLength, Layout/EmptyLines
|
|
214
|
+
|
|
215
|
+
# @see the `==` method
|
|
216
|
+
# @param [Object] other the other object to be compared
|
|
217
|
+
def eql?(other)
|
|
218
|
+
self == other
|
|
219
|
+
end
|
|
220
|
+
|
|
221
|
+
# rubocop:disable Metrics/AbcSize, Metrics/LineLength, Layout/EmptyLines
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
# Calculates hash code according to all attributes.
|
|
225
|
+
# @return [Fixnum] Hash code
|
|
226
|
+
def hash
|
|
227
|
+
[id, operation_type, status, compartment_id, resources, percent_complete, time_accepted, time_started, time_finished].hash
|
|
228
|
+
end
|
|
229
|
+
# rubocop:enable Metrics/AbcSize, Metrics/LineLength, Layout/EmptyLines
|
|
230
|
+
|
|
231
|
+
# rubocop:disable Metrics/AbcSize, Layout/EmptyLines
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
# Builds the object from hash
|
|
235
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
236
|
+
# @return [Object] Returns the model itself
|
|
237
|
+
def build_from_hash(attributes)
|
|
238
|
+
return nil unless attributes.is_a?(Hash)
|
|
239
|
+
|
|
240
|
+
self.class.swagger_types.each_pair do |key, type|
|
|
241
|
+
if type =~ /^Array<(.*)>/i
|
|
242
|
+
# check to ensure the input is an array given that the the attribute
|
|
243
|
+
# is documented as an array but the input is not
|
|
244
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
245
|
+
public_method("#{key}=").call(
|
|
246
|
+
attributes[self.class.attribute_map[key]]
|
|
247
|
+
.map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) }
|
|
248
|
+
)
|
|
249
|
+
end
|
|
250
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
251
|
+
public_method("#{key}=").call(
|
|
252
|
+
OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]])
|
|
253
|
+
)
|
|
254
|
+
end
|
|
255
|
+
# or else data not found in attributes(hash), not an issue as the data can be optional
|
|
256
|
+
end
|
|
257
|
+
|
|
258
|
+
self
|
|
259
|
+
end
|
|
260
|
+
# rubocop:enable Metrics/AbcSize, Layout/EmptyLines
|
|
261
|
+
|
|
262
|
+
# Returns the string representation of the object
|
|
263
|
+
# @return [String] String presentation of the object
|
|
264
|
+
def to_s
|
|
265
|
+
to_hash.to_s
|
|
266
|
+
end
|
|
267
|
+
|
|
268
|
+
# Returns the object in the form of hash
|
|
269
|
+
# @return [Hash] Returns the object in the form of hash
|
|
270
|
+
def to_hash
|
|
271
|
+
hash = {}
|
|
272
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
273
|
+
value = public_method(attr).call
|
|
274
|
+
next if value.nil? && !instance_variable_defined?("@#{attr}")
|
|
275
|
+
|
|
276
|
+
hash[param] = _to_hash(value)
|
|
277
|
+
end
|
|
278
|
+
hash
|
|
279
|
+
end
|
|
280
|
+
|
|
281
|
+
private
|
|
282
|
+
|
|
283
|
+
# Outputs non-array value in the form of hash
|
|
284
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
285
|
+
# @param [Object] value Any valid value
|
|
286
|
+
# @return [Hash] Returns the value in the form of hash
|
|
287
|
+
def _to_hash(value)
|
|
288
|
+
if value.is_a?(Array)
|
|
289
|
+
value.compact.map { |v| _to_hash(v) }
|
|
290
|
+
elsif value.is_a?(Hash)
|
|
291
|
+
{}.tap do |hash|
|
|
292
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
293
|
+
end
|
|
294
|
+
elsif value.respond_to? :to_hash
|
|
295
|
+
value.to_hash
|
|
296
|
+
else
|
|
297
|
+
value
|
|
298
|
+
end
|
|
299
|
+
end
|
|
300
|
+
end
|
|
301
|
+
end
|
|
302
|
+
# rubocop:enable Lint/UnneededCopDisableDirective
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
|
|
2
|
+
|
|
3
|
+
module OCI
|
|
4
|
+
module Waas
|
|
5
|
+
# Module containing models for requests made to, and responses received from,
|
|
6
|
+
# OCI Waas services
|
|
7
|
+
module Models
|
|
8
|
+
end
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
# Require models
|
|
13
|
+
require 'oci/waas/models/access_rule'
|
|
14
|
+
require 'oci/waas/models/access_rule_criteria'
|
|
15
|
+
require 'oci/waas/models/address_rate_limiting'
|
|
16
|
+
require 'oci/waas/models/block_challenge_settings'
|
|
17
|
+
require 'oci/waas/models/captcha'
|
|
18
|
+
require 'oci/waas/models/certificate'
|
|
19
|
+
require 'oci/waas/models/certificate_extensions'
|
|
20
|
+
require 'oci/waas/models/certificate_public_key_info'
|
|
21
|
+
require 'oci/waas/models/certificate_subject_name'
|
|
22
|
+
require 'oci/waas/models/certificate_summary'
|
|
23
|
+
require 'oci/waas/models/create_certificate_details'
|
|
24
|
+
require 'oci/waas/models/create_waas_policy_details'
|
|
25
|
+
require 'oci/waas/models/device_fingerprint_challenge'
|
|
26
|
+
require 'oci/waas/models/edge_subnet'
|
|
27
|
+
require 'oci/waas/models/good_bot'
|
|
28
|
+
require 'oci/waas/models/header'
|
|
29
|
+
require 'oci/waas/models/human_interaction_challenge'
|
|
30
|
+
require 'oci/waas/models/js_challenge'
|
|
31
|
+
require 'oci/waas/models/lifecycle_states'
|
|
32
|
+
require 'oci/waas/models/origin'
|
|
33
|
+
require 'oci/waas/models/policy_config'
|
|
34
|
+
require 'oci/waas/models/protection_rule'
|
|
35
|
+
require 'oci/waas/models/protection_rule_action'
|
|
36
|
+
require 'oci/waas/models/protection_rule_exclusion'
|
|
37
|
+
require 'oci/waas/models/protection_settings'
|
|
38
|
+
require 'oci/waas/models/recommendation'
|
|
39
|
+
require 'oci/waas/models/threat_feed'
|
|
40
|
+
require 'oci/waas/models/threat_feed_action'
|
|
41
|
+
require 'oci/waas/models/update_certificate_details'
|
|
42
|
+
require 'oci/waas/models/update_waas_policy_details'
|
|
43
|
+
require 'oci/waas/models/waas_policy'
|
|
44
|
+
require 'oci/waas/models/waas_policy_summary'
|
|
45
|
+
require 'oci/waas/models/waf_blocked_request'
|
|
46
|
+
require 'oci/waas/models/waf_config'
|
|
47
|
+
require 'oci/waas/models/waf_config_details'
|
|
48
|
+
require 'oci/waas/models/waf_log'
|
|
49
|
+
require 'oci/waas/models/waf_meter_datum'
|
|
50
|
+
require 'oci/waas/models/waf_request'
|
|
51
|
+
require 'oci/waas/models/waf_traffic_datum'
|
|
52
|
+
require 'oci/waas/models/whitelist'
|
|
53
|
+
require 'oci/waas/models/work_request'
|
|
54
|
+
require 'oci/waas/models/work_request_error'
|
|
55
|
+
require 'oci/waas/models/work_request_log_entry'
|
|
56
|
+
require 'oci/waas/models/work_request_operation_types'
|
|
57
|
+
require 'oci/waas/models/work_request_resource'
|
|
58
|
+
require 'oci/waas/models/work_request_status_values'
|
|
59
|
+
require 'oci/waas/models/work_request_summary'
|
|
60
|
+
|
|
61
|
+
# Require generated clients
|
|
62
|
+
require 'oci/waas/waas_client'
|
|
63
|
+
require 'oci/waas/waas_client_composite_operations'
|
|
64
|
+
|
|
65
|
+
# Require service utilities
|
|
66
|
+
require 'oci/waas/util'
|
|
@@ -0,0 +1,3044 @@
|
|
|
1
|
+
# Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
|
|
2
|
+
|
|
3
|
+
require 'uri'
|
|
4
|
+
require 'logger'
|
|
5
|
+
|
|
6
|
+
# rubocop:disable Lint/UnneededCopDisableDirective, Metrics/LineLength
|
|
7
|
+
module OCI
|
|
8
|
+
# OCI Web Application Acceleration and Security Services
|
|
9
|
+
class Waas::WaasClient
|
|
10
|
+
# Client used to make HTTP requests.
|
|
11
|
+
# @return [OCI::ApiClient]
|
|
12
|
+
attr_reader :api_client
|
|
13
|
+
|
|
14
|
+
# Fully qualified endpoint URL
|
|
15
|
+
# @return [String]
|
|
16
|
+
attr_reader :endpoint
|
|
17
|
+
|
|
18
|
+
# The default retry configuration to apply to all operations in this service client. This can be overridden
|
|
19
|
+
# on a per-operation basis. The default retry configuration value is `nil`, which means that an operation
|
|
20
|
+
# will not perform any retries
|
|
21
|
+
# @return [OCI::Retry::RetryConfig]
|
|
22
|
+
attr_reader :retry_config
|
|
23
|
+
|
|
24
|
+
# The region, which will usually correspond to a value in {OCI::Regions::REGION_ENUM}.
|
|
25
|
+
# @return [String]
|
|
26
|
+
attr_reader :region
|
|
27
|
+
|
|
28
|
+
# rubocop:disable Metrics/AbcSize, Metrics/CyclomaticComplexity, Layout/EmptyLines
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
# Creates a new WaasClient.
|
|
32
|
+
# Notes:
|
|
33
|
+
# If a config is not specified, then the global OCI.config will be used.
|
|
34
|
+
# This client is not thread-safe
|
|
35
|
+
#
|
|
36
|
+
# A region must be specified in either the config or the region parameter. If specified in both,
|
|
37
|
+
# then the region parameter will be used.
|
|
38
|
+
#
|
|
39
|
+
# @param [Config] config A Config object.
|
|
40
|
+
# @param [String] region A region used to determine the service endpoint. This will usually
|
|
41
|
+
# correspond to a value in {OCI::Regions::REGION_ENUM}, but may be an arbitrary string.
|
|
42
|
+
# @param [OCI::BaseSigner] signer A signer implementation which can be used by this client. If this is not provided then
|
|
43
|
+
# a signer will be constructed via the provided config. One use case of this parameter is instance principals authentication,
|
|
44
|
+
# so that the instance principals signer can be provided to the client
|
|
45
|
+
# @param [OCI::ApiClientProxySettings] proxy_settings If your environment requires you to use a proxy server for outgoing HTTP requests
|
|
46
|
+
# the details for the proxy can be provided in this parameter
|
|
47
|
+
# @param [OCI::Retry::RetryConfig] retry_config The retry configuration for this service client. This represents the default retry configuration to
|
|
48
|
+
# apply across all operations. This can be overridden on a per-operation basis. The default retry configuration value is `nil`, which means that an operation
|
|
49
|
+
# will not perform any retries
|
|
50
|
+
def initialize(config: nil, region: nil, signer: nil, proxy_settings: nil, retry_config: nil)
|
|
51
|
+
# If the signer is an InstancePrincipalsSecurityTokenSigner and no config was supplied (which is valid for instance principals)
|
|
52
|
+
# then create a dummy config to pass to the ApiClient constructor. If customers wish to create a client which uses instance principals
|
|
53
|
+
# and has config (either populated programmatically or loaded from a file), they must construct that config themselves and then
|
|
54
|
+
# pass it to this constructor.
|
|
55
|
+
#
|
|
56
|
+
# If there is no signer (or the signer is not an instance principals signer) and no config was supplied, this is not valid
|
|
57
|
+
# so try and load the config from the default file.
|
|
58
|
+
config ||= OCI.config unless signer.is_a?(OCI::Auth::Signers::InstancePrincipalsSecurityTokenSigner)
|
|
59
|
+
config ||= OCI::Config.new if signer.is_a?(OCI::Auth::Signers::InstancePrincipalsSecurityTokenSigner)
|
|
60
|
+
config.validate unless signer.is_a?(OCI::Auth::Signers::InstancePrincipalsSecurityTokenSigner)
|
|
61
|
+
|
|
62
|
+
if signer.nil?
|
|
63
|
+
signer = OCI::Signer.new(
|
|
64
|
+
config.user,
|
|
65
|
+
config.fingerprint,
|
|
66
|
+
config.tenancy,
|
|
67
|
+
config.key_file,
|
|
68
|
+
pass_phrase: config.pass_phrase,
|
|
69
|
+
private_key_content: config.key_content
|
|
70
|
+
)
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
@api_client = OCI::ApiClient.new(config, signer, proxy_settings: proxy_settings)
|
|
74
|
+
@retry_config = retry_config
|
|
75
|
+
|
|
76
|
+
region ||= config.region
|
|
77
|
+
region ||= signer.region if signer.respond_to?(:region)
|
|
78
|
+
self.region = region
|
|
79
|
+
end
|
|
80
|
+
# rubocop:enable Metrics/AbcSize, Metrics/CyclomaticComplexity, Layout/EmptyLines
|
|
81
|
+
|
|
82
|
+
# Set the region that will be used to determine the service endpoint.
|
|
83
|
+
# This will usually correspond to a value in {OCI::Regions::REGION_ENUM},
|
|
84
|
+
# but may be an arbitrary string.
|
|
85
|
+
def region=(new_region)
|
|
86
|
+
@region = new_region
|
|
87
|
+
|
|
88
|
+
raise 'A region must be specified.' unless @region
|
|
89
|
+
|
|
90
|
+
@endpoint = OCI::Regions.get_service_endpoint(@region, :WaasClient) + '/20181116'
|
|
91
|
+
logger.info "WaasClient endpoint set to '#{endpoint}'." if logger
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
# @return [Logger] The logger for this client. May be nil.
|
|
95
|
+
def logger
|
|
96
|
+
@api_client.config.logger
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
100
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
101
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
# 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.
|
|
105
|
+
#
|
|
106
|
+
# Use the `GET /waasPolicies/{waasPolicyId}/wafConfig/recommendations` method to view a list of recommended Web Application Firewall protection rules. For more information, see [WAF Protection Rules](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/WAF/Tasks/wafprotectionrules.htm).
|
|
107
|
+
# @param [String] waas_policy_id The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the WAAS policy.
|
|
108
|
+
# @param [Array<String>] protection_rule_keys
|
|
109
|
+
# @param [Hash] opts the optional parameters
|
|
110
|
+
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
|
|
111
|
+
# retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
|
|
112
|
+
# @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
|
|
113
|
+
# @option opts [String] :if_match For optimistic concurrency control. In the `PUT` or `DELETE` call for a resource, set the `if-match` parameter to the value of the etag from a previous `GET` or `POST` response for that resource. The resource will be updated or deleted only if the etag provided matches the resource's current etag value.
|
|
114
|
+
# @return [Response] A Response object with data of type nil
|
|
115
|
+
def accept_recommendations(waas_policy_id, protection_rule_keys, opts = {})
|
|
116
|
+
logger.debug 'Calling operation WaasClient#accept_recommendations.' if logger
|
|
117
|
+
|
|
118
|
+
raise "Missing the required parameter 'waas_policy_id' when calling accept_recommendations." if waas_policy_id.nil?
|
|
119
|
+
raise "Missing the required parameter 'protection_rule_keys' when calling accept_recommendations." if protection_rule_keys.nil?
|
|
120
|
+
raise "Parameter value for 'waas_policy_id' must not be blank" if OCI::Internal::Util.blank_string?(waas_policy_id)
|
|
121
|
+
|
|
122
|
+
path = '/waasPolicies/{waasPolicyId}/actions/acceptWafConfigRecommendations'.sub('{waasPolicyId}', waas_policy_id.to_s)
|
|
123
|
+
operation_signing_strategy = :standard
|
|
124
|
+
|
|
125
|
+
# rubocop:disable Style/NegatedIf
|
|
126
|
+
# Query Params
|
|
127
|
+
query_params = {}
|
|
128
|
+
|
|
129
|
+
# Header Params
|
|
130
|
+
header_params = {}
|
|
131
|
+
header_params[:accept] = 'application/json'
|
|
132
|
+
header_params[:'content-type'] = 'application/json'
|
|
133
|
+
header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
|
|
134
|
+
header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
|
|
135
|
+
# rubocop:enable Style/NegatedIf
|
|
136
|
+
|
|
137
|
+
post_body = @api_client.object_to_http_body(protection_rule_keys)
|
|
138
|
+
|
|
139
|
+
# rubocop:disable Metrics/BlockLength
|
|
140
|
+
OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'WaasClient#accept_recommendations') do
|
|
141
|
+
@api_client.call_api(
|
|
142
|
+
:POST,
|
|
143
|
+
path,
|
|
144
|
+
endpoint,
|
|
145
|
+
header_params: header_params,
|
|
146
|
+
query_params: query_params,
|
|
147
|
+
operation_signing_strategy: operation_signing_strategy,
|
|
148
|
+
body: post_body
|
|
149
|
+
)
|
|
150
|
+
end
|
|
151
|
+
# rubocop:enable Metrics/BlockLength
|
|
152
|
+
end
|
|
153
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
154
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
155
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
|
156
|
+
|
|
157
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
158
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
159
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
# Cancels a specified work request.
|
|
163
|
+
# @param [String] work_request_id The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the work request. This number is generated when work request is created.
|
|
164
|
+
# @param [Hash] opts the optional parameters
|
|
165
|
+
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
|
|
166
|
+
# retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
|
|
167
|
+
# @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
|
|
168
|
+
# @option opts [String] :opc_retry_token A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations
|
|
169
|
+
# *Example:* If a resource has been deleted and purged from the system, then a retry of the original delete request may be rejected.
|
|
170
|
+
# @option opts [String] :if_match For optimistic concurrency control. In the `PUT` or `DELETE` call for a resource, set the `if-match` parameter to the value of the etag from a previous `GET` or `POST` response for that resource. The resource will be updated or deleted only if the etag provided matches the resource's current etag value.
|
|
171
|
+
# @return [Response] A Response object with data of type nil
|
|
172
|
+
def cancel_work_request(work_request_id, opts = {})
|
|
173
|
+
logger.debug 'Calling operation WaasClient#cancel_work_request.' if logger
|
|
174
|
+
|
|
175
|
+
raise "Missing the required parameter 'work_request_id' when calling cancel_work_request." if work_request_id.nil?
|
|
176
|
+
raise "Parameter value for 'work_request_id' must not be blank" if OCI::Internal::Util.blank_string?(work_request_id)
|
|
177
|
+
|
|
178
|
+
path = '/workRequests/{workRequestId}'.sub('{workRequestId}', work_request_id.to_s)
|
|
179
|
+
operation_signing_strategy = :standard
|
|
180
|
+
|
|
181
|
+
# rubocop:disable Style/NegatedIf
|
|
182
|
+
# Query Params
|
|
183
|
+
query_params = {}
|
|
184
|
+
|
|
185
|
+
# Header Params
|
|
186
|
+
header_params = {}
|
|
187
|
+
header_params[:accept] = 'application/json'
|
|
188
|
+
header_params[:'content-type'] = 'application/json'
|
|
189
|
+
header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
|
|
190
|
+
header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
|
|
191
|
+
header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
|
|
192
|
+
# rubocop:enable Style/NegatedIf
|
|
193
|
+
header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token
|
|
194
|
+
|
|
195
|
+
post_body = nil
|
|
196
|
+
|
|
197
|
+
# rubocop:disable Metrics/BlockLength
|
|
198
|
+
OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'WaasClient#cancel_work_request') do
|
|
199
|
+
@api_client.call_api(
|
|
200
|
+
:DELETE,
|
|
201
|
+
path,
|
|
202
|
+
endpoint,
|
|
203
|
+
header_params: header_params,
|
|
204
|
+
query_params: query_params,
|
|
205
|
+
operation_signing_strategy: operation_signing_strategy,
|
|
206
|
+
body: post_body
|
|
207
|
+
)
|
|
208
|
+
end
|
|
209
|
+
# rubocop:enable Metrics/BlockLength
|
|
210
|
+
end
|
|
211
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
212
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
213
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
|
214
|
+
|
|
215
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
216
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
217
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+
# 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.
|
|
221
|
+
#
|
|
222
|
+
# For more information, see [WAF Settings](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/WAF/Tasks/wafsettings.htm).
|
|
223
|
+
# @param [OCI::Waas::Models::CreateCertificateDetails] create_certificate_details The details of the SSL certificate resource to create.
|
|
224
|
+
# @param [Hash] opts the optional parameters
|
|
225
|
+
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
|
|
226
|
+
# retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
|
|
227
|
+
# @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
|
|
228
|
+
# @option opts [String] :opc_retry_token A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations
|
|
229
|
+
# *Example:* If a resource has been deleted and purged from the system, then a retry of the original delete request may be rejected.
|
|
230
|
+
# @return [Response] A Response object with data of type {OCI::Waas::Models::Certificate Certificate}
|
|
231
|
+
def create_certificate(create_certificate_details, opts = {})
|
|
232
|
+
logger.debug 'Calling operation WaasClient#create_certificate.' if logger
|
|
233
|
+
|
|
234
|
+
raise "Missing the required parameter 'create_certificate_details' when calling create_certificate." if create_certificate_details.nil?
|
|
235
|
+
|
|
236
|
+
path = '/certificates'
|
|
237
|
+
operation_signing_strategy = :standard
|
|
238
|
+
|
|
239
|
+
# rubocop:disable Style/NegatedIf
|
|
240
|
+
# Query Params
|
|
241
|
+
query_params = {}
|
|
242
|
+
|
|
243
|
+
# Header Params
|
|
244
|
+
header_params = {}
|
|
245
|
+
header_params[:accept] = 'application/json'
|
|
246
|
+
header_params[:'content-type'] = 'application/json'
|
|
247
|
+
header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
|
|
248
|
+
header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
|
|
249
|
+
# rubocop:enable Style/NegatedIf
|
|
250
|
+
header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token
|
|
251
|
+
|
|
252
|
+
post_body = @api_client.object_to_http_body(create_certificate_details)
|
|
253
|
+
|
|
254
|
+
# rubocop:disable Metrics/BlockLength
|
|
255
|
+
OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'WaasClient#create_certificate') do
|
|
256
|
+
@api_client.call_api(
|
|
257
|
+
:POST,
|
|
258
|
+
path,
|
|
259
|
+
endpoint,
|
|
260
|
+
header_params: header_params,
|
|
261
|
+
query_params: query_params,
|
|
262
|
+
operation_signing_strategy: operation_signing_strategy,
|
|
263
|
+
body: post_body,
|
|
264
|
+
return_type: 'OCI::Waas::Models::Certificate'
|
|
265
|
+
)
|
|
266
|
+
end
|
|
267
|
+
# rubocop:enable Metrics/BlockLength
|
|
268
|
+
end
|
|
269
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
270
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
271
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
|
272
|
+
|
|
273
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
274
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
275
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
|
276
|
+
|
|
277
|
+
|
|
278
|
+
# 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.
|
|
279
|
+
#
|
|
280
|
+
# 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.
|
|
281
|
+
#
|
|
282
|
+
# 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.
|
|
283
|
+
#
|
|
284
|
+
# 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](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/Identity/Concepts/overview.htm).
|
|
285
|
+
#
|
|
286
|
+
# 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`.
|
|
287
|
+
#
|
|
288
|
+
# 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](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/General/Concepts/identifiers.htm).
|
|
289
|
+
#
|
|
290
|
+
# **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.
|
|
291
|
+
# @param [OCI::Waas::Models::CreateWaasPolicyDetails] create_waas_policy_details The details of the WAAS policy.
|
|
292
|
+
# @param [Hash] opts the optional parameters
|
|
293
|
+
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
|
|
294
|
+
# retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
|
|
295
|
+
# @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
|
|
296
|
+
# @option opts [String] :opc_retry_token A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations
|
|
297
|
+
# *Example:* If a resource has been deleted and purged from the system, then a retry of the original delete request may be rejected.
|
|
298
|
+
# @return [Response] A Response object with data of type nil
|
|
299
|
+
def create_waas_policy(create_waas_policy_details, opts = {})
|
|
300
|
+
logger.debug 'Calling operation WaasClient#create_waas_policy.' if logger
|
|
301
|
+
|
|
302
|
+
raise "Missing the required parameter 'create_waas_policy_details' when calling create_waas_policy." if create_waas_policy_details.nil?
|
|
303
|
+
|
|
304
|
+
path = '/waasPolicies'
|
|
305
|
+
operation_signing_strategy = :standard
|
|
306
|
+
|
|
307
|
+
# rubocop:disable Style/NegatedIf
|
|
308
|
+
# Query Params
|
|
309
|
+
query_params = {}
|
|
310
|
+
|
|
311
|
+
# Header Params
|
|
312
|
+
header_params = {}
|
|
313
|
+
header_params[:accept] = 'application/json'
|
|
314
|
+
header_params[:'content-type'] = 'application/json'
|
|
315
|
+
header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
|
|
316
|
+
header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
|
|
317
|
+
# rubocop:enable Style/NegatedIf
|
|
318
|
+
header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token
|
|
319
|
+
|
|
320
|
+
post_body = @api_client.object_to_http_body(create_waas_policy_details)
|
|
321
|
+
|
|
322
|
+
# rubocop:disable Metrics/BlockLength
|
|
323
|
+
OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'WaasClient#create_waas_policy') do
|
|
324
|
+
@api_client.call_api(
|
|
325
|
+
:POST,
|
|
326
|
+
path,
|
|
327
|
+
endpoint,
|
|
328
|
+
header_params: header_params,
|
|
329
|
+
query_params: query_params,
|
|
330
|
+
operation_signing_strategy: operation_signing_strategy,
|
|
331
|
+
body: post_body
|
|
332
|
+
)
|
|
333
|
+
end
|
|
334
|
+
# rubocop:enable Metrics/BlockLength
|
|
335
|
+
end
|
|
336
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
337
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
338
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
|
339
|
+
|
|
340
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
341
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
342
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
|
343
|
+
|
|
344
|
+
|
|
345
|
+
# Deletes an SSL certificate from the WAAS service.
|
|
346
|
+
# @param [String] certificate_id The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the SSL certificate used in the WAAS policy. This number is generated when the certificate is added to the policy.
|
|
347
|
+
# @param [Hash] opts the optional parameters
|
|
348
|
+
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
|
|
349
|
+
# retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
|
|
350
|
+
# @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
|
|
351
|
+
# @option opts [String] :opc_retry_token A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations
|
|
352
|
+
# *Example:* If a resource has been deleted and purged from the system, then a retry of the original delete request may be rejected.
|
|
353
|
+
# @option opts [String] :if_match For optimistic concurrency control. In the `PUT` or `DELETE` call for a resource, set the `if-match` parameter to the value of the etag from a previous `GET` or `POST` response for that resource. The resource will be updated or deleted only if the etag provided matches the resource's current etag value.
|
|
354
|
+
# @return [Response] A Response object with data of type nil
|
|
355
|
+
def delete_certificate(certificate_id, opts = {})
|
|
356
|
+
logger.debug 'Calling operation WaasClient#delete_certificate.' if logger
|
|
357
|
+
|
|
358
|
+
raise "Missing the required parameter 'certificate_id' when calling delete_certificate." if certificate_id.nil?
|
|
359
|
+
raise "Parameter value for 'certificate_id' must not be blank" if OCI::Internal::Util.blank_string?(certificate_id)
|
|
360
|
+
|
|
361
|
+
path = '/certificates/{certificateId}'.sub('{certificateId}', certificate_id.to_s)
|
|
362
|
+
operation_signing_strategy = :standard
|
|
363
|
+
|
|
364
|
+
# rubocop:disable Style/NegatedIf
|
|
365
|
+
# Query Params
|
|
366
|
+
query_params = {}
|
|
367
|
+
|
|
368
|
+
# Header Params
|
|
369
|
+
header_params = {}
|
|
370
|
+
header_params[:accept] = 'application/json'
|
|
371
|
+
header_params[:'content-type'] = 'application/json'
|
|
372
|
+
header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
|
|
373
|
+
header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
|
|
374
|
+
header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
|
|
375
|
+
# rubocop:enable Style/NegatedIf
|
|
376
|
+
header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token
|
|
377
|
+
|
|
378
|
+
post_body = nil
|
|
379
|
+
|
|
380
|
+
# rubocop:disable Metrics/BlockLength
|
|
381
|
+
OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'WaasClient#delete_certificate') do
|
|
382
|
+
@api_client.call_api(
|
|
383
|
+
:DELETE,
|
|
384
|
+
path,
|
|
385
|
+
endpoint,
|
|
386
|
+
header_params: header_params,
|
|
387
|
+
query_params: query_params,
|
|
388
|
+
operation_signing_strategy: operation_signing_strategy,
|
|
389
|
+
body: post_body
|
|
390
|
+
)
|
|
391
|
+
end
|
|
392
|
+
# rubocop:enable Metrics/BlockLength
|
|
393
|
+
end
|
|
394
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
395
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
396
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
|
397
|
+
|
|
398
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
399
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
400
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
|
401
|
+
|
|
402
|
+
|
|
403
|
+
# Deletes a policy.
|
|
404
|
+
# @param [String] waas_policy_id The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the WAAS policy.
|
|
405
|
+
# @param [Hash] opts the optional parameters
|
|
406
|
+
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
|
|
407
|
+
# retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
|
|
408
|
+
# @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
|
|
409
|
+
# @option opts [String] :opc_retry_token A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations
|
|
410
|
+
# *Example:* If a resource has been deleted and purged from the system, then a retry of the original delete request may be rejected.
|
|
411
|
+
# @option opts [String] :if_match For optimistic concurrency control. In the `PUT` or `DELETE` call for a resource, set the `if-match` parameter to the value of the etag from a previous `GET` or `POST` response for that resource. The resource will be updated or deleted only if the etag provided matches the resource's current etag value.
|
|
412
|
+
# @return [Response] A Response object with data of type nil
|
|
413
|
+
def delete_waas_policy(waas_policy_id, opts = {})
|
|
414
|
+
logger.debug 'Calling operation WaasClient#delete_waas_policy.' if logger
|
|
415
|
+
|
|
416
|
+
raise "Missing the required parameter 'waas_policy_id' when calling delete_waas_policy." if waas_policy_id.nil?
|
|
417
|
+
raise "Parameter value for 'waas_policy_id' must not be blank" if OCI::Internal::Util.blank_string?(waas_policy_id)
|
|
418
|
+
|
|
419
|
+
path = '/waasPolicies/{waasPolicyId}'.sub('{waasPolicyId}', waas_policy_id.to_s)
|
|
420
|
+
operation_signing_strategy = :standard
|
|
421
|
+
|
|
422
|
+
# rubocop:disable Style/NegatedIf
|
|
423
|
+
# Query Params
|
|
424
|
+
query_params = {}
|
|
425
|
+
|
|
426
|
+
# Header Params
|
|
427
|
+
header_params = {}
|
|
428
|
+
header_params[:accept] = 'application/json'
|
|
429
|
+
header_params[:'content-type'] = 'application/json'
|
|
430
|
+
header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
|
|
431
|
+
header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
|
|
432
|
+
header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
|
|
433
|
+
# rubocop:enable Style/NegatedIf
|
|
434
|
+
header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token
|
|
435
|
+
|
|
436
|
+
post_body = nil
|
|
437
|
+
|
|
438
|
+
# rubocop:disable Metrics/BlockLength
|
|
439
|
+
OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'WaasClient#delete_waas_policy') do
|
|
440
|
+
@api_client.call_api(
|
|
441
|
+
:DELETE,
|
|
442
|
+
path,
|
|
443
|
+
endpoint,
|
|
444
|
+
header_params: header_params,
|
|
445
|
+
query_params: query_params,
|
|
446
|
+
operation_signing_strategy: operation_signing_strategy,
|
|
447
|
+
body: post_body
|
|
448
|
+
)
|
|
449
|
+
end
|
|
450
|
+
# rubocop:enable Metrics/BlockLength
|
|
451
|
+
end
|
|
452
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
453
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
454
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
|
455
|
+
|
|
456
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
457
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
458
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
|
459
|
+
|
|
460
|
+
|
|
461
|
+
# Gets the details of an SSL certificate.
|
|
462
|
+
# @param [String] certificate_id The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the SSL certificate used in the WAAS policy. This number is generated when the certificate is added to the policy.
|
|
463
|
+
# @param [Hash] opts the optional parameters
|
|
464
|
+
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
|
|
465
|
+
# retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
|
|
466
|
+
# @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
|
|
467
|
+
# @return [Response] A Response object with data of type {OCI::Waas::Models::Certificate Certificate}
|
|
468
|
+
def get_certificate(certificate_id, opts = {})
|
|
469
|
+
logger.debug 'Calling operation WaasClient#get_certificate.' if logger
|
|
470
|
+
|
|
471
|
+
raise "Missing the required parameter 'certificate_id' when calling get_certificate." if certificate_id.nil?
|
|
472
|
+
raise "Parameter value for 'certificate_id' must not be blank" if OCI::Internal::Util.blank_string?(certificate_id)
|
|
473
|
+
|
|
474
|
+
path = '/certificates/{certificateId}'.sub('{certificateId}', certificate_id.to_s)
|
|
475
|
+
operation_signing_strategy = :standard
|
|
476
|
+
|
|
477
|
+
# rubocop:disable Style/NegatedIf
|
|
478
|
+
# Query Params
|
|
479
|
+
query_params = {}
|
|
480
|
+
|
|
481
|
+
# Header Params
|
|
482
|
+
header_params = {}
|
|
483
|
+
header_params[:accept] = 'application/json'
|
|
484
|
+
header_params[:'content-type'] = 'application/json'
|
|
485
|
+
header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
|
|
486
|
+
# rubocop:enable Style/NegatedIf
|
|
487
|
+
|
|
488
|
+
post_body = nil
|
|
489
|
+
|
|
490
|
+
# rubocop:disable Metrics/BlockLength
|
|
491
|
+
OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'WaasClient#get_certificate') do
|
|
492
|
+
@api_client.call_api(
|
|
493
|
+
:GET,
|
|
494
|
+
path,
|
|
495
|
+
endpoint,
|
|
496
|
+
header_params: header_params,
|
|
497
|
+
query_params: query_params,
|
|
498
|
+
operation_signing_strategy: operation_signing_strategy,
|
|
499
|
+
body: post_body,
|
|
500
|
+
return_type: 'OCI::Waas::Models::Certificate'
|
|
501
|
+
)
|
|
502
|
+
end
|
|
503
|
+
# rubocop:enable Metrics/BlockLength
|
|
504
|
+
end
|
|
505
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
506
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
507
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
|
508
|
+
|
|
509
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
510
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
511
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
|
512
|
+
|
|
513
|
+
|
|
514
|
+
# Gets the device fingerprint challenge settings in the Web Application Firewall configuration for a WAAS policy.
|
|
515
|
+
# @param [String] waas_policy_id The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the WAAS policy.
|
|
516
|
+
# @param [Hash] opts the optional parameters
|
|
517
|
+
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
|
|
518
|
+
# retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
|
|
519
|
+
# @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
|
|
520
|
+
# @return [Response] A Response object with data of type {OCI::Waas::Models::DeviceFingerprintChallenge DeviceFingerprintChallenge}
|
|
521
|
+
def get_device_fingerprint_challenge(waas_policy_id, opts = {})
|
|
522
|
+
logger.debug 'Calling operation WaasClient#get_device_fingerprint_challenge.' if logger
|
|
523
|
+
|
|
524
|
+
raise "Missing the required parameter 'waas_policy_id' when calling get_device_fingerprint_challenge." if waas_policy_id.nil?
|
|
525
|
+
raise "Parameter value for 'waas_policy_id' must not be blank" if OCI::Internal::Util.blank_string?(waas_policy_id)
|
|
526
|
+
|
|
527
|
+
path = '/waasPolicies/{waasPolicyId}/wafConfig/deviceFingerprintChallenge'.sub('{waasPolicyId}', waas_policy_id.to_s)
|
|
528
|
+
operation_signing_strategy = :standard
|
|
529
|
+
|
|
530
|
+
# rubocop:disable Style/NegatedIf
|
|
531
|
+
# Query Params
|
|
532
|
+
query_params = {}
|
|
533
|
+
|
|
534
|
+
# Header Params
|
|
535
|
+
header_params = {}
|
|
536
|
+
header_params[:accept] = 'application/json'
|
|
537
|
+
header_params[:'content-type'] = 'application/json'
|
|
538
|
+
header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
|
|
539
|
+
# rubocop:enable Style/NegatedIf
|
|
540
|
+
|
|
541
|
+
post_body = nil
|
|
542
|
+
|
|
543
|
+
# rubocop:disable Metrics/BlockLength
|
|
544
|
+
OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'WaasClient#get_device_fingerprint_challenge') do
|
|
545
|
+
@api_client.call_api(
|
|
546
|
+
:GET,
|
|
547
|
+
path,
|
|
548
|
+
endpoint,
|
|
549
|
+
header_params: header_params,
|
|
550
|
+
query_params: query_params,
|
|
551
|
+
operation_signing_strategy: operation_signing_strategy,
|
|
552
|
+
body: post_body,
|
|
553
|
+
return_type: 'OCI::Waas::Models::DeviceFingerprintChallenge'
|
|
554
|
+
)
|
|
555
|
+
end
|
|
556
|
+
# rubocop:enable Metrics/BlockLength
|
|
557
|
+
end
|
|
558
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
559
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
560
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
|
561
|
+
|
|
562
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
563
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
564
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
|
565
|
+
|
|
566
|
+
|
|
567
|
+
# Gets the human interaction challenge settings in the Web Application Firewall configuration for a WAAS policy.
|
|
568
|
+
# @param [String] waas_policy_id The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the WAAS policy.
|
|
569
|
+
# @param [Hash] opts the optional parameters
|
|
570
|
+
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
|
|
571
|
+
# retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
|
|
572
|
+
# @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
|
|
573
|
+
# @return [Response] A Response object with data of type {OCI::Waas::Models::HumanInteractionChallenge HumanInteractionChallenge}
|
|
574
|
+
def get_human_interaction_challenge(waas_policy_id, opts = {})
|
|
575
|
+
logger.debug 'Calling operation WaasClient#get_human_interaction_challenge.' if logger
|
|
576
|
+
|
|
577
|
+
raise "Missing the required parameter 'waas_policy_id' when calling get_human_interaction_challenge." if waas_policy_id.nil?
|
|
578
|
+
raise "Parameter value for 'waas_policy_id' must not be blank" if OCI::Internal::Util.blank_string?(waas_policy_id)
|
|
579
|
+
|
|
580
|
+
path = '/waasPolicies/{waasPolicyId}/wafConfig/humanInteractionChallenge'.sub('{waasPolicyId}', waas_policy_id.to_s)
|
|
581
|
+
operation_signing_strategy = :standard
|
|
582
|
+
|
|
583
|
+
# rubocop:disable Style/NegatedIf
|
|
584
|
+
# Query Params
|
|
585
|
+
query_params = {}
|
|
586
|
+
|
|
587
|
+
# Header Params
|
|
588
|
+
header_params = {}
|
|
589
|
+
header_params[:accept] = 'application/json'
|
|
590
|
+
header_params[:'content-type'] = 'application/json'
|
|
591
|
+
header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
|
|
592
|
+
# rubocop:enable Style/NegatedIf
|
|
593
|
+
|
|
594
|
+
post_body = nil
|
|
595
|
+
|
|
596
|
+
# rubocop:disable Metrics/BlockLength
|
|
597
|
+
OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'WaasClient#get_human_interaction_challenge') do
|
|
598
|
+
@api_client.call_api(
|
|
599
|
+
:GET,
|
|
600
|
+
path,
|
|
601
|
+
endpoint,
|
|
602
|
+
header_params: header_params,
|
|
603
|
+
query_params: query_params,
|
|
604
|
+
operation_signing_strategy: operation_signing_strategy,
|
|
605
|
+
body: post_body,
|
|
606
|
+
return_type: 'OCI::Waas::Models::HumanInteractionChallenge'
|
|
607
|
+
)
|
|
608
|
+
end
|
|
609
|
+
# rubocop:enable Metrics/BlockLength
|
|
610
|
+
end
|
|
611
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
612
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
613
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
|
614
|
+
|
|
615
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
616
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
617
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
|
618
|
+
|
|
619
|
+
|
|
620
|
+
# Gets the JavaScript challenge settings in the Web Application Firewall configuration for a WAAS policy.
|
|
621
|
+
# @param [String] waas_policy_id The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the WAAS policy.
|
|
622
|
+
# @param [Hash] opts the optional parameters
|
|
623
|
+
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
|
|
624
|
+
# retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
|
|
625
|
+
# @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
|
|
626
|
+
# @return [Response] A Response object with data of type {OCI::Waas::Models::JsChallenge JsChallenge}
|
|
627
|
+
def get_js_challenge(waas_policy_id, opts = {})
|
|
628
|
+
logger.debug 'Calling operation WaasClient#get_js_challenge.' if logger
|
|
629
|
+
|
|
630
|
+
raise "Missing the required parameter 'waas_policy_id' when calling get_js_challenge." if waas_policy_id.nil?
|
|
631
|
+
raise "Parameter value for 'waas_policy_id' must not be blank" if OCI::Internal::Util.blank_string?(waas_policy_id)
|
|
632
|
+
|
|
633
|
+
path = '/waasPolicies/{waasPolicyId}/wafConfig/jsChallenge'.sub('{waasPolicyId}', waas_policy_id.to_s)
|
|
634
|
+
operation_signing_strategy = :standard
|
|
635
|
+
|
|
636
|
+
# rubocop:disable Style/NegatedIf
|
|
637
|
+
# Query Params
|
|
638
|
+
query_params = {}
|
|
639
|
+
|
|
640
|
+
# Header Params
|
|
641
|
+
header_params = {}
|
|
642
|
+
header_params[:accept] = 'application/json'
|
|
643
|
+
header_params[:'content-type'] = 'application/json'
|
|
644
|
+
header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
|
|
645
|
+
# rubocop:enable Style/NegatedIf
|
|
646
|
+
|
|
647
|
+
post_body = nil
|
|
648
|
+
|
|
649
|
+
# rubocop:disable Metrics/BlockLength
|
|
650
|
+
OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'WaasClient#get_js_challenge') do
|
|
651
|
+
@api_client.call_api(
|
|
652
|
+
:GET,
|
|
653
|
+
path,
|
|
654
|
+
endpoint,
|
|
655
|
+
header_params: header_params,
|
|
656
|
+
query_params: query_params,
|
|
657
|
+
operation_signing_strategy: operation_signing_strategy,
|
|
658
|
+
body: post_body,
|
|
659
|
+
return_type: 'OCI::Waas::Models::JsChallenge'
|
|
660
|
+
)
|
|
661
|
+
end
|
|
662
|
+
# rubocop:enable Metrics/BlockLength
|
|
663
|
+
end
|
|
664
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
665
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
666
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
|
667
|
+
|
|
668
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
669
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
670
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
|
671
|
+
|
|
672
|
+
|
|
673
|
+
# Gets the configuration of a WAAS policy.
|
|
674
|
+
# @param [String] waas_policy_id The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the WAAS policy.
|
|
675
|
+
# @param [Hash] opts the optional parameters
|
|
676
|
+
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
|
|
677
|
+
# retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
|
|
678
|
+
# @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
|
|
679
|
+
# @return [Response] A Response object with data of type {OCI::Waas::Models::PolicyConfig PolicyConfig}
|
|
680
|
+
def get_policy_config(waas_policy_id, opts = {})
|
|
681
|
+
logger.debug 'Calling operation WaasClient#get_policy_config.' if logger
|
|
682
|
+
|
|
683
|
+
raise "Missing the required parameter 'waas_policy_id' when calling get_policy_config." if waas_policy_id.nil?
|
|
684
|
+
raise "Parameter value for 'waas_policy_id' must not be blank" if OCI::Internal::Util.blank_string?(waas_policy_id)
|
|
685
|
+
|
|
686
|
+
path = '/waasPolicies/{waasPolicyId}/policyConfig'.sub('{waasPolicyId}', waas_policy_id.to_s)
|
|
687
|
+
operation_signing_strategy = :standard
|
|
688
|
+
|
|
689
|
+
# rubocop:disable Style/NegatedIf
|
|
690
|
+
# Query Params
|
|
691
|
+
query_params = {}
|
|
692
|
+
|
|
693
|
+
# Header Params
|
|
694
|
+
header_params = {}
|
|
695
|
+
header_params[:accept] = 'application/json'
|
|
696
|
+
header_params[:'content-type'] = 'application/json'
|
|
697
|
+
header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
|
|
698
|
+
# rubocop:enable Style/NegatedIf
|
|
699
|
+
|
|
700
|
+
post_body = nil
|
|
701
|
+
|
|
702
|
+
# rubocop:disable Metrics/BlockLength
|
|
703
|
+
OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'WaasClient#get_policy_config') do
|
|
704
|
+
@api_client.call_api(
|
|
705
|
+
:GET,
|
|
706
|
+
path,
|
|
707
|
+
endpoint,
|
|
708
|
+
header_params: header_params,
|
|
709
|
+
query_params: query_params,
|
|
710
|
+
operation_signing_strategy: operation_signing_strategy,
|
|
711
|
+
body: post_body,
|
|
712
|
+
return_type: 'OCI::Waas::Models::PolicyConfig'
|
|
713
|
+
)
|
|
714
|
+
end
|
|
715
|
+
# rubocop:enable Metrics/BlockLength
|
|
716
|
+
end
|
|
717
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
718
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
719
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
|
720
|
+
|
|
721
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
722
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
723
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
|
724
|
+
|
|
725
|
+
|
|
726
|
+
# Gets the details of a protection rule in the Web Application Firewall configuration for a WAAS policy.
|
|
727
|
+
# @param [String] waas_policy_id The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the WAAS policy.
|
|
728
|
+
# @param [String] protection_rule_key The protection rule key.
|
|
729
|
+
# @param [Hash] opts the optional parameters
|
|
730
|
+
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
|
|
731
|
+
# retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
|
|
732
|
+
# @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
|
|
733
|
+
# @return [Response] A Response object with data of type {OCI::Waas::Models::ProtectionRule ProtectionRule}
|
|
734
|
+
def get_protection_rule(waas_policy_id, protection_rule_key, opts = {})
|
|
735
|
+
logger.debug 'Calling operation WaasClient#get_protection_rule.' if logger
|
|
736
|
+
|
|
737
|
+
raise "Missing the required parameter 'waas_policy_id' when calling get_protection_rule." if waas_policy_id.nil?
|
|
738
|
+
raise "Missing the required parameter 'protection_rule_key' when calling get_protection_rule." if protection_rule_key.nil?
|
|
739
|
+
raise "Parameter value for 'waas_policy_id' must not be blank" if OCI::Internal::Util.blank_string?(waas_policy_id)
|
|
740
|
+
raise "Parameter value for 'protection_rule_key' must not be blank" if OCI::Internal::Util.blank_string?(protection_rule_key)
|
|
741
|
+
|
|
742
|
+
path = '/waasPolicies/{waasPolicyId}/wafConfig/protectionRules/{protectionRuleKey}'.sub('{waasPolicyId}', waas_policy_id.to_s).sub('{protectionRuleKey}', protection_rule_key.to_s)
|
|
743
|
+
operation_signing_strategy = :standard
|
|
744
|
+
|
|
745
|
+
# rubocop:disable Style/NegatedIf
|
|
746
|
+
# Query Params
|
|
747
|
+
query_params = {}
|
|
748
|
+
|
|
749
|
+
# Header Params
|
|
750
|
+
header_params = {}
|
|
751
|
+
header_params[:accept] = 'application/json'
|
|
752
|
+
header_params[:'content-type'] = 'application/json'
|
|
753
|
+
header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
|
|
754
|
+
# rubocop:enable Style/NegatedIf
|
|
755
|
+
|
|
756
|
+
post_body = nil
|
|
757
|
+
|
|
758
|
+
# rubocop:disable Metrics/BlockLength
|
|
759
|
+
OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'WaasClient#get_protection_rule') do
|
|
760
|
+
@api_client.call_api(
|
|
761
|
+
:GET,
|
|
762
|
+
path,
|
|
763
|
+
endpoint,
|
|
764
|
+
header_params: header_params,
|
|
765
|
+
query_params: query_params,
|
|
766
|
+
operation_signing_strategy: operation_signing_strategy,
|
|
767
|
+
body: post_body,
|
|
768
|
+
return_type: 'OCI::Waas::Models::ProtectionRule'
|
|
769
|
+
)
|
|
770
|
+
end
|
|
771
|
+
# rubocop:enable Metrics/BlockLength
|
|
772
|
+
end
|
|
773
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
774
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
775
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
|
776
|
+
|
|
777
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
778
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
779
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
|
780
|
+
|
|
781
|
+
|
|
782
|
+
# Gets the protection settings in the Web Application Firewall configuration for a WAAS policy.
|
|
783
|
+
# @param [String] waas_policy_id The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the WAAS policy.
|
|
784
|
+
# @param [Hash] opts the optional parameters
|
|
785
|
+
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
|
|
786
|
+
# retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
|
|
787
|
+
# @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
|
|
788
|
+
# @return [Response] A Response object with data of type {OCI::Waas::Models::ProtectionSettings ProtectionSettings}
|
|
789
|
+
def get_protection_settings(waas_policy_id, opts = {})
|
|
790
|
+
logger.debug 'Calling operation WaasClient#get_protection_settings.' if logger
|
|
791
|
+
|
|
792
|
+
raise "Missing the required parameter 'waas_policy_id' when calling get_protection_settings." if waas_policy_id.nil?
|
|
793
|
+
raise "Parameter value for 'waas_policy_id' must not be blank" if OCI::Internal::Util.blank_string?(waas_policy_id)
|
|
794
|
+
|
|
795
|
+
path = '/waasPolicies/{waasPolicyId}/wafConfig/protectionSettings'.sub('{waasPolicyId}', waas_policy_id.to_s)
|
|
796
|
+
operation_signing_strategy = :standard
|
|
797
|
+
|
|
798
|
+
# rubocop:disable Style/NegatedIf
|
|
799
|
+
# Query Params
|
|
800
|
+
query_params = {}
|
|
801
|
+
|
|
802
|
+
# Header Params
|
|
803
|
+
header_params = {}
|
|
804
|
+
header_params[:accept] = 'application/json'
|
|
805
|
+
header_params[:'content-type'] = 'application/json'
|
|
806
|
+
header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
|
|
807
|
+
# rubocop:enable Style/NegatedIf
|
|
808
|
+
|
|
809
|
+
post_body = nil
|
|
810
|
+
|
|
811
|
+
# rubocop:disable Metrics/BlockLength
|
|
812
|
+
OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'WaasClient#get_protection_settings') do
|
|
813
|
+
@api_client.call_api(
|
|
814
|
+
:GET,
|
|
815
|
+
path,
|
|
816
|
+
endpoint,
|
|
817
|
+
header_params: header_params,
|
|
818
|
+
query_params: query_params,
|
|
819
|
+
operation_signing_strategy: operation_signing_strategy,
|
|
820
|
+
body: post_body,
|
|
821
|
+
return_type: 'OCI::Waas::Models::ProtectionSettings'
|
|
822
|
+
)
|
|
823
|
+
end
|
|
824
|
+
# rubocop:enable Metrics/BlockLength
|
|
825
|
+
end
|
|
826
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
827
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
828
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
|
829
|
+
|
|
830
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
831
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
832
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
|
833
|
+
|
|
834
|
+
|
|
835
|
+
# Gets the details of a WAAS policy.
|
|
836
|
+
# @param [String] waas_policy_id The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the WAAS policy.
|
|
837
|
+
# @param [Hash] opts the optional parameters
|
|
838
|
+
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
|
|
839
|
+
# retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
|
|
840
|
+
# @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
|
|
841
|
+
# @return [Response] A Response object with data of type {OCI::Waas::Models::WaasPolicy WaasPolicy}
|
|
842
|
+
def get_waas_policy(waas_policy_id, opts = {})
|
|
843
|
+
logger.debug 'Calling operation WaasClient#get_waas_policy.' if logger
|
|
844
|
+
|
|
845
|
+
raise "Missing the required parameter 'waas_policy_id' when calling get_waas_policy." if waas_policy_id.nil?
|
|
846
|
+
raise "Parameter value for 'waas_policy_id' must not be blank" if OCI::Internal::Util.blank_string?(waas_policy_id)
|
|
847
|
+
|
|
848
|
+
path = '/waasPolicies/{waasPolicyId}'.sub('{waasPolicyId}', waas_policy_id.to_s)
|
|
849
|
+
operation_signing_strategy = :standard
|
|
850
|
+
|
|
851
|
+
# rubocop:disable Style/NegatedIf
|
|
852
|
+
# Query Params
|
|
853
|
+
query_params = {}
|
|
854
|
+
|
|
855
|
+
# Header Params
|
|
856
|
+
header_params = {}
|
|
857
|
+
header_params[:accept] = 'application/json'
|
|
858
|
+
header_params[:'content-type'] = 'application/json'
|
|
859
|
+
header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
|
|
860
|
+
# rubocop:enable Style/NegatedIf
|
|
861
|
+
|
|
862
|
+
post_body = nil
|
|
863
|
+
|
|
864
|
+
# rubocop:disable Metrics/BlockLength
|
|
865
|
+
OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'WaasClient#get_waas_policy') do
|
|
866
|
+
@api_client.call_api(
|
|
867
|
+
:GET,
|
|
868
|
+
path,
|
|
869
|
+
endpoint,
|
|
870
|
+
header_params: header_params,
|
|
871
|
+
query_params: query_params,
|
|
872
|
+
operation_signing_strategy: operation_signing_strategy,
|
|
873
|
+
body: post_body,
|
|
874
|
+
return_type: 'OCI::Waas::Models::WaasPolicy'
|
|
875
|
+
)
|
|
876
|
+
end
|
|
877
|
+
# rubocop:enable Metrics/BlockLength
|
|
878
|
+
end
|
|
879
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
880
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
881
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
|
882
|
+
|
|
883
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
884
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
885
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
|
886
|
+
|
|
887
|
+
|
|
888
|
+
# Gets the address rate limiting settings of the Web Application Firewall configuration for a WAAS policy.
|
|
889
|
+
# @param [String] waas_policy_id The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the WAAS policy.
|
|
890
|
+
# @param [Hash] opts the optional parameters
|
|
891
|
+
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
|
|
892
|
+
# retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
|
|
893
|
+
# @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
|
|
894
|
+
# @return [Response] A Response object with data of type {OCI::Waas::Models::AddressRateLimiting AddressRateLimiting}
|
|
895
|
+
def get_waf_address_rate_limiting(waas_policy_id, opts = {})
|
|
896
|
+
logger.debug 'Calling operation WaasClient#get_waf_address_rate_limiting.' if logger
|
|
897
|
+
|
|
898
|
+
raise "Missing the required parameter 'waas_policy_id' when calling get_waf_address_rate_limiting." if waas_policy_id.nil?
|
|
899
|
+
raise "Parameter value for 'waas_policy_id' must not be blank" if OCI::Internal::Util.blank_string?(waas_policy_id)
|
|
900
|
+
|
|
901
|
+
path = '/waasPolicies/{waasPolicyId}/wafConfig/addressRateLimiting'.sub('{waasPolicyId}', waas_policy_id.to_s)
|
|
902
|
+
operation_signing_strategy = :standard
|
|
903
|
+
|
|
904
|
+
# rubocop:disable Style/NegatedIf
|
|
905
|
+
# Query Params
|
|
906
|
+
query_params = {}
|
|
907
|
+
|
|
908
|
+
# Header Params
|
|
909
|
+
header_params = {}
|
|
910
|
+
header_params[:accept] = 'application/json'
|
|
911
|
+
header_params[:'content-type'] = 'application/json'
|
|
912
|
+
header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
|
|
913
|
+
# rubocop:enable Style/NegatedIf
|
|
914
|
+
|
|
915
|
+
post_body = nil
|
|
916
|
+
|
|
917
|
+
# rubocop:disable Metrics/BlockLength
|
|
918
|
+
OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'WaasClient#get_waf_address_rate_limiting') do
|
|
919
|
+
@api_client.call_api(
|
|
920
|
+
:GET,
|
|
921
|
+
path,
|
|
922
|
+
endpoint,
|
|
923
|
+
header_params: header_params,
|
|
924
|
+
query_params: query_params,
|
|
925
|
+
operation_signing_strategy: operation_signing_strategy,
|
|
926
|
+
body: post_body,
|
|
927
|
+
return_type: 'OCI::Waas::Models::AddressRateLimiting'
|
|
928
|
+
)
|
|
929
|
+
end
|
|
930
|
+
# rubocop:enable Metrics/BlockLength
|
|
931
|
+
end
|
|
932
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
933
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
934
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
|
935
|
+
|
|
936
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
937
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
938
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
|
939
|
+
|
|
940
|
+
|
|
941
|
+
# Gets the Web Application Firewall configuration details for a WAAS policy.
|
|
942
|
+
# @param [String] waas_policy_id The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the WAAS policy.
|
|
943
|
+
# @param [Hash] opts the optional parameters
|
|
944
|
+
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
|
|
945
|
+
# retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
|
|
946
|
+
# @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
|
|
947
|
+
# @return [Response] A Response object with data of type {OCI::Waas::Models::WafConfig WafConfig}
|
|
948
|
+
def get_waf_config(waas_policy_id, opts = {})
|
|
949
|
+
logger.debug 'Calling operation WaasClient#get_waf_config.' if logger
|
|
950
|
+
|
|
951
|
+
raise "Missing the required parameter 'waas_policy_id' when calling get_waf_config." if waas_policy_id.nil?
|
|
952
|
+
raise "Parameter value for 'waas_policy_id' must not be blank" if OCI::Internal::Util.blank_string?(waas_policy_id)
|
|
953
|
+
|
|
954
|
+
path = '/waasPolicies/{waasPolicyId}/wafConfig'.sub('{waasPolicyId}', waas_policy_id.to_s)
|
|
955
|
+
operation_signing_strategy = :standard
|
|
956
|
+
|
|
957
|
+
# rubocop:disable Style/NegatedIf
|
|
958
|
+
# Query Params
|
|
959
|
+
query_params = {}
|
|
960
|
+
|
|
961
|
+
# Header Params
|
|
962
|
+
header_params = {}
|
|
963
|
+
header_params[:accept] = 'application/json'
|
|
964
|
+
header_params[:'content-type'] = 'application/json'
|
|
965
|
+
header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
|
|
966
|
+
# rubocop:enable Style/NegatedIf
|
|
967
|
+
|
|
968
|
+
post_body = nil
|
|
969
|
+
|
|
970
|
+
# rubocop:disable Metrics/BlockLength
|
|
971
|
+
OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'WaasClient#get_waf_config') do
|
|
972
|
+
@api_client.call_api(
|
|
973
|
+
:GET,
|
|
974
|
+
path,
|
|
975
|
+
endpoint,
|
|
976
|
+
header_params: header_params,
|
|
977
|
+
query_params: query_params,
|
|
978
|
+
operation_signing_strategy: operation_signing_strategy,
|
|
979
|
+
body: post_body,
|
|
980
|
+
return_type: 'OCI::Waas::Models::WafConfig'
|
|
981
|
+
)
|
|
982
|
+
end
|
|
983
|
+
# rubocop:enable Metrics/BlockLength
|
|
984
|
+
end
|
|
985
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
986
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
987
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
|
988
|
+
|
|
989
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
990
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
991
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
|
992
|
+
|
|
993
|
+
|
|
994
|
+
# Gets the details of a specified work request.
|
|
995
|
+
# @param [String] work_request_id The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the work request. This number is generated when work request is created.
|
|
996
|
+
# @param [Hash] opts the optional parameters
|
|
997
|
+
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
|
|
998
|
+
# retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
|
|
999
|
+
# @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
|
|
1000
|
+
# @return [Response] A Response object with data of type {OCI::Waas::Models::WorkRequest WorkRequest}
|
|
1001
|
+
def get_work_request(work_request_id, opts = {})
|
|
1002
|
+
logger.debug 'Calling operation WaasClient#get_work_request.' if logger
|
|
1003
|
+
|
|
1004
|
+
raise "Missing the required parameter 'work_request_id' when calling get_work_request." if work_request_id.nil?
|
|
1005
|
+
raise "Parameter value for 'work_request_id' must not be blank" if OCI::Internal::Util.blank_string?(work_request_id)
|
|
1006
|
+
|
|
1007
|
+
path = '/workRequests/{workRequestId}'.sub('{workRequestId}', work_request_id.to_s)
|
|
1008
|
+
operation_signing_strategy = :standard
|
|
1009
|
+
|
|
1010
|
+
# rubocop:disable Style/NegatedIf
|
|
1011
|
+
# Query Params
|
|
1012
|
+
query_params = {}
|
|
1013
|
+
|
|
1014
|
+
# Header Params
|
|
1015
|
+
header_params = {}
|
|
1016
|
+
header_params[:accept] = 'application/json'
|
|
1017
|
+
header_params[:'content-type'] = 'application/json'
|
|
1018
|
+
header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
|
|
1019
|
+
# rubocop:enable Style/NegatedIf
|
|
1020
|
+
|
|
1021
|
+
post_body = nil
|
|
1022
|
+
|
|
1023
|
+
# rubocop:disable Metrics/BlockLength
|
|
1024
|
+
OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'WaasClient#get_work_request') do
|
|
1025
|
+
@api_client.call_api(
|
|
1026
|
+
:GET,
|
|
1027
|
+
path,
|
|
1028
|
+
endpoint,
|
|
1029
|
+
header_params: header_params,
|
|
1030
|
+
query_params: query_params,
|
|
1031
|
+
operation_signing_strategy: operation_signing_strategy,
|
|
1032
|
+
body: post_body,
|
|
1033
|
+
return_type: 'OCI::Waas::Models::WorkRequest'
|
|
1034
|
+
)
|
|
1035
|
+
end
|
|
1036
|
+
# rubocop:enable Metrics/BlockLength
|
|
1037
|
+
end
|
|
1038
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
1039
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
1040
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
|
1041
|
+
|
|
1042
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
1043
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
1044
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
|
1045
|
+
|
|
1046
|
+
|
|
1047
|
+
# Gets the currently configured access rules for the Web Application Firewall configration of a specified WAAS policy.
|
|
1048
|
+
# 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.
|
|
1049
|
+
# @param [String] waas_policy_id The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the WAAS policy.
|
|
1050
|
+
# @param [Hash] opts the optional parameters
|
|
1051
|
+
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
|
|
1052
|
+
# retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
|
|
1053
|
+
# @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
|
|
1054
|
+
# @option opts [Integer] :limit The maximum number of items to return in a paginated call. In unspecified, defaults to `10`. (default to 10)
|
|
1055
|
+
# @option opts [String] :page The value of the `opc-next-page` response header from the previous paginated call.
|
|
1056
|
+
# @return [Response] A Response object with data of type Array<{OCI::Waas::Models::AccessRule AccessRule}>
|
|
1057
|
+
def list_access_rules(waas_policy_id, opts = {})
|
|
1058
|
+
logger.debug 'Calling operation WaasClient#list_access_rules.' if logger
|
|
1059
|
+
|
|
1060
|
+
raise "Missing the required parameter 'waas_policy_id' when calling list_access_rules." if waas_policy_id.nil?
|
|
1061
|
+
raise "Parameter value for 'waas_policy_id' must not be blank" if OCI::Internal::Util.blank_string?(waas_policy_id)
|
|
1062
|
+
|
|
1063
|
+
path = '/waasPolicies/{waasPolicyId}/wafConfig/accessRules'.sub('{waasPolicyId}', waas_policy_id.to_s)
|
|
1064
|
+
operation_signing_strategy = :standard
|
|
1065
|
+
|
|
1066
|
+
# rubocop:disable Style/NegatedIf
|
|
1067
|
+
# Query Params
|
|
1068
|
+
query_params = {}
|
|
1069
|
+
query_params[:limit] = opts[:limit] if opts[:limit]
|
|
1070
|
+
query_params[:page] = opts[:page] if opts[:page]
|
|
1071
|
+
|
|
1072
|
+
# Header Params
|
|
1073
|
+
header_params = {}
|
|
1074
|
+
header_params[:accept] = 'application/json'
|
|
1075
|
+
header_params[:'content-type'] = 'application/json'
|
|
1076
|
+
header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
|
|
1077
|
+
# rubocop:enable Style/NegatedIf
|
|
1078
|
+
|
|
1079
|
+
post_body = nil
|
|
1080
|
+
|
|
1081
|
+
# rubocop:disable Metrics/BlockLength
|
|
1082
|
+
OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'WaasClient#list_access_rules') do
|
|
1083
|
+
@api_client.call_api(
|
|
1084
|
+
:GET,
|
|
1085
|
+
path,
|
|
1086
|
+
endpoint,
|
|
1087
|
+
header_params: header_params,
|
|
1088
|
+
query_params: query_params,
|
|
1089
|
+
operation_signing_strategy: operation_signing_strategy,
|
|
1090
|
+
body: post_body,
|
|
1091
|
+
return_type: 'Array<OCI::Waas::Models::AccessRule>'
|
|
1092
|
+
)
|
|
1093
|
+
end
|
|
1094
|
+
# rubocop:enable Metrics/BlockLength
|
|
1095
|
+
end
|
|
1096
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
1097
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
1098
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
|
1099
|
+
|
|
1100
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
1101
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
1102
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
|
1103
|
+
|
|
1104
|
+
|
|
1105
|
+
# Gets the list of currently configured CAPTCHA challenges in the Web
|
|
1106
|
+
# Application Firewall configuration of a WAAS policy.
|
|
1107
|
+
#
|
|
1108
|
+
# The order of the CAPTCHA challenges is important. The URL for each
|
|
1109
|
+
# CAPTCHA will be checked in the order they are created.
|
|
1110
|
+
#
|
|
1111
|
+
# @param [String] waas_policy_id The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the WAAS policy.
|
|
1112
|
+
# @param [Hash] opts the optional parameters
|
|
1113
|
+
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
|
|
1114
|
+
# retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
|
|
1115
|
+
# @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
|
|
1116
|
+
# @option opts [Integer] :limit The maximum number of items to return in a paginated call. In unspecified, defaults to `10`. (default to 10)
|
|
1117
|
+
# @option opts [String] :page The value of the `opc-next-page` response header from the previous paginated call.
|
|
1118
|
+
# @return [Response] A Response object with data of type Array<{OCI::Waas::Models::Captcha Captcha}>
|
|
1119
|
+
def list_captchas(waas_policy_id, opts = {})
|
|
1120
|
+
logger.debug 'Calling operation WaasClient#list_captchas.' if logger
|
|
1121
|
+
|
|
1122
|
+
raise "Missing the required parameter 'waas_policy_id' when calling list_captchas." if waas_policy_id.nil?
|
|
1123
|
+
raise "Parameter value for 'waas_policy_id' must not be blank" if OCI::Internal::Util.blank_string?(waas_policy_id)
|
|
1124
|
+
|
|
1125
|
+
path = '/waasPolicies/{waasPolicyId}/wafConfig/captchas'.sub('{waasPolicyId}', waas_policy_id.to_s)
|
|
1126
|
+
operation_signing_strategy = :standard
|
|
1127
|
+
|
|
1128
|
+
# rubocop:disable Style/NegatedIf
|
|
1129
|
+
# Query Params
|
|
1130
|
+
query_params = {}
|
|
1131
|
+
query_params[:limit] = opts[:limit] if opts[:limit]
|
|
1132
|
+
query_params[:page] = opts[:page] if opts[:page]
|
|
1133
|
+
|
|
1134
|
+
# Header Params
|
|
1135
|
+
header_params = {}
|
|
1136
|
+
header_params[:accept] = 'application/json'
|
|
1137
|
+
header_params[:'content-type'] = 'application/json'
|
|
1138
|
+
header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
|
|
1139
|
+
# rubocop:enable Style/NegatedIf
|
|
1140
|
+
|
|
1141
|
+
post_body = nil
|
|
1142
|
+
|
|
1143
|
+
# rubocop:disable Metrics/BlockLength
|
|
1144
|
+
OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'WaasClient#list_captchas') do
|
|
1145
|
+
@api_client.call_api(
|
|
1146
|
+
:GET,
|
|
1147
|
+
path,
|
|
1148
|
+
endpoint,
|
|
1149
|
+
header_params: header_params,
|
|
1150
|
+
query_params: query_params,
|
|
1151
|
+
operation_signing_strategy: operation_signing_strategy,
|
|
1152
|
+
body: post_body,
|
|
1153
|
+
return_type: 'Array<OCI::Waas::Models::Captcha>'
|
|
1154
|
+
)
|
|
1155
|
+
end
|
|
1156
|
+
# rubocop:enable Metrics/BlockLength
|
|
1157
|
+
end
|
|
1158
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
1159
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
1160
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
|
1161
|
+
|
|
1162
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
1163
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
1164
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
|
1165
|
+
|
|
1166
|
+
|
|
1167
|
+
# Gets a list of SSL certificates that can be used in a WAAS policy.
|
|
1168
|
+
# @param [String] compartment_id The [OCID](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. This number is generated when the compartment is created.
|
|
1169
|
+
# @param [Hash] opts the optional parameters
|
|
1170
|
+
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
|
|
1171
|
+
# retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
|
|
1172
|
+
# @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
|
|
1173
|
+
# @option opts [Integer] :limit The maximum number of items to return in a paginated call. In unspecified, defaults to `10`. (default to 10)
|
|
1174
|
+
# @option opts [String] :page The value of the `opc-next-page` response header from the previous paginated call.
|
|
1175
|
+
# @option opts [String] :sort_by The value by which certificate summaries are sorted in a paginated 'List' call. If unspecified, defaults to `timeCreated`.
|
|
1176
|
+
# Allowed values are: id, compartmentId, displayName, notValidAfter, timeCreated
|
|
1177
|
+
# @option opts [String] :sort_order The value of the sorting direction of resources in a paginated 'List' call. If unspecified, defaults to `DESC`.
|
|
1178
|
+
# Allowed values are: ASC, DESC
|
|
1179
|
+
# @option opts [Array<String>] :id Filter certificates using a list of certificates OCIDs.
|
|
1180
|
+
# @option opts [Array<String>] :display_name Filter certificates using a list of display names.
|
|
1181
|
+
# @option opts [Array<String>] :lifecycle_state Filter certificates using a list of lifecycle states.
|
|
1182
|
+
# @option opts [DateTime] :time_created_greater_than_or_equal_to A filter that matches certificates created on or after the specified date-time.
|
|
1183
|
+
# @option opts [DateTime] :time_created_less_than A filter that matches certificates created before the specified date-time.
|
|
1184
|
+
# @return [Response] A Response object with data of type Array<{OCI::Waas::Models::CertificateSummary CertificateSummary}>
|
|
1185
|
+
def list_certificates(compartment_id, opts = {})
|
|
1186
|
+
logger.debug 'Calling operation WaasClient#list_certificates.' if logger
|
|
1187
|
+
|
|
1188
|
+
raise "Missing the required parameter 'compartment_id' when calling list_certificates." if compartment_id.nil?
|
|
1189
|
+
|
|
1190
|
+
if opts[:sort_by] && !%w[id compartmentId displayName notValidAfter timeCreated].include?(opts[:sort_by])
|
|
1191
|
+
raise 'Invalid value for "sort_by", must be one of id, compartmentId, displayName, notValidAfter, timeCreated.'
|
|
1192
|
+
end
|
|
1193
|
+
|
|
1194
|
+
if opts[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order])
|
|
1195
|
+
raise 'Invalid value for "sort_order", must be one of ASC, DESC.'
|
|
1196
|
+
end
|
|
1197
|
+
|
|
1198
|
+
path = '/certificates'
|
|
1199
|
+
operation_signing_strategy = :standard
|
|
1200
|
+
|
|
1201
|
+
# rubocop:disable Style/NegatedIf
|
|
1202
|
+
# Query Params
|
|
1203
|
+
query_params = {}
|
|
1204
|
+
query_params[:compartmentId] = compartment_id
|
|
1205
|
+
query_params[:limit] = opts[:limit] if opts[:limit]
|
|
1206
|
+
query_params[:page] = opts[:page] if opts[:page]
|
|
1207
|
+
query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
|
|
1208
|
+
query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
|
|
1209
|
+
query_params[:id] = OCI::ApiClient.build_collection_params(opts[:id], :multi) if opts[:id] && !opts[:id].empty?
|
|
1210
|
+
query_params[:displayName] = OCI::ApiClient.build_collection_params(opts[:display_name], :multi) if opts[:display_name] && !opts[:display_name].empty?
|
|
1211
|
+
query_params[:lifecycleState] = OCI::ApiClient.build_collection_params(opts[:lifecycle_state], :multi) if opts[:lifecycle_state] && !opts[:lifecycle_state].empty?
|
|
1212
|
+
query_params[:timeCreatedGreaterThanOrEqualTo] = opts[:time_created_greater_than_or_equal_to] if opts[:time_created_greater_than_or_equal_to]
|
|
1213
|
+
query_params[:timeCreatedLessThan] = opts[:time_created_less_than] if opts[:time_created_less_than]
|
|
1214
|
+
|
|
1215
|
+
# Header Params
|
|
1216
|
+
header_params = {}
|
|
1217
|
+
header_params[:accept] = 'application/json'
|
|
1218
|
+
header_params[:'content-type'] = 'application/json'
|
|
1219
|
+
header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
|
|
1220
|
+
# rubocop:enable Style/NegatedIf
|
|
1221
|
+
|
|
1222
|
+
post_body = nil
|
|
1223
|
+
|
|
1224
|
+
# rubocop:disable Metrics/BlockLength
|
|
1225
|
+
OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'WaasClient#list_certificates') do
|
|
1226
|
+
@api_client.call_api(
|
|
1227
|
+
:GET,
|
|
1228
|
+
path,
|
|
1229
|
+
endpoint,
|
|
1230
|
+
header_params: header_params,
|
|
1231
|
+
query_params: query_params,
|
|
1232
|
+
operation_signing_strategy: operation_signing_strategy,
|
|
1233
|
+
body: post_body,
|
|
1234
|
+
return_type: 'Array<OCI::Waas::Models::CertificateSummary>'
|
|
1235
|
+
)
|
|
1236
|
+
end
|
|
1237
|
+
# rubocop:enable Metrics/BlockLength
|
|
1238
|
+
end
|
|
1239
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
1240
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
1241
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
|
1242
|
+
|
|
1243
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
1244
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
1245
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
|
1246
|
+
|
|
1247
|
+
|
|
1248
|
+
# 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.
|
|
1249
|
+
# @param [Hash] opts the optional parameters
|
|
1250
|
+
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
|
|
1251
|
+
# retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
|
|
1252
|
+
# @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
|
|
1253
|
+
# @option opts [Integer] :limit The maximum number of items to return in a paginated call. In unspecified, defaults to `10`. (default to 10)
|
|
1254
|
+
# @option opts [String] :page The value of the `opc-next-page` response header from the previous paginated call.
|
|
1255
|
+
# @option opts [String] :sort_by The value by which edge node subnets are sorted in a paginated 'List' call. If unspecified, defaults to `timeModified`.
|
|
1256
|
+
# Allowed values are: cidr, region, timeModified
|
|
1257
|
+
# @option opts [String] :sort_order The value of the sorting direction of resources in a paginated 'List' call. If unspecified, defaults to `DESC`.
|
|
1258
|
+
# Allowed values are: ASC, DESC
|
|
1259
|
+
# @return [Response] A Response object with data of type Array<{OCI::Waas::Models::EdgeSubnet EdgeSubnet}>
|
|
1260
|
+
def list_edge_subnets(opts = {})
|
|
1261
|
+
logger.debug 'Calling operation WaasClient#list_edge_subnets.' if logger
|
|
1262
|
+
|
|
1263
|
+
|
|
1264
|
+
if opts[:sort_by] && !%w[cidr region timeModified].include?(opts[:sort_by])
|
|
1265
|
+
raise 'Invalid value for "sort_by", must be one of cidr, region, timeModified.'
|
|
1266
|
+
end
|
|
1267
|
+
|
|
1268
|
+
if opts[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order])
|
|
1269
|
+
raise 'Invalid value for "sort_order", must be one of ASC, DESC.'
|
|
1270
|
+
end
|
|
1271
|
+
|
|
1272
|
+
path = '/edgeSubnets'
|
|
1273
|
+
operation_signing_strategy = :standard
|
|
1274
|
+
|
|
1275
|
+
# rubocop:disable Style/NegatedIf
|
|
1276
|
+
# Query Params
|
|
1277
|
+
query_params = {}
|
|
1278
|
+
query_params[:limit] = opts[:limit] if opts[:limit]
|
|
1279
|
+
query_params[:page] = opts[:page] if opts[:page]
|
|
1280
|
+
query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
|
|
1281
|
+
query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
|
|
1282
|
+
|
|
1283
|
+
# Header Params
|
|
1284
|
+
header_params = {}
|
|
1285
|
+
header_params[:accept] = 'application/json'
|
|
1286
|
+
header_params[:'content-type'] = 'application/json'
|
|
1287
|
+
header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
|
|
1288
|
+
# rubocop:enable Style/NegatedIf
|
|
1289
|
+
|
|
1290
|
+
post_body = nil
|
|
1291
|
+
|
|
1292
|
+
# rubocop:disable Metrics/BlockLength
|
|
1293
|
+
OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'WaasClient#list_edge_subnets') do
|
|
1294
|
+
@api_client.call_api(
|
|
1295
|
+
:GET,
|
|
1296
|
+
path,
|
|
1297
|
+
endpoint,
|
|
1298
|
+
header_params: header_params,
|
|
1299
|
+
query_params: query_params,
|
|
1300
|
+
operation_signing_strategy: operation_signing_strategy,
|
|
1301
|
+
body: post_body,
|
|
1302
|
+
return_type: 'Array<OCI::Waas::Models::EdgeSubnet>'
|
|
1303
|
+
)
|
|
1304
|
+
end
|
|
1305
|
+
# rubocop:enable Metrics/BlockLength
|
|
1306
|
+
end
|
|
1307
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
1308
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
1309
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
|
1310
|
+
|
|
1311
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
1312
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
1313
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
|
1314
|
+
|
|
1315
|
+
|
|
1316
|
+
# Gets the list of good bots defined in the Web Application Firewall configuration for a WAAS policy.
|
|
1317
|
+
#
|
|
1318
|
+
# The list is sorted ascending by `key`.
|
|
1319
|
+
#
|
|
1320
|
+
# @param [String] waas_policy_id The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the WAAS policy.
|
|
1321
|
+
# @param [Hash] opts the optional parameters
|
|
1322
|
+
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
|
|
1323
|
+
# retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
|
|
1324
|
+
# @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
|
|
1325
|
+
# @option opts [Integer] :limit The maximum number of items to return in a paginated call. In unspecified, defaults to `10`. (default to 10)
|
|
1326
|
+
# @option opts [String] :page The value of the `opc-next-page` response header from the previous paginated call.
|
|
1327
|
+
# @return [Response] A Response object with data of type Array<{OCI::Waas::Models::GoodBot GoodBot}>
|
|
1328
|
+
def list_good_bots(waas_policy_id, opts = {})
|
|
1329
|
+
logger.debug 'Calling operation WaasClient#list_good_bots.' if logger
|
|
1330
|
+
|
|
1331
|
+
raise "Missing the required parameter 'waas_policy_id' when calling list_good_bots." if waas_policy_id.nil?
|
|
1332
|
+
raise "Parameter value for 'waas_policy_id' must not be blank" if OCI::Internal::Util.blank_string?(waas_policy_id)
|
|
1333
|
+
|
|
1334
|
+
path = '/waasPolicies/{waasPolicyId}/wafConfig/goodBots'.sub('{waasPolicyId}', waas_policy_id.to_s)
|
|
1335
|
+
operation_signing_strategy = :standard
|
|
1336
|
+
|
|
1337
|
+
# rubocop:disable Style/NegatedIf
|
|
1338
|
+
# Query Params
|
|
1339
|
+
query_params = {}
|
|
1340
|
+
query_params[:limit] = opts[:limit] if opts[:limit]
|
|
1341
|
+
query_params[:page] = opts[:page] if opts[:page]
|
|
1342
|
+
|
|
1343
|
+
# Header Params
|
|
1344
|
+
header_params = {}
|
|
1345
|
+
header_params[:accept] = 'application/json'
|
|
1346
|
+
header_params[:'content-type'] = 'application/json'
|
|
1347
|
+
header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
|
|
1348
|
+
# rubocop:enable Style/NegatedIf
|
|
1349
|
+
|
|
1350
|
+
post_body = nil
|
|
1351
|
+
|
|
1352
|
+
# rubocop:disable Metrics/BlockLength
|
|
1353
|
+
OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'WaasClient#list_good_bots') do
|
|
1354
|
+
@api_client.call_api(
|
|
1355
|
+
:GET,
|
|
1356
|
+
path,
|
|
1357
|
+
endpoint,
|
|
1358
|
+
header_params: header_params,
|
|
1359
|
+
query_params: query_params,
|
|
1360
|
+
operation_signing_strategy: operation_signing_strategy,
|
|
1361
|
+
body: post_body,
|
|
1362
|
+
return_type: 'Array<OCI::Waas::Models::GoodBot>'
|
|
1363
|
+
)
|
|
1364
|
+
end
|
|
1365
|
+
# rubocop:enable Metrics/BlockLength
|
|
1366
|
+
end
|
|
1367
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
1368
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
1369
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
|
1370
|
+
|
|
1371
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
1372
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
1373
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
|
1374
|
+
|
|
1375
|
+
|
|
1376
|
+
# Gets the list of protection rules in the Web Application Firewall configuration for a WAAS policy, including currently defined rules and recommended rules.
|
|
1377
|
+
# The list is sorted ascending by `key`.
|
|
1378
|
+
# @param [String] waas_policy_id The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the WAAS policy.
|
|
1379
|
+
# @param [Hash] opts the optional parameters
|
|
1380
|
+
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
|
|
1381
|
+
# retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
|
|
1382
|
+
# @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
|
|
1383
|
+
# @option opts [Integer] :limit The maximum number of items to return in a paginated call. In unspecified, defaults to `10`. (default to 10)
|
|
1384
|
+
# @option opts [String] :page The value of the `opc-next-page` response header from the previous paginated call.
|
|
1385
|
+
# @option opts [Array<String>] :mod_security_rule_id Filter rules using a list of ModSecurity rule IDs.
|
|
1386
|
+
# @option opts [Array<String>] :action Filter rules using a list of actions.
|
|
1387
|
+
# Allowed values are: OFF, DETECT, BLOCK
|
|
1388
|
+
# @return [Response] A Response object with data of type Array<{OCI::Waas::Models::ProtectionRule ProtectionRule}>
|
|
1389
|
+
def list_protection_rules(waas_policy_id, opts = {})
|
|
1390
|
+
logger.debug 'Calling operation WaasClient#list_protection_rules.' if logger
|
|
1391
|
+
|
|
1392
|
+
raise "Missing the required parameter 'waas_policy_id' when calling list_protection_rules." if waas_policy_id.nil?
|
|
1393
|
+
|
|
1394
|
+
|
|
1395
|
+
action_allowable_values = %w[OFF DETECT BLOCK]
|
|
1396
|
+
if opts[:action] && !opts[:action].empty?
|
|
1397
|
+
opts[:action].each do |val_to_check|
|
|
1398
|
+
unless action_allowable_values.include?(val_to_check)
|
|
1399
|
+
raise 'Invalid value for "action", must be one of OFF, DETECT, BLOCK.'
|
|
1400
|
+
end
|
|
1401
|
+
end
|
|
1402
|
+
end
|
|
1403
|
+
raise "Parameter value for 'waas_policy_id' must not be blank" if OCI::Internal::Util.blank_string?(waas_policy_id)
|
|
1404
|
+
|
|
1405
|
+
path = '/waasPolicies/{waasPolicyId}/wafConfig/protectionRules'.sub('{waasPolicyId}', waas_policy_id.to_s)
|
|
1406
|
+
operation_signing_strategy = :standard
|
|
1407
|
+
|
|
1408
|
+
# rubocop:disable Style/NegatedIf
|
|
1409
|
+
# Query Params
|
|
1410
|
+
query_params = {}
|
|
1411
|
+
query_params[:limit] = opts[:limit] if opts[:limit]
|
|
1412
|
+
query_params[:page] = opts[:page] if opts[:page]
|
|
1413
|
+
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?
|
|
1414
|
+
query_params[:action] = OCI::ApiClient.build_collection_params(opts[:action], :multi) if opts[:action] && !opts[:action].empty?
|
|
1415
|
+
|
|
1416
|
+
# Header Params
|
|
1417
|
+
header_params = {}
|
|
1418
|
+
header_params[:accept] = 'application/json'
|
|
1419
|
+
header_params[:'content-type'] = 'application/json'
|
|
1420
|
+
header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
|
|
1421
|
+
# rubocop:enable Style/NegatedIf
|
|
1422
|
+
|
|
1423
|
+
post_body = nil
|
|
1424
|
+
|
|
1425
|
+
# rubocop:disable Metrics/BlockLength
|
|
1426
|
+
OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'WaasClient#list_protection_rules') do
|
|
1427
|
+
@api_client.call_api(
|
|
1428
|
+
:GET,
|
|
1429
|
+
path,
|
|
1430
|
+
endpoint,
|
|
1431
|
+
header_params: header_params,
|
|
1432
|
+
query_params: query_params,
|
|
1433
|
+
operation_signing_strategy: operation_signing_strategy,
|
|
1434
|
+
body: post_body,
|
|
1435
|
+
return_type: 'Array<OCI::Waas::Models::ProtectionRule>'
|
|
1436
|
+
)
|
|
1437
|
+
end
|
|
1438
|
+
# rubocop:enable Metrics/BlockLength
|
|
1439
|
+
end
|
|
1440
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
1441
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
1442
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
|
1443
|
+
|
|
1444
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
1445
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
1446
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
|
1447
|
+
|
|
1448
|
+
|
|
1449
|
+
# Gets the list of recommended Web Application Firewall protection rules.
|
|
1450
|
+
#
|
|
1451
|
+
# Use the `POST /waasPolicies/{waasPolicyId}/actions/acceptWafConfigRecommendations` method to accept recommended Web Application Firewall protection rules. For more information, see [WAF Protection Rules](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/WAF/Tasks/wafprotectionrules.htm).
|
|
1452
|
+
# The list is sorted ascending by `key`.
|
|
1453
|
+
# @param [String] waas_policy_id The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the WAAS policy.
|
|
1454
|
+
# @param [Hash] opts the optional parameters
|
|
1455
|
+
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
|
|
1456
|
+
# retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
|
|
1457
|
+
# @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
|
|
1458
|
+
# @option opts [String] :recommended_action A filter that matches recommended protection rules based on the selected action. If unspecified, rules with any action type are returned.
|
|
1459
|
+
# Allowed values are: DETECT, BLOCK
|
|
1460
|
+
# @option opts [Integer] :limit The maximum number of items to return in a paginated call. In unspecified, defaults to `10`. (default to 10)
|
|
1461
|
+
# @option opts [String] :page The value of the `opc-next-page` response header from the previous paginated call.
|
|
1462
|
+
# @return [Response] A Response object with data of type Array<{OCI::Waas::Models::Recommendation Recommendation}>
|
|
1463
|
+
def list_recommendations(waas_policy_id, opts = {})
|
|
1464
|
+
logger.debug 'Calling operation WaasClient#list_recommendations.' if logger
|
|
1465
|
+
|
|
1466
|
+
raise "Missing the required parameter 'waas_policy_id' when calling list_recommendations." if waas_policy_id.nil?
|
|
1467
|
+
|
|
1468
|
+
if opts[:recommended_action] && !%w[DETECT BLOCK].include?(opts[:recommended_action])
|
|
1469
|
+
raise 'Invalid value for "recommended_action", must be one of DETECT, BLOCK.'
|
|
1470
|
+
end
|
|
1471
|
+
raise "Parameter value for 'waas_policy_id' must not be blank" if OCI::Internal::Util.blank_string?(waas_policy_id)
|
|
1472
|
+
|
|
1473
|
+
path = '/waasPolicies/{waasPolicyId}/wafConfig/recommendations'.sub('{waasPolicyId}', waas_policy_id.to_s)
|
|
1474
|
+
operation_signing_strategy = :standard
|
|
1475
|
+
|
|
1476
|
+
# rubocop:disable Style/NegatedIf
|
|
1477
|
+
# Query Params
|
|
1478
|
+
query_params = {}
|
|
1479
|
+
query_params[:recommendedAction] = opts[:recommended_action] if opts[:recommended_action]
|
|
1480
|
+
query_params[:limit] = opts[:limit] if opts[:limit]
|
|
1481
|
+
query_params[:page] = opts[:page] if opts[:page]
|
|
1482
|
+
|
|
1483
|
+
# Header Params
|
|
1484
|
+
header_params = {}
|
|
1485
|
+
header_params[:accept] = 'application/json'
|
|
1486
|
+
header_params[:'content-type'] = 'application/json'
|
|
1487
|
+
header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
|
|
1488
|
+
# rubocop:enable Style/NegatedIf
|
|
1489
|
+
|
|
1490
|
+
post_body = nil
|
|
1491
|
+
|
|
1492
|
+
# rubocop:disable Metrics/BlockLength
|
|
1493
|
+
OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'WaasClient#list_recommendations') do
|
|
1494
|
+
@api_client.call_api(
|
|
1495
|
+
:GET,
|
|
1496
|
+
path,
|
|
1497
|
+
endpoint,
|
|
1498
|
+
header_params: header_params,
|
|
1499
|
+
query_params: query_params,
|
|
1500
|
+
operation_signing_strategy: operation_signing_strategy,
|
|
1501
|
+
body: post_body,
|
|
1502
|
+
return_type: 'Array<OCI::Waas::Models::Recommendation>'
|
|
1503
|
+
)
|
|
1504
|
+
end
|
|
1505
|
+
# rubocop:enable Metrics/BlockLength
|
|
1506
|
+
end
|
|
1507
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
1508
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
1509
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
|
1510
|
+
|
|
1511
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
1512
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
1513
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
|
1514
|
+
|
|
1515
|
+
|
|
1516
|
+
# Gets the list of available web application threat intelligence feeds
|
|
1517
|
+
# and the actions set for each feed. The list is sorted ascending by
|
|
1518
|
+
# `key`.
|
|
1519
|
+
#
|
|
1520
|
+
# @param [String] waas_policy_id The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the WAAS policy.
|
|
1521
|
+
# @param [Hash] opts the optional parameters
|
|
1522
|
+
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
|
|
1523
|
+
# retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
|
|
1524
|
+
# @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
|
|
1525
|
+
# @option opts [Integer] :limit The maximum number of items to return in a paginated call. In unspecified, defaults to `10`. (default to 10)
|
|
1526
|
+
# @option opts [String] :page The value of the `opc-next-page` response header from the previous paginated call.
|
|
1527
|
+
# @return [Response] A Response object with data of type Array<{OCI::Waas::Models::ThreatFeed ThreatFeed}>
|
|
1528
|
+
def list_threat_feeds(waas_policy_id, opts = {})
|
|
1529
|
+
logger.debug 'Calling operation WaasClient#list_threat_feeds.' if logger
|
|
1530
|
+
|
|
1531
|
+
raise "Missing the required parameter 'waas_policy_id' when calling list_threat_feeds." if waas_policy_id.nil?
|
|
1532
|
+
raise "Parameter value for 'waas_policy_id' must not be blank" if OCI::Internal::Util.blank_string?(waas_policy_id)
|
|
1533
|
+
|
|
1534
|
+
path = '/waasPolicies/{waasPolicyId}/wafConfig/threatFeeds'.sub('{waasPolicyId}', waas_policy_id.to_s)
|
|
1535
|
+
operation_signing_strategy = :standard
|
|
1536
|
+
|
|
1537
|
+
# rubocop:disable Style/NegatedIf
|
|
1538
|
+
# Query Params
|
|
1539
|
+
query_params = {}
|
|
1540
|
+
query_params[:limit] = opts[:limit] if opts[:limit]
|
|
1541
|
+
query_params[:page] = opts[:page] if opts[:page]
|
|
1542
|
+
|
|
1543
|
+
# Header Params
|
|
1544
|
+
header_params = {}
|
|
1545
|
+
header_params[:accept] = 'application/json'
|
|
1546
|
+
header_params[:'content-type'] = 'application/json'
|
|
1547
|
+
header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
|
|
1548
|
+
# rubocop:enable Style/NegatedIf
|
|
1549
|
+
|
|
1550
|
+
post_body = nil
|
|
1551
|
+
|
|
1552
|
+
# rubocop:disable Metrics/BlockLength
|
|
1553
|
+
OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'WaasClient#list_threat_feeds') do
|
|
1554
|
+
@api_client.call_api(
|
|
1555
|
+
:GET,
|
|
1556
|
+
path,
|
|
1557
|
+
endpoint,
|
|
1558
|
+
header_params: header_params,
|
|
1559
|
+
query_params: query_params,
|
|
1560
|
+
operation_signing_strategy: operation_signing_strategy,
|
|
1561
|
+
body: post_body,
|
|
1562
|
+
return_type: 'Array<OCI::Waas::Models::ThreatFeed>'
|
|
1563
|
+
)
|
|
1564
|
+
end
|
|
1565
|
+
# rubocop:enable Metrics/BlockLength
|
|
1566
|
+
end
|
|
1567
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
1568
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
1569
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
|
1570
|
+
|
|
1571
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
1572
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
1573
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
|
1574
|
+
|
|
1575
|
+
|
|
1576
|
+
# Gets a list of WAAS policies.
|
|
1577
|
+
# @param [String] compartment_id The [OCID](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. This number is generated when the compartment is created.
|
|
1578
|
+
# @param [Hash] opts the optional parameters
|
|
1579
|
+
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
|
|
1580
|
+
# retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
|
|
1581
|
+
# @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
|
|
1582
|
+
# @option opts [Integer] :limit The maximum number of items to return in a paginated call. In unspecified, defaults to `10`. (default to 10)
|
|
1583
|
+
# @option opts [String] :page The value of the `opc-next-page` response header from the previous paginated call.
|
|
1584
|
+
# @option opts [String] :sort_by The value by which policies are sorted in a paginated 'List' call. If unspecified, defaults to `timeCreated`.
|
|
1585
|
+
# Allowed values are: id, displayName, timeCreated
|
|
1586
|
+
# @option opts [String] :sort_order The value of the sorting direction of resources in a paginated 'List' call. If unspecified, defaults to `DESC`.
|
|
1587
|
+
# Allowed values are: ASC, DESC
|
|
1588
|
+
# @option opts [Array<String>] :id Filter policies using a list of policy OCIDs.
|
|
1589
|
+
# @option opts [Array<String>] :display_name Filter policies using a list of display names.
|
|
1590
|
+
# @option opts [Array<String>] :lifecycle_state Filter policies using a list of lifecycle states.
|
|
1591
|
+
# @option opts [DateTime] :time_created_greater_than_or_equal_to A filter that matches policies created on or after the specified date and time.
|
|
1592
|
+
# @option opts [DateTime] :time_created_less_than A filter that matches policies created before the specified date-time.
|
|
1593
|
+
# @return [Response] A Response object with data of type Array<{OCI::Waas::Models::WaasPolicySummary WaasPolicySummary}>
|
|
1594
|
+
def list_waas_policies(compartment_id, opts = {})
|
|
1595
|
+
logger.debug 'Calling operation WaasClient#list_waas_policies.' if logger
|
|
1596
|
+
|
|
1597
|
+
raise "Missing the required parameter 'compartment_id' when calling list_waas_policies." if compartment_id.nil?
|
|
1598
|
+
|
|
1599
|
+
if opts[:sort_by] && !%w[id displayName timeCreated].include?(opts[:sort_by])
|
|
1600
|
+
raise 'Invalid value for "sort_by", must be one of id, displayName, timeCreated.'
|
|
1601
|
+
end
|
|
1602
|
+
|
|
1603
|
+
if opts[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order])
|
|
1604
|
+
raise 'Invalid value for "sort_order", must be one of ASC, DESC.'
|
|
1605
|
+
end
|
|
1606
|
+
|
|
1607
|
+
path = '/waasPolicies'
|
|
1608
|
+
operation_signing_strategy = :standard
|
|
1609
|
+
|
|
1610
|
+
# rubocop:disable Style/NegatedIf
|
|
1611
|
+
# Query Params
|
|
1612
|
+
query_params = {}
|
|
1613
|
+
query_params[:compartmentId] = compartment_id
|
|
1614
|
+
query_params[:limit] = opts[:limit] if opts[:limit]
|
|
1615
|
+
query_params[:page] = opts[:page] if opts[:page]
|
|
1616
|
+
query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
|
|
1617
|
+
query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
|
|
1618
|
+
query_params[:id] = OCI::ApiClient.build_collection_params(opts[:id], :multi) if opts[:id] && !opts[:id].empty?
|
|
1619
|
+
query_params[:displayName] = OCI::ApiClient.build_collection_params(opts[:display_name], :multi) if opts[:display_name] && !opts[:display_name].empty?
|
|
1620
|
+
query_params[:lifecycleState] = OCI::ApiClient.build_collection_params(opts[:lifecycle_state], :multi) if opts[:lifecycle_state] && !opts[:lifecycle_state].empty?
|
|
1621
|
+
query_params[:timeCreatedGreaterThanOrEqualTo] = opts[:time_created_greater_than_or_equal_to] if opts[:time_created_greater_than_or_equal_to]
|
|
1622
|
+
query_params[:timeCreatedLessThan] = opts[:time_created_less_than] if opts[:time_created_less_than]
|
|
1623
|
+
|
|
1624
|
+
# Header Params
|
|
1625
|
+
header_params = {}
|
|
1626
|
+
header_params[:accept] = 'application/json'
|
|
1627
|
+
header_params[:'content-type'] = 'application/json'
|
|
1628
|
+
header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
|
|
1629
|
+
# rubocop:enable Style/NegatedIf
|
|
1630
|
+
|
|
1631
|
+
post_body = nil
|
|
1632
|
+
|
|
1633
|
+
# rubocop:disable Metrics/BlockLength
|
|
1634
|
+
OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'WaasClient#list_waas_policies') do
|
|
1635
|
+
@api_client.call_api(
|
|
1636
|
+
:GET,
|
|
1637
|
+
path,
|
|
1638
|
+
endpoint,
|
|
1639
|
+
header_params: header_params,
|
|
1640
|
+
query_params: query_params,
|
|
1641
|
+
operation_signing_strategy: operation_signing_strategy,
|
|
1642
|
+
body: post_body,
|
|
1643
|
+
return_type: 'Array<OCI::Waas::Models::WaasPolicySummary>'
|
|
1644
|
+
)
|
|
1645
|
+
end
|
|
1646
|
+
# rubocop:enable Metrics/BlockLength
|
|
1647
|
+
end
|
|
1648
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
1649
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
1650
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
|
1651
|
+
|
|
1652
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
1653
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
1654
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
|
1655
|
+
|
|
1656
|
+
|
|
1657
|
+
# Gets the number of blocked requests by a Web Application Firewall feature in five minute blocks, in ascending order by `timeObserved`.
|
|
1658
|
+
# @param [String] waas_policy_id The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the WAAS policy.
|
|
1659
|
+
# @param [Hash] opts the optional parameters
|
|
1660
|
+
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
|
|
1661
|
+
# retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
|
|
1662
|
+
# @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
|
|
1663
|
+
# @option opts [DateTime] :time_observed_greater_than_or_equal_to A filter that limits returned events to those occurring on or after a date and time, specified in RFC 3339 format. If unspecified, defaults to 30 minutes before receipt of the request.
|
|
1664
|
+
# @option opts [DateTime] :time_observed_less_than A filter that limits returned events to those occurring before a date and time, specified in RFC 3339 format.
|
|
1665
|
+
# @option opts [Integer] :limit The maximum number of items to return in a paginated call. In unspecified, defaults to `10`. (default to 10)
|
|
1666
|
+
# @option opts [String] :page The value of the `opc-next-page` response header from the previous paginated call.
|
|
1667
|
+
# @option opts [Array<String>] :waf_feature Filter stats by the Web Application Firewall feature that triggered the block action. If unspecified, data for all WAF features will be returned.
|
|
1668
|
+
# Allowed values are: PROTECTION_RULES, JS_CHALLENGE, ACCESS_RULES, THREAT_FEEDS, HUMAN_INTERACTION_CHALLENGE, DEVICE_FINGERPRINT_CHALLENGE, CAPTCHA, ADDRESS_RATE_LIMITING
|
|
1669
|
+
# @return [Response] A Response object with data of type Array<{OCI::Waas::Models::WafBlockedRequest WafBlockedRequest}>
|
|
1670
|
+
def list_waf_blocked_requests(waas_policy_id, opts = {})
|
|
1671
|
+
logger.debug 'Calling operation WaasClient#list_waf_blocked_requests.' if logger
|
|
1672
|
+
|
|
1673
|
+
raise "Missing the required parameter 'waas_policy_id' when calling list_waf_blocked_requests." if waas_policy_id.nil?
|
|
1674
|
+
|
|
1675
|
+
|
|
1676
|
+
waf_feature_allowable_values = %w[PROTECTION_RULES JS_CHALLENGE ACCESS_RULES THREAT_FEEDS HUMAN_INTERACTION_CHALLENGE DEVICE_FINGERPRINT_CHALLENGE CAPTCHA ADDRESS_RATE_LIMITING]
|
|
1677
|
+
if opts[:waf_feature] && !opts[:waf_feature].empty?
|
|
1678
|
+
opts[:waf_feature].each do |val_to_check|
|
|
1679
|
+
unless waf_feature_allowable_values.include?(val_to_check)
|
|
1680
|
+
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.'
|
|
1681
|
+
end
|
|
1682
|
+
end
|
|
1683
|
+
end
|
|
1684
|
+
raise "Parameter value for 'waas_policy_id' must not be blank" if OCI::Internal::Util.blank_string?(waas_policy_id)
|
|
1685
|
+
|
|
1686
|
+
path = '/waasPolicies/{waasPolicyId}/reports/waf/blocked'.sub('{waasPolicyId}', waas_policy_id.to_s)
|
|
1687
|
+
operation_signing_strategy = :standard
|
|
1688
|
+
|
|
1689
|
+
# rubocop:disable Style/NegatedIf
|
|
1690
|
+
# Query Params
|
|
1691
|
+
query_params = {}
|
|
1692
|
+
query_params[:timeObservedGreaterThanOrEqualTo] = opts[:time_observed_greater_than_or_equal_to] if opts[:time_observed_greater_than_or_equal_to]
|
|
1693
|
+
query_params[:timeObservedLessThan] = opts[:time_observed_less_than] if opts[:time_observed_less_than]
|
|
1694
|
+
query_params[:limit] = opts[:limit] if opts[:limit]
|
|
1695
|
+
query_params[:page] = opts[:page] if opts[:page]
|
|
1696
|
+
query_params[:wafFeature] = OCI::ApiClient.build_collection_params(opts[:waf_feature], :multi) if opts[:waf_feature] && !opts[:waf_feature].empty?
|
|
1697
|
+
|
|
1698
|
+
# Header Params
|
|
1699
|
+
header_params = {}
|
|
1700
|
+
header_params[:accept] = 'application/json'
|
|
1701
|
+
header_params[:'content-type'] = 'application/json'
|
|
1702
|
+
header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
|
|
1703
|
+
# rubocop:enable Style/NegatedIf
|
|
1704
|
+
|
|
1705
|
+
post_body = nil
|
|
1706
|
+
|
|
1707
|
+
# rubocop:disable Metrics/BlockLength
|
|
1708
|
+
OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'WaasClient#list_waf_blocked_requests') do
|
|
1709
|
+
@api_client.call_api(
|
|
1710
|
+
:GET,
|
|
1711
|
+
path,
|
|
1712
|
+
endpoint,
|
|
1713
|
+
header_params: header_params,
|
|
1714
|
+
query_params: query_params,
|
|
1715
|
+
operation_signing_strategy: operation_signing_strategy,
|
|
1716
|
+
body: post_body,
|
|
1717
|
+
return_type: 'Array<OCI::Waas::Models::WafBlockedRequest>'
|
|
1718
|
+
)
|
|
1719
|
+
end
|
|
1720
|
+
# rubocop:enable Metrics/BlockLength
|
|
1721
|
+
end
|
|
1722
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
1723
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
1724
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
|
1725
|
+
|
|
1726
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
1727
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
1728
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
|
1729
|
+
|
|
1730
|
+
|
|
1731
|
+
# Gets structured Web Application Firewall event logs for a WAAS
|
|
1732
|
+
# policy. The list is sorted by the `timeObserved` starting from the
|
|
1733
|
+
# oldest recorded event (ascending).
|
|
1734
|
+
#
|
|
1735
|
+
# @param [String] waas_policy_id The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the WAAS policy.
|
|
1736
|
+
# @param [Hash] opts the optional parameters
|
|
1737
|
+
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
|
|
1738
|
+
# retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
|
|
1739
|
+
# @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
|
|
1740
|
+
# @option opts [Integer] :limit The maximum number of items to return in a paginated call. In unspecified, defaults to `20`. (default to 20)
|
|
1741
|
+
# @option opts [String] :page The value of the `opc-next-page` response header from the previous paginated call.
|
|
1742
|
+
# @option opts [DateTime] :time_observed_greater_than_or_equal_to A filter that matches log entries where the observed event occurred on or after a date and time specified in RFC 3339 format. If unspecified, defaults to two hours before receipt of the request.
|
|
1743
|
+
# @option opts [DateTime] :time_observed_less_than A filter that matches log entries where the observed event occurred before a date and time, specified in RFC 3339 format.
|
|
1744
|
+
# @option opts [String] :text_contains A full text search for logs.
|
|
1745
|
+
# @option opts [Array<String>] :access_rule_key Filters logs by access rule key.
|
|
1746
|
+
# @option opts [Array<String>] :action Filters logs by Web Application Firewall action.
|
|
1747
|
+
# Allowed values are: BLOCK, DETECT, BYPASS, LOG, REDIRECTED
|
|
1748
|
+
# @option opts [Array<String>] :client_address Filters logs by client IP address.
|
|
1749
|
+
# @option opts [Array<String>] :country_code Filters logs by country code. Country codes are in ISO 3166-1 alpha-2 format. For a list of codes, see [ISO's website](https://www.iso.org/obp/ui/#search/code/).
|
|
1750
|
+
# @option opts [Array<String>] :country_name Filter logs by country name.
|
|
1751
|
+
# @option opts [Array<String>] :fingerprint Filter logs by device fingerprint.
|
|
1752
|
+
# @option opts [Array<String>] :http_method Filter logs by HTTP method.
|
|
1753
|
+
# Allowed values are: OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, CONNECT
|
|
1754
|
+
# @option opts [Array<String>] :incident_key Filter logs by incident key.
|
|
1755
|
+
# @option opts [Array<String>] :log_type Filter by log type.
|
|
1756
|
+
# Allowed values are: ACCESS, PROTECTION_RULES, JS_CHALLENGE, CAPTCHA, ACCESS_RULES, THREAT_FEEDS, HUMAN_INTERACTION_CHALLENGE, DEVICE_FINGERPRINT_CHALLENGE, ADDRESS_RATE_LIMITING
|
|
1757
|
+
# @option opts [Array<String>] :origin_address Filter by origin IP address.
|
|
1758
|
+
# @option opts [Array<String>] :referrer Filter by referrer.
|
|
1759
|
+
# @option opts [Array<String>] :request_url Filter by request URL.
|
|
1760
|
+
# @option opts [Array<Integer>] :response_code Filter by response code.
|
|
1761
|
+
# @option opts [Array<String>] :threat_feed_key Filter by threat feed key.
|
|
1762
|
+
# @option opts [Array<String>] :user_agent Filter by user agent.
|
|
1763
|
+
# @option opts [Array<String>] :protection_rule_key Filter by protection rule key.
|
|
1764
|
+
# @return [Response] A Response object with data of type Array<{OCI::Waas::Models::WafLog WafLog}>
|
|
1765
|
+
def list_waf_logs(waas_policy_id, opts = {})
|
|
1766
|
+
logger.debug 'Calling operation WaasClient#list_waf_logs.' if logger
|
|
1767
|
+
|
|
1768
|
+
raise "Missing the required parameter 'waas_policy_id' when calling list_waf_logs." if waas_policy_id.nil?
|
|
1769
|
+
|
|
1770
|
+
|
|
1771
|
+
action_allowable_values = %w[BLOCK DETECT BYPASS LOG REDIRECTED]
|
|
1772
|
+
if opts[:action] && !opts[:action].empty?
|
|
1773
|
+
opts[:action].each do |val_to_check|
|
|
1774
|
+
unless action_allowable_values.include?(val_to_check)
|
|
1775
|
+
raise 'Invalid value for "action", must be one of BLOCK, DETECT, BYPASS, LOG, REDIRECTED.'
|
|
1776
|
+
end
|
|
1777
|
+
end
|
|
1778
|
+
end
|
|
1779
|
+
|
|
1780
|
+
|
|
1781
|
+
http_method_allowable_values = %w[OPTIONS GET HEAD POST PUT DELETE TRACE CONNECT]
|
|
1782
|
+
if opts[:http_method] && !opts[:http_method].empty?
|
|
1783
|
+
opts[:http_method].each do |val_to_check|
|
|
1784
|
+
unless http_method_allowable_values.include?(val_to_check)
|
|
1785
|
+
raise 'Invalid value for "http_method", must be one of OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, CONNECT.'
|
|
1786
|
+
end
|
|
1787
|
+
end
|
|
1788
|
+
end
|
|
1789
|
+
|
|
1790
|
+
|
|
1791
|
+
log_type_allowable_values = %w[ACCESS PROTECTION_RULES JS_CHALLENGE CAPTCHA ACCESS_RULES THREAT_FEEDS HUMAN_INTERACTION_CHALLENGE DEVICE_FINGERPRINT_CHALLENGE ADDRESS_RATE_LIMITING]
|
|
1792
|
+
if opts[:log_type] && !opts[:log_type].empty?
|
|
1793
|
+
opts[:log_type].each do |val_to_check|
|
|
1794
|
+
unless log_type_allowable_values.include?(val_to_check)
|
|
1795
|
+
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.'
|
|
1796
|
+
end
|
|
1797
|
+
end
|
|
1798
|
+
end
|
|
1799
|
+
raise "Parameter value for 'waas_policy_id' must not be blank" if OCI::Internal::Util.blank_string?(waas_policy_id)
|
|
1800
|
+
|
|
1801
|
+
path = '/waasPolicies/{waasPolicyId}/wafLogs'.sub('{waasPolicyId}', waas_policy_id.to_s)
|
|
1802
|
+
operation_signing_strategy = :standard
|
|
1803
|
+
|
|
1804
|
+
# rubocop:disable Style/NegatedIf
|
|
1805
|
+
# Query Params
|
|
1806
|
+
query_params = {}
|
|
1807
|
+
query_params[:limit] = opts[:limit] if opts[:limit]
|
|
1808
|
+
query_params[:page] = opts[:page] if opts[:page]
|
|
1809
|
+
query_params[:timeObservedGreaterThanOrEqualTo] = opts[:time_observed_greater_than_or_equal_to] if opts[:time_observed_greater_than_or_equal_to]
|
|
1810
|
+
query_params[:timeObservedLessThan] = opts[:time_observed_less_than] if opts[:time_observed_less_than]
|
|
1811
|
+
query_params[:textContains] = opts[:text_contains] if opts[:text_contains]
|
|
1812
|
+
query_params[:accessRuleKey] = OCI::ApiClient.build_collection_params(opts[:access_rule_key], :multi) if opts[:access_rule_key] && !opts[:access_rule_key].empty?
|
|
1813
|
+
query_params[:action] = OCI::ApiClient.build_collection_params(opts[:action], :multi) if opts[:action] && !opts[:action].empty?
|
|
1814
|
+
query_params[:clientAddress] = OCI::ApiClient.build_collection_params(opts[:client_address], :multi) if opts[:client_address] && !opts[:client_address].empty?
|
|
1815
|
+
query_params[:countryCode] = OCI::ApiClient.build_collection_params(opts[:country_code], :multi) if opts[:country_code] && !opts[:country_code].empty?
|
|
1816
|
+
query_params[:countryName] = OCI::ApiClient.build_collection_params(opts[:country_name], :multi) if opts[:country_name] && !opts[:country_name].empty?
|
|
1817
|
+
query_params[:fingerprint] = OCI::ApiClient.build_collection_params(opts[:fingerprint], :multi) if opts[:fingerprint] && !opts[:fingerprint].empty?
|
|
1818
|
+
query_params[:httpMethod] = OCI::ApiClient.build_collection_params(opts[:http_method], :multi) if opts[:http_method] && !opts[:http_method].empty?
|
|
1819
|
+
query_params[:incidentKey] = OCI::ApiClient.build_collection_params(opts[:incident_key], :multi) if opts[:incident_key] && !opts[:incident_key].empty?
|
|
1820
|
+
query_params[:logType] = OCI::ApiClient.build_collection_params(opts[:log_type], :multi) if opts[:log_type] && !opts[:log_type].empty?
|
|
1821
|
+
query_params[:originAddress] = OCI::ApiClient.build_collection_params(opts[:origin_address], :multi) if opts[:origin_address] && !opts[:origin_address].empty?
|
|
1822
|
+
query_params[:referrer] = OCI::ApiClient.build_collection_params(opts[:referrer], :multi) if opts[:referrer] && !opts[:referrer].empty?
|
|
1823
|
+
query_params[:requestUrl] = OCI::ApiClient.build_collection_params(opts[:request_url], :multi) if opts[:request_url] && !opts[:request_url].empty?
|
|
1824
|
+
query_params[:responseCode] = OCI::ApiClient.build_collection_params(opts[:response_code], :multi) if opts[:response_code] && !opts[:response_code].empty?
|
|
1825
|
+
query_params[:threatFeedKey] = OCI::ApiClient.build_collection_params(opts[:threat_feed_key], :multi) if opts[:threat_feed_key] && !opts[:threat_feed_key].empty?
|
|
1826
|
+
query_params[:userAgent] = OCI::ApiClient.build_collection_params(opts[:user_agent], :multi) if opts[:user_agent] && !opts[:user_agent].empty?
|
|
1827
|
+
query_params[:protectionRuleKey] = OCI::ApiClient.build_collection_params(opts[:protection_rule_key], :multi) if opts[:protection_rule_key] && !opts[:protection_rule_key].empty?
|
|
1828
|
+
|
|
1829
|
+
# Header Params
|
|
1830
|
+
header_params = {}
|
|
1831
|
+
header_params[:accept] = 'application/json'
|
|
1832
|
+
header_params[:'content-type'] = 'application/json'
|
|
1833
|
+
header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
|
|
1834
|
+
# rubocop:enable Style/NegatedIf
|
|
1835
|
+
|
|
1836
|
+
post_body = nil
|
|
1837
|
+
|
|
1838
|
+
# rubocop:disable Metrics/BlockLength
|
|
1839
|
+
OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'WaasClient#list_waf_logs') do
|
|
1840
|
+
@api_client.call_api(
|
|
1841
|
+
:GET,
|
|
1842
|
+
path,
|
|
1843
|
+
endpoint,
|
|
1844
|
+
header_params: header_params,
|
|
1845
|
+
query_params: query_params,
|
|
1846
|
+
operation_signing_strategy: operation_signing_strategy,
|
|
1847
|
+
body: post_body,
|
|
1848
|
+
return_type: 'Array<OCI::Waas::Models::WafLog>'
|
|
1849
|
+
)
|
|
1850
|
+
end
|
|
1851
|
+
# rubocop:enable Metrics/BlockLength
|
|
1852
|
+
end
|
|
1853
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
1854
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
1855
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
|
1856
|
+
|
|
1857
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
1858
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
1859
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
|
1860
|
+
|
|
1861
|
+
|
|
1862
|
+
# Gets the number of requests managed by a Web Application Firewall
|
|
1863
|
+
# over a specified period of time, including blocked requests. Sorted
|
|
1864
|
+
# by `timeObserved` with oldest requests first (ascending).
|
|
1865
|
+
#
|
|
1866
|
+
# @param [String] waas_policy_id The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the WAAS policy.
|
|
1867
|
+
# @param [Hash] opts the optional parameters
|
|
1868
|
+
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
|
|
1869
|
+
# retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
|
|
1870
|
+
# @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
|
|
1871
|
+
# @option opts [DateTime] :time_observed_greater_than_or_equal_to A filter that limits returned events to those occurring on or after a date and time, specified in RFC 3339 format. If unspecified, defaults to 30 minutes before receipt of the request.
|
|
1872
|
+
# @option opts [DateTime] :time_observed_less_than A filter that limits returned events to those occurring before a date and time, specified in RFC 3339 format.
|
|
1873
|
+
# @option opts [Integer] :limit The maximum number of items to return in a paginated call. In unspecified, defaults to `10`. (default to 10)
|
|
1874
|
+
# @option opts [String] :page The value of the `opc-next-page` response header from the previous paginated call.
|
|
1875
|
+
# @return [Response] A Response object with data of type Array<{OCI::Waas::Models::WafRequest WafRequest}>
|
|
1876
|
+
def list_waf_requests(waas_policy_id, opts = {})
|
|
1877
|
+
logger.debug 'Calling operation WaasClient#list_waf_requests.' if logger
|
|
1878
|
+
|
|
1879
|
+
raise "Missing the required parameter 'waas_policy_id' when calling list_waf_requests." if waas_policy_id.nil?
|
|
1880
|
+
raise "Parameter value for 'waas_policy_id' must not be blank" if OCI::Internal::Util.blank_string?(waas_policy_id)
|
|
1881
|
+
|
|
1882
|
+
path = '/waasPolicies/{waasPolicyId}/reports/waf/requests'.sub('{waasPolicyId}', waas_policy_id.to_s)
|
|
1883
|
+
operation_signing_strategy = :standard
|
|
1884
|
+
|
|
1885
|
+
# rubocop:disable Style/NegatedIf
|
|
1886
|
+
# Query Params
|
|
1887
|
+
query_params = {}
|
|
1888
|
+
query_params[:timeObservedGreaterThanOrEqualTo] = opts[:time_observed_greater_than_or_equal_to] if opts[:time_observed_greater_than_or_equal_to]
|
|
1889
|
+
query_params[:timeObservedLessThan] = opts[:time_observed_less_than] if opts[:time_observed_less_than]
|
|
1890
|
+
query_params[:limit] = opts[:limit] if opts[:limit]
|
|
1891
|
+
query_params[:page] = opts[:page] if opts[:page]
|
|
1892
|
+
|
|
1893
|
+
# Header Params
|
|
1894
|
+
header_params = {}
|
|
1895
|
+
header_params[:accept] = 'application/json'
|
|
1896
|
+
header_params[:'content-type'] = 'application/json'
|
|
1897
|
+
header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
|
|
1898
|
+
# rubocop:enable Style/NegatedIf
|
|
1899
|
+
|
|
1900
|
+
post_body = nil
|
|
1901
|
+
|
|
1902
|
+
# rubocop:disable Metrics/BlockLength
|
|
1903
|
+
OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'WaasClient#list_waf_requests') do
|
|
1904
|
+
@api_client.call_api(
|
|
1905
|
+
:GET,
|
|
1906
|
+
path,
|
|
1907
|
+
endpoint,
|
|
1908
|
+
header_params: header_params,
|
|
1909
|
+
query_params: query_params,
|
|
1910
|
+
operation_signing_strategy: operation_signing_strategy,
|
|
1911
|
+
body: post_body,
|
|
1912
|
+
return_type: 'Array<OCI::Waas::Models::WafRequest>'
|
|
1913
|
+
)
|
|
1914
|
+
end
|
|
1915
|
+
# rubocop:enable Metrics/BlockLength
|
|
1916
|
+
end
|
|
1917
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
1918
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
1919
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
|
1920
|
+
|
|
1921
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
1922
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
1923
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
|
1924
|
+
|
|
1925
|
+
|
|
1926
|
+
# Gets the Web Application Firewall traffic data for a WAAS policy.
|
|
1927
|
+
# Sorted by `timeObserved` with oldest data points first (ascending).
|
|
1928
|
+
#
|
|
1929
|
+
# @param [String] waas_policy_id The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the WAAS policy.
|
|
1930
|
+
# @param [Hash] opts the optional parameters
|
|
1931
|
+
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
|
|
1932
|
+
# retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
|
|
1933
|
+
# @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
|
|
1934
|
+
# @option opts [DateTime] :time_observed_greater_than_or_equal_to A filter that limits returned events to those occurring on or after a date and time, specified in RFC 3339 format. If unspecified, defaults to 30 minutes before receipt of the request.
|
|
1935
|
+
# @option opts [DateTime] :time_observed_less_than A filter that limits returned events to those occurring before a date and time, specified in RFC 3339 format.
|
|
1936
|
+
# @option opts [Integer] :limit The maximum number of items to return in a paginated call. In unspecified, defaults to `10`. (default to 10)
|
|
1937
|
+
# @option opts [String] :page The value of the `opc-next-page` response header from the previous paginated call.
|
|
1938
|
+
# @return [Response] A Response object with data of type Array<{OCI::Waas::Models::WafTrafficDatum WafTrafficDatum}>
|
|
1939
|
+
def list_waf_traffic(waas_policy_id, opts = {})
|
|
1940
|
+
logger.debug 'Calling operation WaasClient#list_waf_traffic.' if logger
|
|
1941
|
+
|
|
1942
|
+
raise "Missing the required parameter 'waas_policy_id' when calling list_waf_traffic." if waas_policy_id.nil?
|
|
1943
|
+
raise "Parameter value for 'waas_policy_id' must not be blank" if OCI::Internal::Util.blank_string?(waas_policy_id)
|
|
1944
|
+
|
|
1945
|
+
path = '/waasPolicies/{waasPolicyId}/reports/waf/traffic'.sub('{waasPolicyId}', waas_policy_id.to_s)
|
|
1946
|
+
operation_signing_strategy = :standard
|
|
1947
|
+
|
|
1948
|
+
# rubocop:disable Style/NegatedIf
|
|
1949
|
+
# Query Params
|
|
1950
|
+
query_params = {}
|
|
1951
|
+
query_params[:timeObservedGreaterThanOrEqualTo] = opts[:time_observed_greater_than_or_equal_to] if opts[:time_observed_greater_than_or_equal_to]
|
|
1952
|
+
query_params[:timeObservedLessThan] = opts[:time_observed_less_than] if opts[:time_observed_less_than]
|
|
1953
|
+
query_params[:limit] = opts[:limit] if opts[:limit]
|
|
1954
|
+
query_params[:page] = opts[:page] if opts[:page]
|
|
1955
|
+
|
|
1956
|
+
# Header Params
|
|
1957
|
+
header_params = {}
|
|
1958
|
+
header_params[:accept] = 'application/json'
|
|
1959
|
+
header_params[:'content-type'] = 'application/json'
|
|
1960
|
+
header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
|
|
1961
|
+
# rubocop:enable Style/NegatedIf
|
|
1962
|
+
|
|
1963
|
+
post_body = nil
|
|
1964
|
+
|
|
1965
|
+
# rubocop:disable Metrics/BlockLength
|
|
1966
|
+
OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'WaasClient#list_waf_traffic') do
|
|
1967
|
+
@api_client.call_api(
|
|
1968
|
+
:GET,
|
|
1969
|
+
path,
|
|
1970
|
+
endpoint,
|
|
1971
|
+
header_params: header_params,
|
|
1972
|
+
query_params: query_params,
|
|
1973
|
+
operation_signing_strategy: operation_signing_strategy,
|
|
1974
|
+
body: post_body,
|
|
1975
|
+
return_type: 'Array<OCI::Waas::Models::WafTrafficDatum>'
|
|
1976
|
+
)
|
|
1977
|
+
end
|
|
1978
|
+
# rubocop:enable Metrics/BlockLength
|
|
1979
|
+
end
|
|
1980
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
1981
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
1982
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
|
1983
|
+
|
|
1984
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
1985
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
1986
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
|
1987
|
+
|
|
1988
|
+
|
|
1989
|
+
# Gets the list of whitelists defined in the Web Application Firewall configuration for a WAAS policy.
|
|
1990
|
+
# @param [String] waas_policy_id The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the WAAS policy.
|
|
1991
|
+
# @param [Hash] opts the optional parameters
|
|
1992
|
+
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
|
|
1993
|
+
# retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
|
|
1994
|
+
# @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
|
|
1995
|
+
# @option opts [Integer] :limit The maximum number of items to return in a paginated call. In unspecified, defaults to `10`. (default to 10)
|
|
1996
|
+
# @option opts [String] :page The value of the `opc-next-page` response header from the previous paginated call.
|
|
1997
|
+
# @return [Response] A Response object with data of type Array<{OCI::Waas::Models::Whitelist Whitelist}>
|
|
1998
|
+
def list_whitelists(waas_policy_id, opts = {})
|
|
1999
|
+
logger.debug 'Calling operation WaasClient#list_whitelists.' if logger
|
|
2000
|
+
|
|
2001
|
+
raise "Missing the required parameter 'waas_policy_id' when calling list_whitelists." if waas_policy_id.nil?
|
|
2002
|
+
raise "Parameter value for 'waas_policy_id' must not be blank" if OCI::Internal::Util.blank_string?(waas_policy_id)
|
|
2003
|
+
|
|
2004
|
+
path = '/waasPolicies/{waasPolicyId}/wafConfig/whitelists'.sub('{waasPolicyId}', waas_policy_id.to_s)
|
|
2005
|
+
operation_signing_strategy = :standard
|
|
2006
|
+
|
|
2007
|
+
# rubocop:disable Style/NegatedIf
|
|
2008
|
+
# Query Params
|
|
2009
|
+
query_params = {}
|
|
2010
|
+
query_params[:limit] = opts[:limit] if opts[:limit]
|
|
2011
|
+
query_params[:page] = opts[:page] if opts[:page]
|
|
2012
|
+
|
|
2013
|
+
# Header Params
|
|
2014
|
+
header_params = {}
|
|
2015
|
+
header_params[:accept] = 'application/json'
|
|
2016
|
+
header_params[:'content-type'] = 'application/json'
|
|
2017
|
+
header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
|
|
2018
|
+
# rubocop:enable Style/NegatedIf
|
|
2019
|
+
|
|
2020
|
+
post_body = nil
|
|
2021
|
+
|
|
2022
|
+
# rubocop:disable Metrics/BlockLength
|
|
2023
|
+
OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'WaasClient#list_whitelists') do
|
|
2024
|
+
@api_client.call_api(
|
|
2025
|
+
:GET,
|
|
2026
|
+
path,
|
|
2027
|
+
endpoint,
|
|
2028
|
+
header_params: header_params,
|
|
2029
|
+
query_params: query_params,
|
|
2030
|
+
operation_signing_strategy: operation_signing_strategy,
|
|
2031
|
+
body: post_body,
|
|
2032
|
+
return_type: 'Array<OCI::Waas::Models::Whitelist>'
|
|
2033
|
+
)
|
|
2034
|
+
end
|
|
2035
|
+
# rubocop:enable Metrics/BlockLength
|
|
2036
|
+
end
|
|
2037
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
2038
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
2039
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
|
2040
|
+
|
|
2041
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
2042
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
2043
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
|
2044
|
+
|
|
2045
|
+
|
|
2046
|
+
# 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.
|
|
2047
|
+
# @param [String] waas_policy_id The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the policy.
|
|
2048
|
+
# @param [String] compartment_id The [OCID](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment. This number is generated when the compartment is created.
|
|
2049
|
+
# @param [Hash] opts the optional parameters
|
|
2050
|
+
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
|
|
2051
|
+
# retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
|
|
2052
|
+
# @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
|
|
2053
|
+
# @option opts [Integer] :limit The maximum number of items to return in a paginated call. In unspecified, defaults to `10`. (default to 10)
|
|
2054
|
+
# @option opts [String] :page The value of the `opc-next-page` response header from the previous paginated call.
|
|
2055
|
+
# @option opts [String] :sort_by The value by which work requests are sorted in a paginated 'List' call. If unspecified, defaults to `timeAccepted`.
|
|
2056
|
+
# Allowed values are: id, status, timeAccepted, timeStarted, timeFinished, operationType
|
|
2057
|
+
# @option opts [String] :sort_order The value of the sorting direction of resources in a paginated 'List' call. If unspecified, defaults to `DESC`.
|
|
2058
|
+
# Allowed values are: ASC, DESC
|
|
2059
|
+
# @return [Response] A Response object with data of type Array<{OCI::Waas::Models::WorkRequestSummary WorkRequestSummary}>
|
|
2060
|
+
def list_work_requests(waas_policy_id, compartment_id, opts = {})
|
|
2061
|
+
logger.debug 'Calling operation WaasClient#list_work_requests.' if logger
|
|
2062
|
+
|
|
2063
|
+
raise "Missing the required parameter 'waas_policy_id' when calling list_work_requests." if waas_policy_id.nil?
|
|
2064
|
+
raise "Missing the required parameter 'compartment_id' when calling list_work_requests." if compartment_id.nil?
|
|
2065
|
+
|
|
2066
|
+
if opts[:sort_by] && !%w[id status timeAccepted timeStarted timeFinished operationType].include?(opts[:sort_by])
|
|
2067
|
+
raise 'Invalid value for "sort_by", must be one of id, status, timeAccepted, timeStarted, timeFinished, operationType.'
|
|
2068
|
+
end
|
|
2069
|
+
|
|
2070
|
+
if opts[:sort_order] && !%w[ASC DESC].include?(opts[:sort_order])
|
|
2071
|
+
raise 'Invalid value for "sort_order", must be one of ASC, DESC.'
|
|
2072
|
+
end
|
|
2073
|
+
|
|
2074
|
+
path = '/workRequests'
|
|
2075
|
+
operation_signing_strategy = :standard
|
|
2076
|
+
|
|
2077
|
+
# rubocop:disable Style/NegatedIf
|
|
2078
|
+
# Query Params
|
|
2079
|
+
query_params = {}
|
|
2080
|
+
query_params[:waasPolicyId] = waas_policy_id
|
|
2081
|
+
query_params[:compartmentId] = compartment_id
|
|
2082
|
+
query_params[:limit] = opts[:limit] if opts[:limit]
|
|
2083
|
+
query_params[:page] = opts[:page] if opts[:page]
|
|
2084
|
+
query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
|
|
2085
|
+
query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
|
|
2086
|
+
|
|
2087
|
+
# Header Params
|
|
2088
|
+
header_params = {}
|
|
2089
|
+
header_params[:accept] = 'application/json'
|
|
2090
|
+
header_params[:'content-type'] = 'application/json'
|
|
2091
|
+
header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
|
|
2092
|
+
# rubocop:enable Style/NegatedIf
|
|
2093
|
+
|
|
2094
|
+
post_body = nil
|
|
2095
|
+
|
|
2096
|
+
# rubocop:disable Metrics/BlockLength
|
|
2097
|
+
OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'WaasClient#list_work_requests') do
|
|
2098
|
+
@api_client.call_api(
|
|
2099
|
+
:GET,
|
|
2100
|
+
path,
|
|
2101
|
+
endpoint,
|
|
2102
|
+
header_params: header_params,
|
|
2103
|
+
query_params: query_params,
|
|
2104
|
+
operation_signing_strategy: operation_signing_strategy,
|
|
2105
|
+
body: post_body,
|
|
2106
|
+
return_type: 'Array<OCI::Waas::Models::WorkRequestSummary>'
|
|
2107
|
+
)
|
|
2108
|
+
end
|
|
2109
|
+
# rubocop:enable Metrics/BlockLength
|
|
2110
|
+
end
|
|
2111
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
2112
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
2113
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
|
2114
|
+
|
|
2115
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
2116
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
2117
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
|
2118
|
+
|
|
2119
|
+
|
|
2120
|
+
# 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.
|
|
2121
|
+
# This operation can create, delete, update, and/or reorder access rules depending on the structure of the request body.
|
|
2122
|
+
# Updating an existing access rule can be accomplished by changing the properties of the access rule object with a non-empty `key` property in the list.
|
|
2123
|
+
# Reordering of access rules can be accomplished by changing the order of the access rules in the list when updating.
|
|
2124
|
+
# Creating an access rule can be accomplished by adding a new access rule object to the list without a `key` property. A `key` will be generated for the new access rule upon update.
|
|
2125
|
+
# Deleting an access rule can be accomplished by removing the existing access rule object from the list. Any existing access rule with a `key` that is not present in the list of access rules sent in the request will be deleted.
|
|
2126
|
+
# @param [String] waas_policy_id The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the WAAS policy.
|
|
2127
|
+
# @param [Array<OCI::Waas::Models::OCI::Waas::Models::AccessRule>] access_rules
|
|
2128
|
+
# @param [Hash] opts the optional parameters
|
|
2129
|
+
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
|
|
2130
|
+
# retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
|
|
2131
|
+
# @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
|
|
2132
|
+
# @option opts [String] :opc_retry_token A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations
|
|
2133
|
+
# *Example:* If a resource has been deleted and purged from the system, then a retry of the original delete request may be rejected.
|
|
2134
|
+
# @option opts [String] :if_match For optimistic concurrency control. In the `PUT` or `DELETE` call for a resource, set the `if-match` parameter to the value of the etag from a previous `GET` or `POST` response for that resource. The resource will be updated or deleted only if the etag provided matches the resource's current etag value.
|
|
2135
|
+
# @return [Response] A Response object with data of type nil
|
|
2136
|
+
def update_access_rules(waas_policy_id, access_rules, opts = {})
|
|
2137
|
+
logger.debug 'Calling operation WaasClient#update_access_rules.' if logger
|
|
2138
|
+
|
|
2139
|
+
raise "Missing the required parameter 'waas_policy_id' when calling update_access_rules." if waas_policy_id.nil?
|
|
2140
|
+
raise "Missing the required parameter 'access_rules' when calling update_access_rules." if access_rules.nil?
|
|
2141
|
+
raise "Parameter value for 'waas_policy_id' must not be blank" if OCI::Internal::Util.blank_string?(waas_policy_id)
|
|
2142
|
+
|
|
2143
|
+
path = '/waasPolicies/{waasPolicyId}/wafConfig/accessRules'.sub('{waasPolicyId}', waas_policy_id.to_s)
|
|
2144
|
+
operation_signing_strategy = :standard
|
|
2145
|
+
|
|
2146
|
+
# rubocop:disable Style/NegatedIf
|
|
2147
|
+
# Query Params
|
|
2148
|
+
query_params = {}
|
|
2149
|
+
|
|
2150
|
+
# Header Params
|
|
2151
|
+
header_params = {}
|
|
2152
|
+
header_params[:accept] = 'application/json'
|
|
2153
|
+
header_params[:'content-type'] = 'application/json'
|
|
2154
|
+
header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
|
|
2155
|
+
header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
|
|
2156
|
+
header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
|
|
2157
|
+
# rubocop:enable Style/NegatedIf
|
|
2158
|
+
header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token
|
|
2159
|
+
|
|
2160
|
+
post_body = @api_client.object_to_http_body(access_rules)
|
|
2161
|
+
|
|
2162
|
+
# rubocop:disable Metrics/BlockLength
|
|
2163
|
+
OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'WaasClient#update_access_rules') do
|
|
2164
|
+
@api_client.call_api(
|
|
2165
|
+
:PUT,
|
|
2166
|
+
path,
|
|
2167
|
+
endpoint,
|
|
2168
|
+
header_params: header_params,
|
|
2169
|
+
query_params: query_params,
|
|
2170
|
+
operation_signing_strategy: operation_signing_strategy,
|
|
2171
|
+
body: post_body
|
|
2172
|
+
)
|
|
2173
|
+
end
|
|
2174
|
+
# rubocop:enable Metrics/BlockLength
|
|
2175
|
+
end
|
|
2176
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
2177
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
2178
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
|
2179
|
+
|
|
2180
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
2181
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
2182
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
|
2183
|
+
|
|
2184
|
+
|
|
2185
|
+
# Updates the list of CAPTCHA challenges in the Web Application Firewall configuration for a WAAS policy.
|
|
2186
|
+
# This operation can create, update, or delete CAPTCHAs depending on the structure of the request body.
|
|
2187
|
+
# Updating an existing CAPTCHA can be accomplished by changing the properties of the CAPTCHA object with a non-empty `key` property in the list.
|
|
2188
|
+
# Creating a CAPTCHA can be accomplished by adding a new CAPTCHA object to the list without a `key` property. A `key` will be generated for the new CAPTCHA upon update.
|
|
2189
|
+
# Deleting a CAPTCHA can be accomplished by removing the existing CAPTCHA object from the list. Any existing CAPTCHA with a `key` that is not present in the list of CAPTCHAs sent in the request will be deleted.
|
|
2190
|
+
# @param [String] waas_policy_id The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the WAAS policy.
|
|
2191
|
+
# @param [Array<OCI::Waas::Models::OCI::Waas::Models::Captcha>] captchas A list of CAPTCHA details.
|
|
2192
|
+
# @param [Hash] opts the optional parameters
|
|
2193
|
+
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
|
|
2194
|
+
# retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
|
|
2195
|
+
# @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
|
|
2196
|
+
# @option opts [String] :opc_retry_token A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations
|
|
2197
|
+
# *Example:* If a resource has been deleted and purged from the system, then a retry of the original delete request may be rejected.
|
|
2198
|
+
# @option opts [String] :if_match For optimistic concurrency control. In the `PUT` or `DELETE` call for a resource, set the `if-match` parameter to the value of the etag from a previous `GET` or `POST` response for that resource. The resource will be updated or deleted only if the etag provided matches the resource's current etag value.
|
|
2199
|
+
# @return [Response] A Response object with data of type nil
|
|
2200
|
+
def update_captchas(waas_policy_id, captchas, opts = {})
|
|
2201
|
+
logger.debug 'Calling operation WaasClient#update_captchas.' if logger
|
|
2202
|
+
|
|
2203
|
+
raise "Missing the required parameter 'waas_policy_id' when calling update_captchas." if waas_policy_id.nil?
|
|
2204
|
+
raise "Missing the required parameter 'captchas' when calling update_captchas." if captchas.nil?
|
|
2205
|
+
raise "Parameter value for 'waas_policy_id' must not be blank" if OCI::Internal::Util.blank_string?(waas_policy_id)
|
|
2206
|
+
|
|
2207
|
+
path = '/waasPolicies/{waasPolicyId}/wafConfig/captchas'.sub('{waasPolicyId}', waas_policy_id.to_s)
|
|
2208
|
+
operation_signing_strategy = :standard
|
|
2209
|
+
|
|
2210
|
+
# rubocop:disable Style/NegatedIf
|
|
2211
|
+
# Query Params
|
|
2212
|
+
query_params = {}
|
|
2213
|
+
|
|
2214
|
+
# Header Params
|
|
2215
|
+
header_params = {}
|
|
2216
|
+
header_params[:accept] = 'application/json'
|
|
2217
|
+
header_params[:'content-type'] = 'application/json'
|
|
2218
|
+
header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
|
|
2219
|
+
header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
|
|
2220
|
+
header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
|
|
2221
|
+
# rubocop:enable Style/NegatedIf
|
|
2222
|
+
header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token
|
|
2223
|
+
|
|
2224
|
+
post_body = @api_client.object_to_http_body(captchas)
|
|
2225
|
+
|
|
2226
|
+
# rubocop:disable Metrics/BlockLength
|
|
2227
|
+
OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'WaasClient#update_captchas') do
|
|
2228
|
+
@api_client.call_api(
|
|
2229
|
+
:PUT,
|
|
2230
|
+
path,
|
|
2231
|
+
endpoint,
|
|
2232
|
+
header_params: header_params,
|
|
2233
|
+
query_params: query_params,
|
|
2234
|
+
operation_signing_strategy: operation_signing_strategy,
|
|
2235
|
+
body: post_body
|
|
2236
|
+
)
|
|
2237
|
+
end
|
|
2238
|
+
# rubocop:enable Metrics/BlockLength
|
|
2239
|
+
end
|
|
2240
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
2241
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
2242
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
|
2243
|
+
|
|
2244
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
2245
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
2246
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
|
2247
|
+
|
|
2248
|
+
|
|
2249
|
+
# 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.
|
|
2250
|
+
# @param [String] certificate_id The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the SSL certificate used in the WAAS policy. This number is generated when the certificate is added to the policy.
|
|
2251
|
+
# @param [Hash] opts the optional parameters
|
|
2252
|
+
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
|
|
2253
|
+
# retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
|
|
2254
|
+
# @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
|
|
2255
|
+
# @option opts [String] :if_match For optimistic concurrency control. In the `PUT` or `DELETE` call for a resource, set the `if-match` parameter to the value of the etag from a previous `GET` or `POST` response for that resource. The resource will be updated or deleted only if the etag provided matches the resource's current etag value.
|
|
2256
|
+
# @option opts [OCI::Waas::Models::UpdateCertificateDetails] :update_certificate_details The new display name, freeform tags, and defined tags to apply to a certificate.
|
|
2257
|
+
# @return [Response] A Response object with data of type {OCI::Waas::Models::Certificate Certificate}
|
|
2258
|
+
def update_certificate(certificate_id, opts = {})
|
|
2259
|
+
logger.debug 'Calling operation WaasClient#update_certificate.' if logger
|
|
2260
|
+
|
|
2261
|
+
raise "Missing the required parameter 'certificate_id' when calling update_certificate." if certificate_id.nil?
|
|
2262
|
+
raise "Parameter value for 'certificate_id' must not be blank" if OCI::Internal::Util.blank_string?(certificate_id)
|
|
2263
|
+
|
|
2264
|
+
path = '/certificates/{certificateId}'.sub('{certificateId}', certificate_id.to_s)
|
|
2265
|
+
operation_signing_strategy = :standard
|
|
2266
|
+
|
|
2267
|
+
# rubocop:disable Style/NegatedIf
|
|
2268
|
+
# Query Params
|
|
2269
|
+
query_params = {}
|
|
2270
|
+
|
|
2271
|
+
# Header Params
|
|
2272
|
+
header_params = {}
|
|
2273
|
+
header_params[:accept] = 'application/json'
|
|
2274
|
+
header_params[:'content-type'] = 'application/json'
|
|
2275
|
+
header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
|
|
2276
|
+
header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
|
|
2277
|
+
# rubocop:enable Style/NegatedIf
|
|
2278
|
+
|
|
2279
|
+
post_body = @api_client.object_to_http_body(opts[:update_certificate_details])
|
|
2280
|
+
|
|
2281
|
+
# rubocop:disable Metrics/BlockLength
|
|
2282
|
+
OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'WaasClient#update_certificate') do
|
|
2283
|
+
@api_client.call_api(
|
|
2284
|
+
:PUT,
|
|
2285
|
+
path,
|
|
2286
|
+
endpoint,
|
|
2287
|
+
header_params: header_params,
|
|
2288
|
+
query_params: query_params,
|
|
2289
|
+
operation_signing_strategy: operation_signing_strategy,
|
|
2290
|
+
body: post_body,
|
|
2291
|
+
return_type: 'OCI::Waas::Models::Certificate'
|
|
2292
|
+
)
|
|
2293
|
+
end
|
|
2294
|
+
# rubocop:enable Metrics/BlockLength
|
|
2295
|
+
end
|
|
2296
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
2297
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
2298
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
|
2299
|
+
|
|
2300
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
2301
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
2302
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
|
2303
|
+
|
|
2304
|
+
|
|
2305
|
+
# 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.
|
|
2306
|
+
#
|
|
2307
|
+
# 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.
|
|
2308
|
+
#
|
|
2309
|
+
# 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.
|
|
2310
|
+
# @param [String] waas_policy_id The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the WAAS policy.
|
|
2311
|
+
# @param [OCI::Waas::Models::DeviceFingerprintChallenge] update_device_fingerprint_challenge_details The device fingerprint challenge settings to be updated.
|
|
2312
|
+
# @param [Hash] opts the optional parameters
|
|
2313
|
+
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
|
|
2314
|
+
# retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
|
|
2315
|
+
# @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
|
|
2316
|
+
# @option opts [String] :opc_retry_token A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations
|
|
2317
|
+
# *Example:* If a resource has been deleted and purged from the system, then a retry of the original delete request may be rejected.
|
|
2318
|
+
# @option opts [String] :if_match For optimistic concurrency control. In the `PUT` or `DELETE` call for a resource, set the `if-match` parameter to the value of the etag from a previous `GET` or `POST` response for that resource. The resource will be updated or deleted only if the etag provided matches the resource's current etag value.
|
|
2319
|
+
# @return [Response] A Response object with data of type nil
|
|
2320
|
+
def update_device_fingerprint_challenge(waas_policy_id, update_device_fingerprint_challenge_details, opts = {})
|
|
2321
|
+
logger.debug 'Calling operation WaasClient#update_device_fingerprint_challenge.' if logger
|
|
2322
|
+
|
|
2323
|
+
raise "Missing the required parameter 'waas_policy_id' when calling update_device_fingerprint_challenge." if waas_policy_id.nil?
|
|
2324
|
+
raise "Missing the required parameter 'update_device_fingerprint_challenge_details' when calling update_device_fingerprint_challenge." if update_device_fingerprint_challenge_details.nil?
|
|
2325
|
+
raise "Parameter value for 'waas_policy_id' must not be blank" if OCI::Internal::Util.blank_string?(waas_policy_id)
|
|
2326
|
+
|
|
2327
|
+
path = '/waasPolicies/{waasPolicyId}/wafConfig/deviceFingerprintChallenge'.sub('{waasPolicyId}', waas_policy_id.to_s)
|
|
2328
|
+
operation_signing_strategy = :standard
|
|
2329
|
+
|
|
2330
|
+
# rubocop:disable Style/NegatedIf
|
|
2331
|
+
# Query Params
|
|
2332
|
+
query_params = {}
|
|
2333
|
+
|
|
2334
|
+
# Header Params
|
|
2335
|
+
header_params = {}
|
|
2336
|
+
header_params[:accept] = 'application/json'
|
|
2337
|
+
header_params[:'content-type'] = 'application/json'
|
|
2338
|
+
header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
|
|
2339
|
+
header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
|
|
2340
|
+
header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
|
|
2341
|
+
# rubocop:enable Style/NegatedIf
|
|
2342
|
+
header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token
|
|
2343
|
+
|
|
2344
|
+
post_body = @api_client.object_to_http_body(update_device_fingerprint_challenge_details)
|
|
2345
|
+
|
|
2346
|
+
# rubocop:disable Metrics/BlockLength
|
|
2347
|
+
OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'WaasClient#update_device_fingerprint_challenge') do
|
|
2348
|
+
@api_client.call_api(
|
|
2349
|
+
:PUT,
|
|
2350
|
+
path,
|
|
2351
|
+
endpoint,
|
|
2352
|
+
header_params: header_params,
|
|
2353
|
+
query_params: query_params,
|
|
2354
|
+
operation_signing_strategy: operation_signing_strategy,
|
|
2355
|
+
body: post_body
|
|
2356
|
+
)
|
|
2357
|
+
end
|
|
2358
|
+
# rubocop:enable Metrics/BlockLength
|
|
2359
|
+
end
|
|
2360
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
2361
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
2362
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
|
2363
|
+
|
|
2364
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
2365
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
2366
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
|
2367
|
+
|
|
2368
|
+
|
|
2369
|
+
# 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.
|
|
2370
|
+
#
|
|
2371
|
+
# Good bots allows you to manage access for bots from known providers, such as Google or Baidu. For more information about good bots, please see [Bot Management](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/WAF/Tasks/botmanagement.htm).
|
|
2372
|
+
# @param [String] waas_policy_id The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the WAAS policy.
|
|
2373
|
+
# @param [Array<OCI::Waas::Models::OCI::Waas::Models::GoodBot>] good_bots
|
|
2374
|
+
# @param [Hash] opts the optional parameters
|
|
2375
|
+
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
|
|
2376
|
+
# retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
|
|
2377
|
+
# @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
|
|
2378
|
+
# @option opts [String] :opc_retry_token A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations
|
|
2379
|
+
# *Example:* If a resource has been deleted and purged from the system, then a retry of the original delete request may be rejected.
|
|
2380
|
+
# @option opts [String] :if_match For optimistic concurrency control. In the `PUT` or `DELETE` call for a resource, set the `if-match` parameter to the value of the etag from a previous `GET` or `POST` response for that resource. The resource will be updated or deleted only if the etag provided matches the resource's current etag value.
|
|
2381
|
+
# @return [Response] A Response object with data of type nil
|
|
2382
|
+
def update_good_bots(waas_policy_id, good_bots, opts = {})
|
|
2383
|
+
logger.debug 'Calling operation WaasClient#update_good_bots.' if logger
|
|
2384
|
+
|
|
2385
|
+
raise "Missing the required parameter 'waas_policy_id' when calling update_good_bots." if waas_policy_id.nil?
|
|
2386
|
+
raise "Missing the required parameter 'good_bots' when calling update_good_bots." if good_bots.nil?
|
|
2387
|
+
raise "Parameter value for 'waas_policy_id' must not be blank" if OCI::Internal::Util.blank_string?(waas_policy_id)
|
|
2388
|
+
|
|
2389
|
+
path = '/waasPolicies/{waasPolicyId}/wafConfig/goodBots'.sub('{waasPolicyId}', waas_policy_id.to_s)
|
|
2390
|
+
operation_signing_strategy = :standard
|
|
2391
|
+
|
|
2392
|
+
# rubocop:disable Style/NegatedIf
|
|
2393
|
+
# Query Params
|
|
2394
|
+
query_params = {}
|
|
2395
|
+
|
|
2396
|
+
# Header Params
|
|
2397
|
+
header_params = {}
|
|
2398
|
+
header_params[:accept] = 'application/json'
|
|
2399
|
+
header_params[:'content-type'] = 'application/json'
|
|
2400
|
+
header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
|
|
2401
|
+
header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
|
|
2402
|
+
header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
|
|
2403
|
+
# rubocop:enable Style/NegatedIf
|
|
2404
|
+
header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token
|
|
2405
|
+
|
|
2406
|
+
post_body = @api_client.object_to_http_body(good_bots)
|
|
2407
|
+
|
|
2408
|
+
# rubocop:disable Metrics/BlockLength
|
|
2409
|
+
OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'WaasClient#update_good_bots') do
|
|
2410
|
+
@api_client.call_api(
|
|
2411
|
+
:PUT,
|
|
2412
|
+
path,
|
|
2413
|
+
endpoint,
|
|
2414
|
+
header_params: header_params,
|
|
2415
|
+
query_params: query_params,
|
|
2416
|
+
operation_signing_strategy: operation_signing_strategy,
|
|
2417
|
+
body: post_body
|
|
2418
|
+
)
|
|
2419
|
+
end
|
|
2420
|
+
# rubocop:enable Metrics/BlockLength
|
|
2421
|
+
end
|
|
2422
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
2423
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
2424
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
|
2425
|
+
|
|
2426
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
2427
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
2428
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
|
2429
|
+
|
|
2430
|
+
|
|
2431
|
+
# 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.
|
|
2432
|
+
# @param [String] waas_policy_id The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the WAAS policy.
|
|
2433
|
+
# @param [OCI::Waas::Models::HumanInteractionChallenge] update_human_interaction_challenge_details The human interaction challenge settings.
|
|
2434
|
+
# @param [Hash] opts the optional parameters
|
|
2435
|
+
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
|
|
2436
|
+
# retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
|
|
2437
|
+
# @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
|
|
2438
|
+
# @option opts [String] :opc_retry_token A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations
|
|
2439
|
+
# *Example:* If a resource has been deleted and purged from the system, then a retry of the original delete request may be rejected.
|
|
2440
|
+
# @option opts [String] :if_match For optimistic concurrency control. In the `PUT` or `DELETE` call for a resource, set the `if-match` parameter to the value of the etag from a previous `GET` or `POST` response for that resource. The resource will be updated or deleted only if the etag provided matches the resource's current etag value.
|
|
2441
|
+
# @return [Response] A Response object with data of type nil
|
|
2442
|
+
def update_human_interaction_challenge(waas_policy_id, update_human_interaction_challenge_details, opts = {})
|
|
2443
|
+
logger.debug 'Calling operation WaasClient#update_human_interaction_challenge.' if logger
|
|
2444
|
+
|
|
2445
|
+
raise "Missing the required parameter 'waas_policy_id' when calling update_human_interaction_challenge." if waas_policy_id.nil?
|
|
2446
|
+
raise "Missing the required parameter 'update_human_interaction_challenge_details' when calling update_human_interaction_challenge." if update_human_interaction_challenge_details.nil?
|
|
2447
|
+
raise "Parameter value for 'waas_policy_id' must not be blank" if OCI::Internal::Util.blank_string?(waas_policy_id)
|
|
2448
|
+
|
|
2449
|
+
path = '/waasPolicies/{waasPolicyId}/wafConfig/humanInteractionChallenge'.sub('{waasPolicyId}', waas_policy_id.to_s)
|
|
2450
|
+
operation_signing_strategy = :standard
|
|
2451
|
+
|
|
2452
|
+
# rubocop:disable Style/NegatedIf
|
|
2453
|
+
# Query Params
|
|
2454
|
+
query_params = {}
|
|
2455
|
+
|
|
2456
|
+
# Header Params
|
|
2457
|
+
header_params = {}
|
|
2458
|
+
header_params[:accept] = 'application/json'
|
|
2459
|
+
header_params[:'content-type'] = 'application/json'
|
|
2460
|
+
header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
|
|
2461
|
+
header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
|
|
2462
|
+
header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
|
|
2463
|
+
# rubocop:enable Style/NegatedIf
|
|
2464
|
+
header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token
|
|
2465
|
+
|
|
2466
|
+
post_body = @api_client.object_to_http_body(update_human_interaction_challenge_details)
|
|
2467
|
+
|
|
2468
|
+
# rubocop:disable Metrics/BlockLength
|
|
2469
|
+
OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'WaasClient#update_human_interaction_challenge') do
|
|
2470
|
+
@api_client.call_api(
|
|
2471
|
+
:PUT,
|
|
2472
|
+
path,
|
|
2473
|
+
endpoint,
|
|
2474
|
+
header_params: header_params,
|
|
2475
|
+
query_params: query_params,
|
|
2476
|
+
operation_signing_strategy: operation_signing_strategy,
|
|
2477
|
+
body: post_body
|
|
2478
|
+
)
|
|
2479
|
+
end
|
|
2480
|
+
# rubocop:enable Metrics/BlockLength
|
|
2481
|
+
end
|
|
2482
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
2483
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
2484
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
|
2485
|
+
|
|
2486
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
2487
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
2488
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
|
2489
|
+
|
|
2490
|
+
|
|
2491
|
+
# 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](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/WAF/Tasks/botmanagement.htm).
|
|
2492
|
+
# @param [String] waas_policy_id The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the WAAS policy.
|
|
2493
|
+
# @param [OCI::Waas::Models::JsChallenge] update_js_challenge_details The JavaScript challenge settings to be updated.
|
|
2494
|
+
# @param [Hash] opts the optional parameters
|
|
2495
|
+
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
|
|
2496
|
+
# retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
|
|
2497
|
+
# @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
|
|
2498
|
+
# @option opts [String] :opc_retry_token A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations
|
|
2499
|
+
# *Example:* If a resource has been deleted and purged from the system, then a retry of the original delete request may be rejected.
|
|
2500
|
+
# @option opts [String] :if_match For optimistic concurrency control. In the `PUT` or `DELETE` call for a resource, set the `if-match` parameter to the value of the etag from a previous `GET` or `POST` response for that resource. The resource will be updated or deleted only if the etag provided matches the resource's current etag value.
|
|
2501
|
+
# @return [Response] A Response object with data of type nil
|
|
2502
|
+
def update_js_challenge(waas_policy_id, update_js_challenge_details, opts = {})
|
|
2503
|
+
logger.debug 'Calling operation WaasClient#update_js_challenge.' if logger
|
|
2504
|
+
|
|
2505
|
+
raise "Missing the required parameter 'waas_policy_id' when calling update_js_challenge." if waas_policy_id.nil?
|
|
2506
|
+
raise "Missing the required parameter 'update_js_challenge_details' when calling update_js_challenge." if update_js_challenge_details.nil?
|
|
2507
|
+
raise "Parameter value for 'waas_policy_id' must not be blank" if OCI::Internal::Util.blank_string?(waas_policy_id)
|
|
2508
|
+
|
|
2509
|
+
path = '/waasPolicies/{waasPolicyId}/wafConfig/jsChallenge'.sub('{waasPolicyId}', waas_policy_id.to_s)
|
|
2510
|
+
operation_signing_strategy = :standard
|
|
2511
|
+
|
|
2512
|
+
# rubocop:disable Style/NegatedIf
|
|
2513
|
+
# Query Params
|
|
2514
|
+
query_params = {}
|
|
2515
|
+
|
|
2516
|
+
# Header Params
|
|
2517
|
+
header_params = {}
|
|
2518
|
+
header_params[:accept] = 'application/json'
|
|
2519
|
+
header_params[:'content-type'] = 'application/json'
|
|
2520
|
+
header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
|
|
2521
|
+
header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
|
|
2522
|
+
header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
|
|
2523
|
+
# rubocop:enable Style/NegatedIf
|
|
2524
|
+
header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token
|
|
2525
|
+
|
|
2526
|
+
post_body = @api_client.object_to_http_body(update_js_challenge_details)
|
|
2527
|
+
|
|
2528
|
+
# rubocop:disable Metrics/BlockLength
|
|
2529
|
+
OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'WaasClient#update_js_challenge') do
|
|
2530
|
+
@api_client.call_api(
|
|
2531
|
+
:PUT,
|
|
2532
|
+
path,
|
|
2533
|
+
endpoint,
|
|
2534
|
+
header_params: header_params,
|
|
2535
|
+
query_params: query_params,
|
|
2536
|
+
operation_signing_strategy: operation_signing_strategy,
|
|
2537
|
+
body: post_body
|
|
2538
|
+
)
|
|
2539
|
+
end
|
|
2540
|
+
# rubocop:enable Metrics/BlockLength
|
|
2541
|
+
end
|
|
2542
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
2543
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
2544
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
|
2545
|
+
|
|
2546
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
2547
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
2548
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
|
2549
|
+
|
|
2550
|
+
|
|
2551
|
+
# Updates the configuration for a WAAS policy. Only the fields specified in the request body will be updated; all other properties will remain unchanged.
|
|
2552
|
+
# @param [String] waas_policy_id The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the WAAS policy.
|
|
2553
|
+
# @param [OCI::Waas::Models::PolicyConfig] update_policy_config_details The new configuration to apply to a WAAS policy.
|
|
2554
|
+
# @param [Hash] opts the optional parameters
|
|
2555
|
+
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
|
|
2556
|
+
# retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
|
|
2557
|
+
# @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
|
|
2558
|
+
# @option opts [String] :opc_retry_token A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations
|
|
2559
|
+
# *Example:* If a resource has been deleted and purged from the system, then a retry of the original delete request may be rejected.
|
|
2560
|
+
# @option opts [String] :if_match For optimistic concurrency control. In the `PUT` or `DELETE` call for a resource, set the `if-match` parameter to the value of the etag from a previous `GET` or `POST` response for that resource. The resource will be updated or deleted only if the etag provided matches the resource's current etag value.
|
|
2561
|
+
# @return [Response] A Response object with data of type nil
|
|
2562
|
+
def update_policy_config(waas_policy_id, update_policy_config_details, opts = {})
|
|
2563
|
+
logger.debug 'Calling operation WaasClient#update_policy_config.' if logger
|
|
2564
|
+
|
|
2565
|
+
raise "Missing the required parameter 'waas_policy_id' when calling update_policy_config." if waas_policy_id.nil?
|
|
2566
|
+
raise "Missing the required parameter 'update_policy_config_details' when calling update_policy_config." if update_policy_config_details.nil?
|
|
2567
|
+
raise "Parameter value for 'waas_policy_id' must not be blank" if OCI::Internal::Util.blank_string?(waas_policy_id)
|
|
2568
|
+
|
|
2569
|
+
path = '/waasPolicies/{waasPolicyId}/policyConfig'.sub('{waasPolicyId}', waas_policy_id.to_s)
|
|
2570
|
+
operation_signing_strategy = :standard
|
|
2571
|
+
|
|
2572
|
+
# rubocop:disable Style/NegatedIf
|
|
2573
|
+
# Query Params
|
|
2574
|
+
query_params = {}
|
|
2575
|
+
|
|
2576
|
+
# Header Params
|
|
2577
|
+
header_params = {}
|
|
2578
|
+
header_params[:accept] = 'application/json'
|
|
2579
|
+
header_params[:'content-type'] = 'application/json'
|
|
2580
|
+
header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
|
|
2581
|
+
header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
|
|
2582
|
+
header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
|
|
2583
|
+
# rubocop:enable Style/NegatedIf
|
|
2584
|
+
header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token
|
|
2585
|
+
|
|
2586
|
+
post_body = @api_client.object_to_http_body(update_policy_config_details)
|
|
2587
|
+
|
|
2588
|
+
# rubocop:disable Metrics/BlockLength
|
|
2589
|
+
OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'WaasClient#update_policy_config') do
|
|
2590
|
+
@api_client.call_api(
|
|
2591
|
+
:PUT,
|
|
2592
|
+
path,
|
|
2593
|
+
endpoint,
|
|
2594
|
+
header_params: header_params,
|
|
2595
|
+
query_params: query_params,
|
|
2596
|
+
operation_signing_strategy: operation_signing_strategy,
|
|
2597
|
+
body: post_body
|
|
2598
|
+
)
|
|
2599
|
+
end
|
|
2600
|
+
# rubocop:enable Metrics/BlockLength
|
|
2601
|
+
end
|
|
2602
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
2603
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
2604
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
|
2605
|
+
|
|
2606
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
2607
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
2608
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
|
2609
|
+
|
|
2610
|
+
|
|
2611
|
+
# 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](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/WAF/Tasks/wafprotectionrules.htm).
|
|
2612
|
+
# This operation can update or disable protection rules depending on the structure of the request body.
|
|
2613
|
+
# Updating an existing protection rule can be accomplished by changing the properties of the protection rule object with a non-empty `key` property in the list.
|
|
2614
|
+
# @param [String] waas_policy_id The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the WAAS policy.
|
|
2615
|
+
# @param [Array<OCI::Waas::Models::OCI::Waas::Models::ProtectionRuleAction>] protection_rules
|
|
2616
|
+
# @param [Hash] opts the optional parameters
|
|
2617
|
+
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
|
|
2618
|
+
# retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
|
|
2619
|
+
# @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
|
|
2620
|
+
# @option opts [String] :if_match For optimistic concurrency control. In the `PUT` or `DELETE` call for a resource, set the `if-match` parameter to the value of the etag from a previous `GET` or `POST` response for that resource. The resource will be updated or deleted only if the etag provided matches the resource's current etag value.
|
|
2621
|
+
# @return [Response] A Response object with data of type nil
|
|
2622
|
+
def update_protection_rules(waas_policy_id, protection_rules, opts = {})
|
|
2623
|
+
logger.debug 'Calling operation WaasClient#update_protection_rules.' if logger
|
|
2624
|
+
|
|
2625
|
+
raise "Missing the required parameter 'waas_policy_id' when calling update_protection_rules." if waas_policy_id.nil?
|
|
2626
|
+
raise "Missing the required parameter 'protection_rules' when calling update_protection_rules." if protection_rules.nil?
|
|
2627
|
+
raise "Parameter value for 'waas_policy_id' must not be blank" if OCI::Internal::Util.blank_string?(waas_policy_id)
|
|
2628
|
+
|
|
2629
|
+
path = '/waasPolicies/{waasPolicyId}/wafConfig/protectionRules'.sub('{waasPolicyId}', waas_policy_id.to_s)
|
|
2630
|
+
operation_signing_strategy = :standard
|
|
2631
|
+
|
|
2632
|
+
# rubocop:disable Style/NegatedIf
|
|
2633
|
+
# Query Params
|
|
2634
|
+
query_params = {}
|
|
2635
|
+
|
|
2636
|
+
# Header Params
|
|
2637
|
+
header_params = {}
|
|
2638
|
+
header_params[:accept] = 'application/json'
|
|
2639
|
+
header_params[:'content-type'] = 'application/json'
|
|
2640
|
+
header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
|
|
2641
|
+
header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
|
|
2642
|
+
# rubocop:enable Style/NegatedIf
|
|
2643
|
+
|
|
2644
|
+
post_body = @api_client.object_to_http_body(protection_rules)
|
|
2645
|
+
|
|
2646
|
+
# rubocop:disable Metrics/BlockLength
|
|
2647
|
+
OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'WaasClient#update_protection_rules') do
|
|
2648
|
+
@api_client.call_api(
|
|
2649
|
+
:PUT,
|
|
2650
|
+
path,
|
|
2651
|
+
endpoint,
|
|
2652
|
+
header_params: header_params,
|
|
2653
|
+
query_params: query_params,
|
|
2654
|
+
operation_signing_strategy: operation_signing_strategy,
|
|
2655
|
+
body: post_body
|
|
2656
|
+
)
|
|
2657
|
+
end
|
|
2658
|
+
# rubocop:enable Metrics/BlockLength
|
|
2659
|
+
end
|
|
2660
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
2661
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
2662
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
|
2663
|
+
|
|
2664
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
2665
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
2666
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
|
2667
|
+
|
|
2668
|
+
|
|
2669
|
+
# 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.
|
|
2670
|
+
# @param [String] waas_policy_id The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the WAAS policy.
|
|
2671
|
+
# @param [OCI::Waas::Models::ProtectionSettings] update_protection_settings_details The details of the protection settings to be updated.
|
|
2672
|
+
# @param [Hash] opts the optional parameters
|
|
2673
|
+
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
|
|
2674
|
+
# retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
|
|
2675
|
+
# @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
|
|
2676
|
+
# @option opts [String] :opc_retry_token A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations
|
|
2677
|
+
# *Example:* If a resource has been deleted and purged from the system, then a retry of the original delete request may be rejected.
|
|
2678
|
+
# @option opts [String] :if_match For optimistic concurrency control. In the `PUT` or `DELETE` call for a resource, set the `if-match` parameter to the value of the etag from a previous `GET` or `POST` response for that resource. The resource will be updated or deleted only if the etag provided matches the resource's current etag value.
|
|
2679
|
+
# @return [Response] A Response object with data of type nil
|
|
2680
|
+
def update_protection_settings(waas_policy_id, update_protection_settings_details, opts = {})
|
|
2681
|
+
logger.debug 'Calling operation WaasClient#update_protection_settings.' if logger
|
|
2682
|
+
|
|
2683
|
+
raise "Missing the required parameter 'waas_policy_id' when calling update_protection_settings." if waas_policy_id.nil?
|
|
2684
|
+
raise "Missing the required parameter 'update_protection_settings_details' when calling update_protection_settings." if update_protection_settings_details.nil?
|
|
2685
|
+
raise "Parameter value for 'waas_policy_id' must not be blank" if OCI::Internal::Util.blank_string?(waas_policy_id)
|
|
2686
|
+
|
|
2687
|
+
path = '/waasPolicies/{waasPolicyId}/wafConfig/protectionSettings'.sub('{waasPolicyId}', waas_policy_id.to_s)
|
|
2688
|
+
operation_signing_strategy = :standard
|
|
2689
|
+
|
|
2690
|
+
# rubocop:disable Style/NegatedIf
|
|
2691
|
+
# Query Params
|
|
2692
|
+
query_params = {}
|
|
2693
|
+
|
|
2694
|
+
# Header Params
|
|
2695
|
+
header_params = {}
|
|
2696
|
+
header_params[:accept] = 'application/json'
|
|
2697
|
+
header_params[:'content-type'] = 'application/json'
|
|
2698
|
+
header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
|
|
2699
|
+
header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
|
|
2700
|
+
header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
|
|
2701
|
+
# rubocop:enable Style/NegatedIf
|
|
2702
|
+
header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token
|
|
2703
|
+
|
|
2704
|
+
post_body = @api_client.object_to_http_body(update_protection_settings_details)
|
|
2705
|
+
|
|
2706
|
+
# rubocop:disable Metrics/BlockLength
|
|
2707
|
+
OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'WaasClient#update_protection_settings') do
|
|
2708
|
+
@api_client.call_api(
|
|
2709
|
+
:PUT,
|
|
2710
|
+
path,
|
|
2711
|
+
endpoint,
|
|
2712
|
+
header_params: header_params,
|
|
2713
|
+
query_params: query_params,
|
|
2714
|
+
operation_signing_strategy: operation_signing_strategy,
|
|
2715
|
+
body: post_body
|
|
2716
|
+
)
|
|
2717
|
+
end
|
|
2718
|
+
# rubocop:enable Metrics/BlockLength
|
|
2719
|
+
end
|
|
2720
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
2721
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
2722
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
|
2723
|
+
|
|
2724
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
2725
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
2726
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
|
2727
|
+
|
|
2728
|
+
|
|
2729
|
+
# 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.
|
|
2730
|
+
# @param [String] waas_policy_id The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the WAAS policy.
|
|
2731
|
+
# @param [Array<OCI::Waas::Models::OCI::Waas::Models::ThreatFeedAction>] threat_feeds A list of threat feeds for which to update the actions.
|
|
2732
|
+
# @param [Hash] opts the optional parameters
|
|
2733
|
+
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
|
|
2734
|
+
# retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
|
|
2735
|
+
# @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
|
|
2736
|
+
# @option opts [String] :if_match For optimistic concurrency control. In the `PUT` or `DELETE` call for a resource, set the `if-match` parameter to the value of the etag from a previous `GET` or `POST` response for that resource. The resource will be updated or deleted only if the etag provided matches the resource's current etag value.
|
|
2737
|
+
# @return [Response] A Response object with data of type nil
|
|
2738
|
+
def update_threat_feeds(waas_policy_id, threat_feeds, opts = {})
|
|
2739
|
+
logger.debug 'Calling operation WaasClient#update_threat_feeds.' if logger
|
|
2740
|
+
|
|
2741
|
+
raise "Missing the required parameter 'waas_policy_id' when calling update_threat_feeds." if waas_policy_id.nil?
|
|
2742
|
+
raise "Missing the required parameter 'threat_feeds' when calling update_threat_feeds." if threat_feeds.nil?
|
|
2743
|
+
raise "Parameter value for 'waas_policy_id' must not be blank" if OCI::Internal::Util.blank_string?(waas_policy_id)
|
|
2744
|
+
|
|
2745
|
+
path = '/waasPolicies/{waasPolicyId}/wafConfig/threatFeeds'.sub('{waasPolicyId}', waas_policy_id.to_s)
|
|
2746
|
+
operation_signing_strategy = :standard
|
|
2747
|
+
|
|
2748
|
+
# rubocop:disable Style/NegatedIf
|
|
2749
|
+
# Query Params
|
|
2750
|
+
query_params = {}
|
|
2751
|
+
|
|
2752
|
+
# Header Params
|
|
2753
|
+
header_params = {}
|
|
2754
|
+
header_params[:accept] = 'application/json'
|
|
2755
|
+
header_params[:'content-type'] = 'application/json'
|
|
2756
|
+
header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
|
|
2757
|
+
header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
|
|
2758
|
+
# rubocop:enable Style/NegatedIf
|
|
2759
|
+
|
|
2760
|
+
post_body = @api_client.object_to_http_body(threat_feeds)
|
|
2761
|
+
|
|
2762
|
+
# rubocop:disable Metrics/BlockLength
|
|
2763
|
+
OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'WaasClient#update_threat_feeds') do
|
|
2764
|
+
@api_client.call_api(
|
|
2765
|
+
:PUT,
|
|
2766
|
+
path,
|
|
2767
|
+
endpoint,
|
|
2768
|
+
header_params: header_params,
|
|
2769
|
+
query_params: query_params,
|
|
2770
|
+
operation_signing_strategy: operation_signing_strategy,
|
|
2771
|
+
body: post_body
|
|
2772
|
+
)
|
|
2773
|
+
end
|
|
2774
|
+
# rubocop:enable Metrics/BlockLength
|
|
2775
|
+
end
|
|
2776
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
2777
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
2778
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
|
2779
|
+
|
|
2780
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
2781
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
2782
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
|
2783
|
+
|
|
2784
|
+
|
|
2785
|
+
# 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.
|
|
2786
|
+
# 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`.
|
|
2787
|
+
# The returned list will contain objects with `key` properties that can be used to update the resource during the `UpdateWaasPolicy` request.
|
|
2788
|
+
# @param [String] waas_policy_id The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the WAAS policy.
|
|
2789
|
+
# @param [OCI::Waas::Models::UpdateWaasPolicyDetails] update_waas_policy_details The details of the WAAS policy to update.
|
|
2790
|
+
# @param [Hash] opts the optional parameters
|
|
2791
|
+
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
|
|
2792
|
+
# retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
|
|
2793
|
+
# @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
|
|
2794
|
+
# @option opts [String] :opc_retry_token A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations
|
|
2795
|
+
# *Example:* If a resource has been deleted and purged from the system, then a retry of the original delete request may be rejected.
|
|
2796
|
+
# @option opts [String] :if_match For optimistic concurrency control. In the `PUT` or `DELETE` call for a resource, set the `if-match` parameter to the value of the etag from a previous `GET` or `POST` response for that resource. The resource will be updated or deleted only if the etag provided matches the resource's current etag value.
|
|
2797
|
+
# @return [Response] A Response object with data of type nil
|
|
2798
|
+
def update_waas_policy(waas_policy_id, update_waas_policy_details, opts = {})
|
|
2799
|
+
logger.debug 'Calling operation WaasClient#update_waas_policy.' if logger
|
|
2800
|
+
|
|
2801
|
+
raise "Missing the required parameter 'waas_policy_id' when calling update_waas_policy." if waas_policy_id.nil?
|
|
2802
|
+
raise "Missing the required parameter 'update_waas_policy_details' when calling update_waas_policy." if update_waas_policy_details.nil?
|
|
2803
|
+
raise "Parameter value for 'waas_policy_id' must not be blank" if OCI::Internal::Util.blank_string?(waas_policy_id)
|
|
2804
|
+
|
|
2805
|
+
path = '/waasPolicies/{waasPolicyId}'.sub('{waasPolicyId}', waas_policy_id.to_s)
|
|
2806
|
+
operation_signing_strategy = :standard
|
|
2807
|
+
|
|
2808
|
+
# rubocop:disable Style/NegatedIf
|
|
2809
|
+
# Query Params
|
|
2810
|
+
query_params = {}
|
|
2811
|
+
|
|
2812
|
+
# Header Params
|
|
2813
|
+
header_params = {}
|
|
2814
|
+
header_params[:accept] = 'application/json'
|
|
2815
|
+
header_params[:'content-type'] = 'application/json'
|
|
2816
|
+
header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
|
|
2817
|
+
header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
|
|
2818
|
+
header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
|
|
2819
|
+
# rubocop:enable Style/NegatedIf
|
|
2820
|
+
header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token
|
|
2821
|
+
|
|
2822
|
+
post_body = @api_client.object_to_http_body(update_waas_policy_details)
|
|
2823
|
+
|
|
2824
|
+
# rubocop:disable Metrics/BlockLength
|
|
2825
|
+
OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'WaasClient#update_waas_policy') do
|
|
2826
|
+
@api_client.call_api(
|
|
2827
|
+
:PUT,
|
|
2828
|
+
path,
|
|
2829
|
+
endpoint,
|
|
2830
|
+
header_params: header_params,
|
|
2831
|
+
query_params: query_params,
|
|
2832
|
+
operation_signing_strategy: operation_signing_strategy,
|
|
2833
|
+
body: post_body
|
|
2834
|
+
)
|
|
2835
|
+
end
|
|
2836
|
+
# rubocop:enable Metrics/BlockLength
|
|
2837
|
+
end
|
|
2838
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
2839
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
2840
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
|
2841
|
+
|
|
2842
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
2843
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
2844
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
|
2845
|
+
|
|
2846
|
+
|
|
2847
|
+
# 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.
|
|
2848
|
+
# @param [String] waas_policy_id The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the WAAS policy.
|
|
2849
|
+
# @param [OCI::Waas::Models::AddressRateLimiting] update_waf_address_rate_limiting_details The address rate limiting settings.
|
|
2850
|
+
# @param [Hash] opts the optional parameters
|
|
2851
|
+
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
|
|
2852
|
+
# retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
|
|
2853
|
+
# @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
|
|
2854
|
+
# @option opts [String] :opc_retry_token A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations
|
|
2855
|
+
# *Example:* If a resource has been deleted and purged from the system, then a retry of the original delete request may be rejected.
|
|
2856
|
+
# @option opts [String] :if_match For optimistic concurrency control. In the `PUT` or `DELETE` call for a resource, set the `if-match` parameter to the value of the etag from a previous `GET` or `POST` response for that resource. The resource will be updated or deleted only if the etag provided matches the resource's current etag value.
|
|
2857
|
+
# @return [Response] A Response object with data of type nil
|
|
2858
|
+
def update_waf_address_rate_limiting(waas_policy_id, update_waf_address_rate_limiting_details, opts = {})
|
|
2859
|
+
logger.debug 'Calling operation WaasClient#update_waf_address_rate_limiting.' if logger
|
|
2860
|
+
|
|
2861
|
+
raise "Missing the required parameter 'waas_policy_id' when calling update_waf_address_rate_limiting." if waas_policy_id.nil?
|
|
2862
|
+
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?
|
|
2863
|
+
raise "Parameter value for 'waas_policy_id' must not be blank" if OCI::Internal::Util.blank_string?(waas_policy_id)
|
|
2864
|
+
|
|
2865
|
+
path = '/waasPolicies/{waasPolicyId}/wafConfig/addressRateLimiting'.sub('{waasPolicyId}', waas_policy_id.to_s)
|
|
2866
|
+
operation_signing_strategy = :standard
|
|
2867
|
+
|
|
2868
|
+
# rubocop:disable Style/NegatedIf
|
|
2869
|
+
# Query Params
|
|
2870
|
+
query_params = {}
|
|
2871
|
+
|
|
2872
|
+
# Header Params
|
|
2873
|
+
header_params = {}
|
|
2874
|
+
header_params[:accept] = 'application/json'
|
|
2875
|
+
header_params[:'content-type'] = 'application/json'
|
|
2876
|
+
header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
|
|
2877
|
+
header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
|
|
2878
|
+
header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
|
|
2879
|
+
# rubocop:enable Style/NegatedIf
|
|
2880
|
+
header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token
|
|
2881
|
+
|
|
2882
|
+
post_body = @api_client.object_to_http_body(update_waf_address_rate_limiting_details)
|
|
2883
|
+
|
|
2884
|
+
# rubocop:disable Metrics/BlockLength
|
|
2885
|
+
OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'WaasClient#update_waf_address_rate_limiting') do
|
|
2886
|
+
@api_client.call_api(
|
|
2887
|
+
:PUT,
|
|
2888
|
+
path,
|
|
2889
|
+
endpoint,
|
|
2890
|
+
header_params: header_params,
|
|
2891
|
+
query_params: query_params,
|
|
2892
|
+
operation_signing_strategy: operation_signing_strategy,
|
|
2893
|
+
body: post_body
|
|
2894
|
+
)
|
|
2895
|
+
end
|
|
2896
|
+
# rubocop:enable Metrics/BlockLength
|
|
2897
|
+
end
|
|
2898
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
2899
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
2900
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
|
2901
|
+
|
|
2902
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
2903
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
2904
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
|
2905
|
+
|
|
2906
|
+
|
|
2907
|
+
# Updates the Web Application Firewall configuration for a specified WAAS policy.
|
|
2908
|
+
#
|
|
2909
|
+
# To update platform provided resources such as `GoodBots`, `ProtectionRules`, and `ThreatFeeds`
|
|
2910
|
+
# first retrieve the list of available resources with the related list operation such as
|
|
2911
|
+
# `GetThreatFeeds` or `GetProtectionRules`.
|
|
2912
|
+
#
|
|
2913
|
+
# The returned list will contain objects with `key` properties that can be used to update the
|
|
2914
|
+
# resource during the `UpdateWafConfig` request.
|
|
2915
|
+
#
|
|
2916
|
+
# @param [String] waas_policy_id The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the WAAS policy.
|
|
2917
|
+
# @param [OCI::Waas::Models::WafConfig] update_waf_config_details The new Web Application Firewall configuration to apply to a WAAS policy.
|
|
2918
|
+
# @param [Hash] opts the optional parameters
|
|
2919
|
+
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
|
|
2920
|
+
# retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
|
|
2921
|
+
# @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
|
|
2922
|
+
# @option opts [String] :opc_retry_token A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations
|
|
2923
|
+
# *Example:* If a resource has been deleted and purged from the system, then a retry of the original delete request may be rejected.
|
|
2924
|
+
# @option opts [String] :if_match For optimistic concurrency control. In the `PUT` or `DELETE` call for a resource, set the `if-match` parameter to the value of the etag from a previous `GET` or `POST` response for that resource. The resource will be updated or deleted only if the etag provided matches the resource's current etag value.
|
|
2925
|
+
# @return [Response] A Response object with data of type nil
|
|
2926
|
+
def update_waf_config(waas_policy_id, update_waf_config_details, opts = {})
|
|
2927
|
+
logger.debug 'Calling operation WaasClient#update_waf_config.' if logger
|
|
2928
|
+
|
|
2929
|
+
raise "Missing the required parameter 'waas_policy_id' when calling update_waf_config." if waas_policy_id.nil?
|
|
2930
|
+
raise "Missing the required parameter 'update_waf_config_details' when calling update_waf_config." if update_waf_config_details.nil?
|
|
2931
|
+
raise "Parameter value for 'waas_policy_id' must not be blank" if OCI::Internal::Util.blank_string?(waas_policy_id)
|
|
2932
|
+
|
|
2933
|
+
path = '/waasPolicies/{waasPolicyId}/wafConfig'.sub('{waasPolicyId}', waas_policy_id.to_s)
|
|
2934
|
+
operation_signing_strategy = :standard
|
|
2935
|
+
|
|
2936
|
+
# rubocop:disable Style/NegatedIf
|
|
2937
|
+
# Query Params
|
|
2938
|
+
query_params = {}
|
|
2939
|
+
|
|
2940
|
+
# Header Params
|
|
2941
|
+
header_params = {}
|
|
2942
|
+
header_params[:accept] = 'application/json'
|
|
2943
|
+
header_params[:'content-type'] = 'application/json'
|
|
2944
|
+
header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
|
|
2945
|
+
header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
|
|
2946
|
+
header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
|
|
2947
|
+
# rubocop:enable Style/NegatedIf
|
|
2948
|
+
header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token
|
|
2949
|
+
|
|
2950
|
+
post_body = @api_client.object_to_http_body(update_waf_config_details)
|
|
2951
|
+
|
|
2952
|
+
# rubocop:disable Metrics/BlockLength
|
|
2953
|
+
OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'WaasClient#update_waf_config') do
|
|
2954
|
+
@api_client.call_api(
|
|
2955
|
+
:PUT,
|
|
2956
|
+
path,
|
|
2957
|
+
endpoint,
|
|
2958
|
+
header_params: header_params,
|
|
2959
|
+
query_params: query_params,
|
|
2960
|
+
operation_signing_strategy: operation_signing_strategy,
|
|
2961
|
+
body: post_body
|
|
2962
|
+
)
|
|
2963
|
+
end
|
|
2964
|
+
# rubocop:enable Metrics/BlockLength
|
|
2965
|
+
end
|
|
2966
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
2967
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
2968
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
|
2969
|
+
|
|
2970
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
2971
|
+
# rubocop:disable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
2972
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines
|
|
2973
|
+
|
|
2974
|
+
|
|
2975
|
+
# 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).
|
|
2976
|
+
# This operation can create, delete, update, and/or reorder whitelists depending on the structure of the request body.
|
|
2977
|
+
# Updating an existing whitelist can be accomplished by changing the properties of the whitelist object with a non-empty `key` property in the list.
|
|
2978
|
+
# Reordering of whitelists can be accomplished by changing the order of the whitelists in the list when updating.
|
|
2979
|
+
# Creating a whitelist can be accomplished by adding a new whitelist object to the list without a `key` property. A `key` will be generated for the new whitelist upon update.
|
|
2980
|
+
# Deleting a whitelist can be accomplished by removing the existing whitelist object from the list. Any existing whitelist with a `key` that is not present in the list of whitelists sent in the request will be deleted.
|
|
2981
|
+
# @param [String] waas_policy_id The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the WAAS policy.
|
|
2982
|
+
# @param [Array<OCI::Waas::Models::OCI::Waas::Models::Whitelist>] whitelists
|
|
2983
|
+
# @param [Hash] opts the optional parameters
|
|
2984
|
+
# @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level
|
|
2985
|
+
# retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry
|
|
2986
|
+
# @option opts [String] :opc_request_id The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID.
|
|
2987
|
+
# @option opts [String] :opc_retry_token A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations
|
|
2988
|
+
# *Example:* If a resource has been deleted and purged from the system, then a retry of the original delete request may be rejected.
|
|
2989
|
+
# @option opts [String] :if_match For optimistic concurrency control. In the `PUT` or `DELETE` call for a resource, set the `if-match` parameter to the value of the etag from a previous `GET` or `POST` response for that resource. The resource will be updated or deleted only if the etag provided matches the resource's current etag value.
|
|
2990
|
+
# @return [Response] A Response object with data of type nil
|
|
2991
|
+
def update_whitelists(waas_policy_id, whitelists, opts = {})
|
|
2992
|
+
logger.debug 'Calling operation WaasClient#update_whitelists.' if logger
|
|
2993
|
+
|
|
2994
|
+
raise "Missing the required parameter 'waas_policy_id' when calling update_whitelists." if waas_policy_id.nil?
|
|
2995
|
+
raise "Missing the required parameter 'whitelists' when calling update_whitelists." if whitelists.nil?
|
|
2996
|
+
raise "Parameter value for 'waas_policy_id' must not be blank" if OCI::Internal::Util.blank_string?(waas_policy_id)
|
|
2997
|
+
|
|
2998
|
+
path = '/waasPolicies/{waasPolicyId}/wafConfig/whitelists'.sub('{waasPolicyId}', waas_policy_id.to_s)
|
|
2999
|
+
operation_signing_strategy = :standard
|
|
3000
|
+
|
|
3001
|
+
# rubocop:disable Style/NegatedIf
|
|
3002
|
+
# Query Params
|
|
3003
|
+
query_params = {}
|
|
3004
|
+
|
|
3005
|
+
# Header Params
|
|
3006
|
+
header_params = {}
|
|
3007
|
+
header_params[:accept] = 'application/json'
|
|
3008
|
+
header_params[:'content-type'] = 'application/json'
|
|
3009
|
+
header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
|
|
3010
|
+
header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
|
|
3011
|
+
header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
|
|
3012
|
+
# rubocop:enable Style/NegatedIf
|
|
3013
|
+
header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token
|
|
3014
|
+
|
|
3015
|
+
post_body = @api_client.object_to_http_body(whitelists)
|
|
3016
|
+
|
|
3017
|
+
# rubocop:disable Metrics/BlockLength
|
|
3018
|
+
OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'WaasClient#update_whitelists') do
|
|
3019
|
+
@api_client.call_api(
|
|
3020
|
+
:PUT,
|
|
3021
|
+
path,
|
|
3022
|
+
endpoint,
|
|
3023
|
+
header_params: header_params,
|
|
3024
|
+
query_params: query_params,
|
|
3025
|
+
operation_signing_strategy: operation_signing_strategy,
|
|
3026
|
+
body: post_body
|
|
3027
|
+
)
|
|
3028
|
+
end
|
|
3029
|
+
# rubocop:enable Metrics/BlockLength
|
|
3030
|
+
end
|
|
3031
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
3032
|
+
# rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists
|
|
3033
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines
|
|
3034
|
+
|
|
3035
|
+
private
|
|
3036
|
+
|
|
3037
|
+
def applicable_retry_config(opts = {})
|
|
3038
|
+
return @retry_config unless opts.key?(:retry_config)
|
|
3039
|
+
|
|
3040
|
+
opts[:retry_config]
|
|
3041
|
+
end
|
|
3042
|
+
end
|
|
3043
|
+
end
|
|
3044
|
+
# rubocop:enable Lint/UnneededCopDisableDirective, Metrics/LineLength
|