fastly 8.8.0 → 8.10.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (104) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +29 -1
  3. data/Gemfile.lock +1 -1
  4. data/README.md +30 -3
  5. data/docs/AclsInComputeApi.md +284 -0
  6. data/docs/Backend.md +2 -2
  7. data/docs/BackendApi.md +8 -8
  8. data/docs/BackendResponse.md +2 -2
  9. data/docs/{OriginInspectorRealtimeEntryRecorded.md → ComputeAclCreateAclsRequest.md} +2 -1
  10. data/docs/ComputeAclCreateAclsResponse.md +11 -0
  11. data/docs/ComputeAclListEntries.md +11 -0
  12. data/docs/ComputeAclListEntriesItem.md +11 -0
  13. data/docs/ComputeAclListEntriesMeta.md +11 -0
  14. data/docs/ComputeAclLookup.md +12 -0
  15. data/docs/ComputeAclUpdateEntry.md +12 -0
  16. data/docs/ConfiguredProductResponse.md +13 -0
  17. data/docs/ConfiguredProductResponseConfiguration.md +11 -0
  18. data/docs/ConfiguredProductResponseLinks.md +11 -0
  19. data/docs/ConfiguredProductResponseProduct.md +11 -0
  20. data/docs/ContactApi.md +1 -1
  21. data/docs/CustomerAddress.md +16 -0
  22. data/docs/CustomerAddressesApi.md +127 -0
  23. data/docs/DomainInspector.md +1 -1
  24. data/docs/DomainInspectorRealtimeEntry.md +1 -1
  25. data/docs/EnabledProductsApi.md +93 -9
  26. data/docs/Environment.md +12 -0
  27. data/docs/{RecordedTimestamp.md → EnvironmentName.md} +1 -1
  28. data/docs/{OriginInspectorSubsequentRequestTimestamp.md → InlineResponse201.md} +2 -1
  29. data/docs/{SubsequentRequestTimestamp.md → ListCustomerAddressesResponse.md} +2 -1
  30. data/docs/OriginInspector.md +1 -1
  31. data/docs/OriginInspectorRealtimeEntry.md +1 -1
  32. data/docs/RealtimeEntryAggregated.md +1 -0
  33. data/docs/RealtimeMeasurements.md +1 -0
  34. data/docs/Results.md +1 -0
  35. data/docs/SchemasVersionResponse.md +1 -0
  36. data/docs/ServiceDetail.md +1 -0
  37. data/docs/ServiceListResponse.md +1 -0
  38. data/docs/ServiceListResponseAllOf.md +1 -0
  39. data/docs/ServiceResponse.md +1 -0
  40. data/docs/ServiceResponseAllOf.md +1 -0
  41. data/docs/ServiceVersionDetail.md +1 -0
  42. data/docs/ServiceVersionDetailOrNull.md +1 -0
  43. data/docs/SetConfiguration.md +11 -0
  44. data/docs/SetWorkspaceId.md +10 -0
  45. data/docs/TlsCertificatesApi.md +2 -2
  46. data/docs/TlsDomainsApi.md +2 -2
  47. data/docs/TlsSubscriptionsApi.md +2 -2
  48. data/docs/VersionApi.md +84 -0
  49. data/docs/VersionResponse.md +1 -0
  50. data/docs/VersionResponseAllOf.md +1 -0
  51. data/lib/fastly/api/acls_in_compute_api.rb +470 -0
  52. data/lib/fastly/api/backend_api.rb +8 -8
  53. data/lib/fastly/api/contact_api.rb +1 -1
  54. data/lib/fastly/api/customer_addresses_api.rb +224 -0
  55. data/lib/fastly/api/enabled_products_api.rb +164 -10
  56. data/lib/fastly/api/tls_certificates_api.rb +7 -7
  57. data/lib/fastly/api/tls_domains_api.rb +7 -7
  58. data/lib/fastly/api/tls_subscriptions_api.rb +7 -7
  59. data/lib/fastly/api/version_api.rb +154 -0
  60. data/lib/fastly/configuration.rb +84 -0
  61. data/lib/fastly/models/backend.rb +2 -2
  62. data/lib/fastly/models/backend_response.rb +2 -2
  63. data/lib/fastly/models/billing_response_line_item.rb +10 -0
  64. data/lib/fastly/models/{origin_inspector_realtime_entry_recorded.rb → compute_acl_create_acls_request.rb} +15 -6
  65. data/lib/fastly/models/compute_acl_create_acls_response.rb +227 -0
  66. data/lib/fastly/models/compute_acl_list_entries.rb +228 -0
  67. data/lib/fastly/models/compute_acl_list_entries_item.rb +227 -0
  68. data/lib/fastly/models/compute_acl_list_entries_meta.rb +227 -0
  69. data/lib/fastly/models/compute_acl_lookup.rb +238 -0
  70. data/lib/fastly/models/compute_acl_update_entry.rb +238 -0
  71. data/lib/fastly/models/configured_product_response.rb +243 -0
  72. data/lib/fastly/models/configured_product_response_configuration.rb +227 -0
  73. data/lib/fastly/models/configured_product_response_links.rb +227 -0
  74. data/lib/fastly/models/configured_product_response_product.rb +227 -0
  75. data/lib/fastly/models/customer_address.rb +294 -0
  76. data/lib/fastly/models/domain_inspector.rb +2 -1
  77. data/lib/fastly/models/domain_inspector_realtime_entry.rb +2 -1
  78. data/lib/fastly/models/environment.rb +235 -0
  79. data/lib/fastly/models/environment_name.rb +34 -0
  80. data/lib/fastly/models/event_attributes.rb +2 -2
  81. data/lib/fastly/models/{recorded_timestamp.rb → inline_response201.rb} +15 -6
  82. data/lib/fastly/models/line_item_data.rb +10 -0
  83. data/lib/fastly/models/{origin_inspector_subsequent_request_timestamp.rb → list_customer_addresses_response.rb} +16 -6
  84. data/lib/fastly/models/origin_inspector.rb +2 -1
  85. data/lib/fastly/models/origin_inspector_realtime_entry.rb +2 -1
  86. data/lib/fastly/models/realtime_entry_aggregated.rb +14 -4
  87. data/lib/fastly/models/realtime_measurements.rb +14 -4
  88. data/lib/fastly/models/results.rb +11 -1
  89. data/lib/fastly/models/schemas_version_response.rb +16 -4
  90. data/lib/fastly/models/service_detail.rb +13 -1
  91. data/lib/fastly/models/service_list_response.rb +16 -4
  92. data/lib/fastly/models/service_list_response_all_of.rb +16 -4
  93. data/lib/fastly/models/service_response.rb +16 -4
  94. data/lib/fastly/models/service_response_all_of.rb +16 -4
  95. data/lib/fastly/models/service_version_detail.rb +13 -1
  96. data/lib/fastly/models/service_version_detail_or_null.rb +13 -1
  97. data/lib/fastly/models/set_configuration.rb +227 -0
  98. data/lib/fastly/models/{subsequent_request_timestamp.rb → set_workspace_id.rb} +15 -6
  99. data/lib/fastly/models/version_response.rb +16 -4
  100. data/lib/fastly/models/version_response_all_of.rb +16 -4
  101. data/lib/fastly/version.rb +1 -1
  102. data/lib/fastly.rb +20 -4
  103. data/sig.json +1 -1
  104. metadata +42 -10
@@ -0,0 +1,224 @@
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 CustomerAddressesApi
15
+ attr_accessor :api_client
16
+
17
+ def initialize(api_client = ApiClient.default)
18
+ @api_client = api_client
19
+ end
20
+ # Creates an address associated with a customer account.
21
+ # Creates an address associated with a customer account.
22
+ # @option opts [CustomerAddress] :customer_address (required)
23
+ # @return [InlineResponse201]
24
+ def create_customer_address(opts = {})
25
+ data, _status_code, _headers = create_customer_address_with_http_info(opts)
26
+ data
27
+ end
28
+
29
+ # Creates an address associated with a customer account.
30
+ # Creates an address associated with a customer account.
31
+ # @option opts [CustomerAddress] :customer_address (required)
32
+ # @return [Array<(InlineResponse201, Integer, Hash)>] InlineResponse201 data, response status code and response headers
33
+ def create_customer_address_with_http_info(opts = {})
34
+ if @api_client.config.debugging
35
+ @api_client.config.logger.debug 'Calling API: CustomerAddressesApi.create_customer_address ...'
36
+ end
37
+ # unbox the parameters from the hash
38
+ customer_address = opts[:'customer_address']
39
+ # verify the required parameter 'customer_address' is set
40
+ if @api_client.config.client_side_validation && customer_address.nil?
41
+ fail ArgumentError, "Missing the required parameter 'customer_address' when calling CustomerAddressesApi.create_customer_address"
42
+ end
43
+ # resource path
44
+ local_var_path = '/billing/v3/customer-addresses'
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
+ # HTTP header 'Content-Type'
54
+ content_type = @api_client.select_header_content_type(['application/json'])
55
+ if !content_type.nil?
56
+ header_params['Content-Type'] = content_type
57
+ end
58
+
59
+ # form parameters
60
+ form_params = opts[:form_params] || {}
61
+
62
+ # http body (model)
63
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(customer_address)
64
+
65
+ # return_type
66
+ return_type = opts[:debug_return_type] || 'InlineResponse201'
67
+
68
+ # auth_names
69
+ auth_names = opts[:debug_auth_names] || ['token']
70
+
71
+ new_options = opts.merge(
72
+ :operation => :"CustomerAddressesApi.create_customer_address",
73
+ :header_params => header_params,
74
+ :query_params => query_params,
75
+ :form_params => form_params,
76
+ :body => post_body,
77
+ :auth_names => auth_names,
78
+ :return_type => return_type
79
+ )
80
+
81
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
82
+ if @api_client.config.debugging
83
+ @api_client.config.logger.debug "API called: CustomerAddressesApi#create_customer_address\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
84
+ end
85
+ return data, status_code, headers
86
+ end
87
+
88
+ # Return the list of addresses associated with a customer account.
89
+ # Return the list of addresses associated with a customer account.
90
+ # @return [ListCustomerAddressesResponse]
91
+ def list_customer_addresses(opts = {})
92
+ data, _status_code, _headers = list_customer_addresses_with_http_info(opts)
93
+ data
94
+ end
95
+
96
+ # Return the list of addresses associated with a customer account.
97
+ # Return the list of addresses associated with a customer account.
98
+ # @return [Array<(ListCustomerAddressesResponse, Integer, Hash)>] ListCustomerAddressesResponse data, response status code and response headers
99
+ def list_customer_addresses_with_http_info(opts = {})
100
+ if @api_client.config.debugging
101
+ @api_client.config.logger.debug 'Calling API: CustomerAddressesApi.list_customer_addresses ...'
102
+ end
103
+ # unbox the parameters from the hash
104
+ # resource path
105
+ local_var_path = '/billing/v3/customer-addresses'
106
+
107
+ # query parameters
108
+ query_params = opts[:query_params] || {}
109
+
110
+ # header parameters
111
+ header_params = opts[:header_params] || {}
112
+ # HTTP header 'Accept' (if needed)
113
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
114
+
115
+ # form parameters
116
+ form_params = opts[:form_params] || {}
117
+
118
+ # http body (model)
119
+ post_body = opts[:debug_body]
120
+
121
+ # return_type
122
+ return_type = opts[:debug_return_type] || 'ListCustomerAddressesResponse'
123
+
124
+ # auth_names
125
+ auth_names = opts[:debug_auth_names] || ['token']
126
+
127
+ new_options = opts.merge(
128
+ :operation => :"CustomerAddressesApi.list_customer_addresses",
129
+ :header_params => header_params,
130
+ :query_params => query_params,
131
+ :form_params => form_params,
132
+ :body => post_body,
133
+ :auth_names => auth_names,
134
+ :return_type => return_type
135
+ )
136
+
137
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
138
+ if @api_client.config.debugging
139
+ @api_client.config.logger.debug "API called: CustomerAddressesApi#list_customer_addresses\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
140
+ end
141
+ return data, status_code, headers
142
+ end
143
+
144
+ # Updates an address associated with a customer account.
145
+ # Updates an address associated with a customer account.
146
+ # @option opts [String] :type Alphanumeric type of the address being modified. (required)
147
+ # @option opts [CustomerAddress] :customer_address (required)
148
+ # @return [nil]
149
+ def update_customer_address(opts = {})
150
+ update_customer_address_with_http_info(opts)
151
+ nil
152
+ end
153
+
154
+ # Updates an address associated with a customer account.
155
+ # Updates an address associated with a customer account.
156
+ # @option opts [String] :type Alphanumeric type of the address being modified. (required)
157
+ # @option opts [CustomerAddress] :customer_address (required)
158
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
159
+ def update_customer_address_with_http_info(opts = {})
160
+ if @api_client.config.debugging
161
+ @api_client.config.logger.debug 'Calling API: CustomerAddressesApi.update_customer_address ...'
162
+ end
163
+ # unbox the parameters from the hash
164
+ type = opts[:'type']
165
+ customer_address = opts[:'customer_address']
166
+ # verify the required parameter 'type' is set
167
+ if @api_client.config.client_side_validation && type.nil?
168
+ fail ArgumentError, "Missing the required parameter 'type' when calling CustomerAddressesApi.update_customer_address"
169
+ end
170
+ pattern = Regexp.new(/^(tax|billing)$/)
171
+ if @api_client.config.client_side_validation && type !~ pattern
172
+ fail ArgumentError, "invalid value for 'type' when calling CustomerAddressesApi.update_customer_address, must conform to the pattern #{pattern}."
173
+ end
174
+
175
+ # verify the required parameter 'customer_address' is set
176
+ if @api_client.config.client_side_validation && customer_address.nil?
177
+ fail ArgumentError, "Missing the required parameter 'customer_address' when calling CustomerAddressesApi.update_customer_address"
178
+ end
179
+ # resource path
180
+ local_var_path = '/billing/v3/customer-addresses/{type}'.sub('{' + 'type' + '}', CGI.escape(type.to_s))
181
+
182
+ # query parameters
183
+ query_params = opts[:query_params] || {}
184
+
185
+ # header parameters
186
+ header_params = opts[:header_params] || {}
187
+ # HTTP header 'Accept' (if needed)
188
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
189
+ # HTTP header 'Content-Type'
190
+ content_type = @api_client.select_header_content_type(['application/json'])
191
+ if !content_type.nil?
192
+ header_params['Content-Type'] = content_type
193
+ end
194
+
195
+ # form parameters
196
+ form_params = opts[:form_params] || {}
197
+
198
+ # http body (model)
199
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(customer_address)
200
+
201
+ # return_type
202
+ return_type = opts[:debug_return_type]
203
+
204
+ # auth_names
205
+ auth_names = opts[:debug_auth_names] || ['token']
206
+
207
+ new_options = opts.merge(
208
+ :operation => :"CustomerAddressesApi.update_customer_address",
209
+ :header_params => header_params,
210
+ :query_params => query_params,
211
+ :form_params => form_params,
212
+ :body => post_body,
213
+ :auth_names => auth_names,
214
+ :return_type => return_type
215
+ )
216
+
217
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
218
+ if @api_client.config.debugging
219
+ @api_client.config.logger.debug "API called: CustomerAddressesApi#update_customer_address\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
220
+ end
221
+ return data, status_code, headers
222
+ end
223
+ end
224
+ end
@@ -18,7 +18,7 @@ module Fastly
18
18
  @api_client = api_client
19
19
  end
20
20
  # Disable a product
21
- # Disable a product on a service. Supported product IDs: `brotli_compression`,`domain_inspector`,`fanout`,`image_optimizer`,`origin_inspector`, and `websockets`.
21
+ # Disable a product on a service. Supported product IDs: `brotli_compression`,`domain_inspector`,`fanout`,`image_optimizer`,`origin_inspector`, `websockets`, `bot_management`, and `ngwaf`.
22
22
  # @option opts [String] :product_id (required)
23
23
  # @option opts [String] :service_id Alphanumeric string identifying the service. (required)
24
24
  # @return [nil]
@@ -28,7 +28,7 @@ module Fastly
28
28
  end
29
29
 
30
30
  # Disable a product
31
- # Disable a product on a service. Supported product IDs: &#x60;brotli_compression&#x60;,&#x60;domain_inspector&#x60;,&#x60;fanout&#x60;,&#x60;image_optimizer&#x60;,&#x60;origin_inspector&#x60;, and &#x60;websockets&#x60;.
31
+ # Disable a product on a service. Supported product IDs: &#x60;brotli_compression&#x60;,&#x60;domain_inspector&#x60;,&#x60;fanout&#x60;,&#x60;image_optimizer&#x60;,&#x60;origin_inspector&#x60;, &#x60;websockets&#x60;, &#x60;bot_management&#x60;, and &#x60;ngwaf&#x60;.
32
32
  # @option opts [String] :product_id (required)
33
33
  # @option opts [String] :service_id Alphanumeric string identifying the service. (required)
34
34
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
@@ -48,7 +48,7 @@ module Fastly
48
48
  fail ArgumentError, "Missing the required parameter 'service_id' when calling EnabledProductsApi.disable_product"
49
49
  end
50
50
  # resource path
51
- local_var_path = '/enabled-products/{product_id}/services/{service_id}'.sub('{' + 'product_id' + '}', CGI.escape(product_id.to_s)).sub('{' + 'service_id' + '}', CGI.escape(service_id.to_s))
51
+ local_var_path = '/enabled-products/v1/{product_id}/services/{service_id}'.sub('{' + 'product_id' + '}', CGI.escape(product_id.to_s)).sub('{' + 'service_id' + '}', CGI.escape(service_id.to_s))
52
52
 
53
53
  # query parameters
54
54
  query_params = opts[:query_params] || {}
@@ -86,9 +86,10 @@ module Fastly
86
86
  end
87
87
 
88
88
  # Enable a product
89
- # Enable a product on a service. Supported product IDs: `brotli_compression`,`domain_inspector`,`fanout`,`image_optimizer`,`origin_inspector`, and `websockets`.
89
+ # Enable a product on a service. Supported product IDs: `brotli_compression`,`domain_inspector`,`fanout`,`image_optimizer`,`origin_inspector`, `websockets`, `bot_management`, and `ngwaf`.
90
90
  # @option opts [String] :product_id (required)
91
91
  # @option opts [String] :service_id Alphanumeric string identifying the service. (required)
92
+ # @option opts [SetWorkspaceId] :set_workspace_id
92
93
  # @return [EnabledProductResponse]
93
94
  def enable_product(opts = {})
94
95
  data, _status_code, _headers = enable_product_with_http_info(opts)
@@ -96,9 +97,10 @@ module Fastly
96
97
  end
97
98
 
98
99
  # Enable a product
99
- # Enable a product on a service. Supported product IDs: &#x60;brotli_compression&#x60;,&#x60;domain_inspector&#x60;,&#x60;fanout&#x60;,&#x60;image_optimizer&#x60;,&#x60;origin_inspector&#x60;, and &#x60;websockets&#x60;.
100
+ # Enable a product on a service. Supported product IDs: &#x60;brotli_compression&#x60;,&#x60;domain_inspector&#x60;,&#x60;fanout&#x60;,&#x60;image_optimizer&#x60;,&#x60;origin_inspector&#x60;, &#x60;websockets&#x60;, &#x60;bot_management&#x60;, and &#x60;ngwaf&#x60;.
100
101
  # @option opts [String] :product_id (required)
101
102
  # @option opts [String] :service_id Alphanumeric string identifying the service. (required)
103
+ # @option opts [SetWorkspaceId] :set_workspace_id
102
104
  # @return [Array<(EnabledProductResponse, Integer, Hash)>] EnabledProductResponse data, response status code and response headers
103
105
  def enable_product_with_http_info(opts = {})
104
106
  if @api_client.config.debugging
@@ -116,7 +118,7 @@ module Fastly
116
118
  fail ArgumentError, "Missing the required parameter 'service_id' when calling EnabledProductsApi.enable_product"
117
119
  end
118
120
  # resource path
119
- local_var_path = '/enabled-products/{product_id}/services/{service_id}'.sub('{' + 'product_id' + '}', CGI.escape(product_id.to_s)).sub('{' + 'service_id' + '}', CGI.escape(service_id.to_s))
121
+ local_var_path = '/enabled-products/v1/{product_id}/services/{service_id}'.sub('{' + 'product_id' + '}', CGI.escape(product_id.to_s)).sub('{' + 'service_id' + '}', CGI.escape(service_id.to_s))
120
122
 
121
123
  # query parameters
122
124
  query_params = opts[:query_params] || {}
@@ -125,12 +127,17 @@ module Fastly
125
127
  header_params = opts[:header_params] || {}
126
128
  # HTTP header 'Accept' (if needed)
127
129
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
130
+ # HTTP header 'Content-Type'
131
+ content_type = @api_client.select_header_content_type(['application/json'])
132
+ if !content_type.nil?
133
+ header_params['Content-Type'] = content_type
134
+ end
128
135
 
129
136
  # form parameters
130
137
  form_params = opts[:form_params] || {}
131
138
 
132
139
  # http body (model)
133
- post_body = opts[:debug_body]
140
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'set_workspace_id'])
134
141
 
135
142
  # return_type
136
143
  return_type = opts[:debug_return_type] || 'EnabledProductResponse'
@@ -156,7 +163,7 @@ module Fastly
156
163
  end
157
164
 
158
165
  # Get enabled product
159
- # Get enabled product on a service. Supported product IDs: `brotli_compression`,`domain_inspector`,`fanout`,`image_optimizer`,`origin_inspector`, and `websockets`.
166
+ # Get enabled product on a service. Supported product IDs: `brotli_compression`,`domain_inspector`,`fanout`,`image_optimizer`,`origin_inspector`, `websockets`, `bot_management`, and `ngwaf`.
160
167
  # @option opts [String] :product_id (required)
161
168
  # @option opts [String] :service_id Alphanumeric string identifying the service. (required)
162
169
  # @return [EnabledProductResponse]
@@ -166,7 +173,7 @@ module Fastly
166
173
  end
167
174
 
168
175
  # Get enabled product
169
- # Get enabled product on a service. Supported product IDs: &#x60;brotli_compression&#x60;,&#x60;domain_inspector&#x60;,&#x60;fanout&#x60;,&#x60;image_optimizer&#x60;,&#x60;origin_inspector&#x60;, and &#x60;websockets&#x60;.
176
+ # Get enabled product on a service. Supported product IDs: &#x60;brotli_compression&#x60;,&#x60;domain_inspector&#x60;,&#x60;fanout&#x60;,&#x60;image_optimizer&#x60;,&#x60;origin_inspector&#x60;, &#x60;websockets&#x60;, &#x60;bot_management&#x60;, and &#x60;ngwaf&#x60;.
170
177
  # @option opts [String] :product_id (required)
171
178
  # @option opts [String] :service_id Alphanumeric string identifying the service. (required)
172
179
  # @return [Array<(EnabledProductResponse, Integer, Hash)>] EnabledProductResponse data, response status code and response headers
@@ -186,7 +193,7 @@ module Fastly
186
193
  fail ArgumentError, "Missing the required parameter 'service_id' when calling EnabledProductsApi.get_enabled_product"
187
194
  end
188
195
  # resource path
189
- local_var_path = '/enabled-products/{product_id}/services/{service_id}'.sub('{' + 'product_id' + '}', CGI.escape(product_id.to_s)).sub('{' + 'service_id' + '}', CGI.escape(service_id.to_s))
196
+ local_var_path = '/enabled-products/v1/{product_id}/services/{service_id}'.sub('{' + 'product_id' + '}', CGI.escape(product_id.to_s)).sub('{' + 'service_id' + '}', CGI.escape(service_id.to_s))
190
197
 
191
198
  # query parameters
192
199
  query_params = opts[:query_params] || {}
@@ -224,5 +231,152 @@ module Fastly
224
231
  end
225
232
  return data, status_code, headers
226
233
  end
234
+
235
+ # Get configuration for a product
236
+ # Get configuration for an enabled product on a service. Supported product IDs: `ngwaf`.
237
+ # @option opts [String] :product_id (required)
238
+ # @option opts [String] :service_id Alphanumeric string identifying the service. (required)
239
+ # @return [ConfiguredProductResponse]
240
+ def get_product_configuration(opts = {})
241
+ data, _status_code, _headers = get_product_configuration_with_http_info(opts)
242
+ data
243
+ end
244
+
245
+ # Get configuration for a product
246
+ # Get configuration for an enabled product on a service. Supported product IDs: &#x60;ngwaf&#x60;.
247
+ # @option opts [String] :product_id (required)
248
+ # @option opts [String] :service_id Alphanumeric string identifying the service. (required)
249
+ # @return [Array<(ConfiguredProductResponse, Integer, Hash)>] ConfiguredProductResponse data, response status code and response headers
250
+ def get_product_configuration_with_http_info(opts = {})
251
+ if @api_client.config.debugging
252
+ @api_client.config.logger.debug 'Calling API: EnabledProductsApi.get_product_configuration ...'
253
+ end
254
+ # unbox the parameters from the hash
255
+ product_id = opts[:'product_id']
256
+ service_id = opts[:'service_id']
257
+ # verify the required parameter 'product_id' is set
258
+ if @api_client.config.client_side_validation && product_id.nil?
259
+ fail ArgumentError, "Missing the required parameter 'product_id' when calling EnabledProductsApi.get_product_configuration"
260
+ end
261
+ # verify the required parameter 'service_id' is set
262
+ if @api_client.config.client_side_validation && service_id.nil?
263
+ fail ArgumentError, "Missing the required parameter 'service_id' when calling EnabledProductsApi.get_product_configuration"
264
+ end
265
+ # resource path
266
+ local_var_path = '/enabled-products/v1/{product_id}/services/{service_id}/configuration'.sub('{' + 'product_id' + '}', CGI.escape(product_id.to_s)).sub('{' + 'service_id' + '}', CGI.escape(service_id.to_s))
267
+
268
+ # query parameters
269
+ query_params = opts[:query_params] || {}
270
+
271
+ # header parameters
272
+ header_params = opts[:header_params] || {}
273
+ # HTTP header 'Accept' (if needed)
274
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
275
+
276
+ # form parameters
277
+ form_params = opts[:form_params] || {}
278
+
279
+ # http body (model)
280
+ post_body = opts[:debug_body]
281
+
282
+ # return_type
283
+ return_type = opts[:debug_return_type] || 'ConfiguredProductResponse'
284
+
285
+ # auth_names
286
+ auth_names = opts[:debug_auth_names] || ['token']
287
+
288
+ new_options = opts.merge(
289
+ :operation => :"EnabledProductsApi.get_product_configuration",
290
+ :header_params => header_params,
291
+ :query_params => query_params,
292
+ :form_params => form_params,
293
+ :body => post_body,
294
+ :auth_names => auth_names,
295
+ :return_type => return_type
296
+ )
297
+
298
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
299
+ if @api_client.config.debugging
300
+ @api_client.config.logger.debug "API called: EnabledProductsApi#get_product_configuration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
301
+ end
302
+ return data, status_code, headers
303
+ end
304
+
305
+ # Update configuration for a product
306
+ # Update configuration for an enabled product on a service. Supported product IDs: `ngwaf`.
307
+ # @option opts [String] :product_id (required)
308
+ # @option opts [String] :service_id Alphanumeric string identifying the service. (required)
309
+ # @option opts [SetConfiguration] :set_configuration
310
+ # @return [ConfiguredProductResponse]
311
+ def set_product_configuration(opts = {})
312
+ data, _status_code, _headers = set_product_configuration_with_http_info(opts)
313
+ data
314
+ end
315
+
316
+ # Update configuration for a product
317
+ # Update configuration for an enabled product on a service. Supported product IDs: &#x60;ngwaf&#x60;.
318
+ # @option opts [String] :product_id (required)
319
+ # @option opts [String] :service_id Alphanumeric string identifying the service. (required)
320
+ # @option opts [SetConfiguration] :set_configuration
321
+ # @return [Array<(ConfiguredProductResponse, Integer, Hash)>] ConfiguredProductResponse data, response status code and response headers
322
+ def set_product_configuration_with_http_info(opts = {})
323
+ if @api_client.config.debugging
324
+ @api_client.config.logger.debug 'Calling API: EnabledProductsApi.set_product_configuration ...'
325
+ end
326
+ # unbox the parameters from the hash
327
+ product_id = opts[:'product_id']
328
+ service_id = opts[:'service_id']
329
+ # verify the required parameter 'product_id' is set
330
+ if @api_client.config.client_side_validation && product_id.nil?
331
+ fail ArgumentError, "Missing the required parameter 'product_id' when calling EnabledProductsApi.set_product_configuration"
332
+ end
333
+ # verify the required parameter 'service_id' is set
334
+ if @api_client.config.client_side_validation && service_id.nil?
335
+ fail ArgumentError, "Missing the required parameter 'service_id' when calling EnabledProductsApi.set_product_configuration"
336
+ end
337
+ # resource path
338
+ local_var_path = '/enabled-products/v1/{product_id}/services/{service_id}/configuration'.sub('{' + 'product_id' + '}', CGI.escape(product_id.to_s)).sub('{' + 'service_id' + '}', CGI.escape(service_id.to_s))
339
+
340
+ # query parameters
341
+ query_params = opts[:query_params] || {}
342
+
343
+ # header parameters
344
+ header_params = opts[:header_params] || {}
345
+ # HTTP header 'Accept' (if needed)
346
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
347
+ # HTTP header 'Content-Type'
348
+ content_type = @api_client.select_header_content_type(['application/json'])
349
+ if !content_type.nil?
350
+ header_params['Content-Type'] = content_type
351
+ end
352
+
353
+ # form parameters
354
+ form_params = opts[:form_params] || {}
355
+
356
+ # http body (model)
357
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'set_configuration'])
358
+
359
+ # return_type
360
+ return_type = opts[:debug_return_type] || 'ConfiguredProductResponse'
361
+
362
+ # auth_names
363
+ auth_names = opts[:debug_auth_names] || ['token']
364
+
365
+ new_options = opts.merge(
366
+ :operation => :"EnabledProductsApi.set_product_configuration",
367
+ :header_params => header_params,
368
+ :query_params => query_params,
369
+ :form_params => form_params,
370
+ :body => post_body,
371
+ :auth_names => auth_names,
372
+ :return_type => return_type
373
+ )
374
+
375
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
376
+ if @api_client.config.debugging
377
+ @api_client.config.logger.debug "API called: EnabledProductsApi#set_product_configuration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
378
+ end
379
+ return data, status_code, headers
380
+ end
227
381
  end
228
382
  end
@@ -273,9 +273,9 @@ module Fastly
273
273
  # @option opts [String] :filter_not_after Limit the returned certificates to those that expire prior to the specified date in UTC. Accepts parameters: lte (e.g., filter[not_after][lte]&#x3D;2020-05-05).
274
274
  # @option opts [String] :filter_tls_domains_id Limit the returned certificates to those that include the specific domain.
275
275
  # @option opts [String] :include Include related objects. Optional, comma-separated values. Permitted values: &#x60;tls_activations&#x60;.
276
+ # @option opts [String] :sort The order in which to list the results. (default to '-created_at')
276
277
  # @option opts [Integer] :page_number Current page.
277
278
  # @option opts [Integer] :page_size Number of records per page. (default to 20)
278
- # @option opts [String] :sort The order in which to list the results by creation date. (default to 'created_at')
279
279
  # @return [TlsCertificatesResponse]
280
280
  def list_tls_certs(opts = {})
281
281
  data, _status_code, _headers = list_tls_certs_with_http_info(opts)
@@ -288,15 +288,19 @@ module Fastly
288
288
  # @option opts [String] :filter_not_after Limit the returned certificates to those that expire prior to the specified date in UTC. Accepts parameters: lte (e.g., filter[not_after][lte]&#x3D;2020-05-05).
289
289
  # @option opts [String] :filter_tls_domains_id Limit the returned certificates to those that include the specific domain.
290
290
  # @option opts [String] :include Include related objects. Optional, comma-separated values. Permitted values: &#x60;tls_activations&#x60;.
291
+ # @option opts [String] :sort The order in which to list the results. (default to '-created_at')
291
292
  # @option opts [Integer] :page_number Current page.
292
293
  # @option opts [Integer] :page_size Number of records per page. (default to 20)
293
- # @option opts [String] :sort The order in which to list the results by creation date. (default to 'created_at')
294
294
  # @return [Array<(TlsCertificatesResponse, Integer, Hash)>] TlsCertificatesResponse data, response status code and response headers
295
295
  def list_tls_certs_with_http_info(opts = {})
296
296
  if @api_client.config.debugging
297
297
  @api_client.config.logger.debug 'Calling API: TlsCertificatesApi.list_tls_certs ...'
298
298
  end
299
299
  # unbox the parameters from the hash
300
+ allowable_values = ["created_at", "-created_at", "not_before", "-not_before", "not_after", "-not_after", "tls_activations.created_at", "-tls_activations.created_at"]
301
+ if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
302
+ fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
303
+ end
300
304
  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 100
301
305
  fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling TlsCertificatesApi.list_tls_certs, must be smaller than or equal to 100.'
302
306
  end
@@ -305,10 +309,6 @@ module Fastly
305
309
  fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling TlsCertificatesApi.list_tls_certs, must be greater than or equal to 1.'
306
310
  end
307
311
 
308
- allowable_values = ["created_at", "-created_at"]
309
- if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
310
- fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
311
- end
312
312
  # resource path
313
313
  local_var_path = '/tls/certificates'
314
314
 
@@ -318,9 +318,9 @@ module Fastly
318
318
  query_params[:'filter[not_after]'] = opts[:'filter_not_after'] if !opts[:'filter_not_after'].nil?
319
319
  query_params[:'filter[tls_domains.id]'] = opts[:'filter_tls_domains_id'] if !opts[:'filter_tls_domains_id'].nil?
320
320
  query_params[:'include'] = opts[:'include'] if !opts[:'include'].nil?
321
+ query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
321
322
  query_params[:'page[number]'] = opts[:'page_number'] if !opts[:'page_number'].nil?
322
323
  query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil?
323
- query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
324
324
 
325
325
  # header parameters
326
326
  header_params = opts[:header_params] || {}
@@ -23,9 +23,9 @@ module Fastly
23
23
  # @option opts [String] :filter_tls_certificates_id Optional. Limit the returned domains to those listed in the given TLS certificate&#39;s SAN list.
24
24
  # @option opts [String] :filter_tls_subscriptions_id Optional. Limit the returned domains to those for a given TLS subscription.
25
25
  # @option opts [String] :include Include related objects. Optional, comma-separated values. Permitted values: &#x60;tls_activations&#x60;, &#x60;tls_certificates&#x60;, &#x60;tls_subscriptions&#x60;, &#x60;tls_subscriptions.tls_authorizations&#x60;, &#x60;tls_authorizations.globalsign_email_challenge&#x60;, and &#x60;tls_authorizations.self_managed_http_challenge&#x60;.
26
+ # @option opts [String] :sort The order in which to list the results. (default to 'id')
26
27
  # @option opts [Integer] :page_number Current page.
27
28
  # @option opts [Integer] :page_size Number of records per page. (default to 20)
28
- # @option opts [String] :sort The order in which to list the results by creation date. (default to 'created_at')
29
29
  # @return [TlsDomainsResponse]
30
30
  def list_tls_domains(opts = {})
31
31
  data, _status_code, _headers = list_tls_domains_with_http_info(opts)
@@ -38,15 +38,19 @@ module Fastly
38
38
  # @option opts [String] :filter_tls_certificates_id Optional. Limit the returned domains to those listed in the given TLS certificate&#39;s SAN list.
39
39
  # @option opts [String] :filter_tls_subscriptions_id Optional. Limit the returned domains to those for a given TLS subscription.
40
40
  # @option opts [String] :include Include related objects. Optional, comma-separated values. Permitted values: &#x60;tls_activations&#x60;, &#x60;tls_certificates&#x60;, &#x60;tls_subscriptions&#x60;, &#x60;tls_subscriptions.tls_authorizations&#x60;, &#x60;tls_authorizations.globalsign_email_challenge&#x60;, and &#x60;tls_authorizations.self_managed_http_challenge&#x60;.
41
+ # @option opts [String] :sort The order in which to list the results. (default to 'id')
41
42
  # @option opts [Integer] :page_number Current page.
42
43
  # @option opts [Integer] :page_size Number of records per page. (default to 20)
43
- # @option opts [String] :sort The order in which to list the results by creation date. (default to 'created_at')
44
44
  # @return [Array<(TlsDomainsResponse, Integer, Hash)>] TlsDomainsResponse data, response status code and response headers
45
45
  def list_tls_domains_with_http_info(opts = {})
46
46
  if @api_client.config.debugging
47
47
  @api_client.config.logger.debug 'Calling API: TlsDomainsApi.list_tls_domains ...'
48
48
  end
49
49
  # unbox the parameters from the hash
50
+ allowable_values = ["tls_activations.created_at", "-tls_activations.created_at", "id", "-id"]
51
+ if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
52
+ fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
53
+ end
50
54
  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 100
51
55
  fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling TlsDomainsApi.list_tls_domains, must be smaller than or equal to 100.'
52
56
  end
@@ -55,10 +59,6 @@ module Fastly
55
59
  fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling TlsDomainsApi.list_tls_domains, must be greater than or equal to 1.'
56
60
  end
57
61
 
58
- allowable_values = ["created_at", "-created_at"]
59
- if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
60
- fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
61
- end
62
62
  # resource path
63
63
  local_var_path = '/tls/domains'
64
64
 
@@ -68,9 +68,9 @@ module Fastly
68
68
  query_params[:'filter[tls_certificates.id]'] = opts[:'filter_tls_certificates_id'] if !opts[:'filter_tls_certificates_id'].nil?
69
69
  query_params[:'filter[tls_subscriptions.id]'] = opts[:'filter_tls_subscriptions_id'] if !opts[:'filter_tls_subscriptions_id'].nil?
70
70
  query_params[:'include'] = opts[:'include'] if !opts[:'include'].nil?
71
+ query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
71
72
  query_params[:'page[number]'] = opts[:'page_number'] if !opts[:'page_number'].nil?
72
73
  query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil?
73
- query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
74
74
 
75
75
  # header parameters
76
76
  header_params = opts[:header_params] || {}
@@ -368,10 +368,10 @@ module Fastly
368
368
  # @option opts [String] :filter_tls_domains_id Limit the returned subscriptions to those that include the specific domain.
369
369
  # @option opts [Boolean] :filter_has_active_order Limit the returned subscriptions to those that have currently active orders. Permitted values: &#x60;true&#x60;.
370
370
  # @option opts [String] :filter_certificate_authority Limit the returned subscriptions to a specific certification authority. Values may include &#x60;certainly&#x60;, &#x60;lets-encrypt&#x60;, or &#x60;globalsign&#x60;.
371
+ # @option opts [String] :sort The order in which to list the results. (default to '-created_at')
371
372
  # @option opts [String] :include Include related objects. Optional, comma-separated values. Permitted values: &#x60;tls_authorizations&#x60;, &#x60;tls_authorizations.globalsign_email_challenge&#x60;, &#x60;tls_authorizations.self_managed_http_challenge&#x60;, and &#x60;tls_certificates&#x60;.
372
373
  # @option opts [Integer] :page_number Current page.
373
374
  # @option opts [Integer] :page_size Number of records per page. (default to 20)
374
- # @option opts [String] :sort The order in which to list the results by creation date. (default to 'created_at')
375
375
  # @return [TlsSubscriptionsResponse]
376
376
  def list_tls_subs(opts = {})
377
377
  data, _status_code, _headers = list_tls_subs_with_http_info(opts)
@@ -384,16 +384,20 @@ module Fastly
384
384
  # @option opts [String] :filter_tls_domains_id Limit the returned subscriptions to those that include the specific domain.
385
385
  # @option opts [Boolean] :filter_has_active_order Limit the returned subscriptions to those that have currently active orders. Permitted values: &#x60;true&#x60;.
386
386
  # @option opts [String] :filter_certificate_authority Limit the returned subscriptions to a specific certification authority. Values may include &#x60;certainly&#x60;, &#x60;lets-encrypt&#x60;, or &#x60;globalsign&#x60;.
387
+ # @option opts [String] :sort The order in which to list the results. (default to '-created_at')
387
388
  # @option opts [String] :include Include related objects. Optional, comma-separated values. Permitted values: &#x60;tls_authorizations&#x60;, &#x60;tls_authorizations.globalsign_email_challenge&#x60;, &#x60;tls_authorizations.self_managed_http_challenge&#x60;, and &#x60;tls_certificates&#x60;.
388
389
  # @option opts [Integer] :page_number Current page.
389
390
  # @option opts [Integer] :page_size Number of records per page. (default to 20)
390
- # @option opts [String] :sort The order in which to list the results by creation date. (default to 'created_at')
391
391
  # @return [Array<(TlsSubscriptionsResponse, Integer, Hash)>] TlsSubscriptionsResponse data, response status code and response headers
392
392
  def list_tls_subs_with_http_info(opts = {})
393
393
  if @api_client.config.debugging
394
394
  @api_client.config.logger.debug 'Calling API: TlsSubscriptionsApi.list_tls_subs ...'
395
395
  end
396
396
  # unbox the parameters from the hash
397
+ allowable_values = ["created_at", "-created_at", "tls_certificates.not_after", "-tls_certificates.not_after"]
398
+ if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
399
+ fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
400
+ end
397
401
  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 100
398
402
  fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling TlsSubscriptionsApi.list_tls_subs, must be smaller than or equal to 100.'
399
403
  end
@@ -402,10 +406,6 @@ module Fastly
402
406
  fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling TlsSubscriptionsApi.list_tls_subs, must be greater than or equal to 1.'
403
407
  end
404
408
 
405
- allowable_values = ["created_at", "-created_at"]
406
- if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
407
- fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
408
- end
409
409
  # resource path
410
410
  local_var_path = '/tls/subscriptions'
411
411
 
@@ -415,10 +415,10 @@ module Fastly
415
415
  query_params[:'filter[tls_domains.id]'] = opts[:'filter_tls_domains_id'] if !opts[:'filter_tls_domains_id'].nil?
416
416
  query_params[:'filter[has_active_order]'] = opts[:'filter_has_active_order'] if !opts[:'filter_has_active_order'].nil?
417
417
  query_params[:'filter[certificate_authority]'] = opts[:'filter_certificate_authority'] if !opts[:'filter_certificate_authority'].nil?
418
+ query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
418
419
  query_params[:'include'] = opts[:'include'] if !opts[:'include'].nil?
419
420
  query_params[:'page[number]'] = opts[:'page_number'] if !opts[:'page_number'].nil?
420
421
  query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil?
421
- query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
422
422
 
423
423
  # header parameters
424
424
  header_params = opts[:header_params] || {}