Class: OpenapiClient::ElementsConfigsApi

Inherits:
Object
  • Object
show all
Defined in:
lib/openapi_client/api/elements_configs_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ ElementsConfigsApi

Returns a new instance of ElementsConfigsApi.



19
20
21
# File 'lib/openapi_client/api/elements_configs_api.rb', line 19

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



17
18
19
# File 'lib/openapi_client/api/elements_configs_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#create_elements_config(proj_id, env_id, elements_config_create, opts = {}) ⇒ ElementsConfigRead

Create Elements Config Creates a new elements_config under the active organization.

Parameters:

  • proj_id (String)

    Either the unique id of the project, or the URL-friendly key of the project (i.e: the "slug").

  • env_id (String)

    Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the "slug").

  • elements_config_create (ElementsConfigCreate)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



29
30
31
32
# File 'lib/openapi_client/api/elements_configs_api.rb', line 29

def create_elements_config(proj_id, env_id, elements_config_create, opts = {})
  data, _status_code, _headers = create_elements_config_with_http_info(proj_id, env_id, elements_config_create, opts)
  data
end

#create_elements_config_with_http_info(proj_id, env_id, elements_config_create, opts = {}) ⇒ Array<(ElementsConfigRead, Integer, Hash)>

Create Elements Config Creates a new elements_config under the active organization.

Parameters:

  • proj_id (String)

    Either the unique id of the project, or the URL-friendly key of the project (i.e: the &quot;slug&quot;).

  • env_id (String)

    Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the &quot;slug&quot;).

  • elements_config_create (ElementsConfigCreate)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(ElementsConfigRead, Integer, Hash)>)

    ElementsConfigRead data, response status code and response headers



41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
# File 'lib/openapi_client/api/elements_configs_api.rb', line 41

def create_elements_config_with_http_info(proj_id, env_id, elements_config_create, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ElementsConfigsApi.create_elements_config ...'
  end
  # verify the required parameter 'proj_id' is set
  if @api_client.config.client_side_validation && proj_id.nil?
    fail ArgumentError, "Missing the required parameter 'proj_id' when calling ElementsConfigsApi.create_elements_config"
  end
  # verify the required parameter 'env_id' is set
  if @api_client.config.client_side_validation && env_id.nil?
    fail ArgumentError, "Missing the required parameter 'env_id' when calling ElementsConfigsApi.create_elements_config"
  end
  # verify the required parameter 'elements_config_create' is set
  if @api_client.config.client_side_validation && elements_config_create.nil?
    fail ArgumentError, "Missing the required parameter 'elements_config_create' when calling ElementsConfigsApi.create_elements_config"
  end
  # resource path
  local_var_path = '/v2/elements/{proj_id}/{env_id}/config'.sub('{' + 'proj_id' + '}', CGI.escape(proj_id.to_s)).sub('{' + 'env_id' + '}', CGI.escape(env_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(elements_config_create)

  # return_type
  return_type = opts[:debug_return_type] || 'ElementsConfigRead'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['HTTPBearer']

  new_options = opts.merge(
    :operation => :"ElementsConfigsApi.create_elements_config",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ElementsConfigsApi#create_elements_config\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_elements_config(elements_config_id, proj_id, env_id, opts = {}) ⇒ nil

Delete Elements Config Deletes the elements_config and all its related data.

Parameters:

  • elements_config_id (String)

    Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the &quot;slug&quot;).

  • proj_id (String)

    Either the unique id of the project, or the URL-friendly key of the project (i.e: the &quot;slug&quot;).

  • env_id (String)

    Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the &quot;slug&quot;).

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


109
110
111
112
# File 'lib/openapi_client/api/elements_configs_api.rb', line 109

def delete_elements_config(elements_config_id, proj_id, env_id, opts = {})
  delete_elements_config_with_http_info(elements_config_id, proj_id, env_id, opts)
  nil
end

#delete_elements_config_with_http_info(elements_config_id, proj_id, env_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Delete Elements Config Deletes the elements_config and all its related data.

Parameters:

  • elements_config_id (String)

    Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the &quot;slug&quot;).

  • proj_id (String)

    Either the unique id of the project, or the URL-friendly key of the project (i.e: the &quot;slug&quot;).

  • env_id (String)

    Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the &quot;slug&quot;).

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
# File 'lib/openapi_client/api/elements_configs_api.rb', line 121

def delete_elements_config_with_http_info(elements_config_id, proj_id, env_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ElementsConfigsApi.delete_elements_config ...'
  end
  # verify the required parameter 'elements_config_id' is set
  if @api_client.config.client_side_validation && elements_config_id.nil?
    fail ArgumentError, "Missing the required parameter 'elements_config_id' when calling ElementsConfigsApi.delete_elements_config"
  end
  # verify the required parameter 'proj_id' is set
  if @api_client.config.client_side_validation && proj_id.nil?
    fail ArgumentError, "Missing the required parameter 'proj_id' when calling ElementsConfigsApi.delete_elements_config"
  end
  # verify the required parameter 'env_id' is set
  if @api_client.config.client_side_validation && env_id.nil?
    fail ArgumentError, "Missing the required parameter 'env_id' when calling ElementsConfigsApi.delete_elements_config"
  end
  # resource path
  local_var_path = '/v2/elements/{proj_id}/{env_id}/{elements_config_id}'.sub('{' + 'elements_config_id' + '}', CGI.escape(elements_config_id.to_s)).sub('{' + 'proj_id' + '}', CGI.escape(proj_id.to_s)).sub('{' + 'env_id' + '}', CGI.escape(env_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['HTTPBearer']

  new_options = opts.merge(
    :operation => :"ElementsConfigsApi.delete_elements_config",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ElementsConfigsApi#delete_elements_config\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_elements_config(proj_id, env_id, elements_config_id, opts = {}) ⇒ ElementsConfigRead

Get Elements Config Gets a single elements_config matching the given elements_config_id, if such elements_config exists.

Parameters:

  • proj_id (String)

    Either the unique id of the project, or the URL-friendly key of the project (i.e: the &quot;slug&quot;).

  • env_id (String)

    Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the &quot;slug&quot;).

  • elements_config_id (String)

    Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the &quot;slug&quot;).

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



184
185
186
187
# File 'lib/openapi_client/api/elements_configs_api.rb', line 184

def get_elements_config(proj_id, env_id, elements_config_id, opts = {})
  data, _status_code, _headers = get_elements_config_with_http_info(proj_id, env_id, elements_config_id, opts)
  data
end

#get_elements_config_runtime(proj_id, env_id, elements_config_id, opts = {}) ⇒ ElementsConfigRuntimeRead

Get Elements Config Runtime Gets a single elements_config matching the given elements_config_id, if such elements_config exists.

Parameters:

  • proj_id (String)

    Either the unique id of the project, or the URL-friendly key of the project (i.e: the &quot;slug&quot;).

  • env_id (String)

    Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the &quot;slug&quot;).

  • elements_config_id (String)

    Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the &quot;slug&quot;).

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



259
260
261
262
# File 'lib/openapi_client/api/elements_configs_api.rb', line 259

def get_elements_config_runtime(proj_id, env_id, elements_config_id, opts = {})
  data, _status_code, _headers = get_elements_config_runtime_with_http_info(proj_id, env_id, elements_config_id, opts)
  data
end

#get_elements_config_runtime_with_http_info(proj_id, env_id, elements_config_id, opts = {}) ⇒ Array<(ElementsConfigRuntimeRead, Integer, Hash)>

Get Elements Config Runtime Gets a single elements_config matching the given elements_config_id, if such elements_config exists.

Parameters:

  • proj_id (String)

    Either the unique id of the project, or the URL-friendly key of the project (i.e: the &quot;slug&quot;).

  • env_id (String)

    Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the &quot;slug&quot;).

  • elements_config_id (String)

    Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the &quot;slug&quot;).

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(ElementsConfigRuntimeRead, Integer, Hash)>)

    ElementsConfigRuntimeRead data, response status code and response headers



271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
# File 'lib/openapi_client/api/elements_configs_api.rb', line 271

def get_elements_config_runtime_with_http_info(proj_id, env_id, elements_config_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ElementsConfigsApi.get_elements_config_runtime ...'
  end
  # verify the required parameter 'proj_id' is set
  if @api_client.config.client_side_validation && proj_id.nil?
    fail ArgumentError, "Missing the required parameter 'proj_id' when calling ElementsConfigsApi.get_elements_config_runtime"
  end
  # verify the required parameter 'env_id' is set
  if @api_client.config.client_side_validation && env_id.nil?
    fail ArgumentError, "Missing the required parameter 'env_id' when calling ElementsConfigsApi.get_elements_config_runtime"
  end
  # verify the required parameter 'elements_config_id' is set
  if @api_client.config.client_side_validation && elements_config_id.nil?
    fail ArgumentError, "Missing the required parameter 'elements_config_id' when calling ElementsConfigsApi.get_elements_config_runtime"
  end
  # resource path
  local_var_path = '/v2/elements/{proj_id}/{env_id}/config/{elements_config_id}/runtime'.sub('{' + 'proj_id' + '}', CGI.escape(proj_id.to_s)).sub('{' + 'env_id' + '}', CGI.escape(env_id.to_s)).sub('{' + 'elements_config_id' + '}', CGI.escape(elements_config_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'ElementsConfigRuntimeRead'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['HTTPBearer']

  new_options = opts.merge(
    :operation => :"ElementsConfigsApi.get_elements_config_runtime",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ElementsConfigsApi#get_elements_config_runtime\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_elements_config_with_http_info(proj_id, env_id, elements_config_id, opts = {}) ⇒ Array<(ElementsConfigRead, Integer, Hash)>

Get Elements Config Gets a single elements_config matching the given elements_config_id, if such elements_config exists.

Parameters:

  • proj_id (String)

    Either the unique id of the project, or the URL-friendly key of the project (i.e: the &quot;slug&quot;).

  • env_id (String)

    Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the &quot;slug&quot;).

  • elements_config_id (String)

    Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the &quot;slug&quot;).

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(ElementsConfigRead, Integer, Hash)>)

    ElementsConfigRead data, response status code and response headers



196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
# File 'lib/openapi_client/api/elements_configs_api.rb', line 196

def get_elements_config_with_http_info(proj_id, env_id, elements_config_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ElementsConfigsApi.get_elements_config ...'
  end
  # verify the required parameter 'proj_id' is set
  if @api_client.config.client_side_validation && proj_id.nil?
    fail ArgumentError, "Missing the required parameter 'proj_id' when calling ElementsConfigsApi.get_elements_config"
  end
  # verify the required parameter 'env_id' is set
  if @api_client.config.client_side_validation && env_id.nil?
    fail ArgumentError, "Missing the required parameter 'env_id' when calling ElementsConfigsApi.get_elements_config"
  end
  # verify the required parameter 'elements_config_id' is set
  if @api_client.config.client_side_validation && elements_config_id.nil?
    fail ArgumentError, "Missing the required parameter 'elements_config_id' when calling ElementsConfigsApi.get_elements_config"
  end
  # resource path
  local_var_path = '/v2/elements/{proj_id}/{env_id}/config/{elements_config_id}'.sub('{' + 'proj_id' + '}', CGI.escape(proj_id.to_s)).sub('{' + 'env_id' + '}', CGI.escape(env_id.to_s)).sub('{' + 'elements_config_id' + '}', CGI.escape(elements_config_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'ElementsConfigRead'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['HTTPBearer']

  new_options = opts.merge(
    :operation => :"ElementsConfigsApi.get_elements_config",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ElementsConfigsApi#get_elements_config\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_elements_type_config(proj_id, env_id, element_type, opts = {}) ⇒ ElementsEnvTypeRead

Get Elements Type Config

Parameters:

  • proj_id (String)

    Either the unique id of the project, or the URL-friendly key of the project (i.e: the &quot;slug&quot;).

  • env_id (String)

    Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the &quot;slug&quot;).

  • element_type (ElementsType)

    Either the unique id of the elements_type, or the URL-friendly key of the elements_type (i.e: the &quot;slug&quot;).

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



333
334
335
336
# File 'lib/openapi_client/api/elements_configs_api.rb', line 333

def get_elements_type_config(proj_id, env_id, element_type, opts = {})
  data, _status_code, _headers = get_elements_type_config_with_http_info(proj_id, env_id, element_type, opts)
  data
end

#get_elements_type_config_with_http_info(proj_id, env_id, element_type, opts = {}) ⇒ Array<(ElementsEnvTypeRead, Integer, Hash)>

Get Elements Type Config

Parameters:

  • proj_id (String)

    Either the unique id of the project, or the URL-friendly key of the project (i.e: the &quot;slug&quot;).

  • env_id (String)

    Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the &quot;slug&quot;).

  • element_type (ElementsType)

    Either the unique id of the elements_type, or the URL-friendly key of the elements_type (i.e: the &quot;slug&quot;).

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(ElementsEnvTypeRead, Integer, Hash)>)

    ElementsEnvTypeRead data, response status code and response headers



344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
# File 'lib/openapi_client/api/elements_configs_api.rb', line 344

def get_elements_type_config_with_http_info(proj_id, env_id, element_type, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ElementsConfigsApi.get_elements_type_config ...'
  end
  # verify the required parameter 'proj_id' is set
  if @api_client.config.client_side_validation && proj_id.nil?
    fail ArgumentError, "Missing the required parameter 'proj_id' when calling ElementsConfigsApi.get_elements_type_config"
  end
  # verify the required parameter 'env_id' is set
  if @api_client.config.client_side_validation && env_id.nil?
    fail ArgumentError, "Missing the required parameter 'env_id' when calling ElementsConfigsApi.get_elements_type_config"
  end
  # verify the required parameter 'element_type' is set
  if @api_client.config.client_side_validation && element_type.nil?
    fail ArgumentError, "Missing the required parameter 'element_type' when calling ElementsConfigsApi.get_elements_type_config"
  end
  # resource path
  local_var_path = '/v2/elements/{proj_id}/{env_id}/{element_type}'.sub('{' + 'proj_id' + '}', CGI.escape(proj_id.to_s)).sub('{' + 'env_id' + '}', CGI.escape(env_id.to_s)).sub('{' + 'element_type' + '}', CGI.escape(element_type.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'ElementsEnvTypeRead'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['HTTPBearer']

  new_options = opts.merge(
    :operation => :"ElementsConfigsApi.get_elements_type_config",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ElementsConfigsApi#get_elements_type_config\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_elements_configs(proj_id, env_id, opts = {}) ⇒ PaginatedResultElementsConfigRead

List Elements Configs Lists all the elements_configs under the active organization.

Parameters:

  • proj_id (String)

    Either the unique id of the project, or the URL-friendly key of the project (i.e: the &quot;slug&quot;).

  • env_id (String)

    Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the &quot;slug&quot;).

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    Page number of the results to fetch, starting at 1. (default to 1)

  • :per_page (Integer)

    The number of results per page (max 100). (default to 30)

Returns:



408
409
410
411
# File 'lib/openapi_client/api/elements_configs_api.rb', line 408

def list_elements_configs(proj_id, env_id, opts = {})
  data, _status_code, _headers = list_elements_configs_with_http_info(proj_id, env_id, opts)
  data
end

#list_elements_configs_with_http_info(proj_id, env_id, opts = {}) ⇒ Array<(PaginatedResultElementsConfigRead, Integer, Hash)>

List Elements Configs Lists all the elements_configs under the active organization.

Parameters:

  • proj_id (String)

    Either the unique id of the project, or the URL-friendly key of the project (i.e: the &quot;slug&quot;).

  • env_id (String)

    Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the &quot;slug&quot;).

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page (Integer)

    Page number of the results to fetch, starting at 1. (default to 1)

  • :per_page (Integer)

    The number of results per page (max 100). (default to 30)

Returns:



421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
# File 'lib/openapi_client/api/elements_configs_api.rb', line 421

def list_elements_configs_with_http_info(proj_id, env_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ElementsConfigsApi.list_elements_configs ...'
  end
  # verify the required parameter 'proj_id' is set
  if @api_client.config.client_side_validation && proj_id.nil?
    fail ArgumentError, "Missing the required parameter 'proj_id' when calling ElementsConfigsApi.list_elements_configs"
  end
  # verify the required parameter 'env_id' is set
  if @api_client.config.client_side_validation && env_id.nil?
    fail ArgumentError, "Missing the required parameter 'env_id' when calling ElementsConfigsApi.list_elements_configs"
  end
  if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page"]" when calling ElementsConfigsApi.list_elements_configs, must be greater than or equal to 1.'
  end

  if @api_client.config.client_side_validation && !opts[:'per_page'].nil? && opts[:'per_page'] > 100
    fail ArgumentError, 'invalid value for "opts[:"per_page"]" when calling ElementsConfigsApi.list_elements_configs, must be smaller than or equal to 100.'
  end

  if @api_client.config.client_side_validation && !opts[:'per_page'].nil? && opts[:'per_page'] < 1
    fail ArgumentError, 'invalid value for "opts[:"per_page"]" when calling ElementsConfigsApi.list_elements_configs, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/v2/elements/{proj_id}/{env_id}/config'.sub('{' + 'proj_id' + '}', CGI.escape(proj_id.to_s)).sub('{' + 'env_id' + '}', CGI.escape(env_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
  query_params[:'per_page'] = opts[:'per_page'] if !opts[:'per_page'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'PaginatedResultElementsConfigRead'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['HTTPBearer']

  new_options = opts.merge(
    :operation => :"ElementsConfigsApi.list_elements_configs",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ElementsConfigsApi#list_elements_configs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_elements_config(elements_config_id, proj_id, env_id, elements_config_update, opts = {}) ⇒ ElementsConfigRead

Update Elements Config Updates the elements_config.

Parameters:

  • elements_config_id (String)

    Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the &quot;slug&quot;).

  • proj_id (String)

    Either the unique id of the project, or the URL-friendly key of the project (i.e: the &quot;slug&quot;).

  • env_id (String)

    Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the &quot;slug&quot;).

  • elements_config_update (ElementsConfigUpdate)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



495
496
497
498
# File 'lib/openapi_client/api/elements_configs_api.rb', line 495

def update_elements_config(elements_config_id, proj_id, env_id, elements_config_update, opts = {})
  data, _status_code, _headers = update_elements_config_with_http_info(elements_config_id, proj_id, env_id, elements_config_update, opts)
  data
end

#update_elements_config_with_http_info(elements_config_id, proj_id, env_id, elements_config_update, opts = {}) ⇒ Array<(ElementsConfigRead, Integer, Hash)>

Update Elements Config Updates the elements_config.

Parameters:

  • elements_config_id (String)

    Either the unique id of the elements_config, or the URL-friendly key of the elements_config (i.e: the &quot;slug&quot;).

  • proj_id (String)

    Either the unique id of the project, or the URL-friendly key of the project (i.e: the &quot;slug&quot;).

  • env_id (String)

    Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the &quot;slug&quot;).

  • elements_config_update (ElementsConfigUpdate)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(ElementsConfigRead, Integer, Hash)>)

    ElementsConfigRead data, response status code and response headers



508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
# File 'lib/openapi_client/api/elements_configs_api.rb', line 508

def update_elements_config_with_http_info(elements_config_id, proj_id, env_id, elements_config_update, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ElementsConfigsApi.update_elements_config ...'
  end
  # verify the required parameter 'elements_config_id' is set
  if @api_client.config.client_side_validation && elements_config_id.nil?
    fail ArgumentError, "Missing the required parameter 'elements_config_id' when calling ElementsConfigsApi.update_elements_config"
  end
  # verify the required parameter 'proj_id' is set
  if @api_client.config.client_side_validation && proj_id.nil?
    fail ArgumentError, "Missing the required parameter 'proj_id' when calling ElementsConfigsApi.update_elements_config"
  end
  # verify the required parameter 'env_id' is set
  if @api_client.config.client_side_validation && env_id.nil?
    fail ArgumentError, "Missing the required parameter 'env_id' when calling ElementsConfigsApi.update_elements_config"
  end
  # verify the required parameter 'elements_config_update' is set
  if @api_client.config.client_side_validation && elements_config_update.nil?
    fail ArgumentError, "Missing the required parameter 'elements_config_update' when calling ElementsConfigsApi.update_elements_config"
  end
  # resource path
  local_var_path = '/v2/elements/{proj_id}/{env_id}/config/{elements_config_id}'.sub('{' + 'elements_config_id' + '}', CGI.escape(elements_config_id.to_s)).sub('{' + 'proj_id' + '}', CGI.escape(proj_id.to_s)).sub('{' + 'env_id' + '}', CGI.escape(env_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(elements_config_update)

  # return_type
  return_type = opts[:debug_return_type] || 'ElementsConfigRead'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['HTTPBearer']

  new_options = opts.merge(
    :operation => :"ElementsConfigsApi.update_elements_config",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ElementsConfigsApi#update_elements_config\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_elements_type_permissions(element_type, proj_id, env_id, elements_env_type_update, opts = {}) ⇒ ElementsEnvTypeRead

Update Elements Type Permissions

Parameters:

  • element_type (ElementsType)

    Either the unique id of the elements_type, or the URL-friendly key of the elements_type (i.e: the &quot;slug&quot;).

  • proj_id (String)

    Either the unique id of the project, or the URL-friendly key of the project (i.e: the &quot;slug&quot;).

  • env_id (String)

    Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the &quot;slug&quot;).

  • elements_env_type_update (ElementsEnvTypeUpdate)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



580
581
582
583
# File 'lib/openapi_client/api/elements_configs_api.rb', line 580

def update_elements_type_permissions(element_type, proj_id, env_id, elements_env_type_update, opts = {})
  data, _status_code, _headers = update_elements_type_permissions_with_http_info(element_type, proj_id, env_id, elements_env_type_update, opts)
  data
end

#update_elements_type_permissions_with_http_info(element_type, proj_id, env_id, elements_env_type_update, opts = {}) ⇒ Array<(ElementsEnvTypeRead, Integer, Hash)>

Update Elements Type Permissions

Parameters:

  • element_type (ElementsType)

    Either the unique id of the elements_type, or the URL-friendly key of the elements_type (i.e: the &quot;slug&quot;).

  • proj_id (String)

    Either the unique id of the project, or the URL-friendly key of the project (i.e: the &quot;slug&quot;).

  • env_id (String)

    Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the &quot;slug&quot;).

  • elements_env_type_update (ElementsEnvTypeUpdate)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(ElementsEnvTypeRead, Integer, Hash)>)

    ElementsEnvTypeRead data, response status code and response headers



592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
# File 'lib/openapi_client/api/elements_configs_api.rb', line 592

def update_elements_type_permissions_with_http_info(element_type, proj_id, env_id, elements_env_type_update, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ElementsConfigsApi.update_elements_type_permissions ...'
  end
  # verify the required parameter 'element_type' is set
  if @api_client.config.client_side_validation && element_type.nil?
    fail ArgumentError, "Missing the required parameter 'element_type' when calling ElementsConfigsApi.update_elements_type_permissions"
  end
  # verify the required parameter 'proj_id' is set
  if @api_client.config.client_side_validation && proj_id.nil?
    fail ArgumentError, "Missing the required parameter 'proj_id' when calling ElementsConfigsApi.update_elements_type_permissions"
  end
  # verify the required parameter 'env_id' is set
  if @api_client.config.client_side_validation && env_id.nil?
    fail ArgumentError, "Missing the required parameter 'env_id' when calling ElementsConfigsApi.update_elements_type_permissions"
  end
  # verify the required parameter 'elements_env_type_update' is set
  if @api_client.config.client_side_validation && elements_env_type_update.nil?
    fail ArgumentError, "Missing the required parameter 'elements_env_type_update' when calling ElementsConfigsApi.update_elements_type_permissions"
  end
  # resource path
  local_var_path = '/v2/elements/{proj_id}/{env_id}/{element_type}'.sub('{' + 'element_type' + '}', CGI.escape(element_type.to_s)).sub('{' + 'proj_id' + '}', CGI.escape(proj_id.to_s)).sub('{' + 'env_id' + '}', CGI.escape(env_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(elements_env_type_update)

  # return_type
  return_type = opts[:debug_return_type] || 'ElementsEnvTypeRead'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['HTTPBearer']

  new_options = opts.merge(
    :operation => :"ElementsConfigsApi.update_elements_type_permissions",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ElementsConfigsApi#update_elements_type_permissions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end