Class: InfluxDB2::API::BucketsApi

Inherits:
Object
  • Object
show all
Defined in:
apis/lib/influxdb2/apis/generated/api/buckets_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ BucketsApi

Returns a new instance of BucketsApi.



18
19
20
# File 'apis/lib/influxdb2/apis/generated/api/buckets_api.rb', line 18

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

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



16
17
18
# File 'apis/lib/influxdb2/apis/generated/api/buckets_api.rb', line 16

def api_client
  @api_client
end

Instance Method Details

#delete_buckets_id(bucket_id, opts = {}) ⇒ nil

Delete a bucket

Parameters:

  • bucket_id (String)

    The ID of the bucket to delete.

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

    the optional parameters

Options Hash (opts):

  • :zap_trace_span (String)

    OpenTracing span context

Returns:

  • (nil)


26
27
28
29
# File 'apis/lib/influxdb2/apis/generated/api/buckets_api.rb', line 26

def delete_buckets_id(bucket_id, opts = {})
  delete_buckets_id_with_http_info(bucket_id, opts)
  nil
end

#delete_buckets_id_labels_id(bucket_id, label_id, opts = {}) ⇒ nil

Delete a label from a bucket

Parameters:

  • bucket_id (String)

    The bucket ID.

  • label_id (String)

    The ID of the label to delete.

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

    the optional parameters

Options Hash (opts):

  • :zap_trace_span (String)

    OpenTracing span context

Returns:

  • (nil)


91
92
93
94
# File 'apis/lib/influxdb2/apis/generated/api/buckets_api.rb', line 91

def delete_buckets_id_labels_id(bucket_id, label_id, opts = {})
  delete_buckets_id_labels_id_with_http_info(bucket_id, label_id, opts)
  nil
end

#delete_buckets_id_labels_id_with_http_info(bucket_id, label_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Delete a label from a bucket

Parameters:

  • bucket_id (String)

    The bucket ID.

  • label_id (String)

    The ID of the label to delete.

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

    the optional parameters

Options Hash (opts):

  • :zap_trace_span (String)

    OpenTracing span context

Returns:

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

    nil, response status code and response headers



102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
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
# File 'apis/lib/influxdb2/apis/generated/api/buckets_api.rb', line 102

def delete_buckets_id_labels_id_with_http_info(bucket_id, label_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: BucketsApi.delete_buckets_id_labels_id ...'
  end
  # verify the required parameter 'bucket_id' is set
  if @api_client.config.client_side_validation && bucket_id.nil?
    fail ArgumentError, "Missing the required parameter 'bucket_id' when calling BucketsApi.delete_buckets_id_labels_id"
  end
  # verify the required parameter 'label_id' is set
  if @api_client.config.client_side_validation && label_id.nil?
    fail ArgumentError, "Missing the required parameter 'label_id' when calling BucketsApi.delete_buckets_id_labels_id"
  end
  # resource path
  local_var_path = '/buckets/{bucketID}/labels/{labelID}'.sub('{' + 'bucketID' + '}', CGI.escape(bucket_id.to_s)).sub('{' + 'labelID' + '}', CGI.escape(label_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'])
  header_params[:'Zap-Trace-Span'] = opts[:'zap_trace_span'] if !opts[:'zap_trace_span'].nil?

  # 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] || ['header']

  new_options = opts.merge(
    :operation => :"BucketsApi.delete_buckets_id_labels_id",
    :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: BucketsApi#delete_buckets_id_labels_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_buckets_id_members_id(user_id, bucket_id, opts = {}) ⇒ nil

Remove a member from a bucket

Parameters:

  • user_id (String)

    The ID of the member to remove.

  • bucket_id (String)

    The bucket ID.

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

    the optional parameters

Options Hash (opts):

  • :zap_trace_span (String)

    OpenTracing span context

Returns:

  • (nil)


161
162
163
164
# File 'apis/lib/influxdb2/apis/generated/api/buckets_api.rb', line 161

def delete_buckets_id_members_id(user_id, bucket_id, opts = {})
  delete_buckets_id_members_id_with_http_info(user_id, bucket_id, opts)
  nil
end

#delete_buckets_id_members_id_with_http_info(user_id, bucket_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Remove a member from a bucket

Parameters:

  • user_id (String)

    The ID of the member to remove.

  • bucket_id (String)

    The bucket ID.

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

    the optional parameters

Options Hash (opts):

  • :zap_trace_span (String)

    OpenTracing span context

Returns:

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

    nil, response status code and response headers



172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
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
# File 'apis/lib/influxdb2/apis/generated/api/buckets_api.rb', line 172

def delete_buckets_id_members_id_with_http_info(user_id, bucket_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: BucketsApi.delete_buckets_id_members_id ...'
  end
  # verify the required parameter 'user_id' is set
  if @api_client.config.client_side_validation && user_id.nil?
    fail ArgumentError, "Missing the required parameter 'user_id' when calling BucketsApi.delete_buckets_id_members_id"
  end
  # verify the required parameter 'bucket_id' is set
  if @api_client.config.client_side_validation && bucket_id.nil?
    fail ArgumentError, "Missing the required parameter 'bucket_id' when calling BucketsApi.delete_buckets_id_members_id"
  end
  # resource path
  local_var_path = '/buckets/{bucketID}/members/{userID}'.sub('{' + 'userID' + '}', CGI.escape(user_id.to_s)).sub('{' + 'bucketID' + '}', CGI.escape(bucket_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'])
  header_params[:'Zap-Trace-Span'] = opts[:'zap_trace_span'] if !opts[:'zap_trace_span'].nil?

  # 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] || ['header']

  new_options = opts.merge(
    :operation => :"BucketsApi.delete_buckets_id_members_id",
    :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: BucketsApi#delete_buckets_id_members_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_buckets_id_owners_id(user_id, bucket_id, opts = {}) ⇒ nil

Remove an owner from a bucket

Parameters:

  • user_id (String)

    The ID of the owner to remove.

  • bucket_id (String)

    The bucket ID.

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

    the optional parameters

Options Hash (opts):

  • :zap_trace_span (String)

    OpenTracing span context

Returns:

  • (nil)


231
232
233
234
# File 'apis/lib/influxdb2/apis/generated/api/buckets_api.rb', line 231

def delete_buckets_id_owners_id(user_id, bucket_id, opts = {})
  delete_buckets_id_owners_id_with_http_info(user_id, bucket_id, opts)
  nil
end

#delete_buckets_id_owners_id_with_http_info(user_id, bucket_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Remove an owner from a bucket

Parameters:

  • user_id (String)

    The ID of the owner to remove.

  • bucket_id (String)

    The bucket ID.

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

    the optional parameters

Options Hash (opts):

  • :zap_trace_span (String)

    OpenTracing span context

Returns:

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

    nil, response status code and response headers



242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
# File 'apis/lib/influxdb2/apis/generated/api/buckets_api.rb', line 242

def delete_buckets_id_owners_id_with_http_info(user_id, bucket_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: BucketsApi.delete_buckets_id_owners_id ...'
  end
  # verify the required parameter 'user_id' is set
  if @api_client.config.client_side_validation && user_id.nil?
    fail ArgumentError, "Missing the required parameter 'user_id' when calling BucketsApi.delete_buckets_id_owners_id"
  end
  # verify the required parameter 'bucket_id' is set
  if @api_client.config.client_side_validation && bucket_id.nil?
    fail ArgumentError, "Missing the required parameter 'bucket_id' when calling BucketsApi.delete_buckets_id_owners_id"
  end
  # resource path
  local_var_path = '/buckets/{bucketID}/owners/{userID}'.sub('{' + 'userID' + '}', CGI.escape(user_id.to_s)).sub('{' + 'bucketID' + '}', CGI.escape(bucket_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'])
  header_params[:'Zap-Trace-Span'] = opts[:'zap_trace_span'] if !opts[:'zap_trace_span'].nil?

  # 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] || ['header']

  new_options = opts.merge(
    :operation => :"BucketsApi.delete_buckets_id_owners_id",
    :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: BucketsApi#delete_buckets_id_owners_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_buckets_id_with_http_info(bucket_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Delete a bucket

Parameters:

  • bucket_id (String)

    The ID of the bucket to delete.

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

    the optional parameters

Options Hash (opts):

  • :zap_trace_span (String)

    OpenTracing span context

Returns:

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

    nil, response status code and response headers



36
37
38
39
40
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
# File 'apis/lib/influxdb2/apis/generated/api/buckets_api.rb', line 36

def delete_buckets_id_with_http_info(bucket_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: BucketsApi.delete_buckets_id ...'
  end
  # verify the required parameter 'bucket_id' is set
  if @api_client.config.client_side_validation && bucket_id.nil?
    fail ArgumentError, "Missing the required parameter 'bucket_id' when calling BucketsApi.delete_buckets_id"
  end
  # resource path
  local_var_path = '/buckets/{bucketID}'.sub('{' + 'bucketID' + '}', CGI.escape(bucket_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'])
  header_params[:'Zap-Trace-Span'] = opts[:'zap_trace_span'] if !opts[:'zap_trace_span'].nil?

  # 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] || ['header']

  new_options = opts.merge(
    :operation => :"BucketsApi.delete_buckets_id",
    :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: BucketsApi#delete_buckets_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_buckets(opts = {}) ⇒ Buckets

List all buckets

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :zap_trace_span (String)

    OpenTracing span context

  • :offset (Integer)
  • :limit (Integer) — default: default to 20
  • :after (String)

    Resource ID to seek from. Results are not inclusive of this ID. Use &#x60;after&#x60; instead of &#x60;offset&#x60;.

  • :org (String)

    The name of the organization.

  • :org_id (String)

    The organization ID.

  • :name (String)

    Only returns buckets with a specific name.

  • :id (String)

    Only returns buckets with a specific ID.

Returns:



306
307
308
309
# File 'apis/lib/influxdb2/apis/generated/api/buckets_api.rb', line 306

def get_buckets(opts = {})
  data, _status_code, _headers = get_buckets_with_http_info(opts)
  data
end

#get_buckets_id(bucket_id, opts = {}) ⇒ Bucket

Retrieve a bucket

Parameters:

  • bucket_id (String)

    The bucket ID.

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

    the optional parameters

Options Hash (opts):

  • :zap_trace_span (String)

    OpenTracing span context

Returns:



391
392
393
394
# File 'apis/lib/influxdb2/apis/generated/api/buckets_api.rb', line 391

def get_buckets_id(bucket_id, opts = {})
  data, _status_code, _headers = get_buckets_id_with_http_info(bucket_id, opts)
  data
end

#get_buckets_id_labels(bucket_id, opts = {}) ⇒ LabelsResponse

List all labels for a bucket

Parameters:

  • bucket_id (String)

    The bucket ID.

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

    the optional parameters

Options Hash (opts):

  • :zap_trace_span (String)

    OpenTracing span context

Returns:



455
456
457
458
# File 'apis/lib/influxdb2/apis/generated/api/buckets_api.rb', line 455

def get_buckets_id_labels(bucket_id, opts = {})
  data, _status_code, _headers = get_buckets_id_labels_with_http_info(bucket_id, opts)
  data
end

#get_buckets_id_labels_with_http_info(bucket_id, opts = {}) ⇒ Array<(LabelsResponse, Integer, Hash)>

List all labels for a bucket

Parameters:

  • bucket_id (String)

    The bucket ID.

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

    the optional parameters

Options Hash (opts):

  • :zap_trace_span (String)

    OpenTracing span context

Returns:

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

    LabelsResponse data, response status code and response headers



465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
# File 'apis/lib/influxdb2/apis/generated/api/buckets_api.rb', line 465

def get_buckets_id_labels_with_http_info(bucket_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: BucketsApi.get_buckets_id_labels ...'
  end
  # verify the required parameter 'bucket_id' is set
  if @api_client.config.client_side_validation && bucket_id.nil?
    fail ArgumentError, "Missing the required parameter 'bucket_id' when calling BucketsApi.get_buckets_id_labels"
  end
  # resource path
  local_var_path = '/buckets/{bucketID}/labels'.sub('{' + 'bucketID' + '}', CGI.escape(bucket_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'])
  header_params[:'Zap-Trace-Span'] = opts[:'zap_trace_span'] if !opts[:'zap_trace_span'].nil?

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

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

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

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

  new_options = opts.merge(
    :operation => :"BucketsApi.get_buckets_id_labels",
    :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: BucketsApi#get_buckets_id_labels\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_buckets_id_members(bucket_id, opts = {}) ⇒ ResourceMembers

List all users with member privileges for a bucket

Parameters:

  • bucket_id (String)

    The bucket ID.

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

    the optional parameters

Options Hash (opts):

  • :zap_trace_span (String)

    OpenTracing span context

Returns:



519
520
521
522
# File 'apis/lib/influxdb2/apis/generated/api/buckets_api.rb', line 519

def get_buckets_id_members(bucket_id, opts = {})
  data, _status_code, _headers = get_buckets_id_members_with_http_info(bucket_id, opts)
  data
end

#get_buckets_id_members_with_http_info(bucket_id, opts = {}) ⇒ Array<(ResourceMembers, Integer, Hash)>

List all users with member privileges for a bucket

Parameters:

  • bucket_id (String)

    The bucket ID.

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

    the optional parameters

Options Hash (opts):

  • :zap_trace_span (String)

    OpenTracing span context

Returns:

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

    ResourceMembers data, response status code and response headers



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
572
573
574
575
576
# File 'apis/lib/influxdb2/apis/generated/api/buckets_api.rb', line 529

def get_buckets_id_members_with_http_info(bucket_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: BucketsApi.get_buckets_id_members ...'
  end
  # verify the required parameter 'bucket_id' is set
  if @api_client.config.client_side_validation && bucket_id.nil?
    fail ArgumentError, "Missing the required parameter 'bucket_id' when calling BucketsApi.get_buckets_id_members"
  end
  # resource path
  local_var_path = '/buckets/{bucketID}/members'.sub('{' + 'bucketID' + '}', CGI.escape(bucket_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'])
  header_params[:'Zap-Trace-Span'] = opts[:'zap_trace_span'] if !opts[:'zap_trace_span'].nil?

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

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

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

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

  new_options = opts.merge(
    :operation => :"BucketsApi.get_buckets_id_members",
    :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: BucketsApi#get_buckets_id_members\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_buckets_id_owners(bucket_id, opts = {}) ⇒ ResourceOwners

List all owners of a bucket

Parameters:

  • bucket_id (String)

    The bucket ID.

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

    the optional parameters

Options Hash (opts):

  • :zap_trace_span (String)

    OpenTracing span context

Returns:



583
584
585
586
# File 'apis/lib/influxdb2/apis/generated/api/buckets_api.rb', line 583

def get_buckets_id_owners(bucket_id, opts = {})
  data, _status_code, _headers = get_buckets_id_owners_with_http_info(bucket_id, opts)
  data
end

#get_buckets_id_owners_with_http_info(bucket_id, opts = {}) ⇒ Array<(ResourceOwners, Integer, Hash)>

List all owners of a bucket

Parameters:

  • bucket_id (String)

    The bucket ID.

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

    the optional parameters

Options Hash (opts):

  • :zap_trace_span (String)

    OpenTracing span context

Returns:

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

    ResourceOwners data, response status code and response headers



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
# File 'apis/lib/influxdb2/apis/generated/api/buckets_api.rb', line 593

def get_buckets_id_owners_with_http_info(bucket_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: BucketsApi.get_buckets_id_owners ...'
  end
  # verify the required parameter 'bucket_id' is set
  if @api_client.config.client_side_validation && bucket_id.nil?
    fail ArgumentError, "Missing the required parameter 'bucket_id' when calling BucketsApi.get_buckets_id_owners"
  end
  # resource path
  local_var_path = '/buckets/{bucketID}/owners'.sub('{' + 'bucketID' + '}', CGI.escape(bucket_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'])
  header_params[:'Zap-Trace-Span'] = opts[:'zap_trace_span'] if !opts[:'zap_trace_span'].nil?

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

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

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

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

  new_options = opts.merge(
    :operation => :"BucketsApi.get_buckets_id_owners",
    :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: BucketsApi#get_buckets_id_owners\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_buckets_id_with_http_info(bucket_id, opts = {}) ⇒ Array<(Bucket, Integer, Hash)>

Retrieve a bucket

Parameters:

  • bucket_id (String)

    The bucket ID.

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

    the optional parameters

Options Hash (opts):

  • :zap_trace_span (String)

    OpenTracing span context

Returns:

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

    Bucket data, response status code and response headers



401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
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
# File 'apis/lib/influxdb2/apis/generated/api/buckets_api.rb', line 401

def get_buckets_id_with_http_info(bucket_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: BucketsApi.get_buckets_id ...'
  end
  # verify the required parameter 'bucket_id' is set
  if @api_client.config.client_side_validation && bucket_id.nil?
    fail ArgumentError, "Missing the required parameter 'bucket_id' when calling BucketsApi.get_buckets_id"
  end
  # resource path
  local_var_path = '/buckets/{bucketID}'.sub('{' + 'bucketID' + '}', CGI.escape(bucket_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'])
  header_params[:'Zap-Trace-Span'] = opts[:'zap_trace_span'] if !opts[:'zap_trace_span'].nil?

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

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

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

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

  new_options = opts.merge(
    :operation => :"BucketsApi.get_buckets_id",
    :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: BucketsApi#get_buckets_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_buckets_with_http_info(opts = {}) ⇒ Array<(Buckets, Integer, Hash)>

List all buckets

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :zap_trace_span (String)

    OpenTracing span context

  • :offset (Integer)
  • :limit (Integer)
  • :after (String)

    Resource ID to seek from. Results are not inclusive of this ID. Use &#x60;after&#x60; instead of &#x60;offset&#x60;.

  • :org (String)

    The name of the organization.

  • :org_id (String)

    The organization ID.

  • :name (String)

    Only returns buckets with a specific name.

  • :id (String)

    Only returns buckets with a specific ID.

Returns:

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

    Buckets data, response status code and response headers



322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
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
# File 'apis/lib/influxdb2/apis/generated/api/buckets_api.rb', line 322

def get_buckets_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: BucketsApi.get_buckets ...'
  end
  if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] < 0
    fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling BucketsApi.get_buckets, must be greater than or equal to 0.'
  end

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

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

  # resource path
  local_var_path = '/buckets'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
  query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil?
  query_params[:'org'] = opts[:'org'] if !opts[:'org'].nil?
  query_params[:'orgID'] = opts[:'org_id'] if !opts[:'org_id'].nil?
  query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
  query_params[:'id'] = opts[:'id'] if !opts[:'id'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  header_params[:'Zap-Trace-Span'] = opts[:'zap_trace_span'] if !opts[:'zap_trace_span'].nil?

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

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

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

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

  new_options = opts.merge(
    :operation => :"BucketsApi.get_buckets",
    :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: BucketsApi#get_buckets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_sources_id_buckets(source_id, opts = {}) ⇒ Buckets

Get buckets in a source

Parameters:

  • source_id (String)

    The source ID.

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

    the optional parameters

Options Hash (opts):

  • :zap_trace_span (String)

    OpenTracing span context

  • :org (String)

    The name of the organization.

Returns:



648
649
650
651
# File 'apis/lib/influxdb2/apis/generated/api/buckets_api.rb', line 648

def get_sources_id_buckets(source_id, opts = {})
  data, _status_code, _headers = get_sources_id_buckets_with_http_info(source_id, opts)
  data
end

#get_sources_id_buckets_with_http_info(source_id, opts = {}) ⇒ Array<(Buckets, Integer, Hash)>

Get buckets in a source

Parameters:

  • source_id (String)

    The source ID.

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

    the optional parameters

Options Hash (opts):

  • :zap_trace_span (String)

    OpenTracing span context

  • :org (String)

    The name of the organization.

Returns:

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

    Buckets data, response status code and response headers



659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
# File 'apis/lib/influxdb2/apis/generated/api/buckets_api.rb', line 659

def get_sources_id_buckets_with_http_info(source_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: BucketsApi.get_sources_id_buckets ...'
  end
  # verify the required parameter 'source_id' is set
  if @api_client.config.client_side_validation && source_id.nil?
    fail ArgumentError, "Missing the required parameter 'source_id' when calling BucketsApi.get_sources_id_buckets"
  end
  # resource path
  local_var_path = '/sources/{sourceID}/buckets'.sub('{' + 'sourceID' + '}', CGI.escape(source_id.to_s))

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

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  header_params[:'Zap-Trace-Span'] = opts[:'zap_trace_span'] if !opts[:'zap_trace_span'].nil?

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

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

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

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

  new_options = opts.merge(
    :operation => :"BucketsApi.get_sources_id_buckets",
    :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: BucketsApi#get_sources_id_buckets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#patch_buckets_id(bucket_id, patch_bucket_request, opts = {}) ⇒ Bucket

Update a bucket

Parameters:

  • bucket_id (String)

    The bucket ID.

  • patch_bucket_request (PatchBucketRequest)

    Bucket update to apply

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

    the optional parameters

Options Hash (opts):

  • :zap_trace_span (String)

    OpenTracing span context

Returns:



715
716
717
718
# File 'apis/lib/influxdb2/apis/generated/api/buckets_api.rb', line 715

def patch_buckets_id(bucket_id, patch_bucket_request, opts = {})
  data, _status_code, _headers = patch_buckets_id_with_http_info(bucket_id, patch_bucket_request, opts)
  data
end

#patch_buckets_id_with_http_info(bucket_id, patch_bucket_request, opts = {}) ⇒ Array<(Bucket, Integer, Hash)>

Update a bucket

Parameters:

  • bucket_id (String)

    The bucket ID.

  • patch_bucket_request (PatchBucketRequest)

    Bucket update to apply

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

    the optional parameters

Options Hash (opts):

  • :zap_trace_span (String)

    OpenTracing span context

Returns:

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

    Bucket data, response status code and response headers



726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
# File 'apis/lib/influxdb2/apis/generated/api/buckets_api.rb', line 726

def patch_buckets_id_with_http_info(bucket_id, patch_bucket_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: BucketsApi.patch_buckets_id ...'
  end
  # verify the required parameter 'bucket_id' is set
  if @api_client.config.client_side_validation && bucket_id.nil?
    fail ArgumentError, "Missing the required parameter 'bucket_id' when calling BucketsApi.patch_buckets_id"
  end
  # verify the required parameter 'patch_bucket_request' is set
  if @api_client.config.client_side_validation && patch_bucket_request.nil?
    fail ArgumentError, "Missing the required parameter 'patch_bucket_request' when calling BucketsApi.patch_buckets_id"
  end
  # resource path
  local_var_path = '/buckets/{bucketID}'.sub('{' + 'bucketID' + '}', CGI.escape(bucket_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'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
  header_params[:'Zap-Trace-Span'] = opts[:'zap_trace_span'] if !opts[:'zap_trace_span'].nil?

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

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

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

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

  new_options = opts.merge(
    :operation => :"BucketsApi.patch_buckets_id",
    :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: BucketsApi#patch_buckets_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#post_buckets(post_bucket_request, opts = {}) ⇒ Bucket

Create a bucket

Parameters:

  • post_bucket_request (PostBucketRequest)

    Bucket to create

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

    the optional parameters

Options Hash (opts):

  • :zap_trace_span (String)

    OpenTracing span context

Returns:



786
787
788
789
# File 'apis/lib/influxdb2/apis/generated/api/buckets_api.rb', line 786

def post_buckets(post_bucket_request, opts = {})
  data, _status_code, _headers = post_buckets_with_http_info(post_bucket_request, opts)
  data
end

#post_buckets_id_labels(bucket_id, label_mapping, opts = {}) ⇒ LabelResponse

Add a label to a bucket

Parameters:

  • bucket_id (String)

    The bucket ID.

  • label_mapping (LabelMapping)

    Label to add

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

    the optional parameters

Options Hash (opts):

  • :zap_trace_span (String)

    OpenTracing span context

Returns:



853
854
855
856
# File 'apis/lib/influxdb2/apis/generated/api/buckets_api.rb', line 853

def post_buckets_id_labels(bucket_id, label_mapping, opts = {})
  data, _status_code, _headers = post_buckets_id_labels_with_http_info(bucket_id, label_mapping, opts)
  data
end

#post_buckets_id_labels_with_http_info(bucket_id, label_mapping, opts = {}) ⇒ Array<(LabelResponse, Integer, Hash)>

Add a label to a bucket

Parameters:

  • bucket_id (String)

    The bucket ID.

  • label_mapping (LabelMapping)

    Label to add

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

    the optional parameters

Options Hash (opts):

  • :zap_trace_span (String)

    OpenTracing span context

Returns:

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

    LabelResponse data, response status code and response headers



864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
# File 'apis/lib/influxdb2/apis/generated/api/buckets_api.rb', line 864

def post_buckets_id_labels_with_http_info(bucket_id, label_mapping, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: BucketsApi.post_buckets_id_labels ...'
  end
  # verify the required parameter 'bucket_id' is set
  if @api_client.config.client_side_validation && bucket_id.nil?
    fail ArgumentError, "Missing the required parameter 'bucket_id' when calling BucketsApi.post_buckets_id_labels"
  end
  # verify the required parameter 'label_mapping' is set
  if @api_client.config.client_side_validation && label_mapping.nil?
    fail ArgumentError, "Missing the required parameter 'label_mapping' when calling BucketsApi.post_buckets_id_labels"
  end
  # resource path
  local_var_path = '/buckets/{bucketID}/labels'.sub('{' + 'bucketID' + '}', CGI.escape(bucket_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'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
  header_params[:'Zap-Trace-Span'] = opts[:'zap_trace_span'] if !opts[:'zap_trace_span'].nil?

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

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

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

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

  new_options = opts.merge(
    :operation => :"BucketsApi.post_buckets_id_labels",
    :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: BucketsApi#post_buckets_id_labels\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#post_buckets_id_members(bucket_id, add_resource_member_request_body, opts = {}) ⇒ ResourceMember

Add a member to a bucket

Parameters:

  • bucket_id (String)

    The bucket ID.

  • add_resource_member_request_body (AddResourceMemberRequestBody)

    User to add as member

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

    the optional parameters

Options Hash (opts):

  • :zap_trace_span (String)

    OpenTracing span context

Returns:



925
926
927
928
# File 'apis/lib/influxdb2/apis/generated/api/buckets_api.rb', line 925

def post_buckets_id_members(bucket_id, add_resource_member_request_body, opts = {})
  data, _status_code, _headers = post_buckets_id_members_with_http_info(bucket_id, add_resource_member_request_body, opts)
  data
end

#post_buckets_id_members_with_http_info(bucket_id, add_resource_member_request_body, opts = {}) ⇒ Array<(ResourceMember, Integer, Hash)>

Add a member to a bucket

Parameters:

  • bucket_id (String)

    The bucket ID.

  • add_resource_member_request_body (AddResourceMemberRequestBody)

    User to add as member

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

    the optional parameters

Options Hash (opts):

  • :zap_trace_span (String)

    OpenTracing span context

Returns:

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

    ResourceMember data, response status code and response headers



936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
# File 'apis/lib/influxdb2/apis/generated/api/buckets_api.rb', line 936

def post_buckets_id_members_with_http_info(bucket_id, add_resource_member_request_body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: BucketsApi.post_buckets_id_members ...'
  end
  # verify the required parameter 'bucket_id' is set
  if @api_client.config.client_side_validation && bucket_id.nil?
    fail ArgumentError, "Missing the required parameter 'bucket_id' when calling BucketsApi.post_buckets_id_members"
  end
  # verify the required parameter 'add_resource_member_request_body' is set
  if @api_client.config.client_side_validation && add_resource_member_request_body.nil?
    fail ArgumentError, "Missing the required parameter 'add_resource_member_request_body' when calling BucketsApi.post_buckets_id_members"
  end
  # resource path
  local_var_path = '/buckets/{bucketID}/members'.sub('{' + 'bucketID' + '}', CGI.escape(bucket_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'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
  header_params[:'Zap-Trace-Span'] = opts[:'zap_trace_span'] if !opts[:'zap_trace_span'].nil?

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

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

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

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

  new_options = opts.merge(
    :operation => :"BucketsApi.post_buckets_id_members",
    :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: BucketsApi#post_buckets_id_members\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#post_buckets_id_owners(bucket_id, add_resource_member_request_body, opts = {}) ⇒ ResourceOwner

Add an owner to a bucket

Parameters:

  • bucket_id (String)

    The bucket ID.

  • add_resource_member_request_body (AddResourceMemberRequestBody)

    User to add as owner

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

    the optional parameters

Options Hash (opts):

  • :zap_trace_span (String)

    OpenTracing span context

Returns:



997
998
999
1000
# File 'apis/lib/influxdb2/apis/generated/api/buckets_api.rb', line 997

def post_buckets_id_owners(bucket_id, add_resource_member_request_body, opts = {})
  data, _status_code, _headers = post_buckets_id_owners_with_http_info(bucket_id, add_resource_member_request_body, opts)
  data
end

#post_buckets_id_owners_with_http_info(bucket_id, add_resource_member_request_body, opts = {}) ⇒ Array<(ResourceOwner, Integer, Hash)>

Add an owner to a bucket

Parameters:

  • bucket_id (String)

    The bucket ID.

  • add_resource_member_request_body (AddResourceMemberRequestBody)

    User to add as owner

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

    the optional parameters

Options Hash (opts):

  • :zap_trace_span (String)

    OpenTracing span context

Returns:

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

    ResourceOwner data, response status code and response headers



1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
# File 'apis/lib/influxdb2/apis/generated/api/buckets_api.rb', line 1008

def post_buckets_id_owners_with_http_info(bucket_id, add_resource_member_request_body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: BucketsApi.post_buckets_id_owners ...'
  end
  # verify the required parameter 'bucket_id' is set
  if @api_client.config.client_side_validation && bucket_id.nil?
    fail ArgumentError, "Missing the required parameter 'bucket_id' when calling BucketsApi.post_buckets_id_owners"
  end
  # verify the required parameter 'add_resource_member_request_body' is set
  if @api_client.config.client_side_validation && add_resource_member_request_body.nil?
    fail ArgumentError, "Missing the required parameter 'add_resource_member_request_body' when calling BucketsApi.post_buckets_id_owners"
  end
  # resource path
  local_var_path = '/buckets/{bucketID}/owners'.sub('{' + 'bucketID' + '}', CGI.escape(bucket_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'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
  header_params[:'Zap-Trace-Span'] = opts[:'zap_trace_span'] if !opts[:'zap_trace_span'].nil?

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

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

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

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

  new_options = opts.merge(
    :operation => :"BucketsApi.post_buckets_id_owners",
    :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: BucketsApi#post_buckets_id_owners\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#post_buckets_with_http_info(post_bucket_request, opts = {}) ⇒ Array<(Bucket, Integer, Hash)>

Create a bucket

Parameters:

  • post_bucket_request (PostBucketRequest)

    Bucket to create

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

    the optional parameters

Options Hash (opts):

  • :zap_trace_span (String)

    OpenTracing span context

Returns:

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

    Bucket data, response status code and response headers



796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
# File 'apis/lib/influxdb2/apis/generated/api/buckets_api.rb', line 796

def post_buckets_with_http_info(post_bucket_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: BucketsApi.post_buckets ...'
  end
  # verify the required parameter 'post_bucket_request' is set
  if @api_client.config.client_side_validation && post_bucket_request.nil?
    fail ArgumentError, "Missing the required parameter 'post_bucket_request' when calling BucketsApi.post_buckets"
  end
  # resource path
  local_var_path = '/buckets'

  # 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'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
  header_params[:'Zap-Trace-Span'] = opts[:'zap_trace_span'] if !opts[:'zap_trace_span'].nil?

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

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

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

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

  new_options = opts.merge(
    :operation => :"BucketsApi.post_buckets",
    :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: BucketsApi#post_buckets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end