vgs_api_client 0.0.1.alpha202205200950 → 0.0.1.alpha202205202337
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/api.yaml +236 -7
- data/lib/openapi_client/api/aliases_api.rb +75 -5
- data/lib/openapi_client/api/functions_api.rb +269 -0
- data/lib/openapi_client/api_client.rb +1 -1
- data/lib/openapi_client/configuration.rb +8 -1
- data/lib/openapi_client/models/create_function_request.rb +253 -0
- data/lib/openapi_client/models/create_function_request_payload.rb +306 -0
- data/lib/openapi_client/models/function.rb +284 -0
- data/lib/openapi_client/models/inline_response2002.rb +245 -0
- data/lib/openapi_client/models/inline_response2003.rb +245 -0
- data/lib/openapi_client/version.rb +1 -1
- data/lib/openapi_client.rb +6 -0
- data/lib/version.rb +1 -1
- data/scripts/assemble/run.sh +1 -1
- data/scripts/test/run.sh +1 -1
- metadata +7 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 466d1ce6ffa623fa8cc02ca65f59a8bcd11718a2dfe20cff3421dc42e2d6f2a2
|
4
|
+
data.tar.gz: 52af700658d4023067c97e1675b033e0ce718b3a1354539b8de5d431b5cf9fb9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3daf0cee732b440e6c226bfbd88ca28b49ee3273fd916b795d1fedb18b1b77d07d90d646cc0a11fd27049ef4af117ba422bae4b30f00d8de42a0af8fc4f611a2
|
7
|
+
data.tar.gz: c265ba7d7ddb03cfdcaf649166a317aaf5dcadfa6c3d8940142d1bb2ccd5f041de60657417c4ac953793b1d2478b8715a569431f68371ee871c6427785babc16
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.1.
|
1
|
+
0.0.1.alpha202205202337
|
data/api.yaml
CHANGED
@@ -80,13 +80,14 @@ info:
|
|
80
80
|
contact:
|
81
81
|
email: support@verygoodsecurity.com
|
82
82
|
x-logo:
|
83
|
-
url:
|
83
|
+
url: https://www.verygoodsecurity.com/img/press-and-assets/vgs-logo-color.png
|
84
84
|
href: https://www.verygoodsecurity.com
|
85
85
|
altText: VGS Logo
|
86
|
+
termsOfService: https://www.verygoodsecurity.com/terms-and-conditions
|
86
87
|
|
87
88
|
externalDocs:
|
88
|
-
description:
|
89
|
-
url: https://www.verygoodsecurity.com/
|
89
|
+
description: Visit the VGS documentation homepage
|
90
|
+
url: https://www.verygoodsecurity.com/docs/
|
90
91
|
|
91
92
|
servers:
|
92
93
|
- url: https://api.sandbox.verygoodvault.com
|
@@ -111,9 +112,137 @@ x-tagGroups:
|
|
111
112
|
- aliases
|
112
113
|
|
113
114
|
security:
|
114
|
-
-
|
115
|
+
- BasicAuth: []
|
115
116
|
|
116
117
|
paths:
|
118
|
+
/functions:
|
119
|
+
post:
|
120
|
+
operationId: createFunction
|
121
|
+
summary: Creates a new function
|
122
|
+
tags:
|
123
|
+
- functions
|
124
|
+
description: |
|
125
|
+
Creates a new function.
|
126
|
+
requestBody:
|
127
|
+
content:
|
128
|
+
application/json:
|
129
|
+
schema:
|
130
|
+
$ref: '#/components/schemas/CreateFunctionRequest'
|
131
|
+
examples:
|
132
|
+
A:
|
133
|
+
summary: Create a new function
|
134
|
+
value:
|
135
|
+
data:
|
136
|
+
- src: |
|
137
|
+
def process(input, ctx):
|
138
|
+
return input
|
139
|
+
lang: larky
|
140
|
+
name: my-function
|
141
|
+
responses:
|
142
|
+
'201':
|
143
|
+
description: Created
|
144
|
+
content:
|
145
|
+
application/json:
|
146
|
+
schema:
|
147
|
+
type: object
|
148
|
+
properties:
|
149
|
+
data:
|
150
|
+
type: array
|
151
|
+
items:
|
152
|
+
$ref: '#/components/schemas/Function'
|
153
|
+
description: A retrieved function.
|
154
|
+
minItems: 1
|
155
|
+
maxItems: 20
|
156
|
+
default:
|
157
|
+
$ref: '#/components/responses/ApiErrorsResponse'
|
158
|
+
get:
|
159
|
+
operationId: listFunctions
|
160
|
+
summary: Lists all functions
|
161
|
+
tags:
|
162
|
+
- functions
|
163
|
+
description: |
|
164
|
+
Lists all functions
|
165
|
+
responses:
|
166
|
+
'200':
|
167
|
+
description: OK
|
168
|
+
content:
|
169
|
+
application/json:
|
170
|
+
schema:
|
171
|
+
type: object
|
172
|
+
properties:
|
173
|
+
data:
|
174
|
+
type: array
|
175
|
+
items:
|
176
|
+
$ref: '#/components/schemas/Function'
|
177
|
+
description: A retrieved function.
|
178
|
+
minItems: 1
|
179
|
+
maxItems: 20
|
180
|
+
default:
|
181
|
+
$ref: '#/components/responses/ApiErrorsResponse'
|
182
|
+
|
183
|
+
/functions/{functionName}:
|
184
|
+
parameters:
|
185
|
+
- $ref: '#/components/parameters/functionName'
|
186
|
+
get:
|
187
|
+
operationId: getFunction
|
188
|
+
tags:
|
189
|
+
- functions
|
190
|
+
summary: Retrieve a single function
|
191
|
+
description: |
|
192
|
+
Retrieves a function
|
193
|
+
parameters:
|
194
|
+
- $ref: '#/components/parameters/functionName'
|
195
|
+
responses:
|
196
|
+
'200':
|
197
|
+
description: OK
|
198
|
+
content:
|
199
|
+
application/json:
|
200
|
+
schema:
|
201
|
+
type: object
|
202
|
+
properties:
|
203
|
+
data:
|
204
|
+
type: array
|
205
|
+
items:
|
206
|
+
$ref: '#/components/schemas/Function'
|
207
|
+
description: The retrieved function.
|
208
|
+
minItems: 1
|
209
|
+
maxItems: 1
|
210
|
+
default:
|
211
|
+
$ref: '#/components/responses/ApiErrorsResponse'
|
212
|
+
|
213
|
+
put:
|
214
|
+
operationId: updateFunction
|
215
|
+
tags:
|
216
|
+
- aliases
|
217
|
+
summary: Update function
|
218
|
+
description: |
|
219
|
+
Update an existing function definition
|
220
|
+
requestBody:
|
221
|
+
content:
|
222
|
+
application/json:
|
223
|
+
schema:
|
224
|
+
$ref: '#/components/schemas/CreateFunctionRequestPayload'
|
225
|
+
responses:
|
226
|
+
'200':
|
227
|
+
description: No Content
|
228
|
+
default:
|
229
|
+
$ref: '#/components/responses/ApiErrorsResponse'
|
230
|
+
|
231
|
+
delete:
|
232
|
+
operationId: deleteFunction
|
233
|
+
tags:
|
234
|
+
- functions
|
235
|
+
summary: Deletes a function
|
236
|
+
description: |
|
237
|
+
Removes a single alias.
|
238
|
+
parameters:
|
239
|
+
- $ref: '#/components/parameters/functionName'
|
240
|
+
responses:
|
241
|
+
'204':
|
242
|
+
description: No Content
|
243
|
+
default:
|
244
|
+
$ref: '#/components/responses/ApiErrorsResponse'
|
245
|
+
|
117
246
|
/aliases:
|
118
247
|
post:
|
119
248
|
operationId: createAliases
|
@@ -345,16 +474,41 @@ paths:
|
|
345
474
|
-X DELETE \
|
346
475
|
-u "$USERNAME:$PASSWORD"
|
347
476
|
|
348
|
-
|
349
477
|
components:
|
350
478
|
|
351
479
|
# See the following links for details:
|
352
480
|
# - https://swagger.io/docs/specification/authentication/basic-authentication/
|
481
|
+
# https://swagger.io/docs/specification/authentication/
|
353
482
|
securitySchemes:
|
354
|
-
|
483
|
+
BasicAuth:
|
355
484
|
type: http
|
356
485
|
scheme: basic
|
357
|
-
description:
|
486
|
+
description: |
|
487
|
+
The default authentication scheme for [Data API](#data-apis) based requests
|
488
|
+
is [Basic authentication](https://en.wikipedia.org/wiki/Basic_access_authentication).
|
489
|
+
OAuth2:
|
490
|
+
type: oauth2
|
491
|
+
flows:
|
492
|
+
authorizationCode:
|
493
|
+
authorizationUrl: https://auth.verygoodsecurity.com/auth/realms/vgs/protocol/openid-connect/auth
|
494
|
+
tokenUrl: https://auth.verygoodsecurity.io/auth/realms/vgs/protocol/openid-connect/token
|
495
|
+
scopes:
|
496
|
+
credentials:read: Read vault credentials without reading secrets
|
497
|
+
credentials:write: Add, delete and manage credentials of vault
|
498
|
+
routes:read: Read your vault routes
|
499
|
+
routes:write: Create, read, update, delete your vault routes
|
500
|
+
vaults:read: Read details of your vaults
|
501
|
+
vaults:write: Read, create, update and delete your vaults
|
502
|
+
upstreams:read: Read your upstreams for SFTP routes
|
503
|
+
upstreams:write: Create and update upstreams for SFTP routes
|
504
|
+
certificates:read: Read certificates setup for your routes
|
505
|
+
certificates:write: Upload and delete certificates for routes
|
506
|
+
hostnames:read: Read/List Custom Hostnames of your vault routes
|
507
|
+
hostnames:write: Create/Delete Custom Hostname of your vault routes
|
508
|
+
functions:read: Read/List Functions
|
509
|
+
functions:write: Create/Delete Functions
|
510
|
+
description: |
|
511
|
+
The default authentication schema for [Management API](#management-apis) based requests.
|
358
512
|
|
359
513
|
parameters:
|
360
514
|
alias:
|
@@ -365,6 +519,15 @@ components:
|
|
365
519
|
schema:
|
366
520
|
type: string
|
367
521
|
example: tok_sandbox_bhtsCwFUzoJMw9rWUfEV5e
|
522
|
+
|
523
|
+
functionName:
|
524
|
+
name: functionName
|
525
|
+
in: path
|
526
|
+
required: true
|
527
|
+
description: Name of function to operate on
|
528
|
+
schema:
|
529
|
+
type: string
|
530
|
+
example: my-function-46Juzcyx
|
368
531
|
|
369
532
|
responses:
|
370
533
|
ApiErrorsResponse:
|
@@ -532,3 +695,69 @@ components:
|
|
532
695
|
- classifiers
|
533
696
|
required:
|
534
697
|
- data
|
698
|
+
|
699
|
+
CreateFunctionRequest:
|
700
|
+
type: object
|
701
|
+
properties:
|
702
|
+
data:
|
703
|
+
type: array
|
704
|
+
items:
|
705
|
+
oneOf:
|
706
|
+
- $ref: '#/components/schemas/CreateFunctionRequestPayload'
|
707
|
+
minItems: 1
|
708
|
+
maxItems: 20
|
709
|
+
required:
|
710
|
+
- data
|
711
|
+
|
712
|
+
CreateFunctionRequestPayload:
|
713
|
+
type: object
|
714
|
+
properties:
|
715
|
+
name:
|
716
|
+
type: string
|
717
|
+
description: Prefix to name your function
|
718
|
+
pattern: "[a-zA-Z]+([A-Za-z0-9\\-_]){5,28}[a-zA-Z0-9]"
|
719
|
+
example: my-function
|
720
|
+
src:
|
721
|
+
type: string
|
722
|
+
description: Definition of function body
|
723
|
+
example: |
|
724
|
+
def process(input, ctx):
|
725
|
+
return input
|
726
|
+
lang:
|
727
|
+
type: string
|
728
|
+
enum:
|
729
|
+
- larky
|
730
|
+
default: larky
|
731
|
+
description: |
|
732
|
+
Language to write your function in.
|
733
|
+
required:
|
734
|
+
- name
|
735
|
+
- src
|
736
|
+
|
737
|
+
Function:
|
738
|
+
type: object
|
739
|
+
properties:
|
740
|
+
name:
|
741
|
+
type: string
|
742
|
+
example: my-function-46Juzcyx
|
743
|
+
src:
|
744
|
+
type: string
|
745
|
+
description: Definition of function body
|
746
|
+
example: |
|
747
|
+
def process(input, ctx):
|
748
|
+
return input
|
749
|
+
lang:
|
750
|
+
type: string
|
751
|
+
enum:
|
752
|
+
- larky
|
753
|
+
default: larky
|
754
|
+
description: |
|
755
|
+
Language to write your function in.
|
756
|
+
hash:
|
757
|
+
type: string
|
758
|
+
description: SHA256 representation of the function definition
|
759
|
+
example: bc1f0c3322091740cead407000af9acc692e7fefd0d96446e07900dcd0f8e308
|
760
|
+
required:
|
761
|
+
- value
|
762
|
+
- format
|
763
|
+
|
@@ -64,7 +64,7 @@ module VgsApiClient
|
|
64
64
|
return_type = opts[:debug_return_type] || 'InlineResponse201'
|
65
65
|
|
66
66
|
# auth_names
|
67
|
-
auth_names = opts[:debug_auth_names] || ['
|
67
|
+
auth_names = opts[:debug_auth_names] || ['BasicAuth']
|
68
68
|
|
69
69
|
new_options = opts.merge(
|
70
70
|
:operation => :"AliasesApi.create_aliases",
|
@@ -127,7 +127,7 @@ module VgsApiClient
|
|
127
127
|
return_type = opts[:debug_return_type]
|
128
128
|
|
129
129
|
# auth_names
|
130
|
-
auth_names = opts[:debug_auth_names] || ['
|
130
|
+
auth_names = opts[:debug_auth_names] || ['BasicAuth']
|
131
131
|
|
132
132
|
new_options = opts.merge(
|
133
133
|
:operation => :"AliasesApi.delete_alias",
|
@@ -190,7 +190,7 @@ module VgsApiClient
|
|
190
190
|
return_type = opts[:debug_return_type] || 'InlineResponse2001'
|
191
191
|
|
192
192
|
# auth_names
|
193
|
-
auth_names = opts[:debug_auth_names] || ['
|
193
|
+
auth_names = opts[:debug_auth_names] || ['BasicAuth']
|
194
194
|
|
195
195
|
new_options = opts.merge(
|
196
196
|
:operation => :"AliasesApi.reveal_alias",
|
@@ -254,7 +254,7 @@ module VgsApiClient
|
|
254
254
|
return_type = opts[:debug_return_type] || 'InlineResponse200'
|
255
255
|
|
256
256
|
# auth_names
|
257
|
-
auth_names = opts[:debug_auth_names] || ['
|
257
|
+
auth_names = opts[:debug_auth_names] || ['BasicAuth']
|
258
258
|
|
259
259
|
new_options = opts.merge(
|
260
260
|
:operation => :"AliasesApi.reveal_multiple_aliases",
|
@@ -324,7 +324,7 @@ module VgsApiClient
|
|
324
324
|
return_type = opts[:debug_return_type]
|
325
325
|
|
326
326
|
# auth_names
|
327
|
-
auth_names = opts[:debug_auth_names] || ['
|
327
|
+
auth_names = opts[:debug_auth_names] || ['BasicAuth']
|
328
328
|
|
329
329
|
new_options = opts.merge(
|
330
330
|
:operation => :"AliasesApi.update_alias",
|
@@ -342,5 +342,75 @@ module VgsApiClient
|
|
342
342
|
end
|
343
343
|
return data, status_code, headers
|
344
344
|
end
|
345
|
+
|
346
|
+
# Update function
|
347
|
+
# Update an existing function definition
|
348
|
+
# @param function_name [String] Name of function to operate on
|
349
|
+
# @param [Hash] opts the optional parameters
|
350
|
+
# @option opts [CreateFunctionRequestPayload] :create_function_request_payload
|
351
|
+
# @return [nil]
|
352
|
+
def update_function(function_name, opts = {})
|
353
|
+
update_function_with_http_info(function_name, opts)
|
354
|
+
nil
|
355
|
+
end
|
356
|
+
|
357
|
+
# Update function
|
358
|
+
# Update an existing function definition
|
359
|
+
# @param function_name [String] Name of function to operate on
|
360
|
+
# @param [Hash] opts the optional parameters
|
361
|
+
# @option opts [CreateFunctionRequestPayload] :create_function_request_payload
|
362
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
363
|
+
def update_function_with_http_info(function_name, opts = {})
|
364
|
+
if @api_client.config.debugging
|
365
|
+
@api_client.config.logger.debug 'Calling API: AliasesApi.update_function ...'
|
366
|
+
end
|
367
|
+
# verify the required parameter 'function_name' is set
|
368
|
+
if @api_client.config.client_side_validation && function_name.nil?
|
369
|
+
fail ArgumentError, "Missing the required parameter 'function_name' when calling AliasesApi.update_function"
|
370
|
+
end
|
371
|
+
# resource path
|
372
|
+
local_var_path = '/functions/{functionName}'.sub('{' + 'functionName' + '}', CGI.escape(function_name.to_s))
|
373
|
+
|
374
|
+
# query parameters
|
375
|
+
query_params = opts[:query_params] || {}
|
376
|
+
|
377
|
+
# header parameters
|
378
|
+
header_params = opts[:header_params] || {}
|
379
|
+
# HTTP header 'Accept' (if needed)
|
380
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
381
|
+
# HTTP header 'Content-Type'
|
382
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
383
|
+
if !content_type.nil?
|
384
|
+
header_params['Content-Type'] = content_type
|
385
|
+
end
|
386
|
+
|
387
|
+
# form parameters
|
388
|
+
form_params = opts[:form_params] || {}
|
389
|
+
|
390
|
+
# http body (model)
|
391
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'create_function_request_payload'])
|
392
|
+
|
393
|
+
# return_type
|
394
|
+
return_type = opts[:debug_return_type]
|
395
|
+
|
396
|
+
# auth_names
|
397
|
+
auth_names = opts[:debug_auth_names] || ['BasicAuth']
|
398
|
+
|
399
|
+
new_options = opts.merge(
|
400
|
+
:operation => :"AliasesApi.update_function",
|
401
|
+
:header_params => header_params,
|
402
|
+
:query_params => query_params,
|
403
|
+
:form_params => form_params,
|
404
|
+
:body => post_body,
|
405
|
+
:auth_names => auth_names,
|
406
|
+
:return_type => return_type
|
407
|
+
)
|
408
|
+
|
409
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
410
|
+
if @api_client.config.debugging
|
411
|
+
@api_client.config.logger.debug "API called: AliasesApi#update_function\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
412
|
+
end
|
413
|
+
return data, status_code, headers
|
414
|
+
end
|
345
415
|
end
|
346
416
|
end
|
@@ -0,0 +1,269 @@
|
|
1
|
+
=begin
|
2
|
+
#Vault HTTP API
|
3
|
+
|
4
|
+
#The VGS Vault HTTP API is used for storing, retrieving, and managing sensitive data (aka Tokenization) within a VGS Vault. The VGS API is organized around REST. Our API is built with a predictable resource-oriented structure, uses JSON-encoded requests and responses, follows standard HTTP verbs/responses, and uses industry standard authentication. ## What is VGS Storing sensitive data on your company’s infrastructure often comes with a heavy compliance burden. For instance, storing payments data yourself greatly increases the amount of work needed to become PCI compliant. It also increases your security risk in general. To combat this, companies will minimize the amount of sensitive information they have to handle or store. VGS provides multiple methods for minimizing the sensitive information that needs to be stored which allows customers to secure any type of data for any use-case. **Tokenization** is a method that focuses on securing the storage of data. This is the quickest way to get started and is free. [Get started with Tokenization](https://www.verygoodsecurity.com/docs/tokenization/getting-started). **Zero Data** is a unique method invented by VGS in 2016 that securely stores data like Tokenization, however it also removes the customer’s environment from PCI scope completely providing maximum security, and minimum compliance scope. [Get started with Zero Data](https://www.verygoodsecurity.com/docs/getting-started/before-you-start). Additionally, for scenarios where neither technology is a complete solution, for instance with legacy systems, VGS provides a compliance product which guarantees customers are able to meet their compliance needs no matter what may happen. [Get started with Control](https://www.verygoodsecurity.com/docs/control). ## Learn about Tokenization - [Create an Account for Free Tokenization](https://dashboard.verygoodsecurity.com/tokenization) - [Try a Tokenization Demo](https://www.verygoodsecurity.com/docs/tokenization/getting-started) - [Install a Tokenization SDK](https://www.verygoodsecurity.com/docs/tokenization/client-libraries) ### Authentication This API uses `Basic` authentication. Credentials to access the API can be generated on the [dashboard](https://dashboard.verygoodsecurity.com) by going to the Settings section of the vault of your choosing. [Docs » Guides » Access credentials](https://www.verygoodsecurity.com/docs/settings/access-credentials) ## Resource Limits ### Data Limits This API allows storing data up to 32MB in size. ### Rate Limiting The API allows up to 3,000 requests per minute. Requests are associated with the vault, regardless of the access credentials used to authenticate the request. Your current rate limit is included as HTTP headers in every API response: | Header Name | Description | |-------------------------|----------------------------------------------------------| | `x-ratelimit-remaining` | The number of requests remaining in the 1-minute window. | If you exceed the rate limit, the API will reject the request with HTTP [429 Too Many Requests](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/429). ### Errors The API uses standard HTTP status codes to indicate whether the request succeeded or not. In case of failure, the response body will be JSON in a predefined format. For example, trying to create too many aliases at once results in the following response: ```json { \"errors\": [ { \"status\": 400, \"title\": \"Bad request\", \"detail\": \"Too many values (limit: 20)\", \"href\": \"https://api.sandbox.verygoodvault.com/aliases\" } ] } ```
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
7
|
+
Contact: support@verygoodsecurity.com
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 5.4.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'cgi'
|
14
|
+
|
15
|
+
module VgsApiClient
|
16
|
+
class FunctionsApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Creates a new function
|
23
|
+
# Creates a new function.
|
24
|
+
# @param [Hash] opts the optional parameters
|
25
|
+
# @option opts [CreateFunctionRequest] :create_function_request
|
26
|
+
# @return [InlineResponse2002]
|
27
|
+
def create_function(opts = {})
|
28
|
+
data, _status_code, _headers = create_function_with_http_info(opts)
|
29
|
+
data
|
30
|
+
end
|
31
|
+
|
32
|
+
# Creates a new function
|
33
|
+
# Creates a new function.
|
34
|
+
# @param [Hash] opts the optional parameters
|
35
|
+
# @option opts [CreateFunctionRequest] :create_function_request
|
36
|
+
# @return [Array<(InlineResponse2002, Integer, Hash)>] InlineResponse2002 data, response status code and response headers
|
37
|
+
def create_function_with_http_info(opts = {})
|
38
|
+
if @api_client.config.debugging
|
39
|
+
@api_client.config.logger.debug 'Calling API: FunctionsApi.create_function ...'
|
40
|
+
end
|
41
|
+
# resource path
|
42
|
+
local_var_path = '/functions'
|
43
|
+
|
44
|
+
# query parameters
|
45
|
+
query_params = opts[:query_params] || {}
|
46
|
+
|
47
|
+
# header parameters
|
48
|
+
header_params = opts[:header_params] || {}
|
49
|
+
# HTTP header 'Accept' (if needed)
|
50
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
51
|
+
# HTTP header 'Content-Type'
|
52
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
53
|
+
if !content_type.nil?
|
54
|
+
header_params['Content-Type'] = content_type
|
55
|
+
end
|
56
|
+
|
57
|
+
# form parameters
|
58
|
+
form_params = opts[:form_params] || {}
|
59
|
+
|
60
|
+
# http body (model)
|
61
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'create_function_request'])
|
62
|
+
|
63
|
+
# return_type
|
64
|
+
return_type = opts[:debug_return_type] || 'InlineResponse2002'
|
65
|
+
|
66
|
+
# auth_names
|
67
|
+
auth_names = opts[:debug_auth_names] || ['BasicAuth']
|
68
|
+
|
69
|
+
new_options = opts.merge(
|
70
|
+
:operation => :"FunctionsApi.create_function",
|
71
|
+
:header_params => header_params,
|
72
|
+
:query_params => query_params,
|
73
|
+
:form_params => form_params,
|
74
|
+
:body => post_body,
|
75
|
+
:auth_names => auth_names,
|
76
|
+
:return_type => return_type
|
77
|
+
)
|
78
|
+
|
79
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
80
|
+
if @api_client.config.debugging
|
81
|
+
@api_client.config.logger.debug "API called: FunctionsApi#create_function\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
82
|
+
end
|
83
|
+
return data, status_code, headers
|
84
|
+
end
|
85
|
+
|
86
|
+
# Deletes a function
|
87
|
+
# Removes a single alias.
|
88
|
+
# @param function_name [String] Name of function to operate on
|
89
|
+
# @param [Hash] opts the optional parameters
|
90
|
+
# @return [nil]
|
91
|
+
def delete_function(function_name, opts = {})
|
92
|
+
delete_function_with_http_info(function_name, opts)
|
93
|
+
nil
|
94
|
+
end
|
95
|
+
|
96
|
+
# Deletes a function
|
97
|
+
# Removes a single alias.
|
98
|
+
# @param function_name [String] Name of function to operate on
|
99
|
+
# @param [Hash] opts the optional parameters
|
100
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
101
|
+
def delete_function_with_http_info(function_name, opts = {})
|
102
|
+
if @api_client.config.debugging
|
103
|
+
@api_client.config.logger.debug 'Calling API: FunctionsApi.delete_function ...'
|
104
|
+
end
|
105
|
+
# verify the required parameter 'function_name' is set
|
106
|
+
if @api_client.config.client_side_validation && function_name.nil?
|
107
|
+
fail ArgumentError, "Missing the required parameter 'function_name' when calling FunctionsApi.delete_function"
|
108
|
+
end
|
109
|
+
# resource path
|
110
|
+
local_var_path = '/functions/{functionName}'.sub('{' + 'functionName' + '}', CGI.escape(function_name.to_s))
|
111
|
+
|
112
|
+
# query parameters
|
113
|
+
query_params = opts[:query_params] || {}
|
114
|
+
|
115
|
+
# header parameters
|
116
|
+
header_params = opts[:header_params] || {}
|
117
|
+
# HTTP header 'Accept' (if needed)
|
118
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
119
|
+
|
120
|
+
# form parameters
|
121
|
+
form_params = opts[:form_params] || {}
|
122
|
+
|
123
|
+
# http body (model)
|
124
|
+
post_body = opts[:debug_body]
|
125
|
+
|
126
|
+
# return_type
|
127
|
+
return_type = opts[:debug_return_type]
|
128
|
+
|
129
|
+
# auth_names
|
130
|
+
auth_names = opts[:debug_auth_names] || ['BasicAuth']
|
131
|
+
|
132
|
+
new_options = opts.merge(
|
133
|
+
:operation => :"FunctionsApi.delete_function",
|
134
|
+
:header_params => header_params,
|
135
|
+
:query_params => query_params,
|
136
|
+
:form_params => form_params,
|
137
|
+
:body => post_body,
|
138
|
+
:auth_names => auth_names,
|
139
|
+
:return_type => return_type
|
140
|
+
)
|
141
|
+
|
142
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
143
|
+
if @api_client.config.debugging
|
144
|
+
@api_client.config.logger.debug "API called: FunctionsApi#delete_function\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
145
|
+
end
|
146
|
+
return data, status_code, headers
|
147
|
+
end
|
148
|
+
|
149
|
+
# Retrieve a single function
|
150
|
+
# Retrieves a function
|
151
|
+
# @param function_name [String] Name of function to operate on
|
152
|
+
# @param [Hash] opts the optional parameters
|
153
|
+
# @return [InlineResponse2003]
|
154
|
+
def get_function(function_name, opts = {})
|
155
|
+
data, _status_code, _headers = get_function_with_http_info(function_name, opts)
|
156
|
+
data
|
157
|
+
end
|
158
|
+
|
159
|
+
# Retrieve a single function
|
160
|
+
# Retrieves a function
|
161
|
+
# @param function_name [String] Name of function to operate on
|
162
|
+
# @param [Hash] opts the optional parameters
|
163
|
+
# @return [Array<(InlineResponse2003, Integer, Hash)>] InlineResponse2003 data, response status code and response headers
|
164
|
+
def get_function_with_http_info(function_name, opts = {})
|
165
|
+
if @api_client.config.debugging
|
166
|
+
@api_client.config.logger.debug 'Calling API: FunctionsApi.get_function ...'
|
167
|
+
end
|
168
|
+
# verify the required parameter 'function_name' is set
|
169
|
+
if @api_client.config.client_side_validation && function_name.nil?
|
170
|
+
fail ArgumentError, "Missing the required parameter 'function_name' when calling FunctionsApi.get_function"
|
171
|
+
end
|
172
|
+
# resource path
|
173
|
+
local_var_path = '/functions/{functionName}'.sub('{' + 'functionName' + '}', CGI.escape(function_name.to_s))
|
174
|
+
|
175
|
+
# query parameters
|
176
|
+
query_params = opts[:query_params] || {}
|
177
|
+
|
178
|
+
# header parameters
|
179
|
+
header_params = opts[:header_params] || {}
|
180
|
+
# HTTP header 'Accept' (if needed)
|
181
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
182
|
+
|
183
|
+
# form parameters
|
184
|
+
form_params = opts[:form_params] || {}
|
185
|
+
|
186
|
+
# http body (model)
|
187
|
+
post_body = opts[:debug_body]
|
188
|
+
|
189
|
+
# return_type
|
190
|
+
return_type = opts[:debug_return_type] || 'InlineResponse2003'
|
191
|
+
|
192
|
+
# auth_names
|
193
|
+
auth_names = opts[:debug_auth_names] || ['BasicAuth']
|
194
|
+
|
195
|
+
new_options = opts.merge(
|
196
|
+
:operation => :"FunctionsApi.get_function",
|
197
|
+
:header_params => header_params,
|
198
|
+
:query_params => query_params,
|
199
|
+
:form_params => form_params,
|
200
|
+
:body => post_body,
|
201
|
+
:auth_names => auth_names,
|
202
|
+
:return_type => return_type
|
203
|
+
)
|
204
|
+
|
205
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
206
|
+
if @api_client.config.debugging
|
207
|
+
@api_client.config.logger.debug "API called: FunctionsApi#get_function\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
208
|
+
end
|
209
|
+
return data, status_code, headers
|
210
|
+
end
|
211
|
+
|
212
|
+
# Lists all functions
|
213
|
+
# Lists all functions
|
214
|
+
# @param [Hash] opts the optional parameters
|
215
|
+
# @return [InlineResponse2002]
|
216
|
+
def list_functions(opts = {})
|
217
|
+
data, _status_code, _headers = list_functions_with_http_info(opts)
|
218
|
+
data
|
219
|
+
end
|
220
|
+
|
221
|
+
# Lists all functions
|
222
|
+
# Lists all functions
|
223
|
+
# @param [Hash] opts the optional parameters
|
224
|
+
# @return [Array<(InlineResponse2002, Integer, Hash)>] InlineResponse2002 data, response status code and response headers
|
225
|
+
def list_functions_with_http_info(opts = {})
|
226
|
+
if @api_client.config.debugging
|
227
|
+
@api_client.config.logger.debug 'Calling API: FunctionsApi.list_functions ...'
|
228
|
+
end
|
229
|
+
# resource path
|
230
|
+
local_var_path = '/functions'
|
231
|
+
|
232
|
+
# query parameters
|
233
|
+
query_params = opts[:query_params] || {}
|
234
|
+
|
235
|
+
# header parameters
|
236
|
+
header_params = opts[:header_params] || {}
|
237
|
+
# HTTP header 'Accept' (if needed)
|
238
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
239
|
+
|
240
|
+
# form parameters
|
241
|
+
form_params = opts[:form_params] || {}
|
242
|
+
|
243
|
+
# http body (model)
|
244
|
+
post_body = opts[:debug_body]
|
245
|
+
|
246
|
+
# return_type
|
247
|
+
return_type = opts[:debug_return_type] || 'InlineResponse2002'
|
248
|
+
|
249
|
+
# auth_names
|
250
|
+
auth_names = opts[:debug_auth_names] || ['BasicAuth']
|
251
|
+
|
252
|
+
new_options = opts.merge(
|
253
|
+
:operation => :"FunctionsApi.list_functions",
|
254
|
+
:header_params => header_params,
|
255
|
+
:query_params => query_params,
|
256
|
+
:form_params => form_params,
|
257
|
+
:body => post_body,
|
258
|
+
:auth_names => auth_names,
|
259
|
+
:return_type => return_type
|
260
|
+
)
|
261
|
+
|
262
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
263
|
+
if @api_client.config.debugging
|
264
|
+
@api_client.config.logger.debug "API called: FunctionsApi#list_functions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
265
|
+
end
|
266
|
+
return data, status_code, headers
|
267
|
+
end
|
268
|
+
end
|
269
|
+
end
|