fastly 9.0.0 → 10.0.0

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.
Files changed (289) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +42 -19
  3. data/Gemfile.lock +3 -3
  4. data/README.md +49 -42
  5. data/docs/AclsInComputeApi.md +2 -2
  6. data/docs/AiAcceleratorResponseBodyEnable.md +12 -0
  7. data/docs/AiAcceleratorResponseCustomer.md +10 -0
  8. data/docs/AiAcceleratorResponseCustomerCustomer.md +11 -0
  9. data/docs/AiAcceleratorResponseLinks.md +10 -0
  10. data/docs/AiAcceleratorResponseLinksLinks.md +10 -0
  11. data/docs/AiAcceleratorResponseProduct.md +10 -0
  12. data/docs/AiAcceleratorResponseProductProduct.md +11 -0
  13. data/docs/Backend.md +1 -1
  14. data/docs/BackendApi.md +4 -4
  15. data/docs/BackendResponse.md +1 -1
  16. data/docs/BillingUsageMetricsApi.md +8 -8
  17. data/docs/BotManagementResponseBodyEnable.md +12 -0
  18. data/docs/BotManagementResponseLinks.md +10 -0
  19. data/docs/BotManagementResponseLinksLinks.md +11 -0
  20. data/docs/BotManagementResponseProduct.md +10 -0
  21. data/docs/BotManagementResponseProductProduct.md +11 -0
  22. data/docs/BotManagementResponseService.md +10 -0
  23. data/docs/{EnabledProductResponseService.md → BotManagementResponseServiceService.md} +1 -1
  24. data/docs/BrotliCompressionResponseBodyEnable.md +12 -0
  25. data/docs/BrotliCompressionResponseLinks.md +10 -0
  26. data/docs/BrotliCompressionResponseLinksLinks.md +11 -0
  27. data/docs/BrotliCompressionResponseProduct.md +10 -0
  28. data/docs/BrotliCompressionResponseProductProduct.md +11 -0
  29. data/docs/BrotliCompressionResponseService.md +10 -0
  30. data/docs/ComputeAclList.md +11 -0
  31. data/docs/{ReadOnlyServiceId.md → ComputeAclListMeta.md} +2 -1
  32. data/docs/ComputeAclLookup.md +1 -2
  33. data/docs/{ReadOnlyVersion.md → DdosProtectionRequestUpdateConfiguration.md} +2 -1
  34. data/docs/DdosProtectionResponseConfiguration.md +10 -0
  35. data/docs/{Store.md → DdosProtectionResponseConfigurationConfiguration.md} +2 -2
  36. data/docs/DdosProtectionResponseConfigure.md +13 -0
  37. data/docs/DdosProtectionResponseEnable.md +12 -0
  38. data/docs/DdosProtectionResponseLinks.md +10 -0
  39. data/docs/DdosProtectionResponseLinksLinks.md +11 -0
  40. data/docs/DdosProtectionResponseProduct.md +10 -0
  41. data/docs/DdosProtectionResponseProductProduct.md +11 -0
  42. data/docs/DdosProtectionResponseService.md +10 -0
  43. data/docs/DomainInspectorMeasurements.md +2 -0
  44. data/docs/DomainInspectorResponseBodyEnable.md +12 -0
  45. data/docs/DomainInspectorResponseLinks.md +10 -0
  46. data/docs/DomainInspectorResponseLinksLinks.md +11 -0
  47. data/docs/DomainInspectorResponseProduct.md +10 -0
  48. data/docs/{InlineResponse2003Meta.md → DomainInspectorResponseProductProduct.md} +3 -3
  49. data/docs/DomainInspectorResponseService.md +10 -0
  50. data/docs/FanoutResponseBodyEnable.md +12 -0
  51. data/docs/FanoutResponseLinks.md +10 -0
  52. data/docs/{EnabledProductResponseLinks.md → FanoutResponseLinksLinks.md} +1 -1
  53. data/docs/FanoutResponseProduct.md +10 -0
  54. data/docs/{EnabledProductResponseProduct.md → FanoutResponseProductProduct.md} +1 -1
  55. data/docs/FanoutResponseService.md +10 -0
  56. data/docs/ImageOptimizerResponseBodyEnable.md +12 -0
  57. data/docs/ImageOptimizerResponseLinks.md +10 -0
  58. data/docs/ImageOptimizerResponseLinksLinks.md +11 -0
  59. data/docs/ImageOptimizerResponseProduct.md +10 -0
  60. data/docs/ImageOptimizerResponseProductProduct.md +11 -0
  61. data/docs/ImageOptimizerResponseService.md +10 -0
  62. data/docs/InlineResponse2003.md +2 -2
  63. data/docs/InlineResponse2004.md +1 -1
  64. data/docs/KvStoreApi.md +30 -30
  65. data/docs/{Batch.md → KvStoreBatchResponse.md} +2 -2
  66. data/docs/{BatchErrors.md → KvStoreBatchResponseErrors.md} +4 -4
  67. data/docs/{StoreResponse.md → KvStoreDetails.md} +2 -2
  68. data/docs/KvStoreItemApi.md +55 -52
  69. data/docs/KvStoreRequestCreate.md +10 -0
  70. data/docs/KvStoreUpsertBatch.md +14 -0
  71. data/docs/LogExplorerInsightsResponseBodyEnable.md +12 -0
  72. data/docs/LogExplorerInsightsResponseLinks.md +10 -0
  73. data/docs/LogExplorerInsightsResponseLinksLinks.md +11 -0
  74. data/docs/LogExplorerInsightsResponseProduct.md +10 -0
  75. data/docs/LogExplorerInsightsResponseProductProduct.md +11 -0
  76. data/docs/LogExplorerInsightsResponseService.md +10 -0
  77. data/docs/{LegacyWafTag.md → NgwafRequestEnable.md} +2 -2
  78. data/docs/NgwafRequestUpdateConfiguration.md +11 -0
  79. data/docs/NgwafResponseConfiguration.md +10 -0
  80. data/docs/{ConfiguredProductResponseConfiguration.md → NgwafResponseConfigurationConfiguration.md} +2 -2
  81. data/docs/NgwafResponseConfigure.md +13 -0
  82. data/docs/NgwafResponseEnable.md +12 -0
  83. data/docs/NgwafResponseLinks.md +10 -0
  84. data/docs/{ConfiguredProductResponseLinks.md → NgwafResponseLinksLinks.md} +1 -1
  85. data/docs/{InlineResponse2004Meta.md → NgwafResponseProduct.md} +2 -3
  86. data/docs/{ConfiguredProductResponseProduct.md → NgwafResponseProductProduct.md} +1 -1
  87. data/docs/NgwafResponseService.md +10 -0
  88. data/docs/ObjectStorageResponseBodyEnable.md +12 -0
  89. data/docs/ObjectStorageResponseCustomer.md +10 -0
  90. data/docs/ObjectStorageResponseLinks.md +10 -0
  91. data/docs/ObjectStorageResponseLinksLinks.md +10 -0
  92. data/docs/ObjectStorageResponseProduct.md +10 -0
  93. data/docs/ObjectStorageResponseProductProduct.md +11 -0
  94. data/docs/OriginInspectorMeasurements.md +4 -0
  95. data/docs/OriginInspectorResponseBodyEnable.md +12 -0
  96. data/docs/OriginInspectorResponseLinks.md +10 -0
  97. data/docs/OriginInspectorResponseLinksLinks.md +11 -0
  98. data/docs/OriginInspectorResponseProduct.md +10 -0
  99. data/docs/OriginInspectorResponseProductProduct.md +11 -0
  100. data/docs/OriginInspectorResponseService.md +10 -0
  101. data/docs/OriginInspectorValues.md +4 -0
  102. data/docs/ProductAiAcceleratorApi.md +115 -0
  103. data/docs/ProductBotManagementApi.md +130 -0
  104. data/docs/ProductBrotliCompressionApi.md +130 -0
  105. data/docs/ProductDdosProtectionApi.md +208 -0
  106. data/docs/ProductDomainInspectorApi.md +130 -0
  107. data/docs/ProductFanoutApi.md +130 -0
  108. data/docs/ProductImageOptimizerApi.md +130 -0
  109. data/docs/ProductLogExplorerInsightsApi.md +130 -0
  110. data/docs/ProductNgwafApi.md +210 -0
  111. data/docs/ProductObjectStorageApi.md +115 -0
  112. data/docs/ProductOriginInspectorApi.md +130 -0
  113. data/docs/ProductWebsocketsApi.md +130 -0
  114. data/docs/RealtimeEntryAggregated.md +18 -3
  115. data/docs/RealtimeMeasurements.md +18 -3
  116. data/docs/Results.md +18 -3
  117. data/docs/SnippetApi.md +15 -15
  118. data/docs/Values.md +2 -0
  119. data/docs/WebsocketsResponseBodyEnable.md +12 -0
  120. data/docs/WebsocketsResponseLinks.md +10 -0
  121. data/docs/WebsocketsResponseLinksLinks.md +11 -0
  122. data/docs/WebsocketsResponseProduct.md +10 -0
  123. data/docs/WebsocketsResponseProductProduct.md +11 -0
  124. data/docs/WebsocketsResponseService.md +10 -0
  125. data/lib/fastly/api/acls_in_compute_api.rb +3 -3
  126. data/lib/fastly/api/backend_api.rb +4 -4
  127. data/lib/fastly/api/billing_usage_metrics_api.rb +26 -26
  128. data/lib/fastly/api/kv_store_api.rb +53 -45
  129. data/lib/fastly/api/kv_store_item_api.rb +114 -102
  130. data/lib/fastly/api/product_ai_accelerator_api.rb +186 -0
  131. data/lib/fastly/api/product_bot_management_api.rb +207 -0
  132. data/lib/fastly/api/product_brotli_compression_api.rb +207 -0
  133. data/lib/fastly/api/product_ddos_protection_api.rb +340 -0
  134. data/lib/fastly/api/product_domain_inspector_api.rb +207 -0
  135. data/lib/fastly/api/product_fanout_api.rb +207 -0
  136. data/lib/fastly/api/product_image_optimizer_api.rb +207 -0
  137. data/lib/fastly/api/product_log_explorer_insights_api.rb +207 -0
  138. data/lib/fastly/api/product_ngwaf_api.rb +347 -0
  139. data/lib/fastly/api/product_object_storage_api.rb +186 -0
  140. data/lib/fastly/api/product_origin_inspector_api.rb +207 -0
  141. data/lib/fastly/api/product_websockets_api.rb +207 -0
  142. data/lib/fastly/api/snippet_api.rb +35 -35
  143. data/lib/fastly/configuration.rb +248 -206
  144. data/lib/fastly/models/{legacy_waf_rule_status.rb → ai_accelerator_response_body_enable.rb} +31 -25
  145. data/lib/fastly/models/ai_accelerator_response_customer.rb +216 -0
  146. data/lib/fastly/models/ai_accelerator_response_customer_customer.rb +227 -0
  147. data/lib/fastly/models/ai_accelerator_response_links.rb +216 -0
  148. data/lib/fastly/models/ai_accelerator_response_links_links.rb +217 -0
  149. data/lib/fastly/models/ai_accelerator_response_product.rb +216 -0
  150. data/lib/fastly/models/ai_accelerator_response_product_product.rb +227 -0
  151. data/lib/fastly/models/backend.rb +1 -1
  152. data/lib/fastly/models/backend_response.rb +1 -1
  153. data/lib/fastly/models/bot_management_response_body_enable.rb +243 -0
  154. data/lib/fastly/models/bot_management_response_links.rb +216 -0
  155. data/lib/fastly/models/bot_management_response_links_links.rb +227 -0
  156. data/lib/fastly/models/bot_management_response_product.rb +216 -0
  157. data/lib/fastly/models/bot_management_response_product_product.rb +227 -0
  158. data/lib/fastly/models/bot_management_response_service.rb +216 -0
  159. data/lib/fastly/models/{enabled_product_response_service.rb → bot_management_response_service_service.rb} +3 -3
  160. data/lib/fastly/models/brotli_compression_response_body_enable.rb +243 -0
  161. data/lib/fastly/models/brotli_compression_response_links.rb +216 -0
  162. data/lib/fastly/models/brotli_compression_response_links_links.rb +227 -0
  163. data/lib/fastly/models/brotli_compression_response_product.rb +216 -0
  164. data/lib/fastly/models/brotli_compression_response_product_product.rb +227 -0
  165. data/lib/fastly/models/brotli_compression_response_service.rb +216 -0
  166. data/lib/fastly/models/{inline_response2004_meta.rb → compute_acl_list.rb} +19 -16
  167. data/lib/fastly/models/compute_acl_list_meta.rb +218 -0
  168. data/lib/fastly/models/compute_acl_lookup.rb +2 -12
  169. data/lib/fastly/models/{set_configuration.rb → ddos_protection_request_update_configuration.rb} +43 -24
  170. data/lib/fastly/models/ddos_protection_response_configuration.rb +216 -0
  171. data/lib/fastly/models/ddos_protection_response_configuration_configuration.rb +217 -0
  172. data/lib/fastly/models/ddos_protection_response_configure.rb +253 -0
  173. data/lib/fastly/models/ddos_protection_response_enable.rb +243 -0
  174. data/lib/fastly/models/ddos_protection_response_links.rb +216 -0
  175. data/lib/fastly/models/ddos_protection_response_links_links.rb +227 -0
  176. data/lib/fastly/models/ddos_protection_response_product.rb +216 -0
  177. data/lib/fastly/models/ddos_protection_response_product_product.rb +227 -0
  178. data/lib/fastly/models/ddos_protection_response_service.rb +216 -0
  179. data/lib/fastly/models/domain_inspector_measurements.rb +21 -1
  180. data/lib/fastly/models/domain_inspector_response_body_enable.rb +243 -0
  181. data/lib/fastly/models/domain_inspector_response_links.rb +216 -0
  182. data/lib/fastly/models/domain_inspector_response_links_links.rb +227 -0
  183. data/lib/fastly/models/domain_inspector_response_product.rb +216 -0
  184. data/lib/fastly/models/domain_inspector_response_product_product.rb +227 -0
  185. data/lib/fastly/models/domain_inspector_response_service.rb +216 -0
  186. data/lib/fastly/models/fanout_response_body_enable.rb +243 -0
  187. data/lib/fastly/models/{store.rb → fanout_response_links.rb} +10 -11
  188. data/lib/fastly/models/{enabled_product_response_links.rb → fanout_response_links_links.rb} +3 -3
  189. data/lib/fastly/models/fanout_response_product.rb +216 -0
  190. data/lib/fastly/models/{enabled_product_response_product.rb → fanout_response_product_product.rb} +3 -3
  191. data/lib/fastly/models/fanout_response_service.rb +216 -0
  192. data/lib/fastly/models/image_optimizer_response_body_enable.rb +243 -0
  193. data/lib/fastly/models/image_optimizer_response_links.rb +216 -0
  194. data/lib/fastly/models/image_optimizer_response_links_links.rb +227 -0
  195. data/lib/fastly/models/image_optimizer_response_product.rb +216 -0
  196. data/lib/fastly/models/image_optimizer_response_product_product.rb +227 -0
  197. data/lib/fastly/models/image_optimizer_response_service.rb +216 -0
  198. data/lib/fastly/models/inline_response2003.rb +2 -2
  199. data/lib/fastly/models/inline_response2004.rb +1 -1
  200. data/lib/fastly/models/{batch.rb → kv_store_batch_response.rb} +5 -5
  201. data/lib/fastly/models/{batch_errors.rb → kv_store_batch_response_errors.rb} +6 -6
  202. data/lib/fastly/models/{store_response.rb → kv_store_details.rb} +4 -4
  203. data/lib/fastly/models/{legacy_waf_configuration_set.rb → kv_store_request_create.rb} +10 -15
  204. data/lib/fastly/models/{legacy_waf_update_status.rb → kv_store_upsert_batch.rb} +51 -49
  205. data/lib/fastly/models/log_explorer_insights_response_body_enable.rb +243 -0
  206. data/lib/fastly/models/log_explorer_insights_response_links.rb +216 -0
  207. data/lib/fastly/models/log_explorer_insights_response_links_links.rb +227 -0
  208. data/lib/fastly/models/log_explorer_insights_response_product.rb +216 -0
  209. data/lib/fastly/models/log_explorer_insights_response_product_product.rb +227 -0
  210. data/lib/fastly/models/log_explorer_insights_response_service.rb +216 -0
  211. data/lib/fastly/models/{set_workspace_id.rb → ngwaf_request_enable.rb} +9 -4
  212. data/lib/fastly/models/ngwaf_request_update_configuration.rb +227 -0
  213. data/lib/fastly/models/ngwaf_response_configuration.rb +216 -0
  214. data/lib/fastly/models/{configured_product_response_configuration.rb → ngwaf_response_configuration_configuration.rb} +4 -4
  215. data/lib/fastly/models/{configured_product_response.rb → ngwaf_response_configure.rb} +17 -7
  216. data/lib/fastly/models/{enabled_product_response.rb → ngwaf_response_enable.rb} +15 -6
  217. data/lib/fastly/models/{legacy_waf_tag.rb → ngwaf_response_links.rb} +10 -11
  218. data/lib/fastly/models/{configured_product_response_links.rb → ngwaf_response_links_links.rb} +3 -3
  219. data/lib/fastly/models/{read_only_version.rb → ngwaf_response_product.rb} +14 -5
  220. data/lib/fastly/models/ngwaf_response_product_product.rb +227 -0
  221. data/lib/fastly/models/ngwaf_response_service.rb +216 -0
  222. data/lib/fastly/models/object_storage_response_body_enable.rb +243 -0
  223. data/lib/fastly/models/object_storage_response_customer.rb +216 -0
  224. data/lib/fastly/models/object_storage_response_links.rb +216 -0
  225. data/lib/fastly/models/object_storage_response_links_links.rb +217 -0
  226. data/lib/fastly/models/object_storage_response_product.rb +216 -0
  227. data/lib/fastly/models/object_storage_response_product_product.rb +227 -0
  228. data/lib/fastly/models/origin_inspector_measurements.rb +41 -1
  229. data/lib/fastly/models/origin_inspector_response_body_enable.rb +243 -0
  230. data/lib/fastly/models/origin_inspector_response_links.rb +216 -0
  231. data/lib/fastly/models/origin_inspector_response_links_links.rb +227 -0
  232. data/lib/fastly/models/origin_inspector_response_product.rb +216 -0
  233. data/lib/fastly/models/origin_inspector_response_product_product.rb +227 -0
  234. data/lib/fastly/models/origin_inspector_response_service.rb +216 -0
  235. data/lib/fastly/models/origin_inspector_values.rb +41 -1
  236. data/lib/fastly/models/realtime_entry_aggregated.rb +169 -19
  237. data/lib/fastly/models/realtime_measurements.rb +169 -19
  238. data/lib/fastly/models/results.rb +169 -19
  239. data/lib/fastly/models/schemas_snippet_response.rb +1 -0
  240. data/lib/fastly/models/snippet.rb +1 -0
  241. data/lib/fastly/models/snippet_common.rb +1 -0
  242. data/lib/fastly/models/snippet_response.rb +1 -0
  243. data/lib/fastly/models/snippet_response_post.rb +1 -0
  244. data/lib/fastly/models/snippet_with_dynamic_number.rb +1 -0
  245. data/lib/fastly/models/values.rb +21 -1
  246. data/lib/fastly/models/websockets_response_body_enable.rb +243 -0
  247. data/lib/fastly/models/{read_only_service_id.rb → websockets_response_links.rb} +14 -5
  248. data/lib/fastly/models/websockets_response_links_links.rb +227 -0
  249. data/lib/fastly/models/websockets_response_product.rb +216 -0
  250. data/lib/fastly/models/{configured_product_response_product.rb → websockets_response_product_product.rb} +3 -3
  251. data/lib/fastly/models/websockets_response_service.rb +216 -0
  252. data/lib/fastly/version.rb +1 -1
  253. data/lib/fastly.rb +102 -35
  254. data/sig.json +1 -1
  255. metadata +209 -75
  256. data/docs/ConfiguredProductResponse.md +0 -13
  257. data/docs/EnabledProductResponse.md +0 -12
  258. data/docs/EnabledProductsApi.md +0 -220
  259. data/docs/LegacyWafConfigurationSet.md +0 -11
  260. data/docs/LegacyWafConfigurationSetsApi.md +0 -128
  261. data/docs/LegacyWafFirewall.md +0 -18
  262. data/docs/LegacyWafFirewallApi.md +0 -355
  263. data/docs/LegacyWafOwasp.md +0 -38
  264. data/docs/LegacyWafOwaspApi.md +0 -141
  265. data/docs/LegacyWafRule.md +0 -14
  266. data/docs/LegacyWafRuleApi.md +0 -187
  267. data/docs/LegacyWafRuleStatus.md +0 -12
  268. data/docs/LegacyWafRuleStatusApi.md +0 -205
  269. data/docs/LegacyWafRuleset.md +0 -11
  270. data/docs/LegacyWafRulesetApi.md +0 -139
  271. data/docs/LegacyWafTagApi.md +0 -61
  272. data/docs/LegacyWafUpdateStatus.md +0 -15
  273. data/docs/LegacyWafUpdateStatusApi.md +0 -105
  274. data/docs/SetConfiguration.md +0 -12
  275. data/docs/SetWorkspaceId.md +0 -10
  276. data/lib/fastly/api/enabled_products_api.rb +0 -382
  277. data/lib/fastly/api/legacy_waf_configuration_sets_api.rb +0 -209
  278. data/lib/fastly/api/legacy_waf_firewall_api.rb +0 -627
  279. data/lib/fastly/api/legacy_waf_owasp_api.rb +0 -244
  280. data/lib/fastly/api/legacy_waf_rule_api.rb +0 -307
  281. data/lib/fastly/api/legacy_waf_rule_status_api.rb +0 -366
  282. data/lib/fastly/api/legacy_waf_ruleset_api.rb +0 -237
  283. data/lib/fastly/api/legacy_waf_tag_api.rb +0 -96
  284. data/lib/fastly/api/legacy_waf_update_status_api.rb +0 -184
  285. data/lib/fastly/models/inline_response2003_meta.rb +0 -228
  286. data/lib/fastly/models/legacy_waf_firewall.rb +0 -297
  287. data/lib/fastly/models/legacy_waf_owasp.rb +0 -527
  288. data/lib/fastly/models/legacy_waf_rule.rb +0 -257
  289. data/lib/fastly/models/legacy_waf_ruleset.rb +0 -227
@@ -0,0 +1,340 @@
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://www.fastly.com/documentation/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 ProductDdosProtectionApi
15
+ attr_accessor :api_client
16
+
17
+ def initialize(api_client = ApiClient.default)
18
+ @api_client = api_client
19
+ end
20
+ # Disable product
21
+ # Disable the DDoS Protection product on a service.
22
+ # @option opts [String] :service_id Alphanumeric string identifying the service. (required)
23
+ # @return [nil]
24
+ def disable_product_ddos_protection(opts = {})
25
+ disable_product_ddos_protection_with_http_info(opts)
26
+ nil
27
+ end
28
+
29
+ # Disable product
30
+ # Disable the DDoS Protection product on a service.
31
+ # @option opts [String] :service_id Alphanumeric string identifying the service. (required)
32
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
33
+ def disable_product_ddos_protection_with_http_info(opts = {})
34
+ if @api_client.config.debugging
35
+ @api_client.config.logger.debug 'Calling API: ProductDdosProtectionApi.disable_product_ddos_protection ...'
36
+ end
37
+ # unbox the parameters from the hash
38
+ service_id = opts[:'service_id']
39
+ # verify the required parameter 'service_id' is set
40
+ if @api_client.config.client_side_validation && service_id.nil?
41
+ fail ArgumentError, "Missing the required parameter 'service_id' when calling ProductDdosProtectionApi.disable_product_ddos_protection"
42
+ end
43
+ # resource path
44
+ local_var_path = '/enabled-products/v1/ddos_protection/services/{service_id}'.sub('{' + 'service_id' + '}', CGI.escape(service_id.to_s))
45
+
46
+ # query parameters
47
+ query_params = opts[:query_params] || {}
48
+
49
+ # header parameters
50
+ header_params = opts[:header_params] || {}
51
+
52
+ # form parameters
53
+ form_params = opts[:form_params] || {}
54
+
55
+ # http body (model)
56
+ post_body = opts[:debug_body]
57
+
58
+ # return_type
59
+ return_type = opts[:debug_return_type]
60
+
61
+ # auth_names
62
+ auth_names = opts[:debug_auth_names] || ['token']
63
+
64
+ new_options = opts.merge(
65
+ :operation => :"ProductDdosProtectionApi.disable_product_ddos_protection",
66
+ :header_params => header_params,
67
+ :query_params => query_params,
68
+ :form_params => form_params,
69
+ :body => post_body,
70
+ :auth_names => auth_names,
71
+ :return_type => return_type
72
+ )
73
+
74
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
75
+ if @api_client.config.debugging
76
+ @api_client.config.logger.debug "API called: ProductDdosProtectionApi#disable_product_ddos_protection\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
77
+ end
78
+ return data, status_code, headers
79
+ end
80
+
81
+ # Enable product
82
+ # Enable the DDoS Protection product on a service.
83
+ # @option opts [String] :service_id Alphanumeric string identifying the service. (required)
84
+ # @return [DdosProtectionResponseEnable]
85
+ def enable_product_ddos_protection(opts = {})
86
+ data, _status_code, _headers = enable_product_ddos_protection_with_http_info(opts)
87
+ data
88
+ end
89
+
90
+ # Enable product
91
+ # Enable the DDoS Protection product on a service.
92
+ # @option opts [String] :service_id Alphanumeric string identifying the service. (required)
93
+ # @return [Array<(DdosProtectionResponseEnable, Integer, Hash)>] DdosProtectionResponseEnable data, response status code and response headers
94
+ def enable_product_ddos_protection_with_http_info(opts = {})
95
+ if @api_client.config.debugging
96
+ @api_client.config.logger.debug 'Calling API: ProductDdosProtectionApi.enable_product_ddos_protection ...'
97
+ end
98
+ # unbox the parameters from the hash
99
+ service_id = opts[:'service_id']
100
+ # verify the required parameter 'service_id' is set
101
+ if @api_client.config.client_side_validation && service_id.nil?
102
+ fail ArgumentError, "Missing the required parameter 'service_id' when calling ProductDdosProtectionApi.enable_product_ddos_protection"
103
+ end
104
+ # resource path
105
+ local_var_path = '/enabled-products/v1/ddos_protection/services/{service_id}'.sub('{' + 'service_id' + '}', CGI.escape(service_id.to_s))
106
+
107
+ # query parameters
108
+ query_params = opts[:query_params] || {}
109
+
110
+ # header parameters
111
+ header_params = opts[:header_params] || {}
112
+ # HTTP header 'Accept' (if needed)
113
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
114
+
115
+ # form parameters
116
+ form_params = opts[:form_params] || {}
117
+
118
+ # http body (model)
119
+ post_body = opts[:debug_body]
120
+
121
+ # return_type
122
+ return_type = opts[:debug_return_type] || 'DdosProtectionResponseEnable'
123
+
124
+ # auth_names
125
+ auth_names = opts[:debug_auth_names] || ['token']
126
+
127
+ new_options = opts.merge(
128
+ :operation => :"ProductDdosProtectionApi.enable_product_ddos_protection",
129
+ :header_params => header_params,
130
+ :query_params => query_params,
131
+ :form_params => form_params,
132
+ :body => post_body,
133
+ :auth_names => auth_names,
134
+ :return_type => return_type
135
+ )
136
+
137
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
138
+ if @api_client.config.debugging
139
+ @api_client.config.logger.debug "API called: ProductDdosProtectionApi#enable_product_ddos_protection\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
140
+ end
141
+ return data, status_code, headers
142
+ end
143
+
144
+ # Get product enablement status
145
+ # Get the enablement status of the DDoS Protection product on a service.
146
+ # @option opts [String] :service_id Alphanumeric string identifying the service. (required)
147
+ # @return [DdosProtectionResponseEnable]
148
+ def get_product_ddos_protection(opts = {})
149
+ data, _status_code, _headers = get_product_ddos_protection_with_http_info(opts)
150
+ data
151
+ end
152
+
153
+ # Get product enablement status
154
+ # Get the enablement status of the DDoS Protection product on a service.
155
+ # @option opts [String] :service_id Alphanumeric string identifying the service. (required)
156
+ # @return [Array<(DdosProtectionResponseEnable, Integer, Hash)>] DdosProtectionResponseEnable data, response status code and response headers
157
+ def get_product_ddos_protection_with_http_info(opts = {})
158
+ if @api_client.config.debugging
159
+ @api_client.config.logger.debug 'Calling API: ProductDdosProtectionApi.get_product_ddos_protection ...'
160
+ end
161
+ # unbox the parameters from the hash
162
+ service_id = opts[:'service_id']
163
+ # verify the required parameter 'service_id' is set
164
+ if @api_client.config.client_side_validation && service_id.nil?
165
+ fail ArgumentError, "Missing the required parameter 'service_id' when calling ProductDdosProtectionApi.get_product_ddos_protection"
166
+ end
167
+ # resource path
168
+ local_var_path = '/enabled-products/v1/ddos_protection/services/{service_id}'.sub('{' + 'service_id' + '}', CGI.escape(service_id.to_s))
169
+
170
+ # query parameters
171
+ query_params = opts[:query_params] || {}
172
+
173
+ # header parameters
174
+ header_params = opts[:header_params] || {}
175
+ # HTTP header 'Accept' (if needed)
176
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
177
+
178
+ # form parameters
179
+ form_params = opts[:form_params] || {}
180
+
181
+ # http body (model)
182
+ post_body = opts[:debug_body]
183
+
184
+ # return_type
185
+ return_type = opts[:debug_return_type] || 'DdosProtectionResponseEnable'
186
+
187
+ # auth_names
188
+ auth_names = opts[:debug_auth_names] || ['token']
189
+
190
+ new_options = opts.merge(
191
+ :operation => :"ProductDdosProtectionApi.get_product_ddos_protection",
192
+ :header_params => header_params,
193
+ :query_params => query_params,
194
+ :form_params => form_params,
195
+ :body => post_body,
196
+ :auth_names => auth_names,
197
+ :return_type => return_type
198
+ )
199
+
200
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
201
+ if @api_client.config.debugging
202
+ @api_client.config.logger.debug "API called: ProductDdosProtectionApi#get_product_ddos_protection\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
203
+ end
204
+ return data, status_code, headers
205
+ end
206
+
207
+ # Get configuration
208
+ # Get configuration of the DDoS Protection product on a service.
209
+ # @option opts [String] :service_id Alphanumeric string identifying the service. (required)
210
+ # @return [DdosProtectionResponseConfigure]
211
+ def get_product_ddos_protection_configuration(opts = {})
212
+ data, _status_code, _headers = get_product_ddos_protection_configuration_with_http_info(opts)
213
+ data
214
+ end
215
+
216
+ # Get configuration
217
+ # Get configuration of the DDoS Protection product on a service.
218
+ # @option opts [String] :service_id Alphanumeric string identifying the service. (required)
219
+ # @return [Array<(DdosProtectionResponseConfigure, Integer, Hash)>] DdosProtectionResponseConfigure data, response status code and response headers
220
+ def get_product_ddos_protection_configuration_with_http_info(opts = {})
221
+ if @api_client.config.debugging
222
+ @api_client.config.logger.debug 'Calling API: ProductDdosProtectionApi.get_product_ddos_protection_configuration ...'
223
+ end
224
+ # unbox the parameters from the hash
225
+ service_id = opts[:'service_id']
226
+ # verify the required parameter 'service_id' is set
227
+ if @api_client.config.client_side_validation && service_id.nil?
228
+ fail ArgumentError, "Missing the required parameter 'service_id' when calling ProductDdosProtectionApi.get_product_ddos_protection_configuration"
229
+ end
230
+ # resource path
231
+ local_var_path = '/enabled-products/v1/ddos_protection/services/{service_id}/configuration'.sub('{' + 'service_id' + '}', CGI.escape(service_id.to_s))
232
+
233
+ # query parameters
234
+ query_params = opts[:query_params] || {}
235
+
236
+ # header parameters
237
+ header_params = opts[:header_params] || {}
238
+ # HTTP header 'Accept' (if needed)
239
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
240
+
241
+ # form parameters
242
+ form_params = opts[:form_params] || {}
243
+
244
+ # http body (model)
245
+ post_body = opts[:debug_body]
246
+
247
+ # return_type
248
+ return_type = opts[:debug_return_type] || 'DdosProtectionResponseConfigure'
249
+
250
+ # auth_names
251
+ auth_names = opts[:debug_auth_names] || ['token']
252
+
253
+ new_options = opts.merge(
254
+ :operation => :"ProductDdosProtectionApi.get_product_ddos_protection_configuration",
255
+ :header_params => header_params,
256
+ :query_params => query_params,
257
+ :form_params => form_params,
258
+ :body => post_body,
259
+ :auth_names => auth_names,
260
+ :return_type => return_type
261
+ )
262
+
263
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
264
+ if @api_client.config.debugging
265
+ @api_client.config.logger.debug "API called: ProductDdosProtectionApi#get_product_ddos_protection_configuration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
266
+ end
267
+ return data, status_code, headers
268
+ end
269
+
270
+ # Update configuration
271
+ # Update configuration of the DDoS Protection product on a service.
272
+ # @option opts [String] :service_id Alphanumeric string identifying the service. (required)
273
+ # @option opts [DdosProtectionRequestUpdateConfiguration] :ddos_protection_request_update_configuration
274
+ # @return [DdosProtectionResponseConfigure]
275
+ def set_product_ddos_protection_configuration(opts = {})
276
+ data, _status_code, _headers = set_product_ddos_protection_configuration_with_http_info(opts)
277
+ data
278
+ end
279
+
280
+ # Update configuration
281
+ # Update configuration of the DDoS Protection product on a service.
282
+ # @option opts [String] :service_id Alphanumeric string identifying the service. (required)
283
+ # @option opts [DdosProtectionRequestUpdateConfiguration] :ddos_protection_request_update_configuration
284
+ # @return [Array<(DdosProtectionResponseConfigure, Integer, Hash)>] DdosProtectionResponseConfigure data, response status code and response headers
285
+ def set_product_ddos_protection_configuration_with_http_info(opts = {})
286
+ if @api_client.config.debugging
287
+ @api_client.config.logger.debug 'Calling API: ProductDdosProtectionApi.set_product_ddos_protection_configuration ...'
288
+ end
289
+ # unbox the parameters from the hash
290
+ service_id = opts[:'service_id']
291
+ # verify the required parameter 'service_id' is set
292
+ if @api_client.config.client_side_validation && service_id.nil?
293
+ fail ArgumentError, "Missing the required parameter 'service_id' when calling ProductDdosProtectionApi.set_product_ddos_protection_configuration"
294
+ end
295
+ # resource path
296
+ local_var_path = '/enabled-products/v1/ddos_protection/services/{service_id}/configuration'.sub('{' + 'service_id' + '}', CGI.escape(service_id.to_s))
297
+
298
+ # query parameters
299
+ query_params = opts[:query_params] || {}
300
+
301
+ # header parameters
302
+ header_params = opts[:header_params] || {}
303
+ # HTTP header 'Accept' (if needed)
304
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
305
+ # HTTP header 'Content-Type'
306
+ content_type = @api_client.select_header_content_type(['application/json'])
307
+ if !content_type.nil?
308
+ header_params['Content-Type'] = content_type
309
+ end
310
+
311
+ # form parameters
312
+ form_params = opts[:form_params] || {}
313
+
314
+ # http body (model)
315
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'ddos_protection_request_update_configuration'])
316
+
317
+ # return_type
318
+ return_type = opts[:debug_return_type] || 'DdosProtectionResponseConfigure'
319
+
320
+ # auth_names
321
+ auth_names = opts[:debug_auth_names] || ['token']
322
+
323
+ new_options = opts.merge(
324
+ :operation => :"ProductDdosProtectionApi.set_product_ddos_protection_configuration",
325
+ :header_params => header_params,
326
+ :query_params => query_params,
327
+ :form_params => form_params,
328
+ :body => post_body,
329
+ :auth_names => auth_names,
330
+ :return_type => return_type
331
+ )
332
+
333
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
334
+ if @api_client.config.debugging
335
+ @api_client.config.logger.debug "API called: ProductDdosProtectionApi#set_product_ddos_protection_configuration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
336
+ end
337
+ return data, status_code, headers
338
+ end
339
+ end
340
+ end
@@ -0,0 +1,207 @@
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://www.fastly.com/documentation/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 ProductDomainInspectorApi
15
+ attr_accessor :api_client
16
+
17
+ def initialize(api_client = ApiClient.default)
18
+ @api_client = api_client
19
+ end
20
+ # Disable product
21
+ # Disable the Domain Inspector product on a service.
22
+ # @option opts [String] :service_id Alphanumeric string identifying the service. (required)
23
+ # @return [nil]
24
+ def disable_product_domain_inspector(opts = {})
25
+ disable_product_domain_inspector_with_http_info(opts)
26
+ nil
27
+ end
28
+
29
+ # Disable product
30
+ # Disable the Domain Inspector product on a service.
31
+ # @option opts [String] :service_id Alphanumeric string identifying the service. (required)
32
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
33
+ def disable_product_domain_inspector_with_http_info(opts = {})
34
+ if @api_client.config.debugging
35
+ @api_client.config.logger.debug 'Calling API: ProductDomainInspectorApi.disable_product_domain_inspector ...'
36
+ end
37
+ # unbox the parameters from the hash
38
+ service_id = opts[:'service_id']
39
+ # verify the required parameter 'service_id' is set
40
+ if @api_client.config.client_side_validation && service_id.nil?
41
+ fail ArgumentError, "Missing the required parameter 'service_id' when calling ProductDomainInspectorApi.disable_product_domain_inspector"
42
+ end
43
+ # resource path
44
+ local_var_path = '/enabled-products/v1/domain_inspector/services/{service_id}'.sub('{' + 'service_id' + '}', CGI.escape(service_id.to_s))
45
+
46
+ # query parameters
47
+ query_params = opts[:query_params] || {}
48
+
49
+ # header parameters
50
+ header_params = opts[:header_params] || {}
51
+
52
+ # form parameters
53
+ form_params = opts[:form_params] || {}
54
+
55
+ # http body (model)
56
+ post_body = opts[:debug_body]
57
+
58
+ # return_type
59
+ return_type = opts[:debug_return_type]
60
+
61
+ # auth_names
62
+ auth_names = opts[:debug_auth_names] || ['token']
63
+
64
+ new_options = opts.merge(
65
+ :operation => :"ProductDomainInspectorApi.disable_product_domain_inspector",
66
+ :header_params => header_params,
67
+ :query_params => query_params,
68
+ :form_params => form_params,
69
+ :body => post_body,
70
+ :auth_names => auth_names,
71
+ :return_type => return_type
72
+ )
73
+
74
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
75
+ if @api_client.config.debugging
76
+ @api_client.config.logger.debug "API called: ProductDomainInspectorApi#disable_product_domain_inspector\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
77
+ end
78
+ return data, status_code, headers
79
+ end
80
+
81
+ # Enable product
82
+ # Enable the Domain Inspector product on a service.
83
+ # @option opts [String] :service_id Alphanumeric string identifying the service. (required)
84
+ # @return [DomainInspectorResponseBodyEnable]
85
+ def enable_product_domain_inspector(opts = {})
86
+ data, _status_code, _headers = enable_product_domain_inspector_with_http_info(opts)
87
+ data
88
+ end
89
+
90
+ # Enable product
91
+ # Enable the Domain Inspector product on a service.
92
+ # @option opts [String] :service_id Alphanumeric string identifying the service. (required)
93
+ # @return [Array<(DomainInspectorResponseBodyEnable, Integer, Hash)>] DomainInspectorResponseBodyEnable data, response status code and response headers
94
+ def enable_product_domain_inspector_with_http_info(opts = {})
95
+ if @api_client.config.debugging
96
+ @api_client.config.logger.debug 'Calling API: ProductDomainInspectorApi.enable_product_domain_inspector ...'
97
+ end
98
+ # unbox the parameters from the hash
99
+ service_id = opts[:'service_id']
100
+ # verify the required parameter 'service_id' is set
101
+ if @api_client.config.client_side_validation && service_id.nil?
102
+ fail ArgumentError, "Missing the required parameter 'service_id' when calling ProductDomainInspectorApi.enable_product_domain_inspector"
103
+ end
104
+ # resource path
105
+ local_var_path = '/enabled-products/v1/domain_inspector/services/{service_id}'.sub('{' + 'service_id' + '}', CGI.escape(service_id.to_s))
106
+
107
+ # query parameters
108
+ query_params = opts[:query_params] || {}
109
+
110
+ # header parameters
111
+ header_params = opts[:header_params] || {}
112
+ # HTTP header 'Accept' (if needed)
113
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
114
+
115
+ # form parameters
116
+ form_params = opts[:form_params] || {}
117
+
118
+ # http body (model)
119
+ post_body = opts[:debug_body]
120
+
121
+ # return_type
122
+ return_type = opts[:debug_return_type] || 'DomainInspectorResponseBodyEnable'
123
+
124
+ # auth_names
125
+ auth_names = opts[:debug_auth_names] || ['token']
126
+
127
+ new_options = opts.merge(
128
+ :operation => :"ProductDomainInspectorApi.enable_product_domain_inspector",
129
+ :header_params => header_params,
130
+ :query_params => query_params,
131
+ :form_params => form_params,
132
+ :body => post_body,
133
+ :auth_names => auth_names,
134
+ :return_type => return_type
135
+ )
136
+
137
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
138
+ if @api_client.config.debugging
139
+ @api_client.config.logger.debug "API called: ProductDomainInspectorApi#enable_product_domain_inspector\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
140
+ end
141
+ return data, status_code, headers
142
+ end
143
+
144
+ # Get product enablement status
145
+ # Get the enablement status of the Domain Inspector product on a service.
146
+ # @option opts [String] :service_id Alphanumeric string identifying the service. (required)
147
+ # @return [DomainInspectorResponseBodyEnable]
148
+ def get_product_domain_inspector(opts = {})
149
+ data, _status_code, _headers = get_product_domain_inspector_with_http_info(opts)
150
+ data
151
+ end
152
+
153
+ # Get product enablement status
154
+ # Get the enablement status of the Domain Inspector product on a service.
155
+ # @option opts [String] :service_id Alphanumeric string identifying the service. (required)
156
+ # @return [Array<(DomainInspectorResponseBodyEnable, Integer, Hash)>] DomainInspectorResponseBodyEnable data, response status code and response headers
157
+ def get_product_domain_inspector_with_http_info(opts = {})
158
+ if @api_client.config.debugging
159
+ @api_client.config.logger.debug 'Calling API: ProductDomainInspectorApi.get_product_domain_inspector ...'
160
+ end
161
+ # unbox the parameters from the hash
162
+ service_id = opts[:'service_id']
163
+ # verify the required parameter 'service_id' is set
164
+ if @api_client.config.client_side_validation && service_id.nil?
165
+ fail ArgumentError, "Missing the required parameter 'service_id' when calling ProductDomainInspectorApi.get_product_domain_inspector"
166
+ end
167
+ # resource path
168
+ local_var_path = '/enabled-products/v1/domain_inspector/services/{service_id}'.sub('{' + 'service_id' + '}', CGI.escape(service_id.to_s))
169
+
170
+ # query parameters
171
+ query_params = opts[:query_params] || {}
172
+
173
+ # header parameters
174
+ header_params = opts[:header_params] || {}
175
+ # HTTP header 'Accept' (if needed)
176
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
177
+
178
+ # form parameters
179
+ form_params = opts[:form_params] || {}
180
+
181
+ # http body (model)
182
+ post_body = opts[:debug_body]
183
+
184
+ # return_type
185
+ return_type = opts[:debug_return_type] || 'DomainInspectorResponseBodyEnable'
186
+
187
+ # auth_names
188
+ auth_names = opts[:debug_auth_names] || ['token']
189
+
190
+ new_options = opts.merge(
191
+ :operation => :"ProductDomainInspectorApi.get_product_domain_inspector",
192
+ :header_params => header_params,
193
+ :query_params => query_params,
194
+ :form_params => form_params,
195
+ :body => post_body,
196
+ :auth_names => auth_names,
197
+ :return_type => return_type
198
+ )
199
+
200
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
201
+ if @api_client.config.debugging
202
+ @api_client.config.logger.debug "API called: ProductDomainInspectorApi#get_product_domain_inspector\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
203
+ end
204
+ return data, status_code, headers
205
+ end
206
+ end
207
+ end