fastly 7.0.0 → 7.1.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -88,6 +88,10 @@ module Fastly
88
88
  # @option opts [String] :filter_user_id Limit the results returned to a specific user.
89
89
  # @option opts [String] :filter_token_id Limit the returned events to a specific token.
90
90
  # @option opts [String] :filter_created_at Limit the returned events to a specific time frame. Accepts sub-parameters: lt, lte, gt, gte (e.g., filter[created_at][gt]=2022-01-12).
91
+ # @option opts [String] :filter_created_at_lte Return events on and before a date and time in ISO 8601 format.
92
+ # @option opts [String] :filter_created_at_lt Return events before a date and time in ISO 8601 format.
93
+ # @option opts [String] :filter_created_at_gte Return events on and after a date and time in ISO 8601 format.
94
+ # @option opts [String] :filter_created_at_gt Return events after a date and time in ISO 8601 format.
91
95
  # @option opts [Integer] :page_number Current page.
92
96
  # @option opts [Integer] :page_size Number of records per page. (default to 20)
93
97
  # @option opts [String] :sort The order in which to list the results by creation date. (default to 'created_at')
@@ -105,6 +109,10 @@ module Fastly
105
109
  # @option opts [String] :filter_user_id Limit the results returned to a specific user.
106
110
  # @option opts [String] :filter_token_id Limit the returned events to a specific token.
107
111
  # @option opts [String] :filter_created_at Limit the returned events to a specific time frame. Accepts sub-parameters: lt, lte, gt, gte (e.g., filter[created_at][gt]=2022-01-12).
112
+ # @option opts [String] :filter_created_at_lte Return events on and before a date and time in ISO 8601 format.
113
+ # @option opts [String] :filter_created_at_lt Return events before a date and time in ISO 8601 format.
114
+ # @option opts [String] :filter_created_at_gte Return events on and after a date and time in ISO 8601 format.
115
+ # @option opts [String] :filter_created_at_gt Return events after a date and time in ISO 8601 format.
108
116
  # @option opts [Integer] :page_number Current page.
109
117
  # @option opts [Integer] :page_size Number of records per page. (default to 20)
110
118
  # @option opts [String] :sort The order in which to list the results by creation date. (default to 'created_at')
@@ -137,6 +145,10 @@ module Fastly
137
145
  query_params[:'filter[user_id]'] = opts[:'filter_user_id'] if !opts[:'filter_user_id'].nil?
138
146
  query_params[:'filter[token_id]'] = opts[:'filter_token_id'] if !opts[:'filter_token_id'].nil?
139
147
  query_params[:'filter[created_at]'] = opts[:'filter_created_at'] if !opts[:'filter_created_at'].nil?
148
+ query_params[:'filter[created_at][lte]'] = opts[:'filter_created_at_lte'] if !opts[:'filter_created_at_lte'].nil?
149
+ query_params[:'filter[created_at][lt]'] = opts[:'filter_created_at_lt'] if !opts[:'filter_created_at_lt'].nil?
150
+ query_params[:'filter[created_at][gte]'] = opts[:'filter_created_at_gte'] if !opts[:'filter_created_at_gte'].nil?
151
+ query_params[:'filter[created_at][gt]'] = opts[:'filter_created_at_gt'] if !opts[:'filter_created_at_gt'].nil?
140
152
  query_params[:'page[number]'] = opts[:'page_number'] if !opts[:'page_number'].nil?
141
153
  query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil?
142
154
  query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
@@ -0,0 +1,473 @@
1
+ =begin
2
+ #Fastly API
3
+
4
+ #Via the Fastly API you can perform any of the operations that are possible within the management console, including creating services, domains, and backends, configuring rules or uploading your own application code, as well as account operations such as user administration and billing reports. The API is organized into collections of endpoints that allow manipulation of objects related to Fastly services and accounts. For the most accurate and up-to-date API reference content, visit our [Developer Hub](https://developer.fastly.com/reference/api/)
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+ Contact: oss@fastly.com
8
+
9
+ =end
10
+
11
+ require 'cgi'
12
+
13
+ module Fastly
14
+ class LoggingNewrelicotlpApi
15
+ attr_accessor :api_client
16
+
17
+ def initialize(api_client = ApiClient.default)
18
+ @api_client = api_client
19
+ end
20
+ # Create a New Relic OTLP endpoint
21
+ # Create a New Relic OTLP logging object for a particular service and version.
22
+ # @option opts [String] :service_id Alphanumeric string identifying the service. (required)
23
+ # @option opts [Integer] :version_id Integer identifying a service version. (required)
24
+ # @option opts [String] :name The name for the real-time logging configuration.
25
+ # @option opts [String] :placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`.
26
+ # @option opts [String] :response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute.
27
+ # @option opts [String] :format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (default to '{\"timestamp\":\"%{begin:%Y-%m-%dT%H:%M:%S}t\",\"time_elapsed\":\"%{time.elapsed.usec}V\",\"is_tls\":\"%{if(req.is_ssl, \\\"true\\\", \\\"false\\\")}V\",\"client_ip\":\"%{req.http.Fastly-Client-IP}V\",\"geo_city\":\"%{client.geo.city}V\",\"geo_country_code\":\"%{client.geo.country_code}V\",\"request\":\"%{req.request}V\",\"host\":\"%{req.http.Fastly-Orig-Host}V\",\"url\":\"%{json.escape(req.url)}V\",\"request_referer\":\"%{json.escape(req.http.Referer)}V\",\"request_user_agent\":\"%{json.escape(req.http.User-Agent)}V\",\"request_accept_language\":\"%{json.escape(req.http.Accept-Language)}V\",\"request_accept_charset\":\"%{json.escape(req.http.Accept-Charset)}V\",\"cache_status\":\"%{regsub(fastly_info.state, \\\"^(HIT-(SYNTH)|(HITPASS|HIT|MISS|PASS|ERROR|PIPE)).*\\\", \\\"\\\\2\\\\3\\\") }V\"}')
28
+ # @option opts [Integer] :format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (default to FORMAT_VERSION::v2)
29
+ # @option opts [String] :token The Insert API key from the Account page of your New Relic account. Required.
30
+ # @option opts [String] :region The region to which to stream logs. (default to 'US')
31
+ # @option opts [String] :url (Optional) URL of the New Relic Trace Observer, if you are using New Relic Infinite Tracing. (default to 'null')
32
+ # @return [LoggingNewrelicotlpResponse]
33
+ def create_log_newrelicotlp(opts = {})
34
+ data, _status_code, _headers = create_log_newrelicotlp_with_http_info(opts)
35
+ data
36
+ end
37
+
38
+ # Create a New Relic OTLP endpoint
39
+ # Create a New Relic OTLP logging object for a particular service and version.
40
+ # @option opts [String] :service_id Alphanumeric string identifying the service. (required)
41
+ # @option opts [Integer] :version_id Integer identifying a service version. (required)
42
+ # @option opts [String] :name The name for the real-time logging configuration.
43
+ # @option opts [String] :placement Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`.
44
+ # @option opts [String] :response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute.
45
+ # @option opts [String] :format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (default to '{\"timestamp\":\"%{begin:%Y-%m-%dT%H:%M:%S}t\",\"time_elapsed\":\"%{time.elapsed.usec}V\",\"is_tls\":\"%{if(req.is_ssl, \\\"true\\\", \\\"false\\\")}V\",\"client_ip\":\"%{req.http.Fastly-Client-IP}V\",\"geo_city\":\"%{client.geo.city}V\",\"geo_country_code\":\"%{client.geo.country_code}V\",\"request\":\"%{req.request}V\",\"host\":\"%{req.http.Fastly-Orig-Host}V\",\"url\":\"%{json.escape(req.url)}V\",\"request_referer\":\"%{json.escape(req.http.Referer)}V\",\"request_user_agent\":\"%{json.escape(req.http.User-Agent)}V\",\"request_accept_language\":\"%{json.escape(req.http.Accept-Language)}V\",\"request_accept_charset\":\"%{json.escape(req.http.Accept-Charset)}V\",\"cache_status\":\"%{regsub(fastly_info.state, \\\"^(HIT-(SYNTH)|(HITPASS|HIT|MISS|PASS|ERROR|PIPE)).*\\\", \\\"\\\\2\\\\3\\\") }V\"}')
46
+ # @option opts [Integer] :format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`. (default to FORMAT_VERSION::v2)
47
+ # @option opts [String] :token The Insert API key from the Account page of your New Relic account. Required.
48
+ # @option opts [String] :region The region to which to stream logs. (default to 'US')
49
+ # @option opts [String] :url (Optional) URL of the New Relic Trace Observer, if you are using New Relic Infinite Tracing. (default to 'null')
50
+ # @return [Array<(LoggingNewrelicotlpResponse, Integer, Hash)>] LoggingNewrelicotlpResponse data, response status code and response headers
51
+ def create_log_newrelicotlp_with_http_info(opts = {})
52
+ if @api_client.config.debugging
53
+ @api_client.config.logger.debug 'Calling API: LoggingNewrelicotlpApi.create_log_newrelicotlp ...'
54
+ end
55
+ # unbox the parameters from the hash
56
+ service_id = opts[:'service_id']
57
+ version_id = opts[:'version_id']
58
+ # verify the required parameter 'service_id' is set
59
+ if @api_client.config.client_side_validation && service_id.nil?
60
+ fail ArgumentError, "Missing the required parameter 'service_id' when calling LoggingNewrelicotlpApi.create_log_newrelicotlp"
61
+ end
62
+ # verify the required parameter 'version_id' is set
63
+ if @api_client.config.client_side_validation && version_id.nil?
64
+ fail ArgumentError, "Missing the required parameter 'version_id' when calling LoggingNewrelicotlpApi.create_log_newrelicotlp"
65
+ end
66
+ allowable_values = ["none", "waf_debug", "null"]
67
+ if @api_client.config.client_side_validation && opts[:'placement'] && !allowable_values.include?(opts[:'placement'])
68
+ fail ArgumentError, "invalid value for \"placement\", must be one of #{allowable_values}"
69
+ end
70
+ allowable_values = [1, 2]
71
+ if @api_client.config.client_side_validation && opts[:'format_version'] && !allowable_values.include?(opts[:'format_version'])
72
+ fail ArgumentError, "invalid value for \"format_version\", must be one of #{allowable_values}"
73
+ end
74
+ allowable_values = ["US", "EU"]
75
+ if @api_client.config.client_side_validation && opts[:'region'] && !allowable_values.include?(opts[:'region'])
76
+ fail ArgumentError, "invalid value for \"region\", must be one of #{allowable_values}"
77
+ end
78
+ # resource path
79
+ local_var_path = '/service/{service_id}/version/{version_id}/logging/newrelicotlp'.sub('{' + 'service_id' + '}', CGI.escape(service_id.to_s)).sub('{' + 'version_id' + '}', CGI.escape(version_id.to_s))
80
+
81
+ # query parameters
82
+ query_params = opts[:query_params] || {}
83
+
84
+ # header parameters
85
+ header_params = opts[:header_params] || {}
86
+ # HTTP header 'Accept' (if needed)
87
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
88
+ # HTTP header 'Content-Type'
89
+ content_type = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])
90
+ if !content_type.nil?
91
+ header_params['Content-Type'] = content_type
92
+ end
93
+
94
+ # form parameters
95
+ form_params = opts[:form_params] || {}
96
+ form_params['name'] = opts[:'name'] if !opts[:'name'].nil?
97
+ form_params['placement'] = opts[:'placement'] if !opts[:'placement'].nil?
98
+ form_params['response_condition'] = opts[:'response_condition'] if !opts[:'response_condition'].nil?
99
+ form_params['format'] = opts[:'format'] if !opts[:'format'].nil?
100
+ form_params['format_version'] = opts[:'format_version'] if !opts[:'format_version'].nil?
101
+ form_params['token'] = opts[:'token'] if !opts[:'token'].nil?
102
+ form_params['region'] = opts[:'region'] if !opts[:'region'].nil?
103
+ form_params['url'] = opts[:'url'] if !opts[:'url'].nil?
104
+
105
+ # http body (model)
106
+ post_body = opts[:debug_body]
107
+
108
+ # return_type
109
+ return_type = opts[:debug_return_type] || 'LoggingNewrelicotlpResponse'
110
+
111
+ # auth_names
112
+ auth_names = opts[:debug_auth_names] || ['token']
113
+
114
+ new_options = opts.merge(
115
+ :operation => :"LoggingNewrelicotlpApi.create_log_newrelicotlp",
116
+ :header_params => header_params,
117
+ :query_params => query_params,
118
+ :form_params => form_params,
119
+ :body => post_body,
120
+ :auth_names => auth_names,
121
+ :return_type => return_type
122
+ )
123
+
124
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
125
+ if @api_client.config.debugging
126
+ @api_client.config.logger.debug "API called: LoggingNewrelicotlpApi#create_log_newrelicotlp\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
127
+ end
128
+ return data, status_code, headers
129
+ end
130
+
131
+ # Delete a New Relic OTLP endpoint
132
+ # Delete the New Relic OTLP logging object for a particular service and version.
133
+ # @option opts [String] :service_id Alphanumeric string identifying the service. (required)
134
+ # @option opts [Integer] :version_id Integer identifying a service version. (required)
135
+ # @option opts [String] :logging_newrelicotlp_name The name for the real-time logging configuration. (required)
136
+ # @return [InlineResponse200]
137
+ def delete_log_newrelicotlp(opts = {})
138
+ data, _status_code, _headers = delete_log_newrelicotlp_with_http_info(opts)
139
+ data
140
+ end
141
+
142
+ # Delete a New Relic OTLP endpoint
143
+ # Delete the New Relic OTLP logging object for a particular service and version.
144
+ # @option opts [String] :service_id Alphanumeric string identifying the service. (required)
145
+ # @option opts [Integer] :version_id Integer identifying a service version. (required)
146
+ # @option opts [String] :logging_newrelicotlp_name The name for the real-time logging configuration. (required)
147
+ # @return [Array<(InlineResponse200, Integer, Hash)>] InlineResponse200 data, response status code and response headers
148
+ def delete_log_newrelicotlp_with_http_info(opts = {})
149
+ if @api_client.config.debugging
150
+ @api_client.config.logger.debug 'Calling API: LoggingNewrelicotlpApi.delete_log_newrelicotlp ...'
151
+ end
152
+ # unbox the parameters from the hash
153
+ service_id = opts[:'service_id']
154
+ version_id = opts[:'version_id']
155
+ logging_newrelicotlp_name = opts[:'logging_newrelicotlp_name']
156
+ # verify the required parameter 'service_id' is set
157
+ if @api_client.config.client_side_validation && service_id.nil?
158
+ fail ArgumentError, "Missing the required parameter 'service_id' when calling LoggingNewrelicotlpApi.delete_log_newrelicotlp"
159
+ end
160
+ # verify the required parameter 'version_id' is set
161
+ if @api_client.config.client_side_validation && version_id.nil?
162
+ fail ArgumentError, "Missing the required parameter 'version_id' when calling LoggingNewrelicotlpApi.delete_log_newrelicotlp"
163
+ end
164
+ # verify the required parameter 'logging_newrelicotlp_name' is set
165
+ if @api_client.config.client_side_validation && logging_newrelicotlp_name.nil?
166
+ fail ArgumentError, "Missing the required parameter 'logging_newrelicotlp_name' when calling LoggingNewrelicotlpApi.delete_log_newrelicotlp"
167
+ end
168
+ # resource path
169
+ local_var_path = '/service/{service_id}/version/{version_id}/logging/newrelicotlp/{logging_newrelicotlp_name}'.sub('{' + 'service_id' + '}', CGI.escape(service_id.to_s)).sub('{' + 'version_id' + '}', CGI.escape(version_id.to_s)).sub('{' + 'logging_newrelicotlp_name' + '}', CGI.escape(logging_newrelicotlp_name.to_s))
170
+
171
+ # query parameters
172
+ query_params = opts[:query_params] || {}
173
+
174
+ # header parameters
175
+ header_params = opts[:header_params] || {}
176
+ # HTTP header 'Accept' (if needed)
177
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
178
+
179
+ # form parameters
180
+ form_params = opts[:form_params] || {}
181
+
182
+ # http body (model)
183
+ post_body = opts[:debug_body]
184
+
185
+ # return_type
186
+ return_type = opts[:debug_return_type] || 'InlineResponse200'
187
+
188
+ # auth_names
189
+ auth_names = opts[:debug_auth_names] || ['token']
190
+
191
+ new_options = opts.merge(
192
+ :operation => :"LoggingNewrelicotlpApi.delete_log_newrelicotlp",
193
+ :header_params => header_params,
194
+ :query_params => query_params,
195
+ :form_params => form_params,
196
+ :body => post_body,
197
+ :auth_names => auth_names,
198
+ :return_type => return_type
199
+ )
200
+
201
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
202
+ if @api_client.config.debugging
203
+ @api_client.config.logger.debug "API called: LoggingNewrelicotlpApi#delete_log_newrelicotlp\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
204
+ end
205
+ return data, status_code, headers
206
+ end
207
+
208
+ # Get a New Relic OTLP endpoint
209
+ # Get the details of a New Relic OTLP logging object for a particular service and version.
210
+ # @option opts [String] :service_id Alphanumeric string identifying the service. (required)
211
+ # @option opts [Integer] :version_id Integer identifying a service version. (required)
212
+ # @option opts [String] :logging_newrelicotlp_name The name for the real-time logging configuration. (required)
213
+ # @return [LoggingNewrelicotlpResponse]
214
+ def get_log_newrelicotlp(opts = {})
215
+ data, _status_code, _headers = get_log_newrelicotlp_with_http_info(opts)
216
+ data
217
+ end
218
+
219
+ # Get a New Relic OTLP endpoint
220
+ # Get the details of a New Relic OTLP logging object for a particular service and version.
221
+ # @option opts [String] :service_id Alphanumeric string identifying the service. (required)
222
+ # @option opts [Integer] :version_id Integer identifying a service version. (required)
223
+ # @option opts [String] :logging_newrelicotlp_name The name for the real-time logging configuration. (required)
224
+ # @return [Array<(LoggingNewrelicotlpResponse, Integer, Hash)>] LoggingNewrelicotlpResponse data, response status code and response headers
225
+ def get_log_newrelicotlp_with_http_info(opts = {})
226
+ if @api_client.config.debugging
227
+ @api_client.config.logger.debug 'Calling API: LoggingNewrelicotlpApi.get_log_newrelicotlp ...'
228
+ end
229
+ # unbox the parameters from the hash
230
+ service_id = opts[:'service_id']
231
+ version_id = opts[:'version_id']
232
+ logging_newrelicotlp_name = opts[:'logging_newrelicotlp_name']
233
+ # verify the required parameter 'service_id' is set
234
+ if @api_client.config.client_side_validation && service_id.nil?
235
+ fail ArgumentError, "Missing the required parameter 'service_id' when calling LoggingNewrelicotlpApi.get_log_newrelicotlp"
236
+ end
237
+ # verify the required parameter 'version_id' is set
238
+ if @api_client.config.client_side_validation && version_id.nil?
239
+ fail ArgumentError, "Missing the required parameter 'version_id' when calling LoggingNewrelicotlpApi.get_log_newrelicotlp"
240
+ end
241
+ # verify the required parameter 'logging_newrelicotlp_name' is set
242
+ if @api_client.config.client_side_validation && logging_newrelicotlp_name.nil?
243
+ fail ArgumentError, "Missing the required parameter 'logging_newrelicotlp_name' when calling LoggingNewrelicotlpApi.get_log_newrelicotlp"
244
+ end
245
+ # resource path
246
+ local_var_path = '/service/{service_id}/version/{version_id}/logging/newrelicotlp/{logging_newrelicotlp_name}'.sub('{' + 'service_id' + '}', CGI.escape(service_id.to_s)).sub('{' + 'version_id' + '}', CGI.escape(version_id.to_s)).sub('{' + 'logging_newrelicotlp_name' + '}', CGI.escape(logging_newrelicotlp_name.to_s))
247
+
248
+ # query parameters
249
+ query_params = opts[:query_params] || {}
250
+
251
+ # header parameters
252
+ header_params = opts[:header_params] || {}
253
+ # HTTP header 'Accept' (if needed)
254
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
255
+
256
+ # form parameters
257
+ form_params = opts[:form_params] || {}
258
+
259
+ # http body (model)
260
+ post_body = opts[:debug_body]
261
+
262
+ # return_type
263
+ return_type = opts[:debug_return_type] || 'LoggingNewrelicotlpResponse'
264
+
265
+ # auth_names
266
+ auth_names = opts[:debug_auth_names] || ['token']
267
+
268
+ new_options = opts.merge(
269
+ :operation => :"LoggingNewrelicotlpApi.get_log_newrelicotlp",
270
+ :header_params => header_params,
271
+ :query_params => query_params,
272
+ :form_params => form_params,
273
+ :body => post_body,
274
+ :auth_names => auth_names,
275
+ :return_type => return_type
276
+ )
277
+
278
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
279
+ if @api_client.config.debugging
280
+ @api_client.config.logger.debug "API called: LoggingNewrelicotlpApi#get_log_newrelicotlp\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
281
+ end
282
+ return data, status_code, headers
283
+ end
284
+
285
+ # List New Relic OTLP endpoints
286
+ # List all of the New Relic OTLP logging objects for a particular service and version.
287
+ # @option opts [String] :service_id Alphanumeric string identifying the service. (required)
288
+ # @option opts [Integer] :version_id Integer identifying a service version. (required)
289
+ # @return [Array<LoggingNewrelicotlpResponse>]
290
+ def list_log_newrelicotlp(opts = {})
291
+ data, _status_code, _headers = list_log_newrelicotlp_with_http_info(opts)
292
+ data
293
+ end
294
+
295
+ # List New Relic OTLP endpoints
296
+ # List all of the New Relic OTLP logging objects for a particular service and version.
297
+ # @option opts [String] :service_id Alphanumeric string identifying the service. (required)
298
+ # @option opts [Integer] :version_id Integer identifying a service version. (required)
299
+ # @return [Array<(Array<LoggingNewrelicotlpResponse>, Integer, Hash)>] Array<LoggingNewrelicotlpResponse> data, response status code and response headers
300
+ def list_log_newrelicotlp_with_http_info(opts = {})
301
+ if @api_client.config.debugging
302
+ @api_client.config.logger.debug 'Calling API: LoggingNewrelicotlpApi.list_log_newrelicotlp ...'
303
+ end
304
+ # unbox the parameters from the hash
305
+ service_id = opts[:'service_id']
306
+ version_id = opts[:'version_id']
307
+ # verify the required parameter 'service_id' is set
308
+ if @api_client.config.client_side_validation && service_id.nil?
309
+ fail ArgumentError, "Missing the required parameter 'service_id' when calling LoggingNewrelicotlpApi.list_log_newrelicotlp"
310
+ end
311
+ # verify the required parameter 'version_id' is set
312
+ if @api_client.config.client_side_validation && version_id.nil?
313
+ fail ArgumentError, "Missing the required parameter 'version_id' when calling LoggingNewrelicotlpApi.list_log_newrelicotlp"
314
+ end
315
+ # resource path
316
+ local_var_path = '/service/{service_id}/version/{version_id}/logging/newrelicotlp'.sub('{' + 'service_id' + '}', CGI.escape(service_id.to_s)).sub('{' + 'version_id' + '}', CGI.escape(version_id.to_s))
317
+
318
+ # query parameters
319
+ query_params = opts[:query_params] || {}
320
+
321
+ # header parameters
322
+ header_params = opts[:header_params] || {}
323
+ # HTTP header 'Accept' (if needed)
324
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
325
+
326
+ # form parameters
327
+ form_params = opts[:form_params] || {}
328
+
329
+ # http body (model)
330
+ post_body = opts[:debug_body]
331
+
332
+ # return_type
333
+ return_type = opts[:debug_return_type] || 'Array<LoggingNewrelicotlpResponse>'
334
+
335
+ # auth_names
336
+ auth_names = opts[:debug_auth_names] || ['token']
337
+
338
+ new_options = opts.merge(
339
+ :operation => :"LoggingNewrelicotlpApi.list_log_newrelicotlp",
340
+ :header_params => header_params,
341
+ :query_params => query_params,
342
+ :form_params => form_params,
343
+ :body => post_body,
344
+ :auth_names => auth_names,
345
+ :return_type => return_type
346
+ )
347
+
348
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
349
+ if @api_client.config.debugging
350
+ @api_client.config.logger.debug "API called: LoggingNewrelicotlpApi#list_log_newrelicotlp\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
351
+ end
352
+ return data, status_code, headers
353
+ end
354
+
355
+ # Update a New Relic log endpoint
356
+ # Update a New Relic OTLP logging object for a particular service and version.
357
+ # @option opts [String] :service_id Alphanumeric string identifying the service. (required)
358
+ # @option opts [Integer] :version_id Integer identifying a service version. (required)
359
+ # @option opts [String] :logging_newrelicotlp_name The name for the real-time logging configuration. (required)
360
+ # @option opts [String] :name The name for the real-time logging configuration.
361
+ # @option opts [String] :placement Where in the generated VCL the logging call should be placed. If not set, endpoints with &#x60;format_version&#x60; of 2 are placed in &#x60;vcl_log&#x60; and those with &#x60;format_version&#x60; of 1 are placed in &#x60;vcl_deliver&#x60;.
362
+ # @option opts [String] :response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute.
363
+ # @option opts [String] :format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (default to '{\"timestamp\":\"%{begin:%Y-%m-%dT%H:%M:%S}t\",\"time_elapsed\":\"%{time.elapsed.usec}V\",\"is_tls\":\"%{if(req.is_ssl, \\\"true\\\", \\\"false\\\")}V\",\"client_ip\":\"%{req.http.Fastly-Client-IP}V\",\"geo_city\":\"%{client.geo.city}V\",\"geo_country_code\":\"%{client.geo.country_code}V\",\"request\":\"%{req.request}V\",\"host\":\"%{req.http.Fastly-Orig-Host}V\",\"url\":\"%{json.escape(req.url)}V\",\"request_referer\":\"%{json.escape(req.http.Referer)}V\",\"request_user_agent\":\"%{json.escape(req.http.User-Agent)}V\",\"request_accept_language\":\"%{json.escape(req.http.Accept-Language)}V\",\"request_accept_charset\":\"%{json.escape(req.http.Accept-Charset)}V\",\"cache_status\":\"%{regsub(fastly_info.state, \\\"^(HIT-(SYNTH)|(HITPASS|HIT|MISS|PASS|ERROR|PIPE)).*\\\", \\\"\\\\2\\\\3\\\") }V\"}')
364
+ # @option opts [Integer] :format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in &#x60;vcl_log&#x60; if &#x60;format_version&#x60; is set to &#x60;2&#x60; and in &#x60;vcl_deliver&#x60; if &#x60;format_version&#x60; is set to &#x60;1&#x60;. (default to FORMAT_VERSION::v2)
365
+ # @option opts [String] :token The Insert API key from the Account page of your New Relic account. Required.
366
+ # @option opts [String] :region The region to which to stream logs. (default to 'US')
367
+ # @option opts [String] :url (Optional) URL of the New Relic Trace Observer, if you are using New Relic Infinite Tracing. (default to 'null')
368
+ # @return [LoggingNewrelicotlpResponse]
369
+ def update_log_newrelicotlp(opts = {})
370
+ data, _status_code, _headers = update_log_newrelicotlp_with_http_info(opts)
371
+ data
372
+ end
373
+
374
+ # Update a New Relic log endpoint
375
+ # Update a New Relic OTLP logging object for a particular service and version.
376
+ # @option opts [String] :service_id Alphanumeric string identifying the service. (required)
377
+ # @option opts [Integer] :version_id Integer identifying a service version. (required)
378
+ # @option opts [String] :logging_newrelicotlp_name The name for the real-time logging configuration. (required)
379
+ # @option opts [String] :name The name for the real-time logging configuration.
380
+ # @option opts [String] :placement Where in the generated VCL the logging call should be placed. If not set, endpoints with &#x60;format_version&#x60; of 2 are placed in &#x60;vcl_log&#x60; and those with &#x60;format_version&#x60; of 1 are placed in &#x60;vcl_deliver&#x60;.
381
+ # @option opts [String] :response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute.
382
+ # @option opts [String] :format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). (default to '{\"timestamp\":\"%{begin:%Y-%m-%dT%H:%M:%S}t\",\"time_elapsed\":\"%{time.elapsed.usec}V\",\"is_tls\":\"%{if(req.is_ssl, \\\"true\\\", \\\"false\\\")}V\",\"client_ip\":\"%{req.http.Fastly-Client-IP}V\",\"geo_city\":\"%{client.geo.city}V\",\"geo_country_code\":\"%{client.geo.country_code}V\",\"request\":\"%{req.request}V\",\"host\":\"%{req.http.Fastly-Orig-Host}V\",\"url\":\"%{json.escape(req.url)}V\",\"request_referer\":\"%{json.escape(req.http.Referer)}V\",\"request_user_agent\":\"%{json.escape(req.http.User-Agent)}V\",\"request_accept_language\":\"%{json.escape(req.http.Accept-Language)}V\",\"request_accept_charset\":\"%{json.escape(req.http.Accept-Charset)}V\",\"cache_status\":\"%{regsub(fastly_info.state, \\\"^(HIT-(SYNTH)|(HITPASS|HIT|MISS|PASS|ERROR|PIPE)).*\\\", \\\"\\\\2\\\\3\\\") }V\"}')
383
+ # @option opts [Integer] :format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in &#x60;vcl_log&#x60; if &#x60;format_version&#x60; is set to &#x60;2&#x60; and in &#x60;vcl_deliver&#x60; if &#x60;format_version&#x60; is set to &#x60;1&#x60;. (default to FORMAT_VERSION::v2)
384
+ # @option opts [String] :token The Insert API key from the Account page of your New Relic account. Required.
385
+ # @option opts [String] :region The region to which to stream logs. (default to 'US')
386
+ # @option opts [String] :url (Optional) URL of the New Relic Trace Observer, if you are using New Relic Infinite Tracing. (default to 'null')
387
+ # @return [Array<(LoggingNewrelicotlpResponse, Integer, Hash)>] LoggingNewrelicotlpResponse data, response status code and response headers
388
+ def update_log_newrelicotlp_with_http_info(opts = {})
389
+ if @api_client.config.debugging
390
+ @api_client.config.logger.debug 'Calling API: LoggingNewrelicotlpApi.update_log_newrelicotlp ...'
391
+ end
392
+ # unbox the parameters from the hash
393
+ service_id = opts[:'service_id']
394
+ version_id = opts[:'version_id']
395
+ logging_newrelicotlp_name = opts[:'logging_newrelicotlp_name']
396
+ # verify the required parameter 'service_id' is set
397
+ if @api_client.config.client_side_validation && service_id.nil?
398
+ fail ArgumentError, "Missing the required parameter 'service_id' when calling LoggingNewrelicotlpApi.update_log_newrelicotlp"
399
+ end
400
+ # verify the required parameter 'version_id' is set
401
+ if @api_client.config.client_side_validation && version_id.nil?
402
+ fail ArgumentError, "Missing the required parameter 'version_id' when calling LoggingNewrelicotlpApi.update_log_newrelicotlp"
403
+ end
404
+ # verify the required parameter 'logging_newrelicotlp_name' is set
405
+ if @api_client.config.client_side_validation && logging_newrelicotlp_name.nil?
406
+ fail ArgumentError, "Missing the required parameter 'logging_newrelicotlp_name' when calling LoggingNewrelicotlpApi.update_log_newrelicotlp"
407
+ end
408
+ allowable_values = ["none", "waf_debug", "null"]
409
+ if @api_client.config.client_side_validation && opts[:'placement'] && !allowable_values.include?(opts[:'placement'])
410
+ fail ArgumentError, "invalid value for \"placement\", must be one of #{allowable_values}"
411
+ end
412
+ allowable_values = [1, 2]
413
+ if @api_client.config.client_side_validation && opts[:'format_version'] && !allowable_values.include?(opts[:'format_version'])
414
+ fail ArgumentError, "invalid value for \"format_version\", must be one of #{allowable_values}"
415
+ end
416
+ allowable_values = ["US", "EU"]
417
+ if @api_client.config.client_side_validation && opts[:'region'] && !allowable_values.include?(opts[:'region'])
418
+ fail ArgumentError, "invalid value for \"region\", must be one of #{allowable_values}"
419
+ end
420
+ # resource path
421
+ local_var_path = '/service/{service_id}/version/{version_id}/logging/newrelicotlp/{logging_newrelicotlp_name}'.sub('{' + 'service_id' + '}', CGI.escape(service_id.to_s)).sub('{' + 'version_id' + '}', CGI.escape(version_id.to_s)).sub('{' + 'logging_newrelicotlp_name' + '}', CGI.escape(logging_newrelicotlp_name.to_s))
422
+
423
+ # query parameters
424
+ query_params = opts[:query_params] || {}
425
+
426
+ # header parameters
427
+ header_params = opts[:header_params] || {}
428
+ # HTTP header 'Accept' (if needed)
429
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
430
+ # HTTP header 'Content-Type'
431
+ content_type = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])
432
+ if !content_type.nil?
433
+ header_params['Content-Type'] = content_type
434
+ end
435
+
436
+ # form parameters
437
+ form_params = opts[:form_params] || {}
438
+ form_params['name'] = opts[:'name'] if !opts[:'name'].nil?
439
+ form_params['placement'] = opts[:'placement'] if !opts[:'placement'].nil?
440
+ form_params['response_condition'] = opts[:'response_condition'] if !opts[:'response_condition'].nil?
441
+ form_params['format'] = opts[:'format'] if !opts[:'format'].nil?
442
+ form_params['format_version'] = opts[:'format_version'] if !opts[:'format_version'].nil?
443
+ form_params['token'] = opts[:'token'] if !opts[:'token'].nil?
444
+ form_params['region'] = opts[:'region'] if !opts[:'region'].nil?
445
+ form_params['url'] = opts[:'url'] if !opts[:'url'].nil?
446
+
447
+ # http body (model)
448
+ post_body = opts[:debug_body]
449
+
450
+ # return_type
451
+ return_type = opts[:debug_return_type] || 'LoggingNewrelicotlpResponse'
452
+
453
+ # auth_names
454
+ auth_names = opts[:debug_auth_names] || ['token']
455
+
456
+ new_options = opts.merge(
457
+ :operation => :"LoggingNewrelicotlpApi.update_log_newrelicotlp",
458
+ :header_params => header_params,
459
+ :query_params => query_params,
460
+ :form_params => form_params,
461
+ :body => post_body,
462
+ :auth_names => auth_names,
463
+ :return_type => return_type
464
+ )
465
+
466
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
467
+ if @api_client.config.debugging
468
+ @api_client.config.logger.debug "API called: LoggingNewrelicotlpApi#update_log_newrelicotlp\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
469
+ end
470
+ return data, status_code, headers
471
+ end
472
+ end
473
+ end
@@ -133,7 +133,7 @@ module Fastly
133
133
  fail ArgumentError, 'invalid value for "opts[:"response_object_name"]" when calling RateLimiterApi.create_rate_limiter, the character length must be great than or equal to 1.'
134
134
  end
135
135
 
136
- allowable_values = ["azureblob", "bigquery", "cloudfiles", "datadog", "digitalocean", "elasticsearch", "ftp", "gcs", "googleanalytics", "heroku", "honeycomb", "http", "https", "kafka", "kinesis", "logentries", "loggly", "logshuttle", "newrelic", "openstack", "papertrail", "pubsub", "s3", "scalyr", "sftp", "splunk", "stackdriver", "sumologic", "syslog"]
136
+ allowable_values = ["azureblob", "bigquery", "cloudfiles", "datadog", "digitalocean", "elasticsearch", "ftp", "gcs", "googleanalytics", "heroku", "honeycomb", "http", "https", "kafka", "kinesis", "logentries", "loggly", "logshuttle", "newrelic", "newrelicotlp", "openstack", "papertrail", "pubsub", "s3", "scalyr", "sftp", "splunk", "stackdriver", "sumologic", "syslog"]
137
137
  if @api_client.config.client_side_validation && opts[:'logger_type'] && !allowable_values.include?(opts[:'logger_type'])
138
138
  fail ArgumentError, "invalid value for \"logger_type\", must be one of #{allowable_values}"
139
139
  end
@@ -498,7 +498,7 @@ module Fastly
498
498
  fail ArgumentError, 'invalid value for "opts[:"response_object_name"]" when calling RateLimiterApi.update_rate_limiter, the character length must be great than or equal to 1.'
499
499
  end
500
500
 
501
- allowable_values = ["azureblob", "bigquery", "cloudfiles", "datadog", "digitalocean", "elasticsearch", "ftp", "gcs", "googleanalytics", "heroku", "honeycomb", "http", "https", "kafka", "kinesis", "logentries", "loggly", "logshuttle", "newrelic", "openstack", "papertrail", "pubsub", "s3", "scalyr", "sftp", "splunk", "stackdriver", "sumologic", "syslog"]
501
+ allowable_values = ["azureblob", "bigquery", "cloudfiles", "datadog", "digitalocean", "elasticsearch", "ftp", "gcs", "googleanalytics", "heroku", "honeycomb", "http", "https", "kafka", "kinesis", "logentries", "loggly", "logshuttle", "newrelic", "newrelicotlp", "openstack", "papertrail", "pubsub", "s3", "scalyr", "sftp", "splunk", "stackdriver", "sumologic", "syslog"]
502
502
  if @api_client.config.client_side_validation && opts[:'logger_type'] && !allowable_values.include?(opts[:'logger_type'])
503
503
  fail ArgumentError, "invalid value for \"logger_type\", must be one of #{allowable_values}"
504
504
  end
@@ -197,7 +197,7 @@ module Fastly
197
197
  return data, status_code, headers
198
198
  end
199
199
 
200
- # Create secret store by ID
200
+ # Get secret store by ID
201
201
  # Get a secret store by ID.
202
202
  # @option opts [String] :store_id (required)
203
203
  # @return [SecretStoreResponse]
@@ -206,7 +206,7 @@ module Fastly
206
206
  data
207
207
  end
208
208
 
209
- # Create secret store by ID
209
+ # Get secret store by ID
210
210
  # Get a secret store by ID.
211
211
  # @option opts [String] :store_id (required)
212
212
  # @return [Array<(SecretStoreResponse, Integer, Hash)>] SecretStoreResponse data, response status code and response headers
@@ -22,7 +22,7 @@ module Fastly
22
22
  # @option opts [String] :filter_in_use Optional. Limit the returned domains to those currently using Fastly to terminate TLS with SNI (that is, domains considered \&quot;in use\&quot;) Permitted values: true, false.
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
- # @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;, and &#x60;tls_authorizations.globalsign_email_challenge&#x60;.
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
26
  # @option opts [Integer] :page_number Current page.
27
27
  # @option opts [Integer] :page_size Number of records per page. (default to 20)
28
28
  # @option opts [String] :sort The order in which to list the results by creation date. (default to 'created_at')
@@ -37,7 +37,7 @@ module Fastly
37
37
  # @option opts [String] :filter_in_use Optional. Limit the returned domains to those currently using Fastly to terminate TLS with SNI (that is, domains considered \&quot;in use\&quot;) Permitted values: true, false.
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
- # @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;, and &#x60;tls_authorizations.globalsign_email_challenge&#x60;.
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
41
  # @option opts [Integer] :page_number Current page.
42
42
  # @option opts [Integer] :page_size Number of records per page. (default to 20)
43
43
  # @option opts [String] :sort The order in which to list the results by creation date. (default to 'created_at')
@@ -299,7 +299,7 @@ module Fastly
299
299
  # Get a TLS subscription
300
300
  # Show a TLS subscription.
301
301
  # @option opts [String] :tls_subscription_id Alphanumeric string identifying a TLS subscription. (required)
302
- # @option opts [String] :include Include related objects. Optional, comma-separated values. Permitted values: &#x60;tls_authorizations&#x60; and &#x60;tls_authorizations.globalsign_email_challenge&#x60;.
302
+ # @option opts [String] :include Include related objects. Optional, comma-separated values. Permitted values: &#x60;tls_authorizations&#x60;, &#x60;tls_authorizations.globalsign_email_challenge&#x60;, and &#x60;tls_authorizations.self_managed_http_challenge&#x60;.
303
303
  # @return [TlsSubscriptionResponse]
304
304
  def get_tls_sub(opts = {})
305
305
  data, _status_code, _headers = get_tls_sub_with_http_info(opts)
@@ -309,7 +309,7 @@ module Fastly
309
309
  # Get a TLS subscription
310
310
  # Show a TLS subscription.
311
311
  # @option opts [String] :tls_subscription_id Alphanumeric string identifying a TLS subscription. (required)
312
- # @option opts [String] :include Include related objects. Optional, comma-separated values. Permitted values: &#x60;tls_authorizations&#x60; and &#x60;tls_authorizations.globalsign_email_challenge&#x60;.
312
+ # @option opts [String] :include Include related objects. Optional, comma-separated values. Permitted values: &#x60;tls_authorizations&#x60;, &#x60;tls_authorizations.globalsign_email_challenge&#x60;, and &#x60;tls_authorizations.self_managed_http_challenge&#x60;.
313
313
  # @return [Array<(TlsSubscriptionResponse, Integer, Hash)>] TlsSubscriptionResponse data, response status code and response headers
314
314
  def get_tls_sub_with_http_info(opts = {})
315
315
  if @api_client.config.debugging
@@ -367,7 +367,7 @@ module Fastly
367
367
  # @option opts [String] :filter_state Limit the returned subscriptions by state. Valid values are &#x60;pending&#x60;, &#x60;processing&#x60;, &#x60;issued&#x60;, &#x60;renewing&#x60;, and &#x60;failed&#x60;. Accepts parameters: &#x60;not&#x60; (e.g., &#x60;filter[state][not]&#x3D;renewing&#x60;).
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
- # @option opts [String] :include Include related objects. Optional, comma-separated values. Permitted values: &#x60;tls_authorizations&#x60; and &#x60;tls_authorizations.globalsign_email_challenge&#x60;.
370
+ # @option opts [String] :include Include related objects. Optional, comma-separated values. Permitted values: &#x60;tls_authorizations&#x60;, &#x60;tls_authorizations.globalsign_email_challenge&#x60;, and &#x60;tls_authorizations.self_managed_http_challenge&#x60;.
371
371
  # @option opts [Integer] :page_number Current page.
372
372
  # @option opts [Integer] :page_size Number of records per page. (default to 20)
373
373
  # @option opts [String] :sort The order in which to list the results by creation date. (default to 'created_at')
@@ -382,7 +382,7 @@ module Fastly
382
382
  # @option opts [String] :filter_state Limit the returned subscriptions by state. Valid values are &#x60;pending&#x60;, &#x60;processing&#x60;, &#x60;issued&#x60;, &#x60;renewing&#x60;, and &#x60;failed&#x60;. Accepts parameters: &#x60;not&#x60; (e.g., &#x60;filter[state][not]&#x3D;renewing&#x60;).
383
383
  # @option opts [String] :filter_tls_domains_id Limit the returned subscriptions to those that include the specific domain.
384
384
  # @option opts [Boolean] :filter_has_active_order Limit the returned subscriptions to those that have currently active orders. Permitted values: &#x60;true&#x60;.
385
- # @option opts [String] :include Include related objects. Optional, comma-separated values. Permitted values: &#x60;tls_authorizations&#x60; and &#x60;tls_authorizations.globalsign_email_challenge&#x60;.
385
+ # @option opts [String] :include Include related objects. Optional, comma-separated values. Permitted values: &#x60;tls_authorizations&#x60;, &#x60;tls_authorizations.globalsign_email_challenge&#x60;, and &#x60;tls_authorizations.self_managed_http_challenge&#x60;.
386
386
  # @option opts [Integer] :page_number Current page.
387
387
  # @option opts [Integer] :page_size Number of records per page. (default to 20)
388
388
  # @option opts [String] :sort The order in which to list the results by creation date. (default to 'created_at')