fastly 5.3.0 → 6.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (224) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +62 -0
  3. data/Gemfile.lock +1 -1
  4. data/README.md +86 -63
  5. data/docs/AclEntry.md +1 -1
  6. data/docs/AclEntryApi.md +176 -0
  7. data/docs/AclEntryResponse.md +1 -1
  8. data/docs/ApexRedirectApi.md +56 -0
  9. data/docs/Batch.md +12 -0
  10. data/docs/BatchErrors.md +13 -0
  11. data/docs/BulkUpdateAclEntry.md +1 -1
  12. data/docs/ClientKey.md +12 -0
  13. data/docs/ContactApi.md +50 -0
  14. data/docs/Content.md +2 -2
  15. data/docs/ContentApi.md +52 -0
  16. data/docs/DirectorApi.md +42 -0
  17. data/docs/DomainInspector.md +12 -0
  18. data/docs/DomainInspectorEntry.md +11 -0
  19. data/docs/DomainInspectorEntryDimensions.md +12 -0
  20. data/docs/DomainInspectorHistoricalApi.md +72 -0
  21. data/docs/DomainInspectorMeasurements.md +71 -0
  22. data/docs/DomainInspectorRealtimeApi.md +132 -0
  23. data/docs/DomainInspectorRealtimeEntry.md +12 -0
  24. data/docs/EventAttributes.md +1 -1
  25. data/docs/{EventsResponseAllOf.md → EventData.md} +1 -1
  26. data/docs/HistoricalDomains.md +13 -0
  27. data/docs/HistoricalDomainsData.md +11 -0
  28. data/docs/HistoricalDomainsMeta.md +18 -0
  29. data/docs/HistoricalDomainsMetaFilters.md +12 -0
  30. data/docs/HistoricalDomainsResponse.md +13 -0
  31. data/docs/HistoricalDomainsResponseAllOf.md +10 -0
  32. data/docs/{HistoricalFieldResultsAttributesAllOf.md → HistoricalFieldResultsAttributesAdditional.md} +1 -1
  33. data/docs/HistoricalOriginsResponse.md +13 -0
  34. data/docs/HistoricalOriginsResponseAllOf.md +10 -0
  35. data/docs/IamRolesApi.md +157 -0
  36. data/docs/IamServiceGroupsApi.md +157 -0
  37. data/docs/IamUserGroupsApi.md +315 -0
  38. data/docs/InlineResponse2005.md +11 -0
  39. data/docs/InlineResponse2006.md +11 -0
  40. data/docs/InlineResponse2007.md +10 -0
  41. data/docs/InlineResponse400.md +10 -0
  42. data/docs/LegacyWafConfigurationSet.md +11 -0
  43. data/docs/LegacyWafConfigurationSetsApi.md +125 -0
  44. data/docs/LegacyWafFirewall.md +18 -0
  45. data/docs/LegacyWafFirewallApi.md +352 -0
  46. data/docs/LegacyWafOwasp.md +38 -0
  47. data/docs/LegacyWafOwaspApi.md +138 -0
  48. data/docs/LegacyWafRule.md +14 -0
  49. data/docs/LegacyWafRuleApi.md +184 -0
  50. data/docs/LegacyWafRuleStatus.md +12 -0
  51. data/docs/LegacyWafRuleStatusApi.md +202 -0
  52. data/docs/LegacyWafRuleset.md +11 -0
  53. data/docs/LegacyWafRulesetApi.md +136 -0
  54. data/docs/LegacyWafTag.md +10 -0
  55. data/docs/LegacyWafTagApi.md +58 -0
  56. data/docs/LegacyWafUpdateStatus.md +15 -0
  57. data/docs/LegacyWafUpdateStatusApi.md +102 -0
  58. data/docs/LoggingKafkaApi.md +42 -0
  59. data/docs/LoggingKinesisApi.md +42 -0
  60. data/docs/OriginInspector.md +12 -0
  61. data/docs/OriginInspectorDimensions.md +12 -0
  62. data/docs/OriginInspectorEntry.md +11 -0
  63. data/docs/OriginInspectorHistorical.md +13 -0
  64. data/docs/OriginInspectorHistoricalApi.md +72 -0
  65. data/docs/OriginInspectorHistoricalData.md +11 -0
  66. data/docs/OriginInspectorHistoricalMeta.md +18 -0
  67. data/docs/OriginInspectorHistoricalMetaFilters.md +12 -0
  68. data/docs/OriginInspectorMeasurements.md +161 -0
  69. data/docs/OriginInspectorRealtimeApi.md +132 -0
  70. data/docs/OriginInspectorRealtimeEntry.md +12 -0
  71. data/docs/OriginInspectorRealtimeEntryRecorded.md +9 -0
  72. data/docs/OriginInspectorSubsequentRequestTimestamp.md +9 -0
  73. data/docs/OriginInspectorValues.md +161 -0
  74. data/docs/PaginationCursorMeta.md +11 -0
  75. data/docs/ReadOnlyServiceId.md +9 -0
  76. data/docs/ReadOnlyVersion.md +9 -0
  77. data/docs/RealtimeEntry.md +2 -2
  78. data/docs/RealtimeEntryAggregated.md +227 -0
  79. data/docs/RealtimeEntryRecorded.md +9 -0
  80. data/docs/RealtimeMeasurements.md +1 -1
  81. data/docs/RecordedTimestamp.md +9 -0
  82. data/docs/RequestSettingsApi.md +40 -0
  83. data/docs/ResponseObjectApi.md +82 -0
  84. data/docs/SchemasSnippetResponse.md +1 -1
  85. data/docs/Secret.md +12 -0
  86. data/docs/SecretResponse.md +13 -0
  87. data/docs/SecretStore.md +10 -0
  88. data/docs/SecretStoreApi.md +233 -0
  89. data/docs/SecretStoreItemApi.md +255 -0
  90. data/docs/SecretStoreResponse.md +12 -0
  91. data/docs/ServiceAuthorizationsApi.md +76 -0
  92. data/docs/SigningKey.md +10 -0
  93. data/docs/Snippet.md +1 -1
  94. data/docs/SnippetApi.md +46 -4
  95. data/docs/SnippetResponse.md +1 -1
  96. data/docs/SubsequentRequestTimestamp.md +9 -0
  97. data/docs/SudoApi.md +52 -0
  98. data/docs/SudoGenericTokenError.md +10 -0
  99. data/docs/SudoRequest.md +12 -0
  100. data/docs/SudoResponse.md +10 -0
  101. data/docs/TokensAdditionalProps.md +9 -0
  102. data/docs/TokensApi.md +70 -0
  103. data/docs/ValidatorResult.md +1 -5
  104. data/docs/ValidatorResultData.md +12 -0
  105. data/docs/ValidatorResultDataAttributes.md +14 -0
  106. data/docs/{ValidatorResultMessages.md → ValidatorResultDataAttributesMessages.md} +2 -2
  107. data/docs/Values.md +71 -0
  108. data/docs/VclApi.md +8 -6
  109. data/docs/VclSyntaxHighlightingResponse.md +10 -0
  110. data/docs/WafActiveRulesApi.md +41 -0
  111. data/lib/fastly/api/acl_entry_api.rb +332 -0
  112. data/lib/fastly/api/apex_redirect_api.rb +111 -0
  113. data/lib/fastly/api/contact_api.rb +90 -0
  114. data/lib/fastly/api/content_api.rb +79 -0
  115. data/lib/fastly/api/director_api.rb +82 -0
  116. data/lib/fastly/api/domain_inspector_historical_api.rb +125 -0
  117. data/lib/fastly/api/domain_inspector_realtime_api.rb +223 -0
  118. data/lib/fastly/api/iam_roles_api.rb +271 -0
  119. data/lib/fastly/api/iam_service_groups_api.rb +271 -0
  120. data/lib/fastly/api/iam_user_groups_api.rb +547 -0
  121. data/lib/fastly/api/legacy_waf_configuration_sets_api.rb +209 -0
  122. data/lib/fastly/api/legacy_waf_firewall_api.rb +627 -0
  123. data/lib/fastly/api/legacy_waf_owasp_api.rb +244 -0
  124. data/lib/fastly/api/legacy_waf_rule_api.rb +307 -0
  125. data/lib/fastly/api/legacy_waf_rule_status_api.rb +366 -0
  126. data/lib/fastly/api/legacy_waf_ruleset_api.rb +237 -0
  127. data/lib/fastly/api/legacy_waf_tag_api.rb +96 -0
  128. data/lib/fastly/api/legacy_waf_update_status_api.rb +184 -0
  129. data/lib/fastly/api/logging_kafka_api.rb +82 -0
  130. data/lib/fastly/api/logging_kinesis_api.rb +82 -0
  131. data/lib/fastly/api/origin_inspector_historical_api.rb +125 -0
  132. data/lib/fastly/api/origin_inspector_realtime_api.rb +223 -0
  133. data/lib/fastly/api/request_settings_api.rb +75 -0
  134. data/lib/fastly/api/response_object_api.rb +157 -0
  135. data/lib/fastly/api/secret_store_api.rb +381 -0
  136. data/lib/fastly/api/secret_store_item_api.rb +437 -0
  137. data/lib/fastly/api/service_authorizations_api.rb +126 -0
  138. data/lib/fastly/api/snippet_api.rb +88 -6
  139. data/lib/fastly/api/sudo_api.rb +83 -0
  140. data/lib/fastly/api/tokens_api.rb +122 -0
  141. data/lib/fastly/api/vcl_api.rb +10 -10
  142. data/lib/fastly/api/waf_active_rules_api.rb +75 -0
  143. data/lib/fastly/configuration.rb +504 -0
  144. data/lib/fastly/models/acl_entry.rb +1 -1
  145. data/lib/fastly/models/acl_entry_response.rb +1 -1
  146. data/lib/fastly/models/batch.rb +239 -0
  147. data/lib/fastly/models/batch_errors.rb +247 -0
  148. data/lib/fastly/models/bulk_update_acl_entry.rb +1 -1
  149. data/lib/fastly/models/client_key.rb +239 -0
  150. data/lib/fastly/models/content.rb +8 -4
  151. data/lib/fastly/models/domain.rb +1 -0
  152. data/lib/fastly/models/domain_inspector.rb +238 -0
  153. data/lib/fastly/models/domain_inspector_entry.rb +228 -0
  154. data/lib/fastly/models/domain_inspector_entry_dimensions.rb +238 -0
  155. data/lib/fastly/models/domain_inspector_measurements.rb +828 -0
  156. data/lib/fastly/models/domain_inspector_realtime_entry.rb +241 -0
  157. data/lib/fastly/models/event_attributes.rb +4 -2
  158. data/lib/fastly/models/{events_response_all_of.rb → event_data.rb} +3 -3
  159. data/lib/fastly/models/events_response.rb +1 -1
  160. data/lib/fastly/models/historical_domains.rb +249 -0
  161. data/lib/fastly/models/historical_domains_data.rb +228 -0
  162. data/lib/fastly/models/historical_domains_meta.rb +297 -0
  163. data/lib/fastly/models/historical_domains_meta_filters.rb +235 -0
  164. data/lib/fastly/models/historical_domains_response.rb +257 -0
  165. data/lib/fastly/models/historical_domains_response_all_of.rb +219 -0
  166. data/lib/fastly/models/historical_field_results_attributes.rb +1 -1
  167. data/lib/fastly/models/{historical_field_results_attributes_all_of.rb → historical_field_results_attributes_additional.rb} +3 -3
  168. data/lib/fastly/models/historical_origins_response.rb +257 -0
  169. data/lib/fastly/models/historical_origins_response_all_of.rb +219 -0
  170. data/lib/fastly/models/inline_response2005.rb +227 -0
  171. data/lib/fastly/models/inline_response2006.rb +227 -0
  172. data/lib/fastly/models/inline_response2007.rb +218 -0
  173. data/lib/fastly/models/inline_response400.rb +250 -0
  174. data/lib/fastly/models/legacy_waf_configuration_set.rb +227 -0
  175. data/lib/fastly/models/legacy_waf_firewall.rb +297 -0
  176. data/lib/fastly/models/legacy_waf_owasp.rb +527 -0
  177. data/lib/fastly/models/legacy_waf_rule.rb +257 -0
  178. data/lib/fastly/models/legacy_waf_rule_status.rb +237 -0
  179. data/lib/fastly/models/legacy_waf_ruleset.rb +227 -0
  180. data/lib/fastly/models/legacy_waf_tag.rb +217 -0
  181. data/lib/fastly/models/legacy_waf_update_status.rb +267 -0
  182. data/lib/fastly/models/origin_inspector.rb +238 -0
  183. data/lib/fastly/models/origin_inspector_dimensions.rb +238 -0
  184. data/lib/fastly/models/origin_inspector_entry.rb +228 -0
  185. data/lib/fastly/models/origin_inspector_historical.rb +249 -0
  186. data/lib/fastly/models/origin_inspector_historical_data.rb +225 -0
  187. data/lib/fastly/models/origin_inspector_historical_meta.rb +297 -0
  188. data/lib/fastly/models/origin_inspector_historical_meta_filters.rb +235 -0
  189. data/lib/fastly/models/origin_inspector_measurements.rb +1728 -0
  190. data/lib/fastly/models/origin_inspector_realtime_entry.rb +241 -0
  191. data/lib/fastly/models/origin_inspector_realtime_entry_recorded.rb +208 -0
  192. data/lib/fastly/models/origin_inspector_subsequent_request_timestamp.rb +208 -0
  193. data/lib/fastly/models/origin_inspector_values.rb +1728 -0
  194. data/lib/fastly/models/pagination_cursor_meta.rb +227 -0
  195. data/lib/fastly/models/read_only_service_id.rb +207 -0
  196. data/lib/fastly/models/read_only_version.rb +207 -0
  197. data/lib/fastly/models/realtime_entry.rb +2 -7
  198. data/lib/fastly/models/realtime_entry_aggregated.rb +2397 -0
  199. data/lib/fastly/models/realtime_entry_recorded.rb +208 -0
  200. data/lib/fastly/models/realtime_measurements.rb +4 -2
  201. data/lib/fastly/models/recorded_timestamp.rb +208 -0
  202. data/lib/fastly/models/schemas_snippet_response.rb +3 -3
  203. data/lib/fastly/models/secret.rb +238 -0
  204. data/lib/fastly/models/secret_response.rb +249 -0
  205. data/lib/fastly/models/secret_store.rb +217 -0
  206. data/lib/fastly/models/secret_store_response.rb +238 -0
  207. data/lib/fastly/models/signing_key.rb +218 -0
  208. data/lib/fastly/models/snippet.rb +3 -3
  209. data/lib/fastly/models/snippet_response.rb +3 -3
  210. data/lib/fastly/models/subsequent_request_timestamp.rb +208 -0
  211. data/lib/fastly/models/sudo_generic_token_error.rb +216 -0
  212. data/lib/fastly/models/sudo_request.rb +244 -0
  213. data/lib/fastly/models/sudo_response.rb +217 -0
  214. data/lib/fastly/models/tokens_additional_props.rb +227 -0
  215. data/lib/fastly/models/validator_result.rb +7 -84
  216. data/lib/fastly/models/validator_result_data.rb +234 -0
  217. data/lib/fastly/models/validator_result_data_attributes.rb +293 -0
  218. data/lib/fastly/models/{validator_result_messages.rb → validator_result_data_attributes_messages.rb} +4 -4
  219. data/lib/fastly/models/values.rb +828 -0
  220. data/lib/fastly/models/vcl_syntax_highlighting_response.rb +217 -0
  221. data/lib/fastly/version.rb +1 -1
  222. data/lib/fastly.rb +79 -3
  223. data/sig.json +1 -1
  224. metadata +160 -8
@@ -0,0 +1,627 @@
1
+ =begin
2
+ #Fastly API
3
+
4
+ #Via the Fastly API you can perform any of the operations that are possible within the management console, including creating services, domains, and backends, configuring rules or uploading your own application code, as well as account operations such as user administration and billing reports. The API is organized into collections of endpoints that allow manipulation of objects related to Fastly services and accounts. For the most accurate and up-to-date API reference content, visit our [Developer Hub](https://developer.fastly.com/reference/api/)
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+ Contact: oss@fastly.com
8
+
9
+ =end
10
+
11
+ require 'cgi'
12
+
13
+ module Fastly
14
+ class LegacyWafFirewallApi
15
+ attr_accessor :api_client
16
+
17
+ def initialize(api_client = ApiClient.default)
18
+ @api_client = api_client
19
+ end
20
+ # Create a firewall
21
+ # Create a firewall object for a particular service and version.
22
+ # @option opts [String] :service_id Alphanumeric string identifying the service. (required)
23
+ # @option opts [Integer] :version_id Integer identifying a service version. (required)
24
+ # @option opts [Hash<String, Object>] :request_body
25
+ # @return [Object]
26
+ def create_legacy_waf_firewall_service(opts = {})
27
+ data, _status_code, _headers = create_legacy_waf_firewall_service_with_http_info(opts)
28
+ data
29
+ end
30
+
31
+ # Create a firewall
32
+ # Create a firewall object for a particular service and version.
33
+ # @option opts [String] :service_id Alphanumeric string identifying the service. (required)
34
+ # @option opts [Integer] :version_id Integer identifying a service version. (required)
35
+ # @option opts [Hash<String, Object>] :request_body
36
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
37
+ def create_legacy_waf_firewall_service_with_http_info(opts = {})
38
+ if @api_client.config.debugging
39
+ @api_client.config.logger.debug 'Calling API: LegacyWafFirewallApi.create_legacy_waf_firewall_service ...'
40
+ end
41
+ # unbox the parameters from the hash
42
+ service_id = opts[:'service_id']
43
+ version_id = opts[:'version_id']
44
+ # verify the required parameter 'service_id' is set
45
+ if @api_client.config.client_side_validation && service_id.nil?
46
+ fail ArgumentError, "Missing the required parameter 'service_id' when calling LegacyWafFirewallApi.create_legacy_waf_firewall_service"
47
+ end
48
+ # verify the required parameter 'version_id' is set
49
+ if @api_client.config.client_side_validation && version_id.nil?
50
+ fail ArgumentError, "Missing the required parameter 'version_id' when calling LegacyWafFirewallApi.create_legacy_waf_firewall_service"
51
+ end
52
+ # resource path
53
+ local_var_path = '/service/{service_id}/version/{version_id}/wafs'.sub('{' + 'service_id' + '}', CGI.escape(service_id.to_s)).sub('{' + 'version_id' + '}', CGI.escape(version_id.to_s))
54
+
55
+ # query parameters
56
+ query_params = opts[:query_params] || {}
57
+
58
+ # header parameters
59
+ header_params = opts[:header_params] || {}
60
+ # HTTP header 'Accept' (if needed)
61
+ header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json'])
62
+ # HTTP header 'Content-Type'
63
+ content_type = @api_client.select_header_content_type(['application/vnd.api+json'])
64
+ if !content_type.nil?
65
+ header_params['Content-Type'] = content_type
66
+ end
67
+
68
+ # form parameters
69
+ form_params = opts[:form_params] || {}
70
+
71
+ # http body (model)
72
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'request_body'])
73
+
74
+ # return_type
75
+ return_type = opts[:debug_return_type] || 'Object'
76
+
77
+ # auth_names
78
+ auth_names = opts[:debug_auth_names] || ['token']
79
+
80
+ new_options = opts.merge(
81
+ :operation => :"LegacyWafFirewallApi.create_legacy_waf_firewall_service",
82
+ :header_params => header_params,
83
+ :query_params => query_params,
84
+ :form_params => form_params,
85
+ :body => post_body,
86
+ :auth_names => auth_names,
87
+ :return_type => return_type
88
+ )
89
+
90
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
91
+ if @api_client.config.debugging
92
+ @api_client.config.logger.debug "API called: LegacyWafFirewallApi#create_legacy_waf_firewall_service\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
93
+ end
94
+ return data, status_code, headers
95
+ end
96
+
97
+ # Disable a firewall
98
+ # Disable a firewall for a particular service and version. This endpoint is intended to be used in an emergency. Disabling a firewall object for a specific service and version replaces your existing WAF ruleset with an empty ruleset. While disabled, your WAF ruleset will not be applied to your origin traffic. This endpoint is only available to users assigned the role of superuser or above. This is an asynchronous action. To check on the completion of this action, use the related link returned in the response to check on the Update Status of the action.
99
+ # @option opts [String] :firewall_id Alphanumeric string identifying a Firewall. (required)
100
+ # @option opts [Hash<String, Object>] :request_body
101
+ # @return [Object]
102
+ def disable_legacy_waf_firewall(opts = {})
103
+ data, _status_code, _headers = disable_legacy_waf_firewall_with_http_info(opts)
104
+ data
105
+ end
106
+
107
+ # Disable a firewall
108
+ # Disable a firewall for a particular service and version. This endpoint is intended to be used in an emergency. Disabling a firewall object for a specific service and version replaces your existing WAF ruleset with an empty ruleset. While disabled, your WAF ruleset will not be applied to your origin traffic. This endpoint is only available to users assigned the role of superuser or above. This is an asynchronous action. To check on the completion of this action, use the related link returned in the response to check on the Update Status of the action.
109
+ # @option opts [String] :firewall_id Alphanumeric string identifying a Firewall. (required)
110
+ # @option opts [Hash<String, Object>] :request_body
111
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
112
+ def disable_legacy_waf_firewall_with_http_info(opts = {})
113
+ if @api_client.config.debugging
114
+ @api_client.config.logger.debug 'Calling API: LegacyWafFirewallApi.disable_legacy_waf_firewall ...'
115
+ end
116
+ # unbox the parameters from the hash
117
+ firewall_id = opts[:'firewall_id']
118
+ # verify the required parameter 'firewall_id' is set
119
+ if @api_client.config.client_side_validation && firewall_id.nil?
120
+ fail ArgumentError, "Missing the required parameter 'firewall_id' when calling LegacyWafFirewallApi.disable_legacy_waf_firewall"
121
+ end
122
+ # resource path
123
+ local_var_path = '/wafs/{firewall_id}/disable'.sub('{' + 'firewall_id' + '}', CGI.escape(firewall_id.to_s))
124
+
125
+ # query parameters
126
+ query_params = opts[:query_params] || {}
127
+
128
+ # header parameters
129
+ header_params = opts[:header_params] || {}
130
+ # HTTP header 'Accept' (if needed)
131
+ header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json'])
132
+ # HTTP header 'Content-Type'
133
+ content_type = @api_client.select_header_content_type(['application/vnd.api+json'])
134
+ if !content_type.nil?
135
+ header_params['Content-Type'] = content_type
136
+ end
137
+
138
+ # form parameters
139
+ form_params = opts[:form_params] || {}
140
+
141
+ # http body (model)
142
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'request_body'])
143
+
144
+ # return_type
145
+ return_type = opts[:debug_return_type] || 'Object'
146
+
147
+ # auth_names
148
+ auth_names = opts[:debug_auth_names] || ['token']
149
+
150
+ new_options = opts.merge(
151
+ :operation => :"LegacyWafFirewallApi.disable_legacy_waf_firewall",
152
+ :header_params => header_params,
153
+ :query_params => query_params,
154
+ :form_params => form_params,
155
+ :body => post_body,
156
+ :auth_names => auth_names,
157
+ :return_type => return_type
158
+ )
159
+
160
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
161
+ if @api_client.config.debugging
162
+ @api_client.config.logger.debug "API called: LegacyWafFirewallApi#disable_legacy_waf_firewall\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
163
+ end
164
+ return data, status_code, headers
165
+ end
166
+
167
+ # Enable a firewall
168
+ # Re-enable a firewall object for a particular service and version after it has been disabled. This endpoint is intended to be used in an emergency. When a firewall object is re-enabled, a newly generated WAF ruleset VCL based on the current WAF configuration is used to replace the empty ruleset. This endpoint is only available to users assigned the role of superuser or above. This is an asynchronous action. To check on the completion of this action, use the related link returned in the response to check on the Update Status of the action.
169
+ # @option opts [String] :firewall_id Alphanumeric string identifying a Firewall. (required)
170
+ # @option opts [Hash<String, Object>] :request_body
171
+ # @return [Object]
172
+ def enable_legacy_waf_firewall(opts = {})
173
+ data, _status_code, _headers = enable_legacy_waf_firewall_with_http_info(opts)
174
+ data
175
+ end
176
+
177
+ # Enable a firewall
178
+ # Re-enable a firewall object for a particular service and version after it has been disabled. This endpoint is intended to be used in an emergency. When a firewall object is re-enabled, a newly generated WAF ruleset VCL based on the current WAF configuration is used to replace the empty ruleset. This endpoint is only available to users assigned the role of superuser or above. This is an asynchronous action. To check on the completion of this action, use the related link returned in the response to check on the Update Status of the action.
179
+ # @option opts [String] :firewall_id Alphanumeric string identifying a Firewall. (required)
180
+ # @option opts [Hash<String, Object>] :request_body
181
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
182
+ def enable_legacy_waf_firewall_with_http_info(opts = {})
183
+ if @api_client.config.debugging
184
+ @api_client.config.logger.debug 'Calling API: LegacyWafFirewallApi.enable_legacy_waf_firewall ...'
185
+ end
186
+ # unbox the parameters from the hash
187
+ firewall_id = opts[:'firewall_id']
188
+ # verify the required parameter 'firewall_id' is set
189
+ if @api_client.config.client_side_validation && firewall_id.nil?
190
+ fail ArgumentError, "Missing the required parameter 'firewall_id' when calling LegacyWafFirewallApi.enable_legacy_waf_firewall"
191
+ end
192
+ # resource path
193
+ local_var_path = '/wafs/{firewall_id}/enable'.sub('{' + 'firewall_id' + '}', CGI.escape(firewall_id.to_s))
194
+
195
+ # query parameters
196
+ query_params = opts[:query_params] || {}
197
+
198
+ # header parameters
199
+ header_params = opts[:header_params] || {}
200
+ # HTTP header 'Accept' (if needed)
201
+ header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json'])
202
+ # HTTP header 'Content-Type'
203
+ content_type = @api_client.select_header_content_type(['application/vnd.api+json'])
204
+ if !content_type.nil?
205
+ header_params['Content-Type'] = content_type
206
+ end
207
+
208
+ # form parameters
209
+ form_params = opts[:form_params] || {}
210
+
211
+ # http body (model)
212
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'request_body'])
213
+
214
+ # return_type
215
+ return_type = opts[:debug_return_type] || 'Object'
216
+
217
+ # auth_names
218
+ auth_names = opts[:debug_auth_names] || ['token']
219
+
220
+ new_options = opts.merge(
221
+ :operation => :"LegacyWafFirewallApi.enable_legacy_waf_firewall",
222
+ :header_params => header_params,
223
+ :query_params => query_params,
224
+ :form_params => form_params,
225
+ :body => post_body,
226
+ :auth_names => auth_names,
227
+ :return_type => return_type
228
+ )
229
+
230
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
231
+ if @api_client.config.debugging
232
+ @api_client.config.logger.debug "API called: LegacyWafFirewallApi#enable_legacy_waf_firewall\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
233
+ end
234
+ return data, status_code, headers
235
+ end
236
+
237
+ # Get a firewall object
238
+ # Get a specific firewall object.
239
+ # @option opts [String] :firewall_id Alphanumeric string identifying a Firewall. (required)
240
+ # @option opts [String] :include Include relationships. Optional, comma separated values. Permitted values: &#x60;configuration_set&#x60;, &#x60;owasp&#x60;, &#x60;rules&#x60;, &#x60;rule_statuses&#x60;.
241
+ # @return [Object]
242
+ def get_legacy_waf_firewall(opts = {})
243
+ data, _status_code, _headers = get_legacy_waf_firewall_with_http_info(opts)
244
+ data
245
+ end
246
+
247
+ # Get a firewall object
248
+ # Get a specific firewall object.
249
+ # @option opts [String] :firewall_id Alphanumeric string identifying a Firewall. (required)
250
+ # @option opts [String] :include Include relationships. Optional, comma separated values. Permitted values: &#x60;configuration_set&#x60;, &#x60;owasp&#x60;, &#x60;rules&#x60;, &#x60;rule_statuses&#x60;.
251
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
252
+ def get_legacy_waf_firewall_with_http_info(opts = {})
253
+ if @api_client.config.debugging
254
+ @api_client.config.logger.debug 'Calling API: LegacyWafFirewallApi.get_legacy_waf_firewall ...'
255
+ end
256
+ # unbox the parameters from the hash
257
+ firewall_id = opts[:'firewall_id']
258
+ # verify the required parameter 'firewall_id' is set
259
+ if @api_client.config.client_side_validation && firewall_id.nil?
260
+ fail ArgumentError, "Missing the required parameter 'firewall_id' when calling LegacyWafFirewallApi.get_legacy_waf_firewall"
261
+ end
262
+ # resource path
263
+ local_var_path = '/wafs/{firewall_id}'.sub('{' + 'firewall_id' + '}', CGI.escape(firewall_id.to_s))
264
+
265
+ # query parameters
266
+ query_params = opts[:query_params] || {}
267
+ query_params[:'include'] = opts[:'include'] if !opts[:'include'].nil?
268
+
269
+ # header parameters
270
+ header_params = opts[:header_params] || {}
271
+ # HTTP header 'Accept' (if needed)
272
+ header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json'])
273
+
274
+ # form parameters
275
+ form_params = opts[:form_params] || {}
276
+
277
+ # http body (model)
278
+ post_body = opts[:debug_body]
279
+
280
+ # return_type
281
+ return_type = opts[:debug_return_type] || 'Object'
282
+
283
+ # auth_names
284
+ auth_names = opts[:debug_auth_names] || ['token']
285
+
286
+ new_options = opts.merge(
287
+ :operation => :"LegacyWafFirewallApi.get_legacy_waf_firewall",
288
+ :header_params => header_params,
289
+ :query_params => query_params,
290
+ :form_params => form_params,
291
+ :body => post_body,
292
+ :auth_names => auth_names,
293
+ :return_type => return_type
294
+ )
295
+
296
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
297
+ if @api_client.config.debugging
298
+ @api_client.config.logger.debug "API called: LegacyWafFirewallApi#get_legacy_waf_firewall\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
299
+ end
300
+ return data, status_code, headers
301
+ end
302
+
303
+ # Get a firewall
304
+ # Get a specific firewall object.
305
+ # @option opts [String] :service_id Alphanumeric string identifying the service. (required)
306
+ # @option opts [Integer] :version_id Integer identifying a service version. (required)
307
+ # @option opts [String] :firewall_id Alphanumeric string identifying a Firewall. (required)
308
+ # @return [Object]
309
+ def get_legacy_waf_firewall_service(opts = {})
310
+ data, _status_code, _headers = get_legacy_waf_firewall_service_with_http_info(opts)
311
+ data
312
+ end
313
+
314
+ # Get a firewall
315
+ # Get a specific firewall object.
316
+ # @option opts [String] :service_id Alphanumeric string identifying the service. (required)
317
+ # @option opts [Integer] :version_id Integer identifying a service version. (required)
318
+ # @option opts [String] :firewall_id Alphanumeric string identifying a Firewall. (required)
319
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
320
+ def get_legacy_waf_firewall_service_with_http_info(opts = {})
321
+ if @api_client.config.debugging
322
+ @api_client.config.logger.debug 'Calling API: LegacyWafFirewallApi.get_legacy_waf_firewall_service ...'
323
+ end
324
+ # unbox the parameters from the hash
325
+ service_id = opts[:'service_id']
326
+ version_id = opts[:'version_id']
327
+ firewall_id = opts[:'firewall_id']
328
+ # verify the required parameter 'service_id' is set
329
+ if @api_client.config.client_side_validation && service_id.nil?
330
+ fail ArgumentError, "Missing the required parameter 'service_id' when calling LegacyWafFirewallApi.get_legacy_waf_firewall_service"
331
+ end
332
+ # verify the required parameter 'version_id' is set
333
+ if @api_client.config.client_side_validation && version_id.nil?
334
+ fail ArgumentError, "Missing the required parameter 'version_id' when calling LegacyWafFirewallApi.get_legacy_waf_firewall_service"
335
+ end
336
+ # verify the required parameter 'firewall_id' is set
337
+ if @api_client.config.client_side_validation && firewall_id.nil?
338
+ fail ArgumentError, "Missing the required parameter 'firewall_id' when calling LegacyWafFirewallApi.get_legacy_waf_firewall_service"
339
+ end
340
+ # resource path
341
+ local_var_path = '/service/{service_id}/version/{version_id}/wafs/{firewall_id}'.sub('{' + 'service_id' + '}', CGI.escape(service_id.to_s)).sub('{' + 'version_id' + '}', CGI.escape(version_id.to_s)).sub('{' + 'firewall_id' + '}', CGI.escape(firewall_id.to_s))
342
+
343
+ # query parameters
344
+ query_params = opts[:query_params] || {}
345
+
346
+ # header parameters
347
+ header_params = opts[:header_params] || {}
348
+ # HTTP header 'Accept' (if needed)
349
+ header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json'])
350
+
351
+ # form parameters
352
+ form_params = opts[:form_params] || {}
353
+
354
+ # http body (model)
355
+ post_body = opts[:debug_body]
356
+
357
+ # return_type
358
+ return_type = opts[:debug_return_type] || 'Object'
359
+
360
+ # auth_names
361
+ auth_names = opts[:debug_auth_names] || ['token']
362
+
363
+ new_options = opts.merge(
364
+ :operation => :"LegacyWafFirewallApi.get_legacy_waf_firewall_service",
365
+ :header_params => header_params,
366
+ :query_params => query_params,
367
+ :form_params => form_params,
368
+ :body => post_body,
369
+ :auth_names => auth_names,
370
+ :return_type => return_type
371
+ )
372
+
373
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
374
+ if @api_client.config.debugging
375
+ @api_client.config.logger.debug "API called: LegacyWafFirewallApi#get_legacy_waf_firewall_service\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
376
+ end
377
+ return data, status_code, headers
378
+ end
379
+
380
+ # List active firewalls
381
+ # List all active firewall objects.
382
+ # @option opts [String] :filter_rules_rule_id Limit the returned firewalls to a specific rule ID.
383
+ # @option opts [Integer] :page_number Current page.
384
+ # @option opts [Integer] :page_size Number of records per page. (default to 20)
385
+ # @option opts [String] :include Include relationships. Optional, comma separated values. Permitted values: &#x60;configuration_set&#x60;, &#x60;owasp&#x60;.
386
+ # @return [Object]
387
+ def list_legacy_waf_firewalls(opts = {})
388
+ data, _status_code, _headers = list_legacy_waf_firewalls_with_http_info(opts)
389
+ data
390
+ end
391
+
392
+ # List active firewalls
393
+ # List all active firewall objects.
394
+ # @option opts [String] :filter_rules_rule_id Limit the returned firewalls to a specific rule ID.
395
+ # @option opts [Integer] :page_number Current page.
396
+ # @option opts [Integer] :page_size Number of records per page. (default to 20)
397
+ # @option opts [String] :include Include relationships. Optional, comma separated values. Permitted values: &#x60;configuration_set&#x60;, &#x60;owasp&#x60;.
398
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
399
+ def list_legacy_waf_firewalls_with_http_info(opts = {})
400
+ if @api_client.config.debugging
401
+ @api_client.config.logger.debug 'Calling API: LegacyWafFirewallApi.list_legacy_waf_firewalls ...'
402
+ end
403
+ # unbox the parameters from the hash
404
+ if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 100
405
+ fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling LegacyWafFirewallApi.list_legacy_waf_firewalls, must be smaller than or equal to 100.'
406
+ end
407
+
408
+ if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
409
+ fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling LegacyWafFirewallApi.list_legacy_waf_firewalls, must be greater than or equal to 1.'
410
+ end
411
+
412
+ # resource path
413
+ local_var_path = '/wafs'
414
+
415
+ # query parameters
416
+ query_params = opts[:query_params] || {}
417
+ query_params[:'filter[rules][rule_id]'] = opts[:'filter_rules_rule_id'] if !opts[:'filter_rules_rule_id'].nil?
418
+ query_params[:'page[number]'] = opts[:'page_number'] if !opts[:'page_number'].nil?
419
+ query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil?
420
+ query_params[:'include'] = opts[:'include'] if !opts[:'include'].nil?
421
+
422
+ # header parameters
423
+ header_params = opts[:header_params] || {}
424
+ # HTTP header 'Accept' (if needed)
425
+ header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json'])
426
+
427
+ # form parameters
428
+ form_params = opts[:form_params] || {}
429
+
430
+ # http body (model)
431
+ post_body = opts[:debug_body]
432
+
433
+ # return_type
434
+ return_type = opts[:debug_return_type] || 'Object'
435
+
436
+ # auth_names
437
+ auth_names = opts[:debug_auth_names] || ['token']
438
+
439
+ new_options = opts.merge(
440
+ :operation => :"LegacyWafFirewallApi.list_legacy_waf_firewalls",
441
+ :header_params => header_params,
442
+ :query_params => query_params,
443
+ :form_params => form_params,
444
+ :body => post_body,
445
+ :auth_names => auth_names,
446
+ :return_type => return_type
447
+ )
448
+
449
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
450
+ if @api_client.config.debugging
451
+ @api_client.config.logger.debug "API called: LegacyWafFirewallApi#list_legacy_waf_firewalls\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
452
+ end
453
+ return data, status_code, headers
454
+ end
455
+
456
+ # List firewalls
457
+ # List all firewall objects for a particular service and version.
458
+ # @option opts [String] :service_id Alphanumeric string identifying the service. (required)
459
+ # @option opts [Integer] :version_id Integer identifying a service version. (required)
460
+ # @option opts [Integer] :page_number Current page.
461
+ # @option opts [Integer] :page_size Number of records per page. (default to 20)
462
+ # @option opts [String] :include Include relationships. Optional, comma separated values. Permitted values: &#x60;configuration_set&#x60;, &#x60;owasp&#x60;.
463
+ # @return [Object]
464
+ def list_legacy_waf_firewalls_service(opts = {})
465
+ data, _status_code, _headers = list_legacy_waf_firewalls_service_with_http_info(opts)
466
+ data
467
+ end
468
+
469
+ # List firewalls
470
+ # List all firewall objects for a particular service and version.
471
+ # @option opts [String] :service_id Alphanumeric string identifying the service. (required)
472
+ # @option opts [Integer] :version_id Integer identifying a service version. (required)
473
+ # @option opts [Integer] :page_number Current page.
474
+ # @option opts [Integer] :page_size Number of records per page. (default to 20)
475
+ # @option opts [String] :include Include relationships. Optional, comma separated values. Permitted values: &#x60;configuration_set&#x60;, &#x60;owasp&#x60;.
476
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
477
+ def list_legacy_waf_firewalls_service_with_http_info(opts = {})
478
+ if @api_client.config.debugging
479
+ @api_client.config.logger.debug 'Calling API: LegacyWafFirewallApi.list_legacy_waf_firewalls_service ...'
480
+ end
481
+ # unbox the parameters from the hash
482
+ service_id = opts[:'service_id']
483
+ version_id = opts[:'version_id']
484
+ # verify the required parameter 'service_id' is set
485
+ if @api_client.config.client_side_validation && service_id.nil?
486
+ fail ArgumentError, "Missing the required parameter 'service_id' when calling LegacyWafFirewallApi.list_legacy_waf_firewalls_service"
487
+ end
488
+ # verify the required parameter 'version_id' is set
489
+ if @api_client.config.client_side_validation && version_id.nil?
490
+ fail ArgumentError, "Missing the required parameter 'version_id' when calling LegacyWafFirewallApi.list_legacy_waf_firewalls_service"
491
+ end
492
+ if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 100
493
+ fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling LegacyWafFirewallApi.list_legacy_waf_firewalls_service, must be smaller than or equal to 100.'
494
+ end
495
+
496
+ if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
497
+ fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling LegacyWafFirewallApi.list_legacy_waf_firewalls_service, must be greater than or equal to 1.'
498
+ end
499
+
500
+ # resource path
501
+ local_var_path = '/service/{service_id}/version/{version_id}/wafs'.sub('{' + 'service_id' + '}', CGI.escape(service_id.to_s)).sub('{' + 'version_id' + '}', CGI.escape(version_id.to_s))
502
+
503
+ # query parameters
504
+ query_params = opts[:query_params] || {}
505
+ query_params[:'page[number]'] = opts[:'page_number'] if !opts[:'page_number'].nil?
506
+ query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil?
507
+ query_params[:'include'] = opts[:'include'] if !opts[:'include'].nil?
508
+
509
+ # header parameters
510
+ header_params = opts[:header_params] || {}
511
+ # HTTP header 'Accept' (if needed)
512
+ header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json'])
513
+
514
+ # form parameters
515
+ form_params = opts[:form_params] || {}
516
+
517
+ # http body (model)
518
+ post_body = opts[:debug_body]
519
+
520
+ # return_type
521
+ return_type = opts[:debug_return_type] || 'Object'
522
+
523
+ # auth_names
524
+ auth_names = opts[:debug_auth_names] || ['token']
525
+
526
+ new_options = opts.merge(
527
+ :operation => :"LegacyWafFirewallApi.list_legacy_waf_firewalls_service",
528
+ :header_params => header_params,
529
+ :query_params => query_params,
530
+ :form_params => form_params,
531
+ :body => post_body,
532
+ :auth_names => auth_names,
533
+ :return_type => return_type
534
+ )
535
+
536
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
537
+ if @api_client.config.debugging
538
+ @api_client.config.logger.debug "API called: LegacyWafFirewallApi#list_legacy_waf_firewalls_service\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
539
+ end
540
+ return data, status_code, headers
541
+ end
542
+
543
+ # Update a firewall
544
+ # Update a firewall object for a particular service and version.
545
+ # @option opts [String] :service_id Alphanumeric string identifying the service. (required)
546
+ # @option opts [Integer] :version_id Integer identifying a service version. (required)
547
+ # @option opts [String] :firewall_id Alphanumeric string identifying a Firewall. (required)
548
+ # @option opts [Hash<String, Object>] :request_body
549
+ # @return [Object]
550
+ def update_legacy_waf_firewall_service(opts = {})
551
+ data, _status_code, _headers = update_legacy_waf_firewall_service_with_http_info(opts)
552
+ data
553
+ end
554
+
555
+ # Update a firewall
556
+ # Update a firewall object for a particular service and version.
557
+ # @option opts [String] :service_id Alphanumeric string identifying the service. (required)
558
+ # @option opts [Integer] :version_id Integer identifying a service version. (required)
559
+ # @option opts [String] :firewall_id Alphanumeric string identifying a Firewall. (required)
560
+ # @option opts [Hash<String, Object>] :request_body
561
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
562
+ def update_legacy_waf_firewall_service_with_http_info(opts = {})
563
+ if @api_client.config.debugging
564
+ @api_client.config.logger.debug 'Calling API: LegacyWafFirewallApi.update_legacy_waf_firewall_service ...'
565
+ end
566
+ # unbox the parameters from the hash
567
+ service_id = opts[:'service_id']
568
+ version_id = opts[:'version_id']
569
+ firewall_id = opts[:'firewall_id']
570
+ # verify the required parameter 'service_id' is set
571
+ if @api_client.config.client_side_validation && service_id.nil?
572
+ fail ArgumentError, "Missing the required parameter 'service_id' when calling LegacyWafFirewallApi.update_legacy_waf_firewall_service"
573
+ end
574
+ # verify the required parameter 'version_id' is set
575
+ if @api_client.config.client_side_validation && version_id.nil?
576
+ fail ArgumentError, "Missing the required parameter 'version_id' when calling LegacyWafFirewallApi.update_legacy_waf_firewall_service"
577
+ end
578
+ # verify the required parameter 'firewall_id' is set
579
+ if @api_client.config.client_side_validation && firewall_id.nil?
580
+ fail ArgumentError, "Missing the required parameter 'firewall_id' when calling LegacyWafFirewallApi.update_legacy_waf_firewall_service"
581
+ end
582
+ # resource path
583
+ local_var_path = '/service/{service_id}/version/{version_id}/wafs/{firewall_id}'.sub('{' + 'service_id' + '}', CGI.escape(service_id.to_s)).sub('{' + 'version_id' + '}', CGI.escape(version_id.to_s)).sub('{' + 'firewall_id' + '}', CGI.escape(firewall_id.to_s))
584
+
585
+ # query parameters
586
+ query_params = opts[:query_params] || {}
587
+
588
+ # header parameters
589
+ header_params = opts[:header_params] || {}
590
+ # HTTP header 'Accept' (if needed)
591
+ header_params['Accept'] = @api_client.select_header_accept(['application/vnd.api+json'])
592
+ # HTTP header 'Content-Type'
593
+ content_type = @api_client.select_header_content_type(['application/vnd.api+json'])
594
+ if !content_type.nil?
595
+ header_params['Content-Type'] = content_type
596
+ end
597
+
598
+ # form parameters
599
+ form_params = opts[:form_params] || {}
600
+
601
+ # http body (model)
602
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'request_body'])
603
+
604
+ # return_type
605
+ return_type = opts[:debug_return_type] || 'Object'
606
+
607
+ # auth_names
608
+ auth_names = opts[:debug_auth_names] || ['token']
609
+
610
+ new_options = opts.merge(
611
+ :operation => :"LegacyWafFirewallApi.update_legacy_waf_firewall_service",
612
+ :header_params => header_params,
613
+ :query_params => query_params,
614
+ :form_params => form_params,
615
+ :body => post_body,
616
+ :auth_names => auth_names,
617
+ :return_type => return_type
618
+ )
619
+
620
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
621
+ if @api_client.config.debugging
622
+ @api_client.config.logger.debug "API called: LegacyWafFirewallApi#update_legacy_waf_firewall_service\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
623
+ end
624
+ return data, status_code, headers
625
+ end
626
+ end
627
+ end