fastly 4.1.0 → 4.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +37 -0
- data/Gemfile.lock +1 -1
- data/README.md +93 -11
- data/docs/Backend.md +1 -1
- data/docs/BackendApi.md +4 -4
- data/docs/BackendResponse.md +1 -1
- data/docs/DomainOwnershipsApi.md +47 -0
- data/docs/EnabledProductResponse.md +12 -0
- data/docs/EnabledProductResponseLinks.md +11 -0
- data/docs/{EnabledProductProduct.md → EnabledProductResponseProduct.md} +3 -3
- data/docs/EnabledProductResponseService.md +11 -0
- data/docs/EnabledProductsApi.md +7 -7
- data/docs/EventsApi.md +2 -0
- data/docs/HistoricalApi.md +10 -10
- data/docs/{EnabledProductLinks.md → InlineResponse2002.md} +2 -3
- data/docs/{GetStoresResponse.md → InlineResponse2003.md} +2 -2
- data/docs/{GetStoresResponseMeta.md → InlineResponse2003Meta.md} +1 -1
- data/docs/{KeyResponse.md → InlineResponse2004.md} +2 -2
- data/docs/{ResourceCreateAllOf.md → InlineResponse2004Meta.md} +3 -2
- data/docs/ObjectStoreApi.md +3 -166
- data/docs/ObjectStoreItemApi.md +177 -0
- data/docs/Pop.md +7 -4
- data/docs/PopCoordinates.md +2 -4
- data/docs/RealtimeMeasurements.md +10 -2
- data/docs/Resource.md +2 -1
- data/docs/ResourceApi.md +34 -32
- data/docs/ResourceResponse.md +3 -3
- data/docs/ResourceResponseAllOf.md +1 -1
- data/docs/Results.md +11 -3
- data/docs/TlsSubscriptionResponseAttributes.md +1 -1
- data/docs/TlsSubscriptionResponseAttributesAllOf.md +1 -1
- data/docs/TlsSubscriptionsApi.md +3 -3
- data/lib/fastly/api/backend_api.rb +4 -4
- data/lib/fastly/api/domain_ownerships_api.rb +76 -0
- data/lib/fastly/api/enabled_products_api.rb +12 -12
- data/lib/fastly/api/events_api.rb +3 -0
- data/lib/fastly/api/historical_api.rb +10 -10
- data/lib/fastly/api/object_store_api.rb +5 -289
- data/lib/fastly/api/object_store_item_api.rb +304 -0
- data/lib/fastly/api/purge_api.rb +2 -2
- data/lib/fastly/api/resource_api.rb +51 -48
- data/lib/fastly/api/tls_subscriptions_api.rb +4 -4
- data/lib/fastly/models/backend.rb +1 -1
- data/lib/fastly/models/backend_response.rb +1 -1
- data/lib/fastly/models/{enabled_product.rb → enabled_product_response.rb} +6 -6
- data/lib/fastly/models/{enabled_product_links.rb → enabled_product_response_links.rb} +5 -3
- data/lib/fastly/models/{enabled_product_product.rb → enabled_product_response_product.rb} +5 -3
- data/lib/fastly/models/enabled_product_response_service.rb +227 -0
- data/lib/fastly/models/{resource_create_all_of.rb → inline_response2002.rb} +11 -11
- data/lib/fastly/models/{get_stores_response.rb → inline_response2003.rb} +4 -4
- data/lib/fastly/models/{get_stores_response_meta.rb → inline_response2003_meta.rb} +3 -3
- data/lib/fastly/models/{key_response.rb → inline_response2004.rb} +4 -4
- data/lib/fastly/models/inline_response2004_meta.rb +225 -0
- data/lib/fastly/models/pop.rb +121 -1
- data/lib/fastly/models/pop_coordinates.rb +12 -19
- data/lib/fastly/models/realtime_measurements.rb +86 -6
- data/lib/fastly/models/resource.rb +12 -2
- data/lib/fastly/models/resource_response.rb +23 -23
- data/lib/fastly/models/resource_response_all_of.rb +1 -1
- data/lib/fastly/models/results.rb +87 -7
- data/lib/fastly/models/tls_subscription_response_attributes.rb +2 -2
- data/lib/fastly/models/tls_subscription_response_attributes_all_of.rb +2 -2
- data/lib/fastly/models/type_resource.rb +2 -0
- data/lib/fastly/version.rb +1 -1
- data/lib/fastly.rb +11 -8
- data/sig.json +1 -1
- metadata +24 -18
- data/docs/EnabledProduct.md +0 -12
- data/docs/ResourceCreate.md +0 -11
- data/lib/fastly/models/resource_create.rb +0 -235
@@ -80,76 +80,8 @@ module Fastly
|
|
80
80
|
return data, status_code, headers
|
81
81
|
end
|
82
82
|
|
83
|
-
# Delete object store key.
|
84
|
-
# Delete a key from a customer store.
|
85
|
-
# @option opts [String] :store_id (required)
|
86
|
-
# @option opts [String] :key_name (required)
|
87
|
-
# @return [nil]
|
88
|
-
def delete_key_from_store(opts = {})
|
89
|
-
delete_key_from_store_with_http_info(opts)
|
90
|
-
nil
|
91
|
-
end
|
92
|
-
|
93
|
-
# Delete object store key.
|
94
|
-
# Delete a key from a customer store.
|
95
|
-
# @option opts [String] :store_id (required)
|
96
|
-
# @option opts [String] :key_name (required)
|
97
|
-
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
98
|
-
def delete_key_from_store_with_http_info(opts = {})
|
99
|
-
if @api_client.config.debugging
|
100
|
-
@api_client.config.logger.debug 'Calling API: ObjectStoreApi.delete_key_from_store ...'
|
101
|
-
end
|
102
|
-
# unbox the parameters from the hash
|
103
|
-
store_id = opts[:'store_id']
|
104
|
-
key_name = opts[:'key_name']
|
105
|
-
# verify the required parameter 'store_id' is set
|
106
|
-
if @api_client.config.client_side_validation && store_id.nil?
|
107
|
-
fail ArgumentError, "Missing the required parameter 'store_id' when calling ObjectStoreApi.delete_key_from_store"
|
108
|
-
end
|
109
|
-
# verify the required parameter 'key_name' is set
|
110
|
-
if @api_client.config.client_side_validation && key_name.nil?
|
111
|
-
fail ArgumentError, "Missing the required parameter 'key_name' when calling ObjectStoreApi.delete_key_from_store"
|
112
|
-
end
|
113
|
-
# resource path
|
114
|
-
local_var_path = '/resources/stores/object/{store_id}/keys/{key_name}'.sub('{' + 'store_id' + '}', CGI.escape(store_id.to_s)).sub('{' + 'key_name' + '}', CGI.escape(key_name.to_s))
|
115
|
-
|
116
|
-
# query parameters
|
117
|
-
query_params = opts[:query_params] || {}
|
118
|
-
|
119
|
-
# header parameters
|
120
|
-
header_params = opts[:header_params] || {}
|
121
|
-
|
122
|
-
# form parameters
|
123
|
-
form_params = opts[:form_params] || {}
|
124
|
-
|
125
|
-
# http body (model)
|
126
|
-
post_body = opts[:debug_body]
|
127
|
-
|
128
|
-
# return_type
|
129
|
-
return_type = opts[:debug_return_type]
|
130
|
-
|
131
|
-
# auth_names
|
132
|
-
auth_names = opts[:debug_auth_names] || ['token']
|
133
|
-
|
134
|
-
new_options = opts.merge(
|
135
|
-
:operation => :"ObjectStoreApi.delete_key_from_store",
|
136
|
-
:header_params => header_params,
|
137
|
-
:query_params => query_params,
|
138
|
-
:form_params => form_params,
|
139
|
-
:body => post_body,
|
140
|
-
:auth_names => auth_names,
|
141
|
-
:return_type => return_type
|
142
|
-
)
|
143
|
-
|
144
|
-
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
145
|
-
if @api_client.config.debugging
|
146
|
-
@api_client.config.logger.debug "API called: ObjectStoreApi#delete_key_from_store\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
147
|
-
end
|
148
|
-
return data, status_code, headers
|
149
|
-
end
|
150
|
-
|
151
83
|
# Delete an object store.
|
152
|
-
# An object store must be empty before it can be deleted. Deleting an object store that still contains keys will result in a 409 Conflict.
|
84
|
+
# An object store must be empty before it can be deleted. Deleting an object store that still contains keys will result in a `409` (Conflict).
|
153
85
|
# @option opts [String] :store_id (required)
|
154
86
|
# @return [nil]
|
155
87
|
def delete_store(opts = {})
|
@@ -158,7 +90,7 @@ module Fastly
|
|
158
90
|
end
|
159
91
|
|
160
92
|
# Delete an object store.
|
161
|
-
# An object store must be empty before it can be deleted. Deleting an object store that still contains keys will result in a 409 Conflict.
|
93
|
+
# An object store must be empty before it can be deleted. Deleting an object store that still contains keys will result in a `409` (Conflict).
|
162
94
|
# @option opts [String] :store_id (required)
|
163
95
|
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
164
96
|
def delete_store_with_http_info(opts = {})
|
@@ -209,75 +141,6 @@ module Fastly
|
|
209
141
|
return data, status_code, headers
|
210
142
|
end
|
211
143
|
|
212
|
-
# List object store keys.
|
213
|
-
# List all keys within an object store.
|
214
|
-
# @option opts [String] :store_id (required)
|
215
|
-
# @option opts [String] :cursor
|
216
|
-
# @option opts [Integer] :limit (default to 100)
|
217
|
-
# @return [KeyResponse]
|
218
|
-
def get_keys(opts = {})
|
219
|
-
data, _status_code, _headers = get_keys_with_http_info(opts)
|
220
|
-
data
|
221
|
-
end
|
222
|
-
|
223
|
-
# List object store keys.
|
224
|
-
# List all keys within an object store.
|
225
|
-
# @option opts [String] :store_id (required)
|
226
|
-
# @option opts [String] :cursor
|
227
|
-
# @option opts [Integer] :limit (default to 100)
|
228
|
-
# @return [Array<(KeyResponse, Integer, Hash)>] KeyResponse data, response status code and response headers
|
229
|
-
def get_keys_with_http_info(opts = {})
|
230
|
-
if @api_client.config.debugging
|
231
|
-
@api_client.config.logger.debug 'Calling API: ObjectStoreApi.get_keys ...'
|
232
|
-
end
|
233
|
-
# unbox the parameters from the hash
|
234
|
-
store_id = opts[:'store_id']
|
235
|
-
# verify the required parameter 'store_id' is set
|
236
|
-
if @api_client.config.client_side_validation && store_id.nil?
|
237
|
-
fail ArgumentError, "Missing the required parameter 'store_id' when calling ObjectStoreApi.get_keys"
|
238
|
-
end
|
239
|
-
# resource path
|
240
|
-
local_var_path = '/resources/stores/object/{store_id}/keys'.sub('{' + 'store_id' + '}', CGI.escape(store_id.to_s))
|
241
|
-
|
242
|
-
# query parameters
|
243
|
-
query_params = opts[:query_params] || {}
|
244
|
-
query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
|
245
|
-
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
246
|
-
|
247
|
-
# header parameters
|
248
|
-
header_params = opts[:header_params] || {}
|
249
|
-
# HTTP header 'Accept' (if needed)
|
250
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
251
|
-
|
252
|
-
# form parameters
|
253
|
-
form_params = opts[:form_params] || {}
|
254
|
-
|
255
|
-
# http body (model)
|
256
|
-
post_body = opts[:debug_body]
|
257
|
-
|
258
|
-
# return_type
|
259
|
-
return_type = opts[:debug_return_type] || 'KeyResponse'
|
260
|
-
|
261
|
-
# auth_names
|
262
|
-
auth_names = opts[:debug_auth_names] || ['token']
|
263
|
-
|
264
|
-
new_options = opts.merge(
|
265
|
-
:operation => :"ObjectStoreApi.get_keys",
|
266
|
-
:header_params => header_params,
|
267
|
-
:query_params => query_params,
|
268
|
-
:form_params => form_params,
|
269
|
-
:body => post_body,
|
270
|
-
:auth_names => auth_names,
|
271
|
-
:return_type => return_type
|
272
|
-
)
|
273
|
-
|
274
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
275
|
-
if @api_client.config.debugging
|
276
|
-
@api_client.config.logger.debug "API called: ObjectStoreApi#get_keys\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
277
|
-
end
|
278
|
-
return data, status_code, headers
|
279
|
-
end
|
280
|
-
|
281
144
|
# Describe an object store.
|
282
145
|
# Get an object store by ID.
|
283
146
|
# @option opts [String] :store_id (required)
|
@@ -345,7 +208,7 @@ module Fastly
|
|
345
208
|
# Get all stores for a given customer.
|
346
209
|
# @option opts [String] :cursor
|
347
210
|
# @option opts [Integer] :limit (default to 100)
|
348
|
-
# @return [
|
211
|
+
# @return [InlineResponse2003]
|
349
212
|
def get_stores(opts = {})
|
350
213
|
data, _status_code, _headers = get_stores_with_http_info(opts)
|
351
214
|
data
|
@@ -355,7 +218,7 @@ module Fastly
|
|
355
218
|
# Get all stores for a given customer.
|
356
219
|
# @option opts [String] :cursor
|
357
220
|
# @option opts [Integer] :limit (default to 100)
|
358
|
-
# @return [Array<(
|
221
|
+
# @return [Array<(InlineResponse2003, Integer, Hash)>] InlineResponse2003 data, response status code and response headers
|
359
222
|
def get_stores_with_http_info(opts = {})
|
360
223
|
if @api_client.config.debugging
|
361
224
|
@api_client.config.logger.debug 'Calling API: ObjectStoreApi.get_stores ...'
|
@@ -381,7 +244,7 @@ module Fastly
|
|
381
244
|
post_body = opts[:debug_body]
|
382
245
|
|
383
246
|
# return_type
|
384
|
-
return_type = opts[:debug_return_type] || '
|
247
|
+
return_type = opts[:debug_return_type] || 'InlineResponse2003'
|
385
248
|
|
386
249
|
# auth_names
|
387
250
|
auth_names = opts[:debug_auth_names] || ['token']
|
@@ -402,152 +265,5 @@ module Fastly
|
|
402
265
|
end
|
403
266
|
return data, status_code, headers
|
404
267
|
end
|
405
|
-
|
406
|
-
# Get object store key value.
|
407
|
-
# Get the value associated with a key.
|
408
|
-
# @option opts [String] :store_id (required)
|
409
|
-
# @option opts [String] :key_name (required)
|
410
|
-
# @return [File]
|
411
|
-
def get_value_for_key(opts = {})
|
412
|
-
data, _status_code, _headers = get_value_for_key_with_http_info(opts)
|
413
|
-
data
|
414
|
-
end
|
415
|
-
|
416
|
-
# Get object store key value.
|
417
|
-
# Get the value associated with a key.
|
418
|
-
# @option opts [String] :store_id (required)
|
419
|
-
# @option opts [String] :key_name (required)
|
420
|
-
# @return [Array<(File, Integer, Hash)>] File data, response status code and response headers
|
421
|
-
def get_value_for_key_with_http_info(opts = {})
|
422
|
-
if @api_client.config.debugging
|
423
|
-
@api_client.config.logger.debug 'Calling API: ObjectStoreApi.get_value_for_key ...'
|
424
|
-
end
|
425
|
-
# unbox the parameters from the hash
|
426
|
-
store_id = opts[:'store_id']
|
427
|
-
key_name = opts[:'key_name']
|
428
|
-
# verify the required parameter 'store_id' is set
|
429
|
-
if @api_client.config.client_side_validation && store_id.nil?
|
430
|
-
fail ArgumentError, "Missing the required parameter 'store_id' when calling ObjectStoreApi.get_value_for_key"
|
431
|
-
end
|
432
|
-
# verify the required parameter 'key_name' is set
|
433
|
-
if @api_client.config.client_side_validation && key_name.nil?
|
434
|
-
fail ArgumentError, "Missing the required parameter 'key_name' when calling ObjectStoreApi.get_value_for_key"
|
435
|
-
end
|
436
|
-
# resource path
|
437
|
-
local_var_path = '/resources/stores/object/{store_id}/keys/{key_name}'.sub('{' + 'store_id' + '}', CGI.escape(store_id.to_s)).sub('{' + 'key_name' + '}', CGI.escape(key_name.to_s))
|
438
|
-
|
439
|
-
# query parameters
|
440
|
-
query_params = opts[:query_params] || {}
|
441
|
-
|
442
|
-
# header parameters
|
443
|
-
header_params = opts[:header_params] || {}
|
444
|
-
# HTTP header 'Accept' (if needed)
|
445
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
|
446
|
-
|
447
|
-
# form parameters
|
448
|
-
form_params = opts[:form_params] || {}
|
449
|
-
|
450
|
-
# http body (model)
|
451
|
-
post_body = opts[:debug_body]
|
452
|
-
|
453
|
-
# return_type
|
454
|
-
return_type = opts[:debug_return_type] || 'File'
|
455
|
-
|
456
|
-
# auth_names
|
457
|
-
auth_names = opts[:debug_auth_names] || ['token']
|
458
|
-
|
459
|
-
new_options = opts.merge(
|
460
|
-
:operation => :"ObjectStoreApi.get_value_for_key",
|
461
|
-
:header_params => header_params,
|
462
|
-
:query_params => query_params,
|
463
|
-
:form_params => form_params,
|
464
|
-
:body => post_body,
|
465
|
-
:auth_names => auth_names,
|
466
|
-
:return_type => return_type
|
467
|
-
)
|
468
|
-
|
469
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
470
|
-
if @api_client.config.debugging
|
471
|
-
@api_client.config.logger.debug "API called: ObjectStoreApi#get_value_for_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
472
|
-
end
|
473
|
-
return data, status_code, headers
|
474
|
-
end
|
475
|
-
|
476
|
-
# Insert object store key-value.
|
477
|
-
# Insert a new key-value pair into an object store.
|
478
|
-
# @option opts [String] :store_id (required)
|
479
|
-
# @option opts [String] :key_name (required)
|
480
|
-
# @option opts [File] :body
|
481
|
-
# @return [File]
|
482
|
-
def set_value_for_key(opts = {})
|
483
|
-
data, _status_code, _headers = set_value_for_key_with_http_info(opts)
|
484
|
-
data
|
485
|
-
end
|
486
|
-
|
487
|
-
# Insert object store key-value.
|
488
|
-
# Insert a new key-value pair into an object store.
|
489
|
-
# @option opts [String] :store_id (required)
|
490
|
-
# @option opts [String] :key_name (required)
|
491
|
-
# @option opts [File] :body
|
492
|
-
# @return [Array<(File, Integer, Hash)>] File data, response status code and response headers
|
493
|
-
def set_value_for_key_with_http_info(opts = {})
|
494
|
-
if @api_client.config.debugging
|
495
|
-
@api_client.config.logger.debug 'Calling API: ObjectStoreApi.set_value_for_key ...'
|
496
|
-
end
|
497
|
-
# unbox the parameters from the hash
|
498
|
-
store_id = opts[:'store_id']
|
499
|
-
key_name = opts[:'key_name']
|
500
|
-
# verify the required parameter 'store_id' is set
|
501
|
-
if @api_client.config.client_side_validation && store_id.nil?
|
502
|
-
fail ArgumentError, "Missing the required parameter 'store_id' when calling ObjectStoreApi.set_value_for_key"
|
503
|
-
end
|
504
|
-
# verify the required parameter 'key_name' is set
|
505
|
-
if @api_client.config.client_side_validation && key_name.nil?
|
506
|
-
fail ArgumentError, "Missing the required parameter 'key_name' when calling ObjectStoreApi.set_value_for_key"
|
507
|
-
end
|
508
|
-
# resource path
|
509
|
-
local_var_path = '/resources/stores/object/{store_id}/keys/{key_name}'.sub('{' + 'store_id' + '}', CGI.escape(store_id.to_s)).sub('{' + 'key_name' + '}', CGI.escape(key_name.to_s))
|
510
|
-
|
511
|
-
# query parameters
|
512
|
-
query_params = opts[:query_params] || {}
|
513
|
-
|
514
|
-
# header parameters
|
515
|
-
header_params = opts[:header_params] || {}
|
516
|
-
# HTTP header 'Accept' (if needed)
|
517
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
|
518
|
-
# HTTP header 'Content-Type'
|
519
|
-
content_type = @api_client.select_header_content_type(['application/octet-stream'])
|
520
|
-
if !content_type.nil?
|
521
|
-
header_params['Content-Type'] = content_type
|
522
|
-
end
|
523
|
-
|
524
|
-
# form parameters
|
525
|
-
form_params = opts[:form_params] || {}
|
526
|
-
|
527
|
-
# http body (model)
|
528
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'body'])
|
529
|
-
|
530
|
-
# return_type
|
531
|
-
return_type = opts[:debug_return_type] || 'File'
|
532
|
-
|
533
|
-
# auth_names
|
534
|
-
auth_names = opts[:debug_auth_names] || ['token']
|
535
|
-
|
536
|
-
new_options = opts.merge(
|
537
|
-
:operation => :"ObjectStoreApi.set_value_for_key",
|
538
|
-
:header_params => header_params,
|
539
|
-
:query_params => query_params,
|
540
|
-
:form_params => form_params,
|
541
|
-
:body => post_body,
|
542
|
-
:auth_names => auth_names,
|
543
|
-
:return_type => return_type
|
544
|
-
)
|
545
|
-
|
546
|
-
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
547
|
-
if @api_client.config.debugging
|
548
|
-
@api_client.config.logger.debug "API called: ObjectStoreApi#set_value_for_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
549
|
-
end
|
550
|
-
return data, status_code, headers
|
551
|
-
end
|
552
268
|
end
|
553
269
|
end
|
@@ -0,0 +1,304 @@
|
|
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 ObjectStoreItemApi
|
15
|
+
attr_accessor :api_client
|
16
|
+
|
17
|
+
def initialize(api_client = ApiClient.default)
|
18
|
+
@api_client = api_client
|
19
|
+
end
|
20
|
+
# Delete object store item.
|
21
|
+
# Delete an item from an object store
|
22
|
+
# @option opts [String] :store_id (required)
|
23
|
+
# @option opts [String] :key_name (required)
|
24
|
+
# @return [nil]
|
25
|
+
def delete_key_from_store(opts = {})
|
26
|
+
delete_key_from_store_with_http_info(opts)
|
27
|
+
nil
|
28
|
+
end
|
29
|
+
|
30
|
+
# Delete object store item.
|
31
|
+
# Delete an item from an object store
|
32
|
+
# @option opts [String] :store_id (required)
|
33
|
+
# @option opts [String] :key_name (required)
|
34
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
35
|
+
def delete_key_from_store_with_http_info(opts = {})
|
36
|
+
if @api_client.config.debugging
|
37
|
+
@api_client.config.logger.debug 'Calling API: ObjectStoreItemApi.delete_key_from_store ...'
|
38
|
+
end
|
39
|
+
# unbox the parameters from the hash
|
40
|
+
store_id = opts[:'store_id']
|
41
|
+
key_name = opts[:'key_name']
|
42
|
+
# verify the required parameter 'store_id' is set
|
43
|
+
if @api_client.config.client_side_validation && store_id.nil?
|
44
|
+
fail ArgumentError, "Missing the required parameter 'store_id' when calling ObjectStoreItemApi.delete_key_from_store"
|
45
|
+
end
|
46
|
+
# verify the required parameter 'key_name' is set
|
47
|
+
if @api_client.config.client_side_validation && key_name.nil?
|
48
|
+
fail ArgumentError, "Missing the required parameter 'key_name' when calling ObjectStoreItemApi.delete_key_from_store"
|
49
|
+
end
|
50
|
+
# resource path
|
51
|
+
local_var_path = '/resources/stores/object/{store_id}/keys/{key_name}'.sub('{' + 'store_id' + '}', CGI.escape(store_id.to_s)).sub('{' + 'key_name' + '}', CGI.escape(key_name.to_s))
|
52
|
+
|
53
|
+
# query parameters
|
54
|
+
query_params = opts[:query_params] || {}
|
55
|
+
|
56
|
+
# header parameters
|
57
|
+
header_params = opts[:header_params] || {}
|
58
|
+
|
59
|
+
# form parameters
|
60
|
+
form_params = opts[:form_params] || {}
|
61
|
+
|
62
|
+
# http body (model)
|
63
|
+
post_body = opts[:debug_body]
|
64
|
+
|
65
|
+
# return_type
|
66
|
+
return_type = opts[:debug_return_type]
|
67
|
+
|
68
|
+
# auth_names
|
69
|
+
auth_names = opts[:debug_auth_names] || ['token']
|
70
|
+
|
71
|
+
new_options = opts.merge(
|
72
|
+
:operation => :"ObjectStoreItemApi.delete_key_from_store",
|
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(:DELETE, local_var_path, new_options)
|
82
|
+
if @api_client.config.debugging
|
83
|
+
@api_client.config.logger.debug "API called: ObjectStoreItemApi#delete_key_from_store\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
84
|
+
end
|
85
|
+
return data, status_code, headers
|
86
|
+
end
|
87
|
+
|
88
|
+
# List object store keys.
|
89
|
+
# List the keys of all items within an object store.
|
90
|
+
# @option opts [String] :store_id (required)
|
91
|
+
# @option opts [String] :cursor
|
92
|
+
# @option opts [Integer] :limit (default to 100)
|
93
|
+
# @return [InlineResponse2004]
|
94
|
+
def get_keys(opts = {})
|
95
|
+
data, _status_code, _headers = get_keys_with_http_info(opts)
|
96
|
+
data
|
97
|
+
end
|
98
|
+
|
99
|
+
# List object store keys.
|
100
|
+
# List the keys of all items within an object store.
|
101
|
+
# @option opts [String] :store_id (required)
|
102
|
+
# @option opts [String] :cursor
|
103
|
+
# @option opts [Integer] :limit (default to 100)
|
104
|
+
# @return [Array<(InlineResponse2004, Integer, Hash)>] InlineResponse2004 data, response status code and response headers
|
105
|
+
def get_keys_with_http_info(opts = {})
|
106
|
+
if @api_client.config.debugging
|
107
|
+
@api_client.config.logger.debug 'Calling API: ObjectStoreItemApi.get_keys ...'
|
108
|
+
end
|
109
|
+
# unbox the parameters from the hash
|
110
|
+
store_id = opts[:'store_id']
|
111
|
+
# verify the required parameter 'store_id' is set
|
112
|
+
if @api_client.config.client_side_validation && store_id.nil?
|
113
|
+
fail ArgumentError, "Missing the required parameter 'store_id' when calling ObjectStoreItemApi.get_keys"
|
114
|
+
end
|
115
|
+
# resource path
|
116
|
+
local_var_path = '/resources/stores/object/{store_id}/keys'.sub('{' + 'store_id' + '}', CGI.escape(store_id.to_s))
|
117
|
+
|
118
|
+
# query parameters
|
119
|
+
query_params = opts[:query_params] || {}
|
120
|
+
query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
|
121
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
122
|
+
|
123
|
+
# header parameters
|
124
|
+
header_params = opts[:header_params] || {}
|
125
|
+
# HTTP header 'Accept' (if needed)
|
126
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
127
|
+
|
128
|
+
# form parameters
|
129
|
+
form_params = opts[:form_params] || {}
|
130
|
+
|
131
|
+
# http body (model)
|
132
|
+
post_body = opts[:debug_body]
|
133
|
+
|
134
|
+
# return_type
|
135
|
+
return_type = opts[:debug_return_type] || 'InlineResponse2004'
|
136
|
+
|
137
|
+
# auth_names
|
138
|
+
auth_names = opts[:debug_auth_names] || ['token']
|
139
|
+
|
140
|
+
new_options = opts.merge(
|
141
|
+
:operation => :"ObjectStoreItemApi.get_keys",
|
142
|
+
:header_params => header_params,
|
143
|
+
:query_params => query_params,
|
144
|
+
:form_params => form_params,
|
145
|
+
:body => post_body,
|
146
|
+
:auth_names => auth_names,
|
147
|
+
:return_type => return_type
|
148
|
+
)
|
149
|
+
|
150
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
151
|
+
if @api_client.config.debugging
|
152
|
+
@api_client.config.logger.debug "API called: ObjectStoreItemApi#get_keys\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
153
|
+
end
|
154
|
+
return data, status_code, headers
|
155
|
+
end
|
156
|
+
|
157
|
+
# Get the value of an object store item
|
158
|
+
# Get the value associated with a key.
|
159
|
+
# @option opts [String] :store_id (required)
|
160
|
+
# @option opts [String] :key_name (required)
|
161
|
+
# @return [File]
|
162
|
+
def get_value_for_key(opts = {})
|
163
|
+
data, _status_code, _headers = get_value_for_key_with_http_info(opts)
|
164
|
+
data
|
165
|
+
end
|
166
|
+
|
167
|
+
# Get the value of an object store item
|
168
|
+
# Get the value associated with a key.
|
169
|
+
# @option opts [String] :store_id (required)
|
170
|
+
# @option opts [String] :key_name (required)
|
171
|
+
# @return [Array<(File, Integer, Hash)>] File data, response status code and response headers
|
172
|
+
def get_value_for_key_with_http_info(opts = {})
|
173
|
+
if @api_client.config.debugging
|
174
|
+
@api_client.config.logger.debug 'Calling API: ObjectStoreItemApi.get_value_for_key ...'
|
175
|
+
end
|
176
|
+
# unbox the parameters from the hash
|
177
|
+
store_id = opts[:'store_id']
|
178
|
+
key_name = opts[:'key_name']
|
179
|
+
# verify the required parameter 'store_id' is set
|
180
|
+
if @api_client.config.client_side_validation && store_id.nil?
|
181
|
+
fail ArgumentError, "Missing the required parameter 'store_id' when calling ObjectStoreItemApi.get_value_for_key"
|
182
|
+
end
|
183
|
+
# verify the required parameter 'key_name' is set
|
184
|
+
if @api_client.config.client_side_validation && key_name.nil?
|
185
|
+
fail ArgumentError, "Missing the required parameter 'key_name' when calling ObjectStoreItemApi.get_value_for_key"
|
186
|
+
end
|
187
|
+
# resource path
|
188
|
+
local_var_path = '/resources/stores/object/{store_id}/keys/{key_name}'.sub('{' + 'store_id' + '}', CGI.escape(store_id.to_s)).sub('{' + 'key_name' + '}', CGI.escape(key_name.to_s))
|
189
|
+
|
190
|
+
# query parameters
|
191
|
+
query_params = opts[:query_params] || {}
|
192
|
+
|
193
|
+
# header parameters
|
194
|
+
header_params = opts[:header_params] || {}
|
195
|
+
# HTTP header 'Accept' (if needed)
|
196
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
|
197
|
+
|
198
|
+
# form parameters
|
199
|
+
form_params = opts[:form_params] || {}
|
200
|
+
|
201
|
+
# http body (model)
|
202
|
+
post_body = opts[:debug_body]
|
203
|
+
|
204
|
+
# return_type
|
205
|
+
return_type = opts[:debug_return_type] || 'File'
|
206
|
+
|
207
|
+
# auth_names
|
208
|
+
auth_names = opts[:debug_auth_names] || ['token']
|
209
|
+
|
210
|
+
new_options = opts.merge(
|
211
|
+
:operation => :"ObjectStoreItemApi.get_value_for_key",
|
212
|
+
:header_params => header_params,
|
213
|
+
:query_params => query_params,
|
214
|
+
:form_params => form_params,
|
215
|
+
:body => post_body,
|
216
|
+
:auth_names => auth_names,
|
217
|
+
:return_type => return_type
|
218
|
+
)
|
219
|
+
|
220
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
221
|
+
if @api_client.config.debugging
|
222
|
+
@api_client.config.logger.debug "API called: ObjectStoreItemApi#get_value_for_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
223
|
+
end
|
224
|
+
return data, status_code, headers
|
225
|
+
end
|
226
|
+
|
227
|
+
# Insert an item into an object store
|
228
|
+
# Set a new value for a new or existing key in an object store.
|
229
|
+
# @option opts [String] :store_id (required)
|
230
|
+
# @option opts [String] :key_name (required)
|
231
|
+
# @option opts [File] :body
|
232
|
+
# @return [File]
|
233
|
+
def set_value_for_key(opts = {})
|
234
|
+
data, _status_code, _headers = set_value_for_key_with_http_info(opts)
|
235
|
+
data
|
236
|
+
end
|
237
|
+
|
238
|
+
# Insert an item into an object store
|
239
|
+
# Set a new value for a new or existing key in an object store.
|
240
|
+
# @option opts [String] :store_id (required)
|
241
|
+
# @option opts [String] :key_name (required)
|
242
|
+
# @option opts [File] :body
|
243
|
+
# @return [Array<(File, Integer, Hash)>] File data, response status code and response headers
|
244
|
+
def set_value_for_key_with_http_info(opts = {})
|
245
|
+
if @api_client.config.debugging
|
246
|
+
@api_client.config.logger.debug 'Calling API: ObjectStoreItemApi.set_value_for_key ...'
|
247
|
+
end
|
248
|
+
# unbox the parameters from the hash
|
249
|
+
store_id = opts[:'store_id']
|
250
|
+
key_name = opts[:'key_name']
|
251
|
+
# verify the required parameter 'store_id' is set
|
252
|
+
if @api_client.config.client_side_validation && store_id.nil?
|
253
|
+
fail ArgumentError, "Missing the required parameter 'store_id' when calling ObjectStoreItemApi.set_value_for_key"
|
254
|
+
end
|
255
|
+
# verify the required parameter 'key_name' is set
|
256
|
+
if @api_client.config.client_side_validation && key_name.nil?
|
257
|
+
fail ArgumentError, "Missing the required parameter 'key_name' when calling ObjectStoreItemApi.set_value_for_key"
|
258
|
+
end
|
259
|
+
# resource path
|
260
|
+
local_var_path = '/resources/stores/object/{store_id}/keys/{key_name}'.sub('{' + 'store_id' + '}', CGI.escape(store_id.to_s)).sub('{' + 'key_name' + '}', CGI.escape(key_name.to_s))
|
261
|
+
|
262
|
+
# query parameters
|
263
|
+
query_params = opts[:query_params] || {}
|
264
|
+
|
265
|
+
# header parameters
|
266
|
+
header_params = opts[:header_params] || {}
|
267
|
+
# HTTP header 'Accept' (if needed)
|
268
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
|
269
|
+
# HTTP header 'Content-Type'
|
270
|
+
content_type = @api_client.select_header_content_type(['application/octet-stream'])
|
271
|
+
if !content_type.nil?
|
272
|
+
header_params['Content-Type'] = content_type
|
273
|
+
end
|
274
|
+
|
275
|
+
# form parameters
|
276
|
+
form_params = opts[:form_params] || {}
|
277
|
+
|
278
|
+
# http body (model)
|
279
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'body'])
|
280
|
+
|
281
|
+
# return_type
|
282
|
+
return_type = opts[:debug_return_type] || 'File'
|
283
|
+
|
284
|
+
# auth_names
|
285
|
+
auth_names = opts[:debug_auth_names] || ['token']
|
286
|
+
|
287
|
+
new_options = opts.merge(
|
288
|
+
:operation => :"ObjectStoreItemApi.set_value_for_key",
|
289
|
+
:header_params => header_params,
|
290
|
+
:query_params => query_params,
|
291
|
+
:form_params => form_params,
|
292
|
+
:body => post_body,
|
293
|
+
:auth_names => auth_names,
|
294
|
+
:return_type => return_type
|
295
|
+
)
|
296
|
+
|
297
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
298
|
+
if @api_client.config.debugging
|
299
|
+
@api_client.config.logger.debug "API called: ObjectStoreItemApi#set_value_for_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
300
|
+
end
|
301
|
+
return data, status_code, headers
|
302
|
+
end
|
303
|
+
end
|
304
|
+
end
|
data/lib/fastly/api/purge_api.rb
CHANGED
@@ -182,7 +182,7 @@ module Fastly
|
|
182
182
|
fail ArgumentError, "Missing the required parameter 'cached_url' when calling PurgeApi.purge_single_url"
|
183
183
|
end
|
184
184
|
# resource path
|
185
|
-
local_var_path = '/purge/{cached_url}'.sub('{' + 'cached_url' + '}',
|
185
|
+
local_var_path = '/purge/{cached_url}'.sub('{' + 'cached_url' + '}', cached_url.to_s)
|
186
186
|
|
187
187
|
# query parameters
|
188
188
|
query_params = opts[:query_params] || {}
|
@@ -203,7 +203,7 @@ module Fastly
|
|
203
203
|
return_type = opts[:debug_return_type] || 'PurgeResponse'
|
204
204
|
|
205
205
|
# auth_names
|
206
|
-
auth_names = opts[:debug_auth_names] || ['
|
206
|
+
auth_names = opts[:debug_auth_names] || ['token']
|
207
207
|
|
208
208
|
new_options = opts.merge(
|
209
209
|
:operation => :"PurgeApi.purge_single_url",
|