fastly 5.0.0 → 5.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +17 -0
- data/Gemfile.lock +1 -1
- data/README.md +15 -8
- data/docs/AclResponse.md +1 -1
- data/docs/AclResponseAllOf.md +2 -0
- data/docs/BulkUpdateConfigStoreItem.md +12 -0
- data/docs/{BulkUpdateDictionaryItemAllOf.md → BulkUpdateConfigStoreItemAllOf.md} +1 -1
- data/docs/BulkUpdateConfigStoreListRequest.md +10 -0
- data/docs/ConfigStore.md +10 -0
- data/docs/ConfigStoreApi.md +277 -0
- data/docs/ConfigStoreInfoResponse.md +10 -0
- data/docs/ConfigStoreItem.md +11 -0
- data/docs/ConfigStoreItemApi.md +302 -0
- data/docs/ConfigStoreItemResponse.md +15 -0
- data/docs/ConfigStoreItemResponseAllOf.md +10 -0
- data/docs/ConfigStoreResponse.md +14 -0
- data/docs/ConfigStoreResponseAllOf.md +10 -0
- data/docs/SchemasSnippetResponse.md +3 -3
- data/docs/Snippet.md +1 -1
- data/docs/SnippetApi.md +4 -4
- data/docs/SnippetResponse.md +3 -3
- data/docs/SnippetResponseAllOf.md +2 -0
- data/lib/fastly/api/config_store_api.rb +463 -0
- data/lib/fastly/api/config_store_item_api.rb +529 -0
- data/lib/fastly/api/purge_api.rb +1 -1
- data/lib/fastly/api/snippet_api.rb +4 -4
- data/lib/fastly/api_client.rb +0 -2
- data/lib/fastly/models/acl_response.rb +2 -2
- data/lib/fastly/models/acl_response_all_of.rb +20 -1
- data/lib/fastly/models/backend.rb +1 -0
- data/lib/fastly/models/backend_response.rb +1 -0
- data/lib/fastly/models/bulk_update_config_store_item.rb +278 -0
- data/lib/fastly/models/{bulk_update_dictionary_item_all_of.rb → bulk_update_config_store_item_all_of.rb} +3 -3
- data/lib/fastly/models/bulk_update_config_store_list_request.rb +218 -0
- data/lib/fastly/models/bulk_update_dictionary_item.rb +1 -1
- data/lib/fastly/models/config_store.rb +217 -0
- data/lib/fastly/models/config_store_info_response.rb +217 -0
- data/lib/fastly/models/config_store_item.rb +227 -0
- data/lib/fastly/models/config_store_item_response.rb +278 -0
- data/lib/fastly/models/config_store_item_response_all_of.rb +216 -0
- data/lib/fastly/models/config_store_response.rb +269 -0
- data/lib/fastly/models/config_store_response_all_of.rb +217 -0
- data/lib/fastly/models/schemas_snippet_response.rb +22 -22
- data/lib/fastly/models/snippet.rb +2 -2
- data/lib/fastly/models/snippet_response.rb +22 -22
- data/lib/fastly/models/snippet_response_all_of.rb +20 -1
- data/lib/fastly/version.rb +1 -1
- data/lib/fastly.rb +12 -1
- data/sig.json +1 -1
- metadata +26 -4
@@ -0,0 +1,529 @@
|
|
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 ConfigStoreItemApi
|
15
|
+
attr_accessor :api_client
|
16
|
+
|
17
|
+
def initialize(api_client = ApiClient.default)
|
18
|
+
@api_client = api_client
|
19
|
+
end
|
20
|
+
# Update multiple entries in a config store
|
21
|
+
# Add multiple key-value pairs to an individual config store, specified by ID.
|
22
|
+
# @option opts [String] :config_store_id An alphanumeric string identifying the config store. (required)
|
23
|
+
# @option opts [BulkUpdateConfigStoreListRequest] :bulk_update_config_store_list_request
|
24
|
+
# @return [InlineResponse200]
|
25
|
+
def bulk_update_config_store_item(opts = {})
|
26
|
+
data, _status_code, _headers = bulk_update_config_store_item_with_http_info(opts)
|
27
|
+
data
|
28
|
+
end
|
29
|
+
|
30
|
+
# Update multiple entries in a config store
|
31
|
+
# Add multiple key-value pairs to an individual config store, specified by ID.
|
32
|
+
# @option opts [String] :config_store_id An alphanumeric string identifying the config store. (required)
|
33
|
+
# @option opts [BulkUpdateConfigStoreListRequest] :bulk_update_config_store_list_request
|
34
|
+
# @return [Array<(InlineResponse200, Integer, Hash)>] InlineResponse200 data, response status code and response headers
|
35
|
+
def bulk_update_config_store_item_with_http_info(opts = {})
|
36
|
+
if @api_client.config.debugging
|
37
|
+
@api_client.config.logger.debug 'Calling API: ConfigStoreItemApi.bulk_update_config_store_item ...'
|
38
|
+
end
|
39
|
+
# unbox the parameters from the hash
|
40
|
+
config_store_id = opts[:'config_store_id']
|
41
|
+
# verify the required parameter 'config_store_id' is set
|
42
|
+
if @api_client.config.client_side_validation && config_store_id.nil?
|
43
|
+
fail ArgumentError, "Missing the required parameter 'config_store_id' when calling ConfigStoreItemApi.bulk_update_config_store_item"
|
44
|
+
end
|
45
|
+
# resource path
|
46
|
+
local_var_path = '/resources/stores/config/{config_store_id}/items'.sub('{' + 'config_store_id' + '}', CGI.escape(config_store_id.to_s))
|
47
|
+
|
48
|
+
# query parameters
|
49
|
+
query_params = opts[:query_params] || {}
|
50
|
+
|
51
|
+
# header parameters
|
52
|
+
header_params = opts[:header_params] || {}
|
53
|
+
# HTTP header 'Accept' (if needed)
|
54
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
55
|
+
# HTTP header 'Content-Type'
|
56
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
57
|
+
if !content_type.nil?
|
58
|
+
header_params['Content-Type'] = content_type
|
59
|
+
end
|
60
|
+
|
61
|
+
# form parameters
|
62
|
+
form_params = opts[:form_params] || {}
|
63
|
+
|
64
|
+
# http body (model)
|
65
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'bulk_update_config_store_list_request'])
|
66
|
+
|
67
|
+
# return_type
|
68
|
+
return_type = opts[:debug_return_type] || 'InlineResponse200'
|
69
|
+
|
70
|
+
# auth_names
|
71
|
+
auth_names = opts[:debug_auth_names] || ['token']
|
72
|
+
|
73
|
+
new_options = opts.merge(
|
74
|
+
:operation => :"ConfigStoreItemApi.bulk_update_config_store_item",
|
75
|
+
:header_params => header_params,
|
76
|
+
:query_params => query_params,
|
77
|
+
:form_params => form_params,
|
78
|
+
:body => post_body,
|
79
|
+
:auth_names => auth_names,
|
80
|
+
:return_type => return_type
|
81
|
+
)
|
82
|
+
|
83
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
84
|
+
if @api_client.config.debugging
|
85
|
+
@api_client.config.logger.debug "API called: ConfigStoreItemApi#bulk_update_config_store_item\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
86
|
+
end
|
87
|
+
return data, status_code, headers
|
88
|
+
end
|
89
|
+
|
90
|
+
# Create an entry in a config store
|
91
|
+
# Add a single key-value pair to an individual config store, specified by ID.
|
92
|
+
# @option opts [String] :config_store_id An alphanumeric string identifying the config store. (required)
|
93
|
+
# @option opts [String] :item_key Item key, maximum 256 characters.
|
94
|
+
# @option opts [String] :item_value Item value, maximum 8000 characters.
|
95
|
+
# @return [ConfigStoreItemResponse]
|
96
|
+
def create_config_store_item(opts = {})
|
97
|
+
data, _status_code, _headers = create_config_store_item_with_http_info(opts)
|
98
|
+
data
|
99
|
+
end
|
100
|
+
|
101
|
+
# Create an entry in a config store
|
102
|
+
# Add a single key-value pair to an individual config store, specified by ID.
|
103
|
+
# @option opts [String] :config_store_id An alphanumeric string identifying the config store. (required)
|
104
|
+
# @option opts [String] :item_key Item key, maximum 256 characters.
|
105
|
+
# @option opts [String] :item_value Item value, maximum 8000 characters.
|
106
|
+
# @return [Array<(ConfigStoreItemResponse, Integer, Hash)>] ConfigStoreItemResponse data, response status code and response headers
|
107
|
+
def create_config_store_item_with_http_info(opts = {})
|
108
|
+
if @api_client.config.debugging
|
109
|
+
@api_client.config.logger.debug 'Calling API: ConfigStoreItemApi.create_config_store_item ...'
|
110
|
+
end
|
111
|
+
# unbox the parameters from the hash
|
112
|
+
config_store_id = opts[:'config_store_id']
|
113
|
+
# verify the required parameter 'config_store_id' is set
|
114
|
+
if @api_client.config.client_side_validation && config_store_id.nil?
|
115
|
+
fail ArgumentError, "Missing the required parameter 'config_store_id' when calling ConfigStoreItemApi.create_config_store_item"
|
116
|
+
end
|
117
|
+
# resource path
|
118
|
+
local_var_path = '/resources/stores/config/{config_store_id}/item'.sub('{' + 'config_store_id' + '}', CGI.escape(config_store_id.to_s))
|
119
|
+
|
120
|
+
# query parameters
|
121
|
+
query_params = opts[:query_params] || {}
|
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
|
+
# HTTP header 'Content-Type'
|
128
|
+
content_type = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])
|
129
|
+
if !content_type.nil?
|
130
|
+
header_params['Content-Type'] = content_type
|
131
|
+
end
|
132
|
+
|
133
|
+
# form parameters
|
134
|
+
form_params = opts[:form_params] || {}
|
135
|
+
form_params['item_key'] = opts[:'item_key'] if !opts[:'item_key'].nil?
|
136
|
+
form_params['item_value'] = opts[:'item_value'] if !opts[:'item_value'].nil?
|
137
|
+
|
138
|
+
# http body (model)
|
139
|
+
post_body = opts[:debug_body]
|
140
|
+
|
141
|
+
# return_type
|
142
|
+
return_type = opts[:debug_return_type] || 'ConfigStoreItemResponse'
|
143
|
+
|
144
|
+
# auth_names
|
145
|
+
auth_names = opts[:debug_auth_names] || ['token']
|
146
|
+
|
147
|
+
new_options = opts.merge(
|
148
|
+
:operation => :"ConfigStoreItemApi.create_config_store_item",
|
149
|
+
:header_params => header_params,
|
150
|
+
:query_params => query_params,
|
151
|
+
:form_params => form_params,
|
152
|
+
:body => post_body,
|
153
|
+
:auth_names => auth_names,
|
154
|
+
:return_type => return_type
|
155
|
+
)
|
156
|
+
|
157
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
158
|
+
if @api_client.config.debugging
|
159
|
+
@api_client.config.logger.debug "API called: ConfigStoreItemApi#create_config_store_item\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
160
|
+
end
|
161
|
+
return data, status_code, headers
|
162
|
+
end
|
163
|
+
|
164
|
+
# Delete an item from a config store
|
165
|
+
# Delete an entry in a config store given a config store ID, and item key.
|
166
|
+
# @option opts [String] :config_store_id An alphanumeric string identifying the config store. (required)
|
167
|
+
# @option opts [String] :config_store_item_key Item key, maximum 256 characters. (required)
|
168
|
+
# @return [InlineResponse200]
|
169
|
+
def delete_config_store_item(opts = {})
|
170
|
+
data, _status_code, _headers = delete_config_store_item_with_http_info(opts)
|
171
|
+
data
|
172
|
+
end
|
173
|
+
|
174
|
+
# Delete an item from a config store
|
175
|
+
# Delete an entry in a config store given a config store ID, and item key.
|
176
|
+
# @option opts [String] :config_store_id An alphanumeric string identifying the config store. (required)
|
177
|
+
# @option opts [String] :config_store_item_key Item key, maximum 256 characters. (required)
|
178
|
+
# @return [Array<(InlineResponse200, Integer, Hash)>] InlineResponse200 data, response status code and response headers
|
179
|
+
def delete_config_store_item_with_http_info(opts = {})
|
180
|
+
if @api_client.config.debugging
|
181
|
+
@api_client.config.logger.debug 'Calling API: ConfigStoreItemApi.delete_config_store_item ...'
|
182
|
+
end
|
183
|
+
# unbox the parameters from the hash
|
184
|
+
config_store_id = opts[:'config_store_id']
|
185
|
+
config_store_item_key = opts[:'config_store_item_key']
|
186
|
+
# verify the required parameter 'config_store_id' is set
|
187
|
+
if @api_client.config.client_side_validation && config_store_id.nil?
|
188
|
+
fail ArgumentError, "Missing the required parameter 'config_store_id' when calling ConfigStoreItemApi.delete_config_store_item"
|
189
|
+
end
|
190
|
+
# verify the required parameter 'config_store_item_key' is set
|
191
|
+
if @api_client.config.client_side_validation && config_store_item_key.nil?
|
192
|
+
fail ArgumentError, "Missing the required parameter 'config_store_item_key' when calling ConfigStoreItemApi.delete_config_store_item"
|
193
|
+
end
|
194
|
+
# resource path
|
195
|
+
local_var_path = '/resources/stores/config/{config_store_id}/item/{config_store_item_key}'.sub('{' + 'config_store_id' + '}', CGI.escape(config_store_id.to_s)).sub('{' + 'config_store_item_key' + '}', CGI.escape(config_store_item_key.to_s))
|
196
|
+
|
197
|
+
# query parameters
|
198
|
+
query_params = opts[:query_params] || {}
|
199
|
+
|
200
|
+
# header parameters
|
201
|
+
header_params = opts[:header_params] || {}
|
202
|
+
# HTTP header 'Accept' (if needed)
|
203
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
204
|
+
|
205
|
+
# form parameters
|
206
|
+
form_params = opts[:form_params] || {}
|
207
|
+
|
208
|
+
# http body (model)
|
209
|
+
post_body = opts[:debug_body]
|
210
|
+
|
211
|
+
# return_type
|
212
|
+
return_type = opts[:debug_return_type] || 'InlineResponse200'
|
213
|
+
|
214
|
+
# auth_names
|
215
|
+
auth_names = opts[:debug_auth_names] || ['token']
|
216
|
+
|
217
|
+
new_options = opts.merge(
|
218
|
+
:operation => :"ConfigStoreItemApi.delete_config_store_item",
|
219
|
+
:header_params => header_params,
|
220
|
+
:query_params => query_params,
|
221
|
+
:form_params => form_params,
|
222
|
+
:body => post_body,
|
223
|
+
:auth_names => auth_names,
|
224
|
+
:return_type => return_type
|
225
|
+
)
|
226
|
+
|
227
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
228
|
+
if @api_client.config.debugging
|
229
|
+
@api_client.config.logger.debug "API called: ConfigStoreItemApi#delete_config_store_item\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
230
|
+
end
|
231
|
+
return data, status_code, headers
|
232
|
+
end
|
233
|
+
|
234
|
+
# Get an item from a config store
|
235
|
+
# Retrieve a config store entry given a config store ID and item key.
|
236
|
+
# @option opts [String] :config_store_id An alphanumeric string identifying the config store. (required)
|
237
|
+
# @option opts [String] :config_store_item_key Item key, maximum 256 characters. (required)
|
238
|
+
# @return [ConfigStoreItemResponse]
|
239
|
+
def get_config_store_item(opts = {})
|
240
|
+
data, _status_code, _headers = get_config_store_item_with_http_info(opts)
|
241
|
+
data
|
242
|
+
end
|
243
|
+
|
244
|
+
# Get an item from a config store
|
245
|
+
# Retrieve a config store entry given a config store ID and item key.
|
246
|
+
# @option opts [String] :config_store_id An alphanumeric string identifying the config store. (required)
|
247
|
+
# @option opts [String] :config_store_item_key Item key, maximum 256 characters. (required)
|
248
|
+
# @return [Array<(ConfigStoreItemResponse, Integer, Hash)>] ConfigStoreItemResponse data, response status code and response headers
|
249
|
+
def get_config_store_item_with_http_info(opts = {})
|
250
|
+
if @api_client.config.debugging
|
251
|
+
@api_client.config.logger.debug 'Calling API: ConfigStoreItemApi.get_config_store_item ...'
|
252
|
+
end
|
253
|
+
# unbox the parameters from the hash
|
254
|
+
config_store_id = opts[:'config_store_id']
|
255
|
+
config_store_item_key = opts[:'config_store_item_key']
|
256
|
+
# verify the required parameter 'config_store_id' is set
|
257
|
+
if @api_client.config.client_side_validation && config_store_id.nil?
|
258
|
+
fail ArgumentError, "Missing the required parameter 'config_store_id' when calling ConfigStoreItemApi.get_config_store_item"
|
259
|
+
end
|
260
|
+
# verify the required parameter 'config_store_item_key' is set
|
261
|
+
if @api_client.config.client_side_validation && config_store_item_key.nil?
|
262
|
+
fail ArgumentError, "Missing the required parameter 'config_store_item_key' when calling ConfigStoreItemApi.get_config_store_item"
|
263
|
+
end
|
264
|
+
# resource path
|
265
|
+
local_var_path = '/resources/stores/config/{config_store_id}/item/{config_store_item_key}'.sub('{' + 'config_store_id' + '}', CGI.escape(config_store_id.to_s)).sub('{' + 'config_store_item_key' + '}', CGI.escape(config_store_item_key.to_s))
|
266
|
+
|
267
|
+
# query parameters
|
268
|
+
query_params = opts[:query_params] || {}
|
269
|
+
|
270
|
+
# header parameters
|
271
|
+
header_params = opts[:header_params] || {}
|
272
|
+
# HTTP header 'Accept' (if needed)
|
273
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
274
|
+
|
275
|
+
# form parameters
|
276
|
+
form_params = opts[:form_params] || {}
|
277
|
+
|
278
|
+
# http body (model)
|
279
|
+
post_body = opts[:debug_body]
|
280
|
+
|
281
|
+
# return_type
|
282
|
+
return_type = opts[:debug_return_type] || 'ConfigStoreItemResponse'
|
283
|
+
|
284
|
+
# auth_names
|
285
|
+
auth_names = opts[:debug_auth_names] || ['token']
|
286
|
+
|
287
|
+
new_options = opts.merge(
|
288
|
+
:operation => :"ConfigStoreItemApi.get_config_store_item",
|
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(:GET, local_var_path, new_options)
|
298
|
+
if @api_client.config.debugging
|
299
|
+
@api_client.config.logger.debug "API called: ConfigStoreItemApi#get_config_store_item\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
300
|
+
end
|
301
|
+
return data, status_code, headers
|
302
|
+
end
|
303
|
+
|
304
|
+
# List items in a config store
|
305
|
+
# List the key-value pairs associated with a given config store ID.
|
306
|
+
# @option opts [String] :config_store_id An alphanumeric string identifying the config store. (required)
|
307
|
+
# @return [Array<ConfigStoreItemResponse>]
|
308
|
+
def list_config_store_items(opts = {})
|
309
|
+
data, _status_code, _headers = list_config_store_items_with_http_info(opts)
|
310
|
+
data
|
311
|
+
end
|
312
|
+
|
313
|
+
# List items in a config store
|
314
|
+
# List the key-value pairs associated with a given config store ID.
|
315
|
+
# @option opts [String] :config_store_id An alphanumeric string identifying the config store. (required)
|
316
|
+
# @return [Array<(Array<ConfigStoreItemResponse>, Integer, Hash)>] Array<ConfigStoreItemResponse> data, response status code and response headers
|
317
|
+
def list_config_store_items_with_http_info(opts = {})
|
318
|
+
if @api_client.config.debugging
|
319
|
+
@api_client.config.logger.debug 'Calling API: ConfigStoreItemApi.list_config_store_items ...'
|
320
|
+
end
|
321
|
+
# unbox the parameters from the hash
|
322
|
+
config_store_id = opts[:'config_store_id']
|
323
|
+
# verify the required parameter 'config_store_id' is set
|
324
|
+
if @api_client.config.client_side_validation && config_store_id.nil?
|
325
|
+
fail ArgumentError, "Missing the required parameter 'config_store_id' when calling ConfigStoreItemApi.list_config_store_items"
|
326
|
+
end
|
327
|
+
# resource path
|
328
|
+
local_var_path = '/resources/stores/config/{config_store_id}/items'.sub('{' + 'config_store_id' + '}', CGI.escape(config_store_id.to_s))
|
329
|
+
|
330
|
+
# query parameters
|
331
|
+
query_params = opts[:query_params] || {}
|
332
|
+
|
333
|
+
# header parameters
|
334
|
+
header_params = opts[:header_params] || {}
|
335
|
+
# HTTP header 'Accept' (if needed)
|
336
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
337
|
+
|
338
|
+
# form parameters
|
339
|
+
form_params = opts[:form_params] || {}
|
340
|
+
|
341
|
+
# http body (model)
|
342
|
+
post_body = opts[:debug_body]
|
343
|
+
|
344
|
+
# return_type
|
345
|
+
return_type = opts[:debug_return_type] || 'Array<ConfigStoreItemResponse>'
|
346
|
+
|
347
|
+
# auth_names
|
348
|
+
auth_names = opts[:debug_auth_names] || ['token']
|
349
|
+
|
350
|
+
new_options = opts.merge(
|
351
|
+
:operation => :"ConfigStoreItemApi.list_config_store_items",
|
352
|
+
:header_params => header_params,
|
353
|
+
:query_params => query_params,
|
354
|
+
:form_params => form_params,
|
355
|
+
:body => post_body,
|
356
|
+
:auth_names => auth_names,
|
357
|
+
:return_type => return_type
|
358
|
+
)
|
359
|
+
|
360
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
361
|
+
if @api_client.config.debugging
|
362
|
+
@api_client.config.logger.debug "API called: ConfigStoreItemApi#list_config_store_items\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
363
|
+
end
|
364
|
+
return data, status_code, headers
|
365
|
+
end
|
366
|
+
|
367
|
+
# Update an entry in a config store
|
368
|
+
# Update an entry in a config store given a config store ID, item key, and item value.
|
369
|
+
# @option opts [String] :config_store_id An alphanumeric string identifying the config store. (required)
|
370
|
+
# @option opts [String] :config_store_item_key Item key, maximum 256 characters. (required)
|
371
|
+
# @option opts [String] :item_key Item key, maximum 256 characters.
|
372
|
+
# @option opts [String] :item_value Item value, maximum 8000 characters.
|
373
|
+
# @return [ConfigStoreItemResponse]
|
374
|
+
def update_config_store_item(opts = {})
|
375
|
+
data, _status_code, _headers = update_config_store_item_with_http_info(opts)
|
376
|
+
data
|
377
|
+
end
|
378
|
+
|
379
|
+
# Update an entry in a config store
|
380
|
+
# Update an entry in a config store given a config store ID, item key, and item value.
|
381
|
+
# @option opts [String] :config_store_id An alphanumeric string identifying the config store. (required)
|
382
|
+
# @option opts [String] :config_store_item_key Item key, maximum 256 characters. (required)
|
383
|
+
# @option opts [String] :item_key Item key, maximum 256 characters.
|
384
|
+
# @option opts [String] :item_value Item value, maximum 8000 characters.
|
385
|
+
# @return [Array<(ConfigStoreItemResponse, Integer, Hash)>] ConfigStoreItemResponse data, response status code and response headers
|
386
|
+
def update_config_store_item_with_http_info(opts = {})
|
387
|
+
if @api_client.config.debugging
|
388
|
+
@api_client.config.logger.debug 'Calling API: ConfigStoreItemApi.update_config_store_item ...'
|
389
|
+
end
|
390
|
+
# unbox the parameters from the hash
|
391
|
+
config_store_id = opts[:'config_store_id']
|
392
|
+
config_store_item_key = opts[:'config_store_item_key']
|
393
|
+
# verify the required parameter 'config_store_id' is set
|
394
|
+
if @api_client.config.client_side_validation && config_store_id.nil?
|
395
|
+
fail ArgumentError, "Missing the required parameter 'config_store_id' when calling ConfigStoreItemApi.update_config_store_item"
|
396
|
+
end
|
397
|
+
# verify the required parameter 'config_store_item_key' is set
|
398
|
+
if @api_client.config.client_side_validation && config_store_item_key.nil?
|
399
|
+
fail ArgumentError, "Missing the required parameter 'config_store_item_key' when calling ConfigStoreItemApi.update_config_store_item"
|
400
|
+
end
|
401
|
+
# resource path
|
402
|
+
local_var_path = '/resources/stores/config/{config_store_id}/item/{config_store_item_key}'.sub('{' + 'config_store_id' + '}', CGI.escape(config_store_id.to_s)).sub('{' + 'config_store_item_key' + '}', CGI.escape(config_store_item_key.to_s))
|
403
|
+
|
404
|
+
# query parameters
|
405
|
+
query_params = opts[:query_params] || {}
|
406
|
+
|
407
|
+
# header parameters
|
408
|
+
header_params = opts[:header_params] || {}
|
409
|
+
# HTTP header 'Accept' (if needed)
|
410
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
411
|
+
# HTTP header 'Content-Type'
|
412
|
+
content_type = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])
|
413
|
+
if !content_type.nil?
|
414
|
+
header_params['Content-Type'] = content_type
|
415
|
+
end
|
416
|
+
|
417
|
+
# form parameters
|
418
|
+
form_params = opts[:form_params] || {}
|
419
|
+
form_params['item_key'] = opts[:'item_key'] if !opts[:'item_key'].nil?
|
420
|
+
form_params['item_value'] = opts[:'item_value'] if !opts[:'item_value'].nil?
|
421
|
+
|
422
|
+
# http body (model)
|
423
|
+
post_body = opts[:debug_body]
|
424
|
+
|
425
|
+
# return_type
|
426
|
+
return_type = opts[:debug_return_type] || 'ConfigStoreItemResponse'
|
427
|
+
|
428
|
+
# auth_names
|
429
|
+
auth_names = opts[:debug_auth_names] || ['token']
|
430
|
+
|
431
|
+
new_options = opts.merge(
|
432
|
+
:operation => :"ConfigStoreItemApi.update_config_store_item",
|
433
|
+
:header_params => header_params,
|
434
|
+
:query_params => query_params,
|
435
|
+
:form_params => form_params,
|
436
|
+
:body => post_body,
|
437
|
+
:auth_names => auth_names,
|
438
|
+
:return_type => return_type
|
439
|
+
)
|
440
|
+
|
441
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
442
|
+
if @api_client.config.debugging
|
443
|
+
@api_client.config.logger.debug "API called: ConfigStoreItemApi#update_config_store_item\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
444
|
+
end
|
445
|
+
return data, status_code, headers
|
446
|
+
end
|
447
|
+
|
448
|
+
# Insert or update an entry in a config store
|
449
|
+
# Insert or update an entry in a config store given a config store ID, item key, and item value.
|
450
|
+
# @option opts [String] :config_store_id An alphanumeric string identifying the config store. (required)
|
451
|
+
# @option opts [String] :config_store_item_key Item key, maximum 256 characters. (required)
|
452
|
+
# @option opts [String] :item_key Item key, maximum 256 characters.
|
453
|
+
# @option opts [String] :item_value Item value, maximum 8000 characters.
|
454
|
+
# @return [ConfigStoreItemResponse]
|
455
|
+
def upsert_config_store_item(opts = {})
|
456
|
+
data, _status_code, _headers = upsert_config_store_item_with_http_info(opts)
|
457
|
+
data
|
458
|
+
end
|
459
|
+
|
460
|
+
# Insert or update an entry in a config store
|
461
|
+
# Insert or update an entry in a config store given a config store ID, item key, and item value.
|
462
|
+
# @option opts [String] :config_store_id An alphanumeric string identifying the config store. (required)
|
463
|
+
# @option opts [String] :config_store_item_key Item key, maximum 256 characters. (required)
|
464
|
+
# @option opts [String] :item_key Item key, maximum 256 characters.
|
465
|
+
# @option opts [String] :item_value Item value, maximum 8000 characters.
|
466
|
+
# @return [Array<(ConfigStoreItemResponse, Integer, Hash)>] ConfigStoreItemResponse data, response status code and response headers
|
467
|
+
def upsert_config_store_item_with_http_info(opts = {})
|
468
|
+
if @api_client.config.debugging
|
469
|
+
@api_client.config.logger.debug 'Calling API: ConfigStoreItemApi.upsert_config_store_item ...'
|
470
|
+
end
|
471
|
+
# unbox the parameters from the hash
|
472
|
+
config_store_id = opts[:'config_store_id']
|
473
|
+
config_store_item_key = opts[:'config_store_item_key']
|
474
|
+
# verify the required parameter 'config_store_id' is set
|
475
|
+
if @api_client.config.client_side_validation && config_store_id.nil?
|
476
|
+
fail ArgumentError, "Missing the required parameter 'config_store_id' when calling ConfigStoreItemApi.upsert_config_store_item"
|
477
|
+
end
|
478
|
+
# verify the required parameter 'config_store_item_key' is set
|
479
|
+
if @api_client.config.client_side_validation && config_store_item_key.nil?
|
480
|
+
fail ArgumentError, "Missing the required parameter 'config_store_item_key' when calling ConfigStoreItemApi.upsert_config_store_item"
|
481
|
+
end
|
482
|
+
# resource path
|
483
|
+
local_var_path = '/resources/stores/config/{config_store_id}/item/{config_store_item_key}'.sub('{' + 'config_store_id' + '}', CGI.escape(config_store_id.to_s)).sub('{' + 'config_store_item_key' + '}', CGI.escape(config_store_item_key.to_s))
|
484
|
+
|
485
|
+
# query parameters
|
486
|
+
query_params = opts[:query_params] || {}
|
487
|
+
|
488
|
+
# header parameters
|
489
|
+
header_params = opts[:header_params] || {}
|
490
|
+
# HTTP header 'Accept' (if needed)
|
491
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
492
|
+
# HTTP header 'Content-Type'
|
493
|
+
content_type = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])
|
494
|
+
if !content_type.nil?
|
495
|
+
header_params['Content-Type'] = content_type
|
496
|
+
end
|
497
|
+
|
498
|
+
# form parameters
|
499
|
+
form_params = opts[:form_params] || {}
|
500
|
+
form_params['item_key'] = opts[:'item_key'] if !opts[:'item_key'].nil?
|
501
|
+
form_params['item_value'] = opts[:'item_value'] if !opts[:'item_value'].nil?
|
502
|
+
|
503
|
+
# http body (model)
|
504
|
+
post_body = opts[:debug_body]
|
505
|
+
|
506
|
+
# return_type
|
507
|
+
return_type = opts[:debug_return_type] || 'ConfigStoreItemResponse'
|
508
|
+
|
509
|
+
# auth_names
|
510
|
+
auth_names = opts[:debug_auth_names] || ['token']
|
511
|
+
|
512
|
+
new_options = opts.merge(
|
513
|
+
:operation => :"ConfigStoreItemApi.upsert_config_store_item",
|
514
|
+
:header_params => header_params,
|
515
|
+
:query_params => query_params,
|
516
|
+
:form_params => form_params,
|
517
|
+
:body => post_body,
|
518
|
+
:auth_names => auth_names,
|
519
|
+
:return_type => return_type
|
520
|
+
)
|
521
|
+
|
522
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
523
|
+
if @api_client.config.debugging
|
524
|
+
@api_client.config.logger.debug "API called: ConfigStoreItemApi#upsert_config_store_item\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
525
|
+
end
|
526
|
+
return data, status_code, headers
|
527
|
+
end
|
528
|
+
end
|
529
|
+
end
|
data/lib/fastly/api/purge_api.rb
CHANGED
@@ -255,7 +255,7 @@ module Fastly
|
|
255
255
|
fail ArgumentError, "Missing the required parameter 'surrogate_key' when calling PurgeApi.purge_tag"
|
256
256
|
end
|
257
257
|
# resource path
|
258
|
-
local_var_path = '/service/{service_id}/purge/{surrogate_key}'.sub('{' + 'service_id' + '}', CGI.escape(service_id.to_s)).sub('{' + 'surrogate_key' + '}',
|
258
|
+
local_var_path = '/service/{service_id}/purge/{surrogate_key}'.sub('{' + 'service_id' + '}', CGI.escape(service_id.to_s)).sub('{' + 'surrogate_key' + '}', surrogate_key.to_s)
|
259
259
|
|
260
260
|
# query parameters
|
261
261
|
query_params = opts[:query_params] || {}
|
@@ -25,7 +25,7 @@ module Fastly
|
|
25
25
|
# @option opts [Integer] :dynamic Sets the snippet version.
|
26
26
|
# @option opts [String] :type The location in generated VCL where the snippet should be placed.
|
27
27
|
# @option opts [String] :content The VCL code that specifies exactly what the snippet does.
|
28
|
-
# @option opts [
|
28
|
+
# @option opts [String] :priority Priority determines execution order. Lower numbers execute first. (default to '100')
|
29
29
|
# @return [SnippetResponse]
|
30
30
|
def create_snippet(opts = {})
|
31
31
|
data, _status_code, _headers = create_snippet_with_http_info(opts)
|
@@ -40,7 +40,7 @@ module Fastly
|
|
40
40
|
# @option opts [Integer] :dynamic Sets the snippet version.
|
41
41
|
# @option opts [String] :type The location in generated VCL where the snippet should be placed.
|
42
42
|
# @option opts [String] :content The VCL code that specifies exactly what the snippet does.
|
43
|
-
# @option opts [
|
43
|
+
# @option opts [String] :priority Priority determines execution order. Lower numbers execute first. (default to '100')
|
44
44
|
# @return [Array<(SnippetResponse, Integer, Hash)>] SnippetResponse data, response status code and response headers
|
45
45
|
def create_snippet_with_http_info(opts = {})
|
46
46
|
if @api_client.config.debugging
|
@@ -417,7 +417,7 @@ module Fastly
|
|
417
417
|
# @option opts [Integer] :dynamic Sets the snippet version.
|
418
418
|
# @option opts [String] :type The location in generated VCL where the snippet should be placed.
|
419
419
|
# @option opts [String] :content The VCL code that specifies exactly what the snippet does.
|
420
|
-
# @option opts [
|
420
|
+
# @option opts [String] :priority Priority determines execution order. Lower numbers execute first. (default to '100')
|
421
421
|
# @return [SnippetResponse]
|
422
422
|
def update_snippet_dynamic(opts = {})
|
423
423
|
data, _status_code, _headers = update_snippet_dynamic_with_http_info(opts)
|
@@ -432,7 +432,7 @@ module Fastly
|
|
432
432
|
# @option opts [Integer] :dynamic Sets the snippet version.
|
433
433
|
# @option opts [String] :type The location in generated VCL where the snippet should be placed.
|
434
434
|
# @option opts [String] :content The VCL code that specifies exactly what the snippet does.
|
435
|
-
# @option opts [
|
435
|
+
# @option opts [String] :priority Priority determines execution order. Lower numbers execute first. (default to '100')
|
436
436
|
# @return [Array<(SnippetResponse, Integer, Hash)>] SnippetResponse data, response status code and response headers
|
437
437
|
def update_snippet_dynamic_with_http_info(opts = {})
|
438
438
|
if @api_client.config.debugging
|
data/lib/fastly/api_client.rb
CHANGED
@@ -27,6 +27,7 @@ module Fastly
|
|
27
27
|
|
28
28
|
attr_accessor :service_id
|
29
29
|
|
30
|
+
# String representing the number identifying a version of the service.
|
30
31
|
attr_accessor :version
|
31
32
|
|
32
33
|
attr_accessor :id
|
@@ -57,7 +58,7 @@ module Fastly
|
|
57
58
|
:'deleted_at' => :'Time',
|
58
59
|
:'updated_at' => :'Time',
|
59
60
|
:'service_id' => :'String',
|
60
|
-
:'version' => :'
|
61
|
+
:'version' => :'String',
|
61
62
|
:'id' => :'String'
|
62
63
|
}
|
63
64
|
end
|
@@ -76,7 +77,6 @@ module Fastly
|
|
76
77
|
[
|
77
78
|
:'Acl',
|
78
79
|
:'AclResponseAllOf',
|
79
|
-
:'ServiceIdAndVersion',
|
80
80
|
:'Timestamps'
|
81
81
|
]
|
82
82
|
end
|
@@ -13,11 +13,18 @@ require 'time'
|
|
13
13
|
|
14
14
|
module Fastly
|
15
15
|
class AclResponseAllOf
|
16
|
+
attr_accessor :service_id
|
17
|
+
|
18
|
+
# String representing the number identifying a version of the service.
|
19
|
+
attr_accessor :version
|
20
|
+
|
16
21
|
attr_accessor :id
|
17
22
|
|
18
23
|
# Attribute mapping from ruby-style variable name to JSON key.
|
19
24
|
def self.attribute_map
|
20
25
|
{
|
26
|
+
:'service_id' => :'service_id',
|
27
|
+
:'version' => :'version',
|
21
28
|
:'id' => :'id'
|
22
29
|
}
|
23
30
|
end
|
@@ -30,6 +37,8 @@ module Fastly
|
|
30
37
|
# Attribute type mapping.
|
31
38
|
def self.fastly_types
|
32
39
|
{
|
40
|
+
:'service_id' => :'String',
|
41
|
+
:'version' => :'String',
|
33
42
|
:'id' => :'String'
|
34
43
|
}
|
35
44
|
end
|
@@ -55,6 +64,14 @@ module Fastly
|
|
55
64
|
h[k.to_sym] = v
|
56
65
|
}
|
57
66
|
|
67
|
+
if attributes.key?(:'service_id')
|
68
|
+
self.service_id = attributes[:'service_id']
|
69
|
+
end
|
70
|
+
|
71
|
+
if attributes.key?(:'version')
|
72
|
+
self.version = attributes[:'version']
|
73
|
+
end
|
74
|
+
|
58
75
|
if attributes.key?(:'id')
|
59
76
|
self.id = attributes[:'id']
|
60
77
|
end
|
@@ -78,6 +95,8 @@ module Fastly
|
|
78
95
|
def ==(o)
|
79
96
|
return true if self.equal?(o)
|
80
97
|
self.class == o.class &&
|
98
|
+
service_id == o.service_id &&
|
99
|
+
version == o.version &&
|
81
100
|
id == o.id
|
82
101
|
end
|
83
102
|
|
@@ -90,7 +109,7 @@ module Fastly
|
|
90
109
|
# Calculates hash code according to all attributes.
|
91
110
|
# @return [Integer] Hash code
|
92
111
|
def hash
|
93
|
-
[id].hash
|
112
|
+
[service_id, version, id].hash
|
94
113
|
end
|
95
114
|
|
96
115
|
# Builds the object from hash
|