fastly 16.1.0 → 17.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 (308) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +58 -0
  3. data/Gemfile.lock +1 -1
  4. data/README.md +101 -58
  5. data/docs/Action.md +11 -0
  6. data/docs/ActionType.md +9 -0
  7. data/docs/AgentKey.md +14 -0
  8. data/docs/AgentKeyMeta.md +10 -0
  9. data/docs/Backend.md +3 -1
  10. data/docs/BackendApi.md +12 -4
  11. data/docs/BackendResponse.md +3 -1
  12. data/docs/BotManagementRequestUpdateConfiguration.md +10 -0
  13. data/docs/BotManagementResponseConfiguration.md +10 -0
  14. data/docs/BotManagementResponseConfigurationConfiguration.md +10 -0
  15. data/docs/BotManagementResponseConfigure.md +13 -0
  16. data/docs/ClientSideProtectionApi.md +821 -0
  17. data/docs/ConditionOperator.md +9 -0
  18. data/docs/ConditionType.md +9 -0
  19. data/docs/DdosProtectionApi.md +4 -4
  20. data/docs/Directive.md +11 -0
  21. data/docs/DmDomainsApi.md +2 -2
  22. data/docs/DmRoutingConfigsApi.md +912 -0
  23. data/docs/DomainOwnershipsApi.md +2 -2
  24. data/docs/DomainResearchApi.md +2 -2
  25. data/docs/DraftDiff.md +12 -0
  26. data/docs/DraftUpdate.md +10 -0
  27. data/docs/EventsResponse.md +1 -1
  28. data/docs/HeaderEvent.md +14 -0
  29. data/docs/InitialVersion.md +12 -0
  30. data/docs/InitialVersionPath.md +11 -0
  31. data/docs/InlineResponse20010.md +2 -2
  32. data/docs/InlineResponse20011.md +2 -2
  33. data/docs/InlineResponse20012.md +1 -1
  34. data/docs/InlineResponse20013.md +2 -2
  35. data/docs/InlineResponse20014.md +2 -1
  36. data/docs/InlineResponse20015.md +10 -0
  37. data/docs/InlineResponse20016.md +10 -0
  38. data/docs/InlineResponse20017.md +11 -0
  39. data/docs/InlineResponse20018.md +11 -0
  40. data/docs/InlineResponse20019.md +11 -0
  41. data/docs/InlineResponse20020.md +11 -0
  42. data/docs/InlineResponse20021.md +11 -0
  43. data/docs/InlineResponse20022.md +10 -0
  44. data/docs/InlineResponse2005.md +2 -2
  45. data/docs/InlineResponse2006.md +2 -2
  46. data/docs/InlineResponse2007.md +2 -2
  47. data/docs/InlineResponse2008.md +2 -1
  48. data/docs/InlineResponse2009.md +2 -1
  49. data/docs/InvitationsResponse.md +1 -1
  50. data/docs/KvStoreApi.md +2 -2
  51. data/docs/KvStoreItemApi.md +2 -2
  52. data/docs/KvStoreResponseBodyEnable.md +12 -0
  53. data/docs/KvStoreResponseCustomer.md +10 -0
  54. data/docs/KvStoreResponseLinks.md +10 -0
  55. data/docs/KvStoreResponseLinksLinks.md +10 -0
  56. data/docs/KvStoreResponseProduct.md +10 -0
  57. data/docs/KvStoreResponseProductProduct.md +11 -0
  58. data/docs/LoggingAzureblobApi.md +4 -4
  59. data/docs/LoggingAzureblobResponse.md +1 -1
  60. data/docs/LoggingCloudfilesApi.md +4 -4
  61. data/docs/LoggingCloudfilesResponse.md +1 -1
  62. data/docs/LoggingDigitaloceanApi.md +4 -4
  63. data/docs/LoggingDigitaloceanResponse.md +1 -1
  64. data/docs/LoggingFtpApi.md +4 -4
  65. data/docs/LoggingFtpResponse.md +1 -1
  66. data/docs/LoggingGcsApi.md +4 -4
  67. data/docs/LoggingGcsResponse.md +1 -1
  68. data/docs/LoggingGenericCommon.md +1 -1
  69. data/docs/LoggingGenericCommonResponse.md +1 -1
  70. data/docs/LoggingGenericCommonResponseAllOf.md +1 -1
  71. data/docs/LoggingHttpsAdditional.md +1 -1
  72. data/docs/LoggingHttpsApi.md +4 -4
  73. data/docs/LoggingHttpsResponse.md +1 -1
  74. data/docs/LoggingOpenstackApi.md +4 -4
  75. data/docs/LoggingOpenstackResponse.md +1 -1
  76. data/docs/LoggingS3Api.md +4 -4
  77. data/docs/LoggingS3Response.md +1 -1
  78. data/docs/LoggingSftpApi.md +4 -4
  79. data/docs/LoggingSftpResponse.md +1 -1
  80. data/docs/LoggingSumologicAdditional.md +1 -1
  81. data/docs/LoggingSumologicApi.md +4 -4
  82. data/docs/LoggingSumologicResponse.md +1 -1
  83. data/docs/LoggingSyslogAdditional.md +1 -1
  84. data/docs/LoggingSyslogApi.md +4 -4
  85. data/docs/LoggingSyslogResponse.md +1 -1
  86. data/docs/MutualAuthenticationsResponse.md +1 -1
  87. data/docs/NgwafAgentKeysApi.md +55 -0
  88. data/docs/NgwafSimulateApi.md +61 -0
  89. data/docs/Notification.md +11 -0
  90. data/docs/NotificationConfig.md +10 -0
  91. data/docs/Page.md +17 -0
  92. data/docs/PageCreate.md +14 -0
  93. data/docs/PageUpdate.md +14 -0
  94. data/docs/Pagination.md +1 -1
  95. data/docs/PaginationMeta.md +4 -4
  96. data/docs/PaginationMeta1.md +13 -0
  97. data/docs/PathChange.md +15 -0
  98. data/docs/PathCreate.md +10 -0
  99. data/docs/PathResponse.md +14 -0
  100. data/docs/PathResponseAllOf.md +12 -0
  101. data/docs/PathUpdate.md +10 -0
  102. data/docs/PathWithRules.md +11 -0
  103. data/docs/PathsResponse.md +11 -0
  104. data/docs/Policy.md +17 -0
  105. data/docs/PolicyCreate.md +13 -0
  106. data/docs/PolicyUpdate.md +13 -0
  107. data/docs/Position.md +11 -0
  108. data/docs/ProductBotManagementApi.md +78 -0
  109. data/docs/ProductKvStoreApi.md +115 -0
  110. data/docs/RealtimeEntry.md +1 -1
  111. data/docs/RealtimeEntryAggregated.md +34 -3
  112. data/docs/RealtimeEntryDatacenter.md +345 -0
  113. data/docs/RealtimeMeasurements.md +34 -3
  114. data/docs/Report.md +15 -0
  115. data/docs/RequestBodyForCreate.md +1 -0
  116. data/docs/RequestBodyForUpdate.md +1 -0
  117. data/docs/Results.md +34 -3
  118. data/docs/RoutingConfig.md +11 -0
  119. data/docs/RoutingConfigCondition.md +13 -0
  120. data/docs/RoutingConfigResponse.md +16 -0
  121. data/docs/RoutingConfigResponseAllOf.md +14 -0
  122. data/docs/RoutingConfigState.md +9 -0
  123. data/docs/RoutingConfigVersionResponse.md +13 -0
  124. data/docs/RoutingConfigsResponse.md +11 -0
  125. data/docs/RuleChange.md +12 -0
  126. data/docs/RuleCreate.md +12 -0
  127. data/docs/RuleResponse.md +15 -0
  128. data/docs/RuleResponseAllOf.md +13 -0
  129. data/docs/RuleUpdate.md +12 -0
  130. data/docs/RulesResponse.md +11 -0
  131. data/docs/Script.md +20 -0
  132. data/docs/ScriptUpdate.md +12 -0
  133. data/docs/SecretStoreApi.md +2 -2
  134. data/docs/SecretStoreItemApi.md +2 -2
  135. data/docs/SecurityHeader.md +12 -0
  136. data/docs/ServiceAuthorizationsApi.md +2 -2
  137. data/docs/ServiceAuthorizationsResponse.md +1 -1
  138. data/docs/SuccessfulResponseAsObject.md +1 -0
  139. data/docs/SuccessfulResponseAsObjectAllOf.md +1 -0
  140. data/docs/TlsActivationsResponse.md +1 -1
  141. data/docs/TlsBulkCertificatesResponse.md +1 -1
  142. data/docs/TlsCertificatesResponse.md +1 -1
  143. data/docs/TlsConfigurationsResponse.md +1 -1
  144. data/docs/TlsDomainsResponse.md +1 -1
  145. data/docs/TlsPrivateKeysResponse.md +1 -1
  146. data/docs/TlsSubscriptionsResponse.md +1 -1
  147. data/docs/VersionsResponse.md +11 -0
  148. data/docs/WafSimulateRequest.md +11 -0
  149. data/docs/WafSimulateResponse.md +11 -0
  150. data/docs/WafSimulateSignal.md +16 -0
  151. data/docs/Website.md +14 -0
  152. data/docs/WebsiteCreate.md +10 -0
  153. data/docs/WebsiteUpdate.md +10 -0
  154. data/lib/fastly/api/backend_api.rb +16 -4
  155. data/lib/fastly/api/client_side_protection_api.rb +1465 -0
  156. data/lib/fastly/api/ddos_protection_api.rb +6 -6
  157. data/lib/fastly/api/dm_domains_api.rb +3 -3
  158. data/lib/fastly/api/dm_routing_configs_api.rb +1596 -0
  159. data/lib/fastly/api/domain_ownerships_api.rb +3 -3
  160. data/lib/fastly/api/domain_research_api.rb +3 -3
  161. data/lib/fastly/api/kv_store_api.rb +3 -3
  162. data/lib/fastly/api/kv_store_item_api.rb +3 -3
  163. data/lib/fastly/api/logging_azureblob_api.rb +6 -6
  164. data/lib/fastly/api/logging_cloudfiles_api.rb +6 -6
  165. data/lib/fastly/api/logging_digitalocean_api.rb +6 -6
  166. data/lib/fastly/api/logging_ftp_api.rb +6 -6
  167. data/lib/fastly/api/logging_gcs_api.rb +6 -6
  168. data/lib/fastly/api/logging_https_api.rb +4 -4
  169. data/lib/fastly/api/logging_openstack_api.rb +6 -6
  170. data/lib/fastly/api/logging_s3_api.rb +6 -6
  171. data/lib/fastly/api/logging_sftp_api.rb +6 -6
  172. data/lib/fastly/api/logging_sumologic_api.rb +4 -4
  173. data/lib/fastly/api/logging_syslog_api.rb +4 -4
  174. data/lib/fastly/api/ngwaf_agent_keys_api.rb +83 -0
  175. data/lib/fastly/api/ngwaf_simulate_api.rb +95 -0
  176. data/lib/fastly/api/product_bot_management_api.rb +133 -0
  177. data/lib/fastly/api/product_kv_store_api.rb +186 -0
  178. data/lib/fastly/api/secret_store_api.rb +3 -3
  179. data/lib/fastly/api/secret_store_item_api.rb +3 -3
  180. data/lib/fastly/api/service_authorizations_api.rb +3 -3
  181. data/lib/fastly/configuration.rb +294 -0
  182. data/lib/fastly/models/action.rb +237 -0
  183. data/lib/fastly/models/action_type.rb +34 -0
  184. data/lib/fastly/models/agent_key.rb +283 -0
  185. data/lib/fastly/models/agent_key_meta.rb +223 -0
  186. data/lib/fastly/models/backend.rb +24 -2
  187. data/lib/fastly/models/backend_response.rb +24 -2
  188. data/lib/fastly/models/bot_management_request_update_configuration.rb +256 -0
  189. data/lib/fastly/models/bot_management_response_configuration.rb +216 -0
  190. data/lib/fastly/models/bot_management_response_configuration_configuration.rb +217 -0
  191. data/lib/fastly/models/bot_management_response_configure.rb +253 -0
  192. data/lib/fastly/models/condition_operator.rb +37 -0
  193. data/lib/fastly/models/condition_type.rb +34 -0
  194. data/lib/fastly/models/directive.rb +229 -0
  195. data/lib/fastly/models/draft_diff.rb +244 -0
  196. data/lib/fastly/models/draft_update.rb +218 -0
  197. data/lib/fastly/models/events_response.rb +1 -1
  198. data/lib/fastly/models/header_event.rb +252 -0
  199. data/lib/fastly/models/initial_version.rb +242 -0
  200. data/lib/fastly/models/initial_version_path.rb +254 -0
  201. data/lib/fastly/models/inline_response20010.rb +2 -2
  202. data/lib/fastly/models/inline_response20011.rb +2 -2
  203. data/lib/fastly/models/inline_response20012.rb +1 -1
  204. data/lib/fastly/models/inline_response20013.rb +11 -1
  205. data/lib/fastly/models/inline_response20014.rb +15 -4
  206. data/lib/fastly/models/inline_response20015.rb +217 -0
  207. data/lib/fastly/models/inline_response20016.rb +218 -0
  208. data/lib/fastly/models/inline_response20017.rb +227 -0
  209. data/lib/fastly/models/inline_response20018.rb +227 -0
  210. data/lib/fastly/models/inline_response20019.rb +228 -0
  211. data/lib/fastly/models/inline_response20020.rb +227 -0
  212. data/lib/fastly/models/inline_response20021.rb +227 -0
  213. data/lib/fastly/models/inline_response20022.rb +218 -0
  214. data/lib/fastly/models/inline_response2005.rb +2 -2
  215. data/lib/fastly/models/inline_response2006.rb +2 -12
  216. data/lib/fastly/models/inline_response2007.rb +2 -4
  217. data/lib/fastly/models/inline_response2008.rb +18 -8
  218. data/lib/fastly/models/inline_response2009.rb +17 -8
  219. data/lib/fastly/models/invitations_response.rb +1 -1
  220. data/lib/fastly/models/kv_store_response_body_enable.rb +243 -0
  221. data/lib/fastly/models/kv_store_response_customer.rb +216 -0
  222. data/lib/fastly/models/kv_store_response_links.rb +216 -0
  223. data/lib/fastly/models/kv_store_response_links_links.rb +217 -0
  224. data/lib/fastly/models/kv_store_response_product.rb +216 -0
  225. data/lib/fastly/models/kv_store_response_product_product.rb +227 -0
  226. data/lib/fastly/models/logging_azureblob_response.rb +3 -3
  227. data/lib/fastly/models/logging_cloudfiles_response.rb +3 -3
  228. data/lib/fastly/models/logging_digitalocean_response.rb +3 -3
  229. data/lib/fastly/models/logging_ftp_response.rb +3 -3
  230. data/lib/fastly/models/logging_gcs_response.rb +3 -3
  231. data/lib/fastly/models/logging_generic_common.rb +3 -3
  232. data/lib/fastly/models/logging_generic_common_response.rb +3 -3
  233. data/lib/fastly/models/logging_generic_common_response_all_of.rb +3 -3
  234. data/lib/fastly/models/logging_https_additional.rb +1 -1
  235. data/lib/fastly/models/logging_https_response.rb +1 -1
  236. data/lib/fastly/models/logging_message_type.rb +1 -1
  237. data/lib/fastly/models/logging_openstack_response.rb +3 -3
  238. data/lib/fastly/models/logging_s3_response.rb +3 -3
  239. data/lib/fastly/models/logging_sftp_response.rb +3 -3
  240. data/lib/fastly/models/logging_sumologic_additional.rb +1 -1
  241. data/lib/fastly/models/logging_sumologic_response.rb +1 -1
  242. data/lib/fastly/models/logging_syslog_additional.rb +1 -1
  243. data/lib/fastly/models/logging_syslog_response.rb +1 -1
  244. data/lib/fastly/models/mutual_authentications_response.rb +1 -1
  245. data/lib/fastly/models/notification.rb +270 -0
  246. data/lib/fastly/models/notification_config.rb +218 -0
  247. data/lib/fastly/models/page.rb +289 -0
  248. data/lib/fastly/models/page_create.rb +266 -0
  249. data/lib/fastly/models/page_update.rb +256 -0
  250. data/lib/fastly/models/pagination.rb +1 -1
  251. data/lib/fastly/models/pagination_meta.rb +30 -55
  252. data/lib/fastly/models/pagination_meta1.rb +273 -0
  253. data/lib/fastly/models/path_change.rb +274 -0
  254. data/lib/fastly/models/path_create.rb +242 -0
  255. data/lib/fastly/models/path_response.rb +285 -0
  256. data/lib/fastly/models/path_response_all_of.rb +254 -0
  257. data/lib/fastly/models/path_update.rb +233 -0
  258. data/lib/fastly/models/path_with_rules.rb +228 -0
  259. data/lib/fastly/models/paths_response.rb +228 -0
  260. data/lib/fastly/models/policy.rb +315 -0
  261. data/lib/fastly/models/policy_create.rb +289 -0
  262. data/lib/fastly/models/policy_update.rb +279 -0
  263. data/lib/fastly/models/position.rb +228 -0
  264. data/lib/fastly/models/realtime_entry.rb +2 -5
  265. data/lib/fastly/models/realtime_entry_aggregated.rb +344 -34
  266. data/lib/fastly/models/realtime_entry_datacenter.rb +3577 -0
  267. data/lib/fastly/models/realtime_measurements.rb +344 -34
  268. data/lib/fastly/models/report.rb +261 -0
  269. data/lib/fastly/models/request_body_for_create.rb +12 -1
  270. data/lib/fastly/models/request_body_for_update.rb +12 -1
  271. data/lib/fastly/models/results.rb +341 -31
  272. data/lib/fastly/models/routing_config.rb +251 -0
  273. data/lib/fastly/models/routing_config_condition.rb +261 -0
  274. data/lib/fastly/models/routing_config_response.rb +305 -0
  275. data/lib/fastly/models/routing_config_response_all_of.rb +274 -0
  276. data/lib/fastly/models/routing_config_state.rb +36 -0
  277. data/lib/fastly/models/routing_config_version_response.rb +250 -0
  278. data/lib/fastly/models/routing_configs_response.rb +228 -0
  279. data/lib/fastly/models/rule_change.rb +236 -0
  280. data/lib/fastly/models/rule_create.rb +267 -0
  281. data/lib/fastly/models/rule_response.rb +279 -0
  282. data/lib/fastly/models/rule_response_all_of.rb +248 -0
  283. data/lib/fastly/models/rule_update.rb +252 -0
  284. data/lib/fastly/models/rules_response.rb +228 -0
  285. data/lib/fastly/models/script.rb +350 -0
  286. data/lib/fastly/models/script_update.rb +271 -0
  287. data/lib/fastly/models/security_header.rb +234 -0
  288. data/lib/fastly/models/service_authorizations_response.rb +1 -1
  289. data/lib/fastly/models/successful_response_as_object.rb +12 -1
  290. data/lib/fastly/models/successful_response_as_object_all_of.rb +12 -1
  291. data/lib/fastly/models/tls_activations_response.rb +1 -1
  292. data/lib/fastly/models/tls_bulk_certificates_response.rb +1 -1
  293. data/lib/fastly/models/tls_certificates_response.rb +1 -1
  294. data/lib/fastly/models/tls_configurations_response.rb +1 -1
  295. data/lib/fastly/models/tls_domains_response.rb +1 -1
  296. data/lib/fastly/models/tls_private_keys_response.rb +1 -1
  297. data/lib/fastly/models/tls_subscriptions_response.rb +1 -1
  298. data/lib/fastly/models/versions_response.rb +228 -0
  299. data/lib/fastly/models/waf_simulate_request.rb +233 -0
  300. data/lib/fastly/models/waf_simulate_response.rb +240 -0
  301. data/lib/fastly/models/waf_simulate_signal.rb +344 -0
  302. data/lib/fastly/models/website.rb +257 -0
  303. data/lib/fastly/models/website_create.rb +222 -0
  304. data/lib/fastly/models/website_update.rb +217 -0
  305. data/lib/fastly/version.rb +1 -1
  306. data/lib/fastly.rb +77 -0
  307. data/sig.json +1 -1
  308. metadata +156 -2
@@ -0,0 +1,1596 @@
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 DmRoutingConfigsApi
15
+ attr_accessor :api_client
16
+
17
+ def initialize(api_client = ApiClient.default)
18
+ @api_client = api_client
19
+ end
20
+ # Activate the draft
21
+ # Activate the current draft version. The previously active version, if any, becomes inactive but is retained in version history.
22
+ # @option opts [String] :config_id (required)
23
+ # @return [RoutingConfigVersionResponse]
24
+ def activate_dm_routing_config_draft(opts = {})
25
+ data, _status_code, _headers = activate_dm_routing_config_draft_with_http_info(opts)
26
+ data
27
+ end
28
+
29
+ # Activate the draft
30
+ # Activate the current draft version. The previously active version, if any, becomes inactive but is retained in version history.
31
+ # @option opts [String] :config_id (required)
32
+ # @return [Array<(RoutingConfigVersionResponse, Integer, Hash)>] RoutingConfigVersionResponse data, response status code and response headers
33
+ def activate_dm_routing_config_draft_with_http_info(opts = {})
34
+ if @api_client.config.debugging
35
+ @api_client.config.logger.debug 'Calling API: DmRoutingConfigsApi.activate_dm_routing_config_draft ...'
36
+ end
37
+ # unbox the parameters from the hash
38
+ config_id = opts[:'config_id']
39
+ # verify the required parameter 'config_id' is set
40
+ if @api_client.config.client_side_validation && config_id.nil?
41
+ fail ArgumentError, "Missing the required parameter 'config_id' when calling DmRoutingConfigsApi.activate_dm_routing_config_draft"
42
+ end
43
+ # resource path
44
+ local_var_path = '/domain-management/v1/routing-configs/{config_id}/activate'.sub('{' + 'config_id' + '}', CGI.escape(config_id.to_s))
45
+
46
+ # query parameters
47
+ query_params = opts[:query_params] || {}
48
+
49
+ # header parameters
50
+ header_params = opts[:header_params] || {}
51
+ # HTTP header 'Accept' (if needed)
52
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
53
+
54
+ # form parameters
55
+ form_params = opts[:form_params] || {}
56
+
57
+ # http body (model)
58
+ post_body = opts[:debug_body]
59
+
60
+ # return_type
61
+ return_type = opts[:debug_return_type] || 'RoutingConfigVersionResponse'
62
+
63
+ # auth_names
64
+ auth_names = opts[:debug_auth_names] || ['token']
65
+
66
+ new_options = opts.merge(
67
+ :operation => :"DmRoutingConfigsApi.activate_dm_routing_config_draft",
68
+ :header_params => header_params,
69
+ :query_params => query_params,
70
+ :form_params => form_params,
71
+ :body => post_body,
72
+ :auth_names => auth_names,
73
+ :return_type => return_type
74
+ )
75
+
76
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
77
+ if @api_client.config.debugging
78
+ @api_client.config.logger.debug "API called: DmRoutingConfigsApi#activate_dm_routing_config_draft\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
79
+ end
80
+ return data, status_code, headers
81
+ end
82
+
83
+ # Create a routing config
84
+ # Create a new routing config. An optional `initial_version` may be provided to seed the config with paths and rules in a single request, and may also be activated immediately.
85
+ # @option opts [RoutingConfig] :routing_config
86
+ # @return [RoutingConfigResponse]
87
+ def create_dm_routing_config(opts = {})
88
+ data, _status_code, _headers = create_dm_routing_config_with_http_info(opts)
89
+ data
90
+ end
91
+
92
+ # Create a routing config
93
+ # Create a new routing config. An optional &#x60;initial_version&#x60; may be provided to seed the config with paths and rules in a single request, and may also be activated immediately.
94
+ # @option opts [RoutingConfig] :routing_config
95
+ # @return [Array<(RoutingConfigResponse, Integer, Hash)>] RoutingConfigResponse data, response status code and response headers
96
+ def create_dm_routing_config_with_http_info(opts = {})
97
+ if @api_client.config.debugging
98
+ @api_client.config.logger.debug 'Calling API: DmRoutingConfigsApi.create_dm_routing_config ...'
99
+ end
100
+ # unbox the parameters from the hash
101
+ # resource path
102
+ local_var_path = '/domain-management/v1/routing-configs'
103
+
104
+ # query parameters
105
+ query_params = opts[:query_params] || {}
106
+
107
+ # header parameters
108
+ header_params = opts[:header_params] || {}
109
+ # HTTP header 'Accept' (if needed)
110
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
111
+ # HTTP header 'Content-Type'
112
+ content_type = @api_client.select_header_content_type(['application/json'])
113
+ if !content_type.nil?
114
+ header_params['Content-Type'] = content_type
115
+ end
116
+
117
+ # form parameters
118
+ form_params = opts[:form_params] || {}
119
+
120
+ # http body (model)
121
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'routing_config'])
122
+
123
+ # return_type
124
+ return_type = opts[:debug_return_type] || 'RoutingConfigResponse'
125
+
126
+ # auth_names
127
+ auth_names = opts[:debug_auth_names] || ['token']
128
+
129
+ new_options = opts.merge(
130
+ :operation => :"DmRoutingConfigsApi.create_dm_routing_config",
131
+ :header_params => header_params,
132
+ :query_params => query_params,
133
+ :form_params => form_params,
134
+ :body => post_body,
135
+ :auth_names => auth_names,
136
+ :return_type => return_type
137
+ )
138
+
139
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
140
+ if @api_client.config.debugging
141
+ @api_client.config.logger.debug "API called: DmRoutingConfigsApi#create_dm_routing_config\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
142
+ end
143
+ return data, status_code, headers
144
+ end
145
+
146
+ # Create a path
147
+ # Add a new path to the config's draft version. If no draft exists, one is created automatically by cloning the active version.
148
+ # @option opts [String] :config_id (required)
149
+ # @option opts [PathCreate] :path_create
150
+ # @return [PathResponse]
151
+ def create_dm_routing_config_path(opts = {})
152
+ data, _status_code, _headers = create_dm_routing_config_path_with_http_info(opts)
153
+ data
154
+ end
155
+
156
+ # Create a path
157
+ # Add a new path to the config&#39;s draft version. If no draft exists, one is created automatically by cloning the active version.
158
+ # @option opts [String] :config_id (required)
159
+ # @option opts [PathCreate] :path_create
160
+ # @return [Array<(PathResponse, Integer, Hash)>] PathResponse data, response status code and response headers
161
+ def create_dm_routing_config_path_with_http_info(opts = {})
162
+ if @api_client.config.debugging
163
+ @api_client.config.logger.debug 'Calling API: DmRoutingConfigsApi.create_dm_routing_config_path ...'
164
+ end
165
+ # unbox the parameters from the hash
166
+ config_id = opts[:'config_id']
167
+ # verify the required parameter 'config_id' is set
168
+ if @api_client.config.client_side_validation && config_id.nil?
169
+ fail ArgumentError, "Missing the required parameter 'config_id' when calling DmRoutingConfigsApi.create_dm_routing_config_path"
170
+ end
171
+ # resource path
172
+ local_var_path = '/domain-management/v1/routing-configs/{config_id}/paths'.sub('{' + 'config_id' + '}', CGI.escape(config_id.to_s))
173
+
174
+ # query parameters
175
+ query_params = opts[:query_params] || {}
176
+
177
+ # header parameters
178
+ header_params = opts[:header_params] || {}
179
+ # HTTP header 'Accept' (if needed)
180
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
181
+ # HTTP header 'Content-Type'
182
+ content_type = @api_client.select_header_content_type(['application/json'])
183
+ if !content_type.nil?
184
+ header_params['Content-Type'] = content_type
185
+ end
186
+
187
+ # form parameters
188
+ form_params = opts[:form_params] || {}
189
+
190
+ # http body (model)
191
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'path_create'])
192
+
193
+ # return_type
194
+ return_type = opts[:debug_return_type] || 'PathResponse'
195
+
196
+ # auth_names
197
+ auth_names = opts[:debug_auth_names] || ['token']
198
+
199
+ new_options = opts.merge(
200
+ :operation => :"DmRoutingConfigsApi.create_dm_routing_config_path",
201
+ :header_params => header_params,
202
+ :query_params => query_params,
203
+ :form_params => form_params,
204
+ :body => post_body,
205
+ :auth_names => auth_names,
206
+ :return_type => return_type
207
+ )
208
+
209
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
210
+ if @api_client.config.debugging
211
+ @api_client.config.logger.debug "API called: DmRoutingConfigsApi#create_dm_routing_config_path\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
212
+ end
213
+ return data, status_code, headers
214
+ end
215
+
216
+ # Create a rule
217
+ # Add a new rule to a path on the config's draft version. If no draft exists, one is created automatically by cloning the active version. A rule with an empty `conditions` array is a default (catch-all) rule and there can be at most one default rule per path.
218
+ # @option opts [String] :config_id (required)
219
+ # @option opts [String] :path_id (required)
220
+ # @option opts [RuleCreate] :rule_create
221
+ # @return [RuleResponse]
222
+ def create_dm_routing_config_rule(opts = {})
223
+ data, _status_code, _headers = create_dm_routing_config_rule_with_http_info(opts)
224
+ data
225
+ end
226
+
227
+ # Create a rule
228
+ # Add a new rule to a path on the config&#39;s draft version. If no draft exists, one is created automatically by cloning the active version. A rule with an empty &#x60;conditions&#x60; array is a default (catch-all) rule and there can be at most one default rule per path.
229
+ # @option opts [String] :config_id (required)
230
+ # @option opts [String] :path_id (required)
231
+ # @option opts [RuleCreate] :rule_create
232
+ # @return [Array<(RuleResponse, Integer, Hash)>] RuleResponse data, response status code and response headers
233
+ def create_dm_routing_config_rule_with_http_info(opts = {})
234
+ if @api_client.config.debugging
235
+ @api_client.config.logger.debug 'Calling API: DmRoutingConfigsApi.create_dm_routing_config_rule ...'
236
+ end
237
+ # unbox the parameters from the hash
238
+ config_id = opts[:'config_id']
239
+ path_id = opts[:'path_id']
240
+ # verify the required parameter 'config_id' is set
241
+ if @api_client.config.client_side_validation && config_id.nil?
242
+ fail ArgumentError, "Missing the required parameter 'config_id' when calling DmRoutingConfigsApi.create_dm_routing_config_rule"
243
+ end
244
+ # verify the required parameter 'path_id' is set
245
+ if @api_client.config.client_side_validation && path_id.nil?
246
+ fail ArgumentError, "Missing the required parameter 'path_id' when calling DmRoutingConfigsApi.create_dm_routing_config_rule"
247
+ end
248
+ # resource path
249
+ local_var_path = '/domain-management/v1/routing-configs/{config_id}/paths/{path_id}/rules'.sub('{' + 'config_id' + '}', CGI.escape(config_id.to_s)).sub('{' + 'path_id' + '}', CGI.escape(path_id.to_s))
250
+
251
+ # query parameters
252
+ query_params = opts[:query_params] || {}
253
+
254
+ # header parameters
255
+ header_params = opts[:header_params] || {}
256
+ # HTTP header 'Accept' (if needed)
257
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
258
+ # HTTP header 'Content-Type'
259
+ content_type = @api_client.select_header_content_type(['application/json'])
260
+ if !content_type.nil?
261
+ header_params['Content-Type'] = content_type
262
+ end
263
+
264
+ # form parameters
265
+ form_params = opts[:form_params] || {}
266
+
267
+ # http body (model)
268
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'rule_create'])
269
+
270
+ # return_type
271
+ return_type = opts[:debug_return_type] || 'RuleResponse'
272
+
273
+ # auth_names
274
+ auth_names = opts[:debug_auth_names] || ['token']
275
+
276
+ new_options = opts.merge(
277
+ :operation => :"DmRoutingConfigsApi.create_dm_routing_config_rule",
278
+ :header_params => header_params,
279
+ :query_params => query_params,
280
+ :form_params => form_params,
281
+ :body => post_body,
282
+ :auth_names => auth_names,
283
+ :return_type => return_type
284
+ )
285
+
286
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
287
+ if @api_client.config.debugging
288
+ @api_client.config.logger.debug "API called: DmRoutingConfigsApi#create_dm_routing_config_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
289
+ end
290
+ return data, status_code, headers
291
+ end
292
+
293
+ # Deactivate a routing config
294
+ # Clear the active version designation. This is a bookkeeping operation only — it does not stop edge traffic. Minerva continues serving the last-activated version until the domain association is removed in Spotless. Only removing the routing config from the domain (via Spotless) triggers Neptune to drop the reference, which causes Minerva to stop fetching and eventually clean up the cached config. Idempotent: returns 200 even if already deactivated.
295
+ # @option opts [String] :config_id (required)
296
+ # @return [RoutingConfigResponse]
297
+ def deactivate_dm_routing_config(opts = {})
298
+ data, _status_code, _headers = deactivate_dm_routing_config_with_http_info(opts)
299
+ data
300
+ end
301
+
302
+ # Deactivate a routing config
303
+ # Clear the active version designation. This is a bookkeeping operation only — it does not stop edge traffic. Minerva continues serving the last-activated version until the domain association is removed in Spotless. Only removing the routing config from the domain (via Spotless) triggers Neptune to drop the reference, which causes Minerva to stop fetching and eventually clean up the cached config. Idempotent: returns 200 even if already deactivated.
304
+ # @option opts [String] :config_id (required)
305
+ # @return [Array<(RoutingConfigResponse, Integer, Hash)>] RoutingConfigResponse data, response status code and response headers
306
+ def deactivate_dm_routing_config_with_http_info(opts = {})
307
+ if @api_client.config.debugging
308
+ @api_client.config.logger.debug 'Calling API: DmRoutingConfigsApi.deactivate_dm_routing_config ...'
309
+ end
310
+ # unbox the parameters from the hash
311
+ config_id = opts[:'config_id']
312
+ # verify the required parameter 'config_id' is set
313
+ if @api_client.config.client_side_validation && config_id.nil?
314
+ fail ArgumentError, "Missing the required parameter 'config_id' when calling DmRoutingConfigsApi.deactivate_dm_routing_config"
315
+ end
316
+ # resource path
317
+ local_var_path = '/domain-management/v1/routing-configs/{config_id}/deactivate'.sub('{' + 'config_id' + '}', CGI.escape(config_id.to_s))
318
+
319
+ # query parameters
320
+ query_params = opts[:query_params] || {}
321
+
322
+ # header parameters
323
+ header_params = opts[:header_params] || {}
324
+ # HTTP header 'Accept' (if needed)
325
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
326
+
327
+ # form parameters
328
+ form_params = opts[:form_params] || {}
329
+
330
+ # http body (model)
331
+ post_body = opts[:debug_body]
332
+
333
+ # return_type
334
+ return_type = opts[:debug_return_type] || 'RoutingConfigResponse'
335
+
336
+ # auth_names
337
+ auth_names = opts[:debug_auth_names] || ['token']
338
+
339
+ new_options = opts.merge(
340
+ :operation => :"DmRoutingConfigsApi.deactivate_dm_routing_config",
341
+ :header_params => header_params,
342
+ :query_params => query_params,
343
+ :form_params => form_params,
344
+ :body => post_body,
345
+ :auth_names => auth_names,
346
+ :return_type => return_type
347
+ )
348
+
349
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
350
+ if @api_client.config.debugging
351
+ @api_client.config.logger.debug "API called: DmRoutingConfigsApi#deactivate_dm_routing_config\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
352
+ end
353
+ return data, status_code, headers
354
+ end
355
+
356
+ # Delete a routing config
357
+ # Delete a routing config. By default, configs that have an active version cannot be deleted. Pass `force=true` to bypass the active-version check — this is destructive and will immediately stop traffic routing for any paths the config serves. The `force` parameter does **not** bypass the domain-association check; if domains are still associated, deletion is rejected with 409 regardless of `force`.
358
+ # @option opts [String] :config_id (required)
359
+ # @option opts [Boolean] :force When &#x60;true&#x60;, allows deleting a routing config that has an active version. This is destructive — traffic routing for any paths served by the config will stop immediately. (default to false)
360
+ # @return [nil]
361
+ def delete_dm_routing_config(opts = {})
362
+ delete_dm_routing_config_with_http_info(opts)
363
+ nil
364
+ end
365
+
366
+ # Delete a routing config
367
+ # Delete a routing config. By default, configs that have an active version cannot be deleted. Pass &#x60;force&#x3D;true&#x60; to bypass the active-version check — this is destructive and will immediately stop traffic routing for any paths the config serves. The &#x60;force&#x60; parameter does **not** bypass the domain-association check; if domains are still associated, deletion is rejected with 409 regardless of &#x60;force&#x60;.
368
+ # @option opts [String] :config_id (required)
369
+ # @option opts [Boolean] :force When &#x60;true&#x60;, allows deleting a routing config that has an active version. This is destructive — traffic routing for any paths served by the config will stop immediately. (default to false)
370
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
371
+ def delete_dm_routing_config_with_http_info(opts = {})
372
+ if @api_client.config.debugging
373
+ @api_client.config.logger.debug 'Calling API: DmRoutingConfigsApi.delete_dm_routing_config ...'
374
+ end
375
+ # unbox the parameters from the hash
376
+ config_id = opts[:'config_id']
377
+ # verify the required parameter 'config_id' is set
378
+ if @api_client.config.client_side_validation && config_id.nil?
379
+ fail ArgumentError, "Missing the required parameter 'config_id' when calling DmRoutingConfigsApi.delete_dm_routing_config"
380
+ end
381
+ # resource path
382
+ local_var_path = '/domain-management/v1/routing-configs/{config_id}'.sub('{' + 'config_id' + '}', CGI.escape(config_id.to_s))
383
+
384
+ # query parameters
385
+ query_params = opts[:query_params] || {}
386
+ query_params[:'force'] = opts[:'force'] if !opts[:'force'].nil?
387
+
388
+ # header parameters
389
+ header_params = opts[:header_params] || {}
390
+
391
+ # form parameters
392
+ form_params = opts[:form_params] || {}
393
+
394
+ # http body (model)
395
+ post_body = opts[:debug_body]
396
+
397
+ # return_type
398
+ return_type = opts[:debug_return_type]
399
+
400
+ # auth_names
401
+ auth_names = opts[:debug_auth_names] || ['token']
402
+
403
+ new_options = opts.merge(
404
+ :operation => :"DmRoutingConfigsApi.delete_dm_routing_config",
405
+ :header_params => header_params,
406
+ :query_params => query_params,
407
+ :form_params => form_params,
408
+ :body => post_body,
409
+ :auth_names => auth_names,
410
+ :return_type => return_type
411
+ )
412
+
413
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
414
+ if @api_client.config.debugging
415
+ @api_client.config.logger.debug "API called: DmRoutingConfigsApi#delete_dm_routing_config\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
416
+ end
417
+ return data, status_code, headers
418
+ end
419
+
420
+ # Delete inactive versions
421
+ # Delete all inactive versions for a routing config. The currently active version, if any, is retained.
422
+ # @option opts [String] :config_id (required)
423
+ # @return [nil]
424
+ def delete_dm_routing_config_inactive_versions(opts = {})
425
+ delete_dm_routing_config_inactive_versions_with_http_info(opts)
426
+ nil
427
+ end
428
+
429
+ # Delete inactive versions
430
+ # Delete all inactive versions for a routing config. The currently active version, if any, is retained.
431
+ # @option opts [String] :config_id (required)
432
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
433
+ def delete_dm_routing_config_inactive_versions_with_http_info(opts = {})
434
+ if @api_client.config.debugging
435
+ @api_client.config.logger.debug 'Calling API: DmRoutingConfigsApi.delete_dm_routing_config_inactive_versions ...'
436
+ end
437
+ # unbox the parameters from the hash
438
+ config_id = opts[:'config_id']
439
+ # verify the required parameter 'config_id' is set
440
+ if @api_client.config.client_side_validation && config_id.nil?
441
+ fail ArgumentError, "Missing the required parameter 'config_id' when calling DmRoutingConfigsApi.delete_dm_routing_config_inactive_versions"
442
+ end
443
+ # resource path
444
+ local_var_path = '/domain-management/v1/routing-configs/{config_id}/versions/inactive'.sub('{' + 'config_id' + '}', CGI.escape(config_id.to_s))
445
+
446
+ # query parameters
447
+ query_params = opts[:query_params] || {}
448
+
449
+ # header parameters
450
+ header_params = opts[:header_params] || {}
451
+
452
+ # form parameters
453
+ form_params = opts[:form_params] || {}
454
+
455
+ # http body (model)
456
+ post_body = opts[:debug_body]
457
+
458
+ # return_type
459
+ return_type = opts[:debug_return_type]
460
+
461
+ # auth_names
462
+ auth_names = opts[:debug_auth_names] || ['token']
463
+
464
+ new_options = opts.merge(
465
+ :operation => :"DmRoutingConfigsApi.delete_dm_routing_config_inactive_versions",
466
+ :header_params => header_params,
467
+ :query_params => query_params,
468
+ :form_params => form_params,
469
+ :body => post_body,
470
+ :auth_names => auth_names,
471
+ :return_type => return_type
472
+ )
473
+
474
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
475
+ if @api_client.config.debugging
476
+ @api_client.config.logger.debug "API called: DmRoutingConfigsApi#delete_dm_routing_config_inactive_versions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
477
+ end
478
+ return data, status_code, headers
479
+ end
480
+
481
+ # Delete a path
482
+ # Delete a path from the config's draft version. If no draft exists, one is created automatically by cloning the active version.
483
+ # @option opts [String] :config_id (required)
484
+ # @option opts [String] :path_id (required)
485
+ # @return [nil]
486
+ def delete_dm_routing_config_path(opts = {})
487
+ delete_dm_routing_config_path_with_http_info(opts)
488
+ nil
489
+ end
490
+
491
+ # Delete a path
492
+ # Delete a path from the config&#39;s draft version. If no draft exists, one is created automatically by cloning the active version.
493
+ # @option opts [String] :config_id (required)
494
+ # @option opts [String] :path_id (required)
495
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
496
+ def delete_dm_routing_config_path_with_http_info(opts = {})
497
+ if @api_client.config.debugging
498
+ @api_client.config.logger.debug 'Calling API: DmRoutingConfigsApi.delete_dm_routing_config_path ...'
499
+ end
500
+ # unbox the parameters from the hash
501
+ config_id = opts[:'config_id']
502
+ path_id = opts[:'path_id']
503
+ # verify the required parameter 'config_id' is set
504
+ if @api_client.config.client_side_validation && config_id.nil?
505
+ fail ArgumentError, "Missing the required parameter 'config_id' when calling DmRoutingConfigsApi.delete_dm_routing_config_path"
506
+ end
507
+ # verify the required parameter 'path_id' is set
508
+ if @api_client.config.client_side_validation && path_id.nil?
509
+ fail ArgumentError, "Missing the required parameter 'path_id' when calling DmRoutingConfigsApi.delete_dm_routing_config_path"
510
+ end
511
+ # resource path
512
+ local_var_path = '/domain-management/v1/routing-configs/{config_id}/paths/{path_id}'.sub('{' + 'config_id' + '}', CGI.escape(config_id.to_s)).sub('{' + 'path_id' + '}', CGI.escape(path_id.to_s))
513
+
514
+ # query parameters
515
+ query_params = opts[:query_params] || {}
516
+
517
+ # header parameters
518
+ header_params = opts[:header_params] || {}
519
+
520
+ # form parameters
521
+ form_params = opts[:form_params] || {}
522
+
523
+ # http body (model)
524
+ post_body = opts[:debug_body]
525
+
526
+ # return_type
527
+ return_type = opts[:debug_return_type]
528
+
529
+ # auth_names
530
+ auth_names = opts[:debug_auth_names] || ['token']
531
+
532
+ new_options = opts.merge(
533
+ :operation => :"DmRoutingConfigsApi.delete_dm_routing_config_path",
534
+ :header_params => header_params,
535
+ :query_params => query_params,
536
+ :form_params => form_params,
537
+ :body => post_body,
538
+ :auth_names => auth_names,
539
+ :return_type => return_type
540
+ )
541
+
542
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
543
+ if @api_client.config.debugging
544
+ @api_client.config.logger.debug "API called: DmRoutingConfigsApi#delete_dm_routing_config_path\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
545
+ end
546
+ return data, status_code, headers
547
+ end
548
+
549
+ # Delete a rule
550
+ # Delete a rule from the config's draft version. If no draft exists, one is created automatically by cloning the active version.
551
+ # @option opts [String] :config_id (required)
552
+ # @option opts [String] :path_id (required)
553
+ # @option opts [String] :rule_id (required)
554
+ # @return [nil]
555
+ def delete_dm_routing_config_rule(opts = {})
556
+ delete_dm_routing_config_rule_with_http_info(opts)
557
+ nil
558
+ end
559
+
560
+ # Delete a rule
561
+ # Delete a rule from the config&#39;s draft version. If no draft exists, one is created automatically by cloning the active version.
562
+ # @option opts [String] :config_id (required)
563
+ # @option opts [String] :path_id (required)
564
+ # @option opts [String] :rule_id (required)
565
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
566
+ def delete_dm_routing_config_rule_with_http_info(opts = {})
567
+ if @api_client.config.debugging
568
+ @api_client.config.logger.debug 'Calling API: DmRoutingConfigsApi.delete_dm_routing_config_rule ...'
569
+ end
570
+ # unbox the parameters from the hash
571
+ config_id = opts[:'config_id']
572
+ path_id = opts[:'path_id']
573
+ rule_id = opts[:'rule_id']
574
+ # verify the required parameter 'config_id' is set
575
+ if @api_client.config.client_side_validation && config_id.nil?
576
+ fail ArgumentError, "Missing the required parameter 'config_id' when calling DmRoutingConfigsApi.delete_dm_routing_config_rule"
577
+ end
578
+ # verify the required parameter 'path_id' is set
579
+ if @api_client.config.client_side_validation && path_id.nil?
580
+ fail ArgumentError, "Missing the required parameter 'path_id' when calling DmRoutingConfigsApi.delete_dm_routing_config_rule"
581
+ end
582
+ # verify the required parameter 'rule_id' is set
583
+ if @api_client.config.client_side_validation && rule_id.nil?
584
+ fail ArgumentError, "Missing the required parameter 'rule_id' when calling DmRoutingConfigsApi.delete_dm_routing_config_rule"
585
+ end
586
+ # resource path
587
+ local_var_path = '/domain-management/v1/routing-configs/{config_id}/paths/{path_id}/rules/{rule_id}'.sub('{' + 'config_id' + '}', CGI.escape(config_id.to_s)).sub('{' + 'path_id' + '}', CGI.escape(path_id.to_s)).sub('{' + 'rule_id' + '}', CGI.escape(rule_id.to_s))
588
+
589
+ # query parameters
590
+ query_params = opts[:query_params] || {}
591
+
592
+ # header parameters
593
+ header_params = opts[:header_params] || {}
594
+
595
+ # form parameters
596
+ form_params = opts[:form_params] || {}
597
+
598
+ # http body (model)
599
+ post_body = opts[:debug_body]
600
+
601
+ # return_type
602
+ return_type = opts[:debug_return_type]
603
+
604
+ # auth_names
605
+ auth_names = opts[:debug_auth_names] || ['token']
606
+
607
+ new_options = opts.merge(
608
+ :operation => :"DmRoutingConfigsApi.delete_dm_routing_config_rule",
609
+ :header_params => header_params,
610
+ :query_params => query_params,
611
+ :form_params => form_params,
612
+ :body => post_body,
613
+ :auth_names => auth_names,
614
+ :return_type => return_type
615
+ )
616
+
617
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
618
+ if @api_client.config.debugging
619
+ @api_client.config.logger.debug "API called: DmRoutingConfigsApi#delete_dm_routing_config_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
620
+ end
621
+ return data, status_code, headers
622
+ end
623
+
624
+ # Discard the draft
625
+ # Delete the current draft version, reverting any unactivated changes.
626
+ # @option opts [String] :config_id (required)
627
+ # @return [nil]
628
+ def discard_dm_routing_config_draft(opts = {})
629
+ discard_dm_routing_config_draft_with_http_info(opts)
630
+ nil
631
+ end
632
+
633
+ # Discard the draft
634
+ # Delete the current draft version, reverting any unactivated changes.
635
+ # @option opts [String] :config_id (required)
636
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
637
+ def discard_dm_routing_config_draft_with_http_info(opts = {})
638
+ if @api_client.config.debugging
639
+ @api_client.config.logger.debug 'Calling API: DmRoutingConfigsApi.discard_dm_routing_config_draft ...'
640
+ end
641
+ # unbox the parameters from the hash
642
+ config_id = opts[:'config_id']
643
+ # verify the required parameter 'config_id' is set
644
+ if @api_client.config.client_side_validation && config_id.nil?
645
+ fail ArgumentError, "Missing the required parameter 'config_id' when calling DmRoutingConfigsApi.discard_dm_routing_config_draft"
646
+ end
647
+ # resource path
648
+ local_var_path = '/domain-management/v1/routing-configs/{config_id}/draft'.sub('{' + 'config_id' + '}', CGI.escape(config_id.to_s))
649
+
650
+ # query parameters
651
+ query_params = opts[:query_params] || {}
652
+
653
+ # header parameters
654
+ header_params = opts[:header_params] || {}
655
+
656
+ # form parameters
657
+ form_params = opts[:form_params] || {}
658
+
659
+ # http body (model)
660
+ post_body = opts[:debug_body]
661
+
662
+ # return_type
663
+ return_type = opts[:debug_return_type]
664
+
665
+ # auth_names
666
+ auth_names = opts[:debug_auth_names] || ['token']
667
+
668
+ new_options = opts.merge(
669
+ :operation => :"DmRoutingConfigsApi.discard_dm_routing_config_draft",
670
+ :header_params => header_params,
671
+ :query_params => query_params,
672
+ :form_params => form_params,
673
+ :body => post_body,
674
+ :auth_names => auth_names,
675
+ :return_type => return_type
676
+ )
677
+
678
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
679
+ if @api_client.config.debugging
680
+ @api_client.config.logger.debug "API called: DmRoutingConfigsApi#discard_dm_routing_config_draft\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
681
+ end
682
+ return data, status_code, headers
683
+ end
684
+
685
+ # Get a routing config
686
+ # Retrieve a single routing config by its identifier.
687
+ # @option opts [String] :config_id (required)
688
+ # @return [RoutingConfigResponse]
689
+ def get_dm_routing_config(opts = {})
690
+ data, _status_code, _headers = get_dm_routing_config_with_http_info(opts)
691
+ data
692
+ end
693
+
694
+ # Get a routing config
695
+ # Retrieve a single routing config by its identifier.
696
+ # @option opts [String] :config_id (required)
697
+ # @return [Array<(RoutingConfigResponse, Integer, Hash)>] RoutingConfigResponse data, response status code and response headers
698
+ def get_dm_routing_config_with_http_info(opts = {})
699
+ if @api_client.config.debugging
700
+ @api_client.config.logger.debug 'Calling API: DmRoutingConfigsApi.get_dm_routing_config ...'
701
+ end
702
+ # unbox the parameters from the hash
703
+ config_id = opts[:'config_id']
704
+ # verify the required parameter 'config_id' is set
705
+ if @api_client.config.client_side_validation && config_id.nil?
706
+ fail ArgumentError, "Missing the required parameter 'config_id' when calling DmRoutingConfigsApi.get_dm_routing_config"
707
+ end
708
+ # resource path
709
+ local_var_path = '/domain-management/v1/routing-configs/{config_id}'.sub('{' + 'config_id' + '}', CGI.escape(config_id.to_s))
710
+
711
+ # query parameters
712
+ query_params = opts[:query_params] || {}
713
+
714
+ # header parameters
715
+ header_params = opts[:header_params] || {}
716
+ # HTTP header 'Accept' (if needed)
717
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
718
+
719
+ # form parameters
720
+ form_params = opts[:form_params] || {}
721
+
722
+ # http body (model)
723
+ post_body = opts[:debug_body]
724
+
725
+ # return_type
726
+ return_type = opts[:debug_return_type] || 'RoutingConfigResponse'
727
+
728
+ # auth_names
729
+ auth_names = opts[:debug_auth_names] || ['token']
730
+
731
+ new_options = opts.merge(
732
+ :operation => :"DmRoutingConfigsApi.get_dm_routing_config",
733
+ :header_params => header_params,
734
+ :query_params => query_params,
735
+ :form_params => form_params,
736
+ :body => post_body,
737
+ :auth_names => auth_names,
738
+ :return_type => return_type
739
+ )
740
+
741
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
742
+ if @api_client.config.debugging
743
+ @api_client.config.logger.debug "API called: DmRoutingConfigsApi#get_dm_routing_config\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
744
+ end
745
+ return data, status_code, headers
746
+ end
747
+
748
+ # Get the draft diff
749
+ # Compare the current draft version against the active version and return the paths and rules that have been added, modified, or deleted.
750
+ # @option opts [String] :config_id (required)
751
+ # @return [DraftDiff]
752
+ def get_dm_routing_config_draft_diff(opts = {})
753
+ data, _status_code, _headers = get_dm_routing_config_draft_diff_with_http_info(opts)
754
+ data
755
+ end
756
+
757
+ # Get the draft diff
758
+ # Compare the current draft version against the active version and return the paths and rules that have been added, modified, or deleted.
759
+ # @option opts [String] :config_id (required)
760
+ # @return [Array<(DraftDiff, Integer, Hash)>] DraftDiff data, response status code and response headers
761
+ def get_dm_routing_config_draft_diff_with_http_info(opts = {})
762
+ if @api_client.config.debugging
763
+ @api_client.config.logger.debug 'Calling API: DmRoutingConfigsApi.get_dm_routing_config_draft_diff ...'
764
+ end
765
+ # unbox the parameters from the hash
766
+ config_id = opts[:'config_id']
767
+ # verify the required parameter 'config_id' is set
768
+ if @api_client.config.client_side_validation && config_id.nil?
769
+ fail ArgumentError, "Missing the required parameter 'config_id' when calling DmRoutingConfigsApi.get_dm_routing_config_draft_diff"
770
+ end
771
+ # resource path
772
+ local_var_path = '/domain-management/v1/routing-configs/{config_id}/draft/diff'.sub('{' + 'config_id' + '}', CGI.escape(config_id.to_s))
773
+
774
+ # query parameters
775
+ query_params = opts[:query_params] || {}
776
+
777
+ # header parameters
778
+ header_params = opts[:header_params] || {}
779
+ # HTTP header 'Accept' (if needed)
780
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
781
+
782
+ # form parameters
783
+ form_params = opts[:form_params] || {}
784
+
785
+ # http body (model)
786
+ post_body = opts[:debug_body]
787
+
788
+ # return_type
789
+ return_type = opts[:debug_return_type] || 'DraftDiff'
790
+
791
+ # auth_names
792
+ auth_names = opts[:debug_auth_names] || ['token']
793
+
794
+ new_options = opts.merge(
795
+ :operation => :"DmRoutingConfigsApi.get_dm_routing_config_draft_diff",
796
+ :header_params => header_params,
797
+ :query_params => query_params,
798
+ :form_params => form_params,
799
+ :body => post_body,
800
+ :auth_names => auth_names,
801
+ :return_type => return_type
802
+ )
803
+
804
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
805
+ if @api_client.config.debugging
806
+ @api_client.config.logger.debug "API called: DmRoutingConfigsApi#get_dm_routing_config_draft_diff\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
807
+ end
808
+ return data, status_code, headers
809
+ end
810
+
811
+ # Get a path
812
+ # Retrieve a single path by its stable identifier.
813
+ # @option opts [String] :config_id (required)
814
+ # @option opts [String] :path_id (required)
815
+ # @return [PathResponse]
816
+ def get_dm_routing_config_path(opts = {})
817
+ data, _status_code, _headers = get_dm_routing_config_path_with_http_info(opts)
818
+ data
819
+ end
820
+
821
+ # Get a path
822
+ # Retrieve a single path by its stable identifier.
823
+ # @option opts [String] :config_id (required)
824
+ # @option opts [String] :path_id (required)
825
+ # @return [Array<(PathResponse, Integer, Hash)>] PathResponse data, response status code and response headers
826
+ def get_dm_routing_config_path_with_http_info(opts = {})
827
+ if @api_client.config.debugging
828
+ @api_client.config.logger.debug 'Calling API: DmRoutingConfigsApi.get_dm_routing_config_path ...'
829
+ end
830
+ # unbox the parameters from the hash
831
+ config_id = opts[:'config_id']
832
+ path_id = opts[:'path_id']
833
+ # verify the required parameter 'config_id' is set
834
+ if @api_client.config.client_side_validation && config_id.nil?
835
+ fail ArgumentError, "Missing the required parameter 'config_id' when calling DmRoutingConfigsApi.get_dm_routing_config_path"
836
+ end
837
+ # verify the required parameter 'path_id' is set
838
+ if @api_client.config.client_side_validation && path_id.nil?
839
+ fail ArgumentError, "Missing the required parameter 'path_id' when calling DmRoutingConfigsApi.get_dm_routing_config_path"
840
+ end
841
+ # resource path
842
+ local_var_path = '/domain-management/v1/routing-configs/{config_id}/paths/{path_id}'.sub('{' + 'config_id' + '}', CGI.escape(config_id.to_s)).sub('{' + 'path_id' + '}', CGI.escape(path_id.to_s))
843
+
844
+ # query parameters
845
+ query_params = opts[:query_params] || {}
846
+
847
+ # header parameters
848
+ header_params = opts[:header_params] || {}
849
+ # HTTP header 'Accept' (if needed)
850
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
851
+
852
+ # form parameters
853
+ form_params = opts[:form_params] || {}
854
+
855
+ # http body (model)
856
+ post_body = opts[:debug_body]
857
+
858
+ # return_type
859
+ return_type = opts[:debug_return_type] || 'PathResponse'
860
+
861
+ # auth_names
862
+ auth_names = opts[:debug_auth_names] || ['token']
863
+
864
+ new_options = opts.merge(
865
+ :operation => :"DmRoutingConfigsApi.get_dm_routing_config_path",
866
+ :header_params => header_params,
867
+ :query_params => query_params,
868
+ :form_params => form_params,
869
+ :body => post_body,
870
+ :auth_names => auth_names,
871
+ :return_type => return_type
872
+ )
873
+
874
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
875
+ if @api_client.config.debugging
876
+ @api_client.config.logger.debug "API called: DmRoutingConfigsApi#get_dm_routing_config_path\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
877
+ end
878
+ return data, status_code, headers
879
+ end
880
+
881
+ # Get a rule
882
+ # Retrieve a single rule by its stable identifier.
883
+ # @option opts [String] :config_id (required)
884
+ # @option opts [String] :path_id (required)
885
+ # @option opts [String] :rule_id (required)
886
+ # @return [RuleResponse]
887
+ def get_dm_routing_config_rule(opts = {})
888
+ data, _status_code, _headers = get_dm_routing_config_rule_with_http_info(opts)
889
+ data
890
+ end
891
+
892
+ # Get a rule
893
+ # Retrieve a single rule by its stable identifier.
894
+ # @option opts [String] :config_id (required)
895
+ # @option opts [String] :path_id (required)
896
+ # @option opts [String] :rule_id (required)
897
+ # @return [Array<(RuleResponse, Integer, Hash)>] RuleResponse data, response status code and response headers
898
+ def get_dm_routing_config_rule_with_http_info(opts = {})
899
+ if @api_client.config.debugging
900
+ @api_client.config.logger.debug 'Calling API: DmRoutingConfigsApi.get_dm_routing_config_rule ...'
901
+ end
902
+ # unbox the parameters from the hash
903
+ config_id = opts[:'config_id']
904
+ path_id = opts[:'path_id']
905
+ rule_id = opts[:'rule_id']
906
+ # verify the required parameter 'config_id' is set
907
+ if @api_client.config.client_side_validation && config_id.nil?
908
+ fail ArgumentError, "Missing the required parameter 'config_id' when calling DmRoutingConfigsApi.get_dm_routing_config_rule"
909
+ end
910
+ # verify the required parameter 'path_id' is set
911
+ if @api_client.config.client_side_validation && path_id.nil?
912
+ fail ArgumentError, "Missing the required parameter 'path_id' when calling DmRoutingConfigsApi.get_dm_routing_config_rule"
913
+ end
914
+ # verify the required parameter 'rule_id' is set
915
+ if @api_client.config.client_side_validation && rule_id.nil?
916
+ fail ArgumentError, "Missing the required parameter 'rule_id' when calling DmRoutingConfigsApi.get_dm_routing_config_rule"
917
+ end
918
+ # resource path
919
+ local_var_path = '/domain-management/v1/routing-configs/{config_id}/paths/{path_id}/rules/{rule_id}'.sub('{' + 'config_id' + '}', CGI.escape(config_id.to_s)).sub('{' + 'path_id' + '}', CGI.escape(path_id.to_s)).sub('{' + 'rule_id' + '}', CGI.escape(rule_id.to_s))
920
+
921
+ # query parameters
922
+ query_params = opts[:query_params] || {}
923
+
924
+ # header parameters
925
+ header_params = opts[:header_params] || {}
926
+ # HTTP header 'Accept' (if needed)
927
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
928
+
929
+ # form parameters
930
+ form_params = opts[:form_params] || {}
931
+
932
+ # http body (model)
933
+ post_body = opts[:debug_body]
934
+
935
+ # return_type
936
+ return_type = opts[:debug_return_type] || 'RuleResponse'
937
+
938
+ # auth_names
939
+ auth_names = opts[:debug_auth_names] || ['token']
940
+
941
+ new_options = opts.merge(
942
+ :operation => :"DmRoutingConfigsApi.get_dm_routing_config_rule",
943
+ :header_params => header_params,
944
+ :query_params => query_params,
945
+ :form_params => form_params,
946
+ :body => post_body,
947
+ :auth_names => auth_names,
948
+ :return_type => return_type
949
+ )
950
+
951
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
952
+ if @api_client.config.debugging
953
+ @api_client.config.logger.debug "API called: DmRoutingConfigsApi#get_dm_routing_config_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
954
+ end
955
+ return data, status_code, headers
956
+ end
957
+
958
+ # List paths
959
+ # List paths for the config. Returns paths from the active version if one exists, otherwise from the draft.
960
+ # @option opts [String] :config_id (required)
961
+ # @option opts [String] :path Filter results by path pattern. The match strategy is controlled by the &#x60;match&#x60; parameter.
962
+ # @option opts [String] :match How to match the value of the &#x60;path&#x60; filter against existing path patterns. Has no effect unless &#x60;path&#x60; is also provided. (default to 'exact')
963
+ # @option opts [String] :sort The order in which to list the results. (default to '-created_at')
964
+ # @option opts [String] :cursor Cursor value from the &#x60;next_cursor&#x60; field of a previous response, used to retrieve the next page. To request the first page, this should be empty.
965
+ # @option opts [Integer] :limit Limit how many results are returned. (default to 20)
966
+ # @return [PathsResponse]
967
+ def list_dm_routing_config_paths(opts = {})
968
+ data, _status_code, _headers = list_dm_routing_config_paths_with_http_info(opts)
969
+ data
970
+ end
971
+
972
+ # List paths
973
+ # List paths for the config. Returns paths from the active version if one exists, otherwise from the draft.
974
+ # @option opts [String] :config_id (required)
975
+ # @option opts [String] :path Filter results by path pattern. The match strategy is controlled by the &#x60;match&#x60; parameter.
976
+ # @option opts [String] :match How to match the value of the &#x60;path&#x60; filter against existing path patterns. Has no effect unless &#x60;path&#x60; is also provided. (default to 'exact')
977
+ # @option opts [String] :sort The order in which to list the results. (default to '-created_at')
978
+ # @option opts [String] :cursor Cursor value from the &#x60;next_cursor&#x60; field of a previous response, used to retrieve the next page. To request the first page, this should be empty.
979
+ # @option opts [Integer] :limit Limit how many results are returned. (default to 20)
980
+ # @return [Array<(PathsResponse, Integer, Hash)>] PathsResponse data, response status code and response headers
981
+ def list_dm_routing_config_paths_with_http_info(opts = {})
982
+ if @api_client.config.debugging
983
+ @api_client.config.logger.debug 'Calling API: DmRoutingConfigsApi.list_dm_routing_config_paths ...'
984
+ end
985
+ # unbox the parameters from the hash
986
+ config_id = opts[:'config_id']
987
+ # verify the required parameter 'config_id' is set
988
+ if @api_client.config.client_side_validation && config_id.nil?
989
+ fail ArgumentError, "Missing the required parameter 'config_id' when calling DmRoutingConfigsApi.list_dm_routing_config_paths"
990
+ end
991
+ allowable_values = ["exact", "starts_with", "ends_with", "contains"]
992
+ if @api_client.config.client_side_validation && opts[:'match'] && !allowable_values.include?(opts[:'match'])
993
+ fail ArgumentError, "invalid value for \"match\", must be one of #{allowable_values}"
994
+ end
995
+ allowable_values = ["created_at", "-created_at", "id", "-id", "path", "-path"]
996
+ if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
997
+ fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
998
+ end
999
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
1000
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling DmRoutingConfigsApi.list_dm_routing_config_paths, must be smaller than or equal to 100.'
1001
+ end
1002
+
1003
+ # resource path
1004
+ local_var_path = '/domain-management/v1/routing-configs/{config_id}/paths'.sub('{' + 'config_id' + '}', CGI.escape(config_id.to_s))
1005
+
1006
+ # query parameters
1007
+ query_params = opts[:query_params] || {}
1008
+ query_params[:'path'] = opts[:'path'] if !opts[:'path'].nil?
1009
+ query_params[:'match'] = opts[:'match'] if !opts[:'match'].nil?
1010
+ query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
1011
+ query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
1012
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
1013
+
1014
+ # header parameters
1015
+ header_params = opts[:header_params] || {}
1016
+ # HTTP header 'Accept' (if needed)
1017
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1018
+
1019
+ # form parameters
1020
+ form_params = opts[:form_params] || {}
1021
+
1022
+ # http body (model)
1023
+ post_body = opts[:debug_body]
1024
+
1025
+ # return_type
1026
+ return_type = opts[:debug_return_type] || 'PathsResponse'
1027
+
1028
+ # auth_names
1029
+ auth_names = opts[:debug_auth_names] || ['token']
1030
+
1031
+ new_options = opts.merge(
1032
+ :operation => :"DmRoutingConfigsApi.list_dm_routing_config_paths",
1033
+ :header_params => header_params,
1034
+ :query_params => query_params,
1035
+ :form_params => form_params,
1036
+ :body => post_body,
1037
+ :auth_names => auth_names,
1038
+ :return_type => return_type
1039
+ )
1040
+
1041
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1042
+ if @api_client.config.debugging
1043
+ @api_client.config.logger.debug "API called: DmRoutingConfigsApi#list_dm_routing_config_paths\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1044
+ end
1045
+ return data, status_code, headers
1046
+ end
1047
+
1048
+ # List rules
1049
+ # List all rules for a path in evaluation order.
1050
+ # @option opts [String] :config_id (required)
1051
+ # @option opts [String] :path_id (required)
1052
+ # @option opts [String] :sort The order in which to list the results. (default to 'position')
1053
+ # @option opts [String] :cursor Cursor value from the &#x60;next_cursor&#x60; field of a previous response, used to retrieve the next page. To request the first page, this should be empty.
1054
+ # @option opts [Integer] :limit Limit how many results are returned. (default to 20)
1055
+ # @return [RulesResponse]
1056
+ def list_dm_routing_config_rules(opts = {})
1057
+ data, _status_code, _headers = list_dm_routing_config_rules_with_http_info(opts)
1058
+ data
1059
+ end
1060
+
1061
+ # List rules
1062
+ # List all rules for a path in evaluation order.
1063
+ # @option opts [String] :config_id (required)
1064
+ # @option opts [String] :path_id (required)
1065
+ # @option opts [String] :sort The order in which to list the results. (default to 'position')
1066
+ # @option opts [String] :cursor Cursor value from the &#x60;next_cursor&#x60; field of a previous response, used to retrieve the next page. To request the first page, this should be empty.
1067
+ # @option opts [Integer] :limit Limit how many results are returned. (default to 20)
1068
+ # @return [Array<(RulesResponse, Integer, Hash)>] RulesResponse data, response status code and response headers
1069
+ def list_dm_routing_config_rules_with_http_info(opts = {})
1070
+ if @api_client.config.debugging
1071
+ @api_client.config.logger.debug 'Calling API: DmRoutingConfigsApi.list_dm_routing_config_rules ...'
1072
+ end
1073
+ # unbox the parameters from the hash
1074
+ config_id = opts[:'config_id']
1075
+ path_id = opts[:'path_id']
1076
+ # verify the required parameter 'config_id' is set
1077
+ if @api_client.config.client_side_validation && config_id.nil?
1078
+ fail ArgumentError, "Missing the required parameter 'config_id' when calling DmRoutingConfigsApi.list_dm_routing_config_rules"
1079
+ end
1080
+ # verify the required parameter 'path_id' is set
1081
+ if @api_client.config.client_side_validation && path_id.nil?
1082
+ fail ArgumentError, "Missing the required parameter 'path_id' when calling DmRoutingConfigsApi.list_dm_routing_config_rules"
1083
+ end
1084
+ allowable_values = ["created_at", "-created_at", "position", "-position"]
1085
+ if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
1086
+ fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
1087
+ end
1088
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
1089
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling DmRoutingConfigsApi.list_dm_routing_config_rules, must be smaller than or equal to 100.'
1090
+ end
1091
+
1092
+ # resource path
1093
+ local_var_path = '/domain-management/v1/routing-configs/{config_id}/paths/{path_id}/rules'.sub('{' + 'config_id' + '}', CGI.escape(config_id.to_s)).sub('{' + 'path_id' + '}', CGI.escape(path_id.to_s))
1094
+
1095
+ # query parameters
1096
+ query_params = opts[:query_params] || {}
1097
+ query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
1098
+ query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
1099
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
1100
+
1101
+ # header parameters
1102
+ header_params = opts[:header_params] || {}
1103
+ # HTTP header 'Accept' (if needed)
1104
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1105
+
1106
+ # form parameters
1107
+ form_params = opts[:form_params] || {}
1108
+
1109
+ # http body (model)
1110
+ post_body = opts[:debug_body]
1111
+
1112
+ # return_type
1113
+ return_type = opts[:debug_return_type] || 'RulesResponse'
1114
+
1115
+ # auth_names
1116
+ auth_names = opts[:debug_auth_names] || ['token']
1117
+
1118
+ new_options = opts.merge(
1119
+ :operation => :"DmRoutingConfigsApi.list_dm_routing_config_rules",
1120
+ :header_params => header_params,
1121
+ :query_params => query_params,
1122
+ :form_params => form_params,
1123
+ :body => post_body,
1124
+ :auth_names => auth_names,
1125
+ :return_type => return_type
1126
+ )
1127
+
1128
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1129
+ if @api_client.config.debugging
1130
+ @api_client.config.logger.debug "API called: DmRoutingConfigsApi#list_dm_routing_config_rules\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1131
+ end
1132
+ return data, status_code, headers
1133
+ end
1134
+
1135
+ # List versions
1136
+ # List all versions for a routing config.
1137
+ # @option opts [String] :config_id (required)
1138
+ # @option opts [String] :sort The order in which to list the results. (default to '-activated_at')
1139
+ # @option opts [String] :cursor Cursor value from the &#x60;next_cursor&#x60; field of a previous response, used to retrieve the next page. To request the first page, this should be empty.
1140
+ # @option opts [Integer] :limit Limit how many results are returned. (default to 20)
1141
+ # @return [VersionsResponse]
1142
+ def list_dm_routing_config_versions(opts = {})
1143
+ data, _status_code, _headers = list_dm_routing_config_versions_with_http_info(opts)
1144
+ data
1145
+ end
1146
+
1147
+ # List versions
1148
+ # List all versions for a routing config.
1149
+ # @option opts [String] :config_id (required)
1150
+ # @option opts [String] :sort The order in which to list the results. (default to '-activated_at')
1151
+ # @option opts [String] :cursor Cursor value from the &#x60;next_cursor&#x60; field of a previous response, used to retrieve the next page. To request the first page, this should be empty.
1152
+ # @option opts [Integer] :limit Limit how many results are returned. (default to 20)
1153
+ # @return [Array<(VersionsResponse, Integer, Hash)>] VersionsResponse data, response status code and response headers
1154
+ def list_dm_routing_config_versions_with_http_info(opts = {})
1155
+ if @api_client.config.debugging
1156
+ @api_client.config.logger.debug 'Calling API: DmRoutingConfigsApi.list_dm_routing_config_versions ...'
1157
+ end
1158
+ # unbox the parameters from the hash
1159
+ config_id = opts[:'config_id']
1160
+ # verify the required parameter 'config_id' is set
1161
+ if @api_client.config.client_side_validation && config_id.nil?
1162
+ fail ArgumentError, "Missing the required parameter 'config_id' when calling DmRoutingConfigsApi.list_dm_routing_config_versions"
1163
+ end
1164
+ allowable_values = ["activated_at", "-activated_at", "created_at", "-created_at"]
1165
+ if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
1166
+ fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
1167
+ end
1168
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
1169
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling DmRoutingConfigsApi.list_dm_routing_config_versions, must be smaller than or equal to 100.'
1170
+ end
1171
+
1172
+ # resource path
1173
+ local_var_path = '/domain-management/v1/routing-configs/{config_id}/versions'.sub('{' + 'config_id' + '}', CGI.escape(config_id.to_s))
1174
+
1175
+ # query parameters
1176
+ query_params = opts[:query_params] || {}
1177
+ query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
1178
+ query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
1179
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
1180
+
1181
+ # header parameters
1182
+ header_params = opts[:header_params] || {}
1183
+ # HTTP header 'Accept' (if needed)
1184
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1185
+
1186
+ # form parameters
1187
+ form_params = opts[:form_params] || {}
1188
+
1189
+ # http body (model)
1190
+ post_body = opts[:debug_body]
1191
+
1192
+ # return_type
1193
+ return_type = opts[:debug_return_type] || 'VersionsResponse'
1194
+
1195
+ # auth_names
1196
+ auth_names = opts[:debug_auth_names] || ['token']
1197
+
1198
+ new_options = opts.merge(
1199
+ :operation => :"DmRoutingConfigsApi.list_dm_routing_config_versions",
1200
+ :header_params => header_params,
1201
+ :query_params => query_params,
1202
+ :form_params => form_params,
1203
+ :body => post_body,
1204
+ :auth_names => auth_names,
1205
+ :return_type => return_type
1206
+ )
1207
+
1208
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1209
+ if @api_client.config.debugging
1210
+ @api_client.config.logger.debug "API called: DmRoutingConfigsApi#list_dm_routing_config_versions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1211
+ end
1212
+ return data, status_code, headers
1213
+ end
1214
+
1215
+ # List routing configs
1216
+ # List all routing configs for the authenticated customer.
1217
+ # @option opts [Array<String>] :state Filter configs by lifecycle state. Accepts a comma-separated list of state values (e.g. &#x60;?state&#x3D;active,active-with-draft&#x60;). Returns only configs whose current state matches one of the provided values. Returns 400 if any value is not a recognised state.
1218
+ # @option opts [String] :sort The order in which to list the results. (default to '-created_at')
1219
+ # @option opts [String] :cursor Cursor value from the &#x60;next_cursor&#x60; field of a previous response, used to retrieve the next page. To request the first page, this should be empty.
1220
+ # @option opts [Integer] :limit Limit how many results are returned. (default to 20)
1221
+ # @return [RoutingConfigsResponse]
1222
+ def list_dm_routing_configs(opts = {})
1223
+ data, _status_code, _headers = list_dm_routing_configs_with_http_info(opts)
1224
+ data
1225
+ end
1226
+
1227
+ # List routing configs
1228
+ # List all routing configs for the authenticated customer.
1229
+ # @option opts [Array<String>] :state Filter configs by lifecycle state. Accepts a comma-separated list of state values (e.g. &#x60;?state&#x3D;active,active-with-draft&#x60;). Returns only configs whose current state matches one of the provided values. Returns 400 if any value is not a recognised state.
1230
+ # @option opts [String] :sort The order in which to list the results. (default to '-created_at')
1231
+ # @option opts [String] :cursor Cursor value from the &#x60;next_cursor&#x60; field of a previous response, used to retrieve the next page. To request the first page, this should be empty.
1232
+ # @option opts [Integer] :limit Limit how many results are returned. (default to 20)
1233
+ # @return [Array<(RoutingConfigsResponse, Integer, Hash)>] RoutingConfigsResponse data, response status code and response headers
1234
+ def list_dm_routing_configs_with_http_info(opts = {})
1235
+ if @api_client.config.debugging
1236
+ @api_client.config.logger.debug 'Calling API: DmRoutingConfigsApi.list_dm_routing_configs ...'
1237
+ end
1238
+ # unbox the parameters from the hash
1239
+ allowable_values = ["draft-only", "active", "active-with-draft"]
1240
+ if @api_client.config.client_side_validation && opts[:'state'] && !opts[:'state'].all? { |item| allowable_values.include?(item) }
1241
+ fail ArgumentError, "invalid value for \"state\", must include one of #{allowable_values}"
1242
+ end
1243
+ allowable_values = ["created_at", "-created_at", "id", "-id", "name", "-name"]
1244
+ if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
1245
+ fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
1246
+ end
1247
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
1248
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling DmRoutingConfigsApi.list_dm_routing_configs, must be smaller than or equal to 100.'
1249
+ end
1250
+
1251
+ # resource path
1252
+ local_var_path = '/domain-management/v1/routing-configs'
1253
+
1254
+ # query parameters
1255
+ query_params = opts[:query_params] || {}
1256
+ query_params[:'state'] = @api_client.build_collection_param(opts[:'state'], :csv) if !opts[:'state'].nil?
1257
+ query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
1258
+ query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
1259
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
1260
+
1261
+ # header parameters
1262
+ header_params = opts[:header_params] || {}
1263
+ # HTTP header 'Accept' (if needed)
1264
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1265
+
1266
+ # form parameters
1267
+ form_params = opts[:form_params] || {}
1268
+
1269
+ # http body (model)
1270
+ post_body = opts[:debug_body]
1271
+
1272
+ # return_type
1273
+ return_type = opts[:debug_return_type] || 'RoutingConfigsResponse'
1274
+
1275
+ # auth_names
1276
+ auth_names = opts[:debug_auth_names] || ['token']
1277
+
1278
+ new_options = opts.merge(
1279
+ :operation => :"DmRoutingConfigsApi.list_dm_routing_configs",
1280
+ :header_params => header_params,
1281
+ :query_params => query_params,
1282
+ :form_params => form_params,
1283
+ :body => post_body,
1284
+ :auth_names => auth_names,
1285
+ :return_type => return_type
1286
+ )
1287
+
1288
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1289
+ if @api_client.config.debugging
1290
+ @api_client.config.logger.debug "API called: DmRoutingConfigsApi#list_dm_routing_configs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1291
+ end
1292
+ return data, status_code, headers
1293
+ end
1294
+
1295
+ # Reactivate a version
1296
+ # Reactivate a previously-active version. The currently active version, if any, becomes inactive but is retained in version history.
1297
+ # @option opts [String] :config_id (required)
1298
+ # @option opts [String] :version_id (required)
1299
+ # @return [RoutingConfigVersionResponse]
1300
+ def reactivate_dm_routing_config_version(opts = {})
1301
+ data, _status_code, _headers = reactivate_dm_routing_config_version_with_http_info(opts)
1302
+ data
1303
+ end
1304
+
1305
+ # Reactivate a version
1306
+ # Reactivate a previously-active version. The currently active version, if any, becomes inactive but is retained in version history.
1307
+ # @option opts [String] :config_id (required)
1308
+ # @option opts [String] :version_id (required)
1309
+ # @return [Array<(RoutingConfigVersionResponse, Integer, Hash)>] RoutingConfigVersionResponse data, response status code and response headers
1310
+ def reactivate_dm_routing_config_version_with_http_info(opts = {})
1311
+ if @api_client.config.debugging
1312
+ @api_client.config.logger.debug 'Calling API: DmRoutingConfigsApi.reactivate_dm_routing_config_version ...'
1313
+ end
1314
+ # unbox the parameters from the hash
1315
+ config_id = opts[:'config_id']
1316
+ version_id = opts[:'version_id']
1317
+ # verify the required parameter 'config_id' is set
1318
+ if @api_client.config.client_side_validation && config_id.nil?
1319
+ fail ArgumentError, "Missing the required parameter 'config_id' when calling DmRoutingConfigsApi.reactivate_dm_routing_config_version"
1320
+ end
1321
+ # verify the required parameter 'version_id' is set
1322
+ if @api_client.config.client_side_validation && version_id.nil?
1323
+ fail ArgumentError, "Missing the required parameter 'version_id' when calling DmRoutingConfigsApi.reactivate_dm_routing_config_version"
1324
+ end
1325
+ # resource path
1326
+ local_var_path = '/domain-management/v1/routing-configs/{config_id}/versions/{version_id}/activate'.sub('{' + 'config_id' + '}', CGI.escape(config_id.to_s)).sub('{' + 'version_id' + '}', CGI.escape(version_id.to_s))
1327
+
1328
+ # query parameters
1329
+ query_params = opts[:query_params] || {}
1330
+
1331
+ # header parameters
1332
+ header_params = opts[:header_params] || {}
1333
+ # HTTP header 'Accept' (if needed)
1334
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1335
+
1336
+ # form parameters
1337
+ form_params = opts[:form_params] || {}
1338
+
1339
+ # http body (model)
1340
+ post_body = opts[:debug_body]
1341
+
1342
+ # return_type
1343
+ return_type = opts[:debug_return_type] || 'RoutingConfigVersionResponse'
1344
+
1345
+ # auth_names
1346
+ auth_names = opts[:debug_auth_names] || ['token']
1347
+
1348
+ new_options = opts.merge(
1349
+ :operation => :"DmRoutingConfigsApi.reactivate_dm_routing_config_version",
1350
+ :header_params => header_params,
1351
+ :query_params => query_params,
1352
+ :form_params => form_params,
1353
+ :body => post_body,
1354
+ :auth_names => auth_names,
1355
+ :return_type => return_type
1356
+ )
1357
+
1358
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1359
+ if @api_client.config.debugging
1360
+ @api_client.config.logger.debug "API called: DmRoutingConfigsApi#reactivate_dm_routing_config_version\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1361
+ end
1362
+ return data, status_code, headers
1363
+ end
1364
+
1365
+ # Update the draft
1366
+ # Update metadata on the draft version, such as its comment. If no draft exists, one is created automatically by cloning the active version.
1367
+ # @option opts [String] :config_id (required)
1368
+ # @option opts [DraftUpdate] :draft_update
1369
+ # @return [RoutingConfigVersionResponse]
1370
+ def update_dm_routing_config_draft(opts = {})
1371
+ data, _status_code, _headers = update_dm_routing_config_draft_with_http_info(opts)
1372
+ data
1373
+ end
1374
+
1375
+ # Update the draft
1376
+ # Update metadata on the draft version, such as its comment. If no draft exists, one is created automatically by cloning the active version.
1377
+ # @option opts [String] :config_id (required)
1378
+ # @option opts [DraftUpdate] :draft_update
1379
+ # @return [Array<(RoutingConfigVersionResponse, Integer, Hash)>] RoutingConfigVersionResponse data, response status code and response headers
1380
+ def update_dm_routing_config_draft_with_http_info(opts = {})
1381
+ if @api_client.config.debugging
1382
+ @api_client.config.logger.debug 'Calling API: DmRoutingConfigsApi.update_dm_routing_config_draft ...'
1383
+ end
1384
+ # unbox the parameters from the hash
1385
+ config_id = opts[:'config_id']
1386
+ # verify the required parameter 'config_id' is set
1387
+ if @api_client.config.client_side_validation && config_id.nil?
1388
+ fail ArgumentError, "Missing the required parameter 'config_id' when calling DmRoutingConfigsApi.update_dm_routing_config_draft"
1389
+ end
1390
+ # resource path
1391
+ local_var_path = '/domain-management/v1/routing-configs/{config_id}/draft'.sub('{' + 'config_id' + '}', CGI.escape(config_id.to_s))
1392
+
1393
+ # query parameters
1394
+ query_params = opts[:query_params] || {}
1395
+
1396
+ # header parameters
1397
+ header_params = opts[:header_params] || {}
1398
+ # HTTP header 'Accept' (if needed)
1399
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1400
+ # HTTP header 'Content-Type'
1401
+ content_type = @api_client.select_header_content_type(['application/json'])
1402
+ if !content_type.nil?
1403
+ header_params['Content-Type'] = content_type
1404
+ end
1405
+
1406
+ # form parameters
1407
+ form_params = opts[:form_params] || {}
1408
+
1409
+ # http body (model)
1410
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'draft_update'])
1411
+
1412
+ # return_type
1413
+ return_type = opts[:debug_return_type] || 'RoutingConfigVersionResponse'
1414
+
1415
+ # auth_names
1416
+ auth_names = opts[:debug_auth_names] || ['token']
1417
+
1418
+ new_options = opts.merge(
1419
+ :operation => :"DmRoutingConfigsApi.update_dm_routing_config_draft",
1420
+ :header_params => header_params,
1421
+ :query_params => query_params,
1422
+ :form_params => form_params,
1423
+ :body => post_body,
1424
+ :auth_names => auth_names,
1425
+ :return_type => return_type
1426
+ )
1427
+
1428
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
1429
+ if @api_client.config.debugging
1430
+ @api_client.config.logger.debug "API called: DmRoutingConfigsApi#update_dm_routing_config_draft\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1431
+ end
1432
+ return data, status_code, headers
1433
+ end
1434
+
1435
+ # Update a path
1436
+ # Update a path on the config's draft version. If no draft exists, one is created automatically by cloning the active version.
1437
+ # @option opts [String] :config_id (required)
1438
+ # @option opts [String] :path_id (required)
1439
+ # @option opts [PathUpdate] :path_update
1440
+ # @return [PathResponse]
1441
+ def update_dm_routing_config_path(opts = {})
1442
+ data, _status_code, _headers = update_dm_routing_config_path_with_http_info(opts)
1443
+ data
1444
+ end
1445
+
1446
+ # Update a path
1447
+ # Update a path on the config&#39;s draft version. If no draft exists, one is created automatically by cloning the active version.
1448
+ # @option opts [String] :config_id (required)
1449
+ # @option opts [String] :path_id (required)
1450
+ # @option opts [PathUpdate] :path_update
1451
+ # @return [Array<(PathResponse, Integer, Hash)>] PathResponse data, response status code and response headers
1452
+ def update_dm_routing_config_path_with_http_info(opts = {})
1453
+ if @api_client.config.debugging
1454
+ @api_client.config.logger.debug 'Calling API: DmRoutingConfigsApi.update_dm_routing_config_path ...'
1455
+ end
1456
+ # unbox the parameters from the hash
1457
+ config_id = opts[:'config_id']
1458
+ path_id = opts[:'path_id']
1459
+ # verify the required parameter 'config_id' is set
1460
+ if @api_client.config.client_side_validation && config_id.nil?
1461
+ fail ArgumentError, "Missing the required parameter 'config_id' when calling DmRoutingConfigsApi.update_dm_routing_config_path"
1462
+ end
1463
+ # verify the required parameter 'path_id' is set
1464
+ if @api_client.config.client_side_validation && path_id.nil?
1465
+ fail ArgumentError, "Missing the required parameter 'path_id' when calling DmRoutingConfigsApi.update_dm_routing_config_path"
1466
+ end
1467
+ # resource path
1468
+ local_var_path = '/domain-management/v1/routing-configs/{config_id}/paths/{path_id}'.sub('{' + 'config_id' + '}', CGI.escape(config_id.to_s)).sub('{' + 'path_id' + '}', CGI.escape(path_id.to_s))
1469
+
1470
+ # query parameters
1471
+ query_params = opts[:query_params] || {}
1472
+
1473
+ # header parameters
1474
+ header_params = opts[:header_params] || {}
1475
+ # HTTP header 'Accept' (if needed)
1476
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1477
+ # HTTP header 'Content-Type'
1478
+ content_type = @api_client.select_header_content_type(['application/json'])
1479
+ if !content_type.nil?
1480
+ header_params['Content-Type'] = content_type
1481
+ end
1482
+
1483
+ # form parameters
1484
+ form_params = opts[:form_params] || {}
1485
+
1486
+ # http body (model)
1487
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'path_update'])
1488
+
1489
+ # return_type
1490
+ return_type = opts[:debug_return_type] || 'PathResponse'
1491
+
1492
+ # auth_names
1493
+ auth_names = opts[:debug_auth_names] || ['token']
1494
+
1495
+ new_options = opts.merge(
1496
+ :operation => :"DmRoutingConfigsApi.update_dm_routing_config_path",
1497
+ :header_params => header_params,
1498
+ :query_params => query_params,
1499
+ :form_params => form_params,
1500
+ :body => post_body,
1501
+ :auth_names => auth_names,
1502
+ :return_type => return_type
1503
+ )
1504
+
1505
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
1506
+ if @api_client.config.debugging
1507
+ @api_client.config.logger.debug "API called: DmRoutingConfigsApi#update_dm_routing_config_path\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1508
+ end
1509
+ return data, status_code, headers
1510
+ end
1511
+
1512
+ # Update a rule
1513
+ # Update a rule on the config's draft version. If no draft exists, one is created automatically by cloning the active version.
1514
+ # @option opts [String] :config_id (required)
1515
+ # @option opts [String] :path_id (required)
1516
+ # @option opts [String] :rule_id (required)
1517
+ # @option opts [RuleUpdate] :rule_update
1518
+ # @return [RuleResponse]
1519
+ def update_dm_routing_config_rule(opts = {})
1520
+ data, _status_code, _headers = update_dm_routing_config_rule_with_http_info(opts)
1521
+ data
1522
+ end
1523
+
1524
+ # Update a rule
1525
+ # Update a rule on the config&#39;s draft version. If no draft exists, one is created automatically by cloning the active version.
1526
+ # @option opts [String] :config_id (required)
1527
+ # @option opts [String] :path_id (required)
1528
+ # @option opts [String] :rule_id (required)
1529
+ # @option opts [RuleUpdate] :rule_update
1530
+ # @return [Array<(RuleResponse, Integer, Hash)>] RuleResponse data, response status code and response headers
1531
+ def update_dm_routing_config_rule_with_http_info(opts = {})
1532
+ if @api_client.config.debugging
1533
+ @api_client.config.logger.debug 'Calling API: DmRoutingConfigsApi.update_dm_routing_config_rule ...'
1534
+ end
1535
+ # unbox the parameters from the hash
1536
+ config_id = opts[:'config_id']
1537
+ path_id = opts[:'path_id']
1538
+ rule_id = opts[:'rule_id']
1539
+ # verify the required parameter 'config_id' is set
1540
+ if @api_client.config.client_side_validation && config_id.nil?
1541
+ fail ArgumentError, "Missing the required parameter 'config_id' when calling DmRoutingConfigsApi.update_dm_routing_config_rule"
1542
+ end
1543
+ # verify the required parameter 'path_id' is set
1544
+ if @api_client.config.client_side_validation && path_id.nil?
1545
+ fail ArgumentError, "Missing the required parameter 'path_id' when calling DmRoutingConfigsApi.update_dm_routing_config_rule"
1546
+ end
1547
+ # verify the required parameter 'rule_id' is set
1548
+ if @api_client.config.client_side_validation && rule_id.nil?
1549
+ fail ArgumentError, "Missing the required parameter 'rule_id' when calling DmRoutingConfigsApi.update_dm_routing_config_rule"
1550
+ end
1551
+ # resource path
1552
+ local_var_path = '/domain-management/v1/routing-configs/{config_id}/paths/{path_id}/rules/{rule_id}'.sub('{' + 'config_id' + '}', CGI.escape(config_id.to_s)).sub('{' + 'path_id' + '}', CGI.escape(path_id.to_s)).sub('{' + 'rule_id' + '}', CGI.escape(rule_id.to_s))
1553
+
1554
+ # query parameters
1555
+ query_params = opts[:query_params] || {}
1556
+
1557
+ # header parameters
1558
+ header_params = opts[:header_params] || {}
1559
+ # HTTP header 'Accept' (if needed)
1560
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1561
+ # HTTP header 'Content-Type'
1562
+ content_type = @api_client.select_header_content_type(['application/json'])
1563
+ if !content_type.nil?
1564
+ header_params['Content-Type'] = content_type
1565
+ end
1566
+
1567
+ # form parameters
1568
+ form_params = opts[:form_params] || {}
1569
+
1570
+ # http body (model)
1571
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'rule_update'])
1572
+
1573
+ # return_type
1574
+ return_type = opts[:debug_return_type] || 'RuleResponse'
1575
+
1576
+ # auth_names
1577
+ auth_names = opts[:debug_auth_names] || ['token']
1578
+
1579
+ new_options = opts.merge(
1580
+ :operation => :"DmRoutingConfigsApi.update_dm_routing_config_rule",
1581
+ :header_params => header_params,
1582
+ :query_params => query_params,
1583
+ :form_params => form_params,
1584
+ :body => post_body,
1585
+ :auth_names => auth_names,
1586
+ :return_type => return_type
1587
+ )
1588
+
1589
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
1590
+ if @api_client.config.debugging
1591
+ @api_client.config.logger.debug "API called: DmRoutingConfigsApi#update_dm_routing_config_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1592
+ end
1593
+ return data, status_code, headers
1594
+ end
1595
+ end
1596
+ end