Class: LaunchDarklyApi::DataExportDestinationsApi

Inherits:
Object
  • Object
show all
Defined in:
lib/launchdarkly_api/api/data_export_destinations_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ DataExportDestinationsApi

Returns a new instance of DataExportDestinationsApi.



19
20
21
# File 'lib/launchdarkly_api/api/data_export_destinations_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/launchdarkly_api/api/data_export_destinations_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#delete_destination(project_key, environment_key, id, opts = {}) ⇒ nil

Delete Data Export destination Delete a Data Export destination by ID.

Parameters:

  • project_key (String)

    The project key

  • environment_key (String)

    The environment key

  • id (String)

    The Data Export destination ID

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

    the optional parameters

Returns:

  • (nil)


29
30
31
32
# File 'lib/launchdarkly_api/api/data_export_destinations_api.rb', line 29

def delete_destination(project_key, environment_key, id, opts = {})
  delete_destination_with_http_info(project_key, environment_key, id, opts)
  nil
end

#delete_destination_with_http_info(project_key, environment_key, id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Delete Data Export destination Delete a Data Export destination by ID.

Parameters:

  • project_key (String)

    The project key

  • environment_key (String)

    The environment key

  • id (String)

    The Data Export destination ID

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

    the optional parameters

Returns:

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

    nil, 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
# File 'lib/launchdarkly_api/api/data_export_destinations_api.rb', line 41

def delete_destination_with_http_info(project_key, environment_key, id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DataExportDestinationsApi.delete_destination ...'
  end
  # verify the required parameter 'project_key' is set
  if @api_client.config.client_side_validation && project_key.nil?
    fail ArgumentError, "Missing the required parameter 'project_key' when calling DataExportDestinationsApi.delete_destination"
  end
  # verify the required parameter 'environment_key' is set
  if @api_client.config.client_side_validation && environment_key.nil?
    fail ArgumentError, "Missing the required parameter 'environment_key' when calling DataExportDestinationsApi.delete_destination"
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling DataExportDestinationsApi.delete_destination"
  end
  # resource path
  local_var_path = '/api/v2/destinations/{projectKey}/{environmentKey}/{id}'.sub('{' + 'projectKey' + '}', CGI.escape(project_key.to_s)).sub('{' + 'environmentKey' + '}', CGI.escape(environment_key.to_s)).sub('{' + 'id' + '}', CGI.escape(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']) unless header_params['Accept']

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

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

#get_destination(project_key, environment_key, id, opts = {}) ⇒ Destination

Get destination Get a single Data Export destination by ID.

Parameters:

  • project_key (String)

    The project key

  • environment_key (String)

    The environment key

  • id (String)

    The Data Export destination ID

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

    the optional parameters

Returns:



104
105
106
107
# File 'lib/launchdarkly_api/api/data_export_destinations_api.rb', line 104

def get_destination(project_key, environment_key, id, opts = {})
  data, _status_code, _headers = get_destination_with_http_info(project_key, environment_key, id, opts)
  data
end

#get_destination_with_http_info(project_key, environment_key, id, opts = {}) ⇒ Array<(Destination, Integer, Hash)>

Get destination Get a single Data Export destination by ID.

Parameters:

  • project_key (String)

    The project key

  • environment_key (String)

    The environment key

  • id (String)

    The Data Export destination ID

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

    the optional parameters

Returns:

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

    Destination data, response status code and response headers



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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
# File 'lib/launchdarkly_api/api/data_export_destinations_api.rb', line 116

def get_destination_with_http_info(project_key, environment_key, id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DataExportDestinationsApi.get_destination ...'
  end
  # verify the required parameter 'project_key' is set
  if @api_client.config.client_side_validation && project_key.nil?
    fail ArgumentError, "Missing the required parameter 'project_key' when calling DataExportDestinationsApi.get_destination"
  end
  # verify the required parameter 'environment_key' is set
  if @api_client.config.client_side_validation && environment_key.nil?
    fail ArgumentError, "Missing the required parameter 'environment_key' when calling DataExportDestinationsApi.get_destination"
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling DataExportDestinationsApi.get_destination"
  end
  # resource path
  local_var_path = '/api/v2/destinations/{projectKey}/{environmentKey}/{id}'.sub('{' + 'projectKey' + '}', CGI.escape(project_key.to_s)).sub('{' + 'environmentKey' + '}', CGI.escape(environment_key.to_s)).sub('{' + 'id' + '}', CGI.escape(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']) unless header_params['Accept']

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

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

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

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

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

#get_destinations(opts = {}) ⇒ Destinations

List destinations Get a list of Data Export destinations configured across all projects and environments.

Parameters:

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

    the optional parameters

Returns:



176
177
178
179
# File 'lib/launchdarkly_api/api/data_export_destinations_api.rb', line 176

def get_destinations(opts = {})
  data, _status_code, _headers = get_destinations_with_http_info(opts)
  data
end

#get_destinations_with_http_info(opts = {}) ⇒ Array<(Destinations, Integer, Hash)>

List destinations Get a list of Data Export destinations configured across all projects and environments.

Parameters:

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

    the optional parameters

Returns:

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

    Destinations data, response status code and response headers



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
224
225
226
227
# File 'lib/launchdarkly_api/api/data_export_destinations_api.rb', line 185

def get_destinations_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DataExportDestinationsApi.get_destinations ...'
  end
  # resource path
  local_var_path = '/api/v2/destinations'

  # 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']) unless header_params['Accept']

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

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

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

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

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

#patch_destination(project_key, environment_key, id, patch_operation, opts = {}) ⇒ Destination

Update Data Export destination Update a Data Export destination. Updating a destination uses a JSON patch or JSON merge patch representation of the desired changes. To learn more, read Updates.

Parameters:

  • project_key (String)

    The project key

  • environment_key (String)

    The environment key

  • id (String)

    The Data Export destination ID

  • patch_operation (Array<PatchOperation>)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



237
238
239
240
# File 'lib/launchdarkly_api/api/data_export_destinations_api.rb', line 237

def patch_destination(project_key, environment_key, id, patch_operation, opts = {})
  data, _status_code, _headers = patch_destination_with_http_info(project_key, environment_key, id, patch_operation, opts)
  data
end

#patch_destination_with_http_info(project_key, environment_key, id, patch_operation, opts = {}) ⇒ Array<(Destination, Integer, Hash)>

Update Data Export destination Update a Data Export destination. Updating a destination uses a JSON patch or JSON merge patch representation of the desired changes. To learn more, read Updates.

Parameters:

  • project_key (String)

    The project key

  • environment_key (String)

    The environment key

  • id (String)

    The Data Export destination ID

  • patch_operation (Array<PatchOperation>)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

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

    Destination data, response status code and response headers



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
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
# File 'lib/launchdarkly_api/api/data_export_destinations_api.rb', line 250

def patch_destination_with_http_info(project_key, environment_key, id, patch_operation, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DataExportDestinationsApi.patch_destination ...'
  end
  # verify the required parameter 'project_key' is set
  if @api_client.config.client_side_validation && project_key.nil?
    fail ArgumentError, "Missing the required parameter 'project_key' when calling DataExportDestinationsApi.patch_destination"
  end
  # verify the required parameter 'environment_key' is set
  if @api_client.config.client_side_validation && environment_key.nil?
    fail ArgumentError, "Missing the required parameter 'environment_key' when calling DataExportDestinationsApi.patch_destination"
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling DataExportDestinationsApi.patch_destination"
  end
  # verify the required parameter 'patch_operation' is set
  if @api_client.config.client_side_validation && patch_operation.nil?
    fail ArgumentError, "Missing the required parameter 'patch_operation' when calling DataExportDestinationsApi.patch_destination"
  end
  # resource path
  local_var_path = '/api/v2/destinations/{projectKey}/{environmentKey}/{id}'.sub('{' + 'projectKey' + '}', CGI.escape(project_key.to_s)).sub('{' + 'environmentKey' + '}', CGI.escape(environment_key.to_s)).sub('{' + 'id' + '}', CGI.escape(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']) unless header_params['Accept']
  # 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(patch_operation)

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

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

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

#post_destination(project_key, environment_key, destination_post, opts = {}) ⇒ Destination

Create Data Export destination Create a new Data Export destination. In the config request body parameter, the fields required depend on the type of Data Export destination.

Click to expand config parameter details #### Azure Event Hubs To create a Data Export destination with a kind of azure-event-hubs, the config object requires the following fields: * namespace: The Event Hub Namespace name * name: The Event Hub name * policyName: The shared access signature policy name. You can find your policy name in the settings of your Azure Event Hubs Namespace. * policyKey: The shared access signature key. You can find your policy key in the settings of your Azure Event Hubs Namespace. #### Google Cloud Pub/Sub To create a Data Export destination with a kind of google-pubsub, the config object requires the following fields: * project: The Google PubSub project ID for the project to publish to * topic: The Google PubSub topic ID for the topic to publish to #### Amazon Kinesis To create a Data Export destination with a kind of kinesis, the config object requires the following fields: * region: The Kinesis stream's AWS region key * roleArn: The Amazon Resource Name (ARN) of the AWS role that will be writing to Kinesis * streamName: The name of the Kinesis stream that LaunchDarkly is sending events to. This is not the ARN of the stream. #### mParticle To create a Data Export destination with a kind of mparticle, the config object requires the following fields: * apiKey: The mParticle API key * secret: The mParticle API secret * userIdentity: The type of identifier you use to identify your end users in mParticle * anonymousUserIdentity: The type of identifier you use to identify your anonymous end users in mParticle #### Segment To create a Data Export destination with a kind of segment, the config object requires the following fields: * writeKey: The Segment write key. This is used to authenticate LaunchDarkly's calls to Segment. #### Snowflake To create a Data Export destination with a kind of snowflake-v2, the config object requires the following fields: * publicKey: The publicKey is returned as part of the Generate Snowflake destination key pair response. It is the public_key field. * snowflakeHostAddress: Your Snowflake account URL.

Parameters:

  • project_key (String)

    The project key

  • environment_key (String)

    The environment key

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

    the optional parameters

Returns:



322
323
324
325
# File 'lib/launchdarkly_api/api/data_export_destinations_api.rb', line 322

def post_destination(project_key, environment_key, destination_post, opts = {})
  data, _status_code, _headers = post_destination_with_http_info(project_key, environment_key, destination_post, opts)
  data
end

#post_destination_with_http_info(project_key, environment_key, destination_post, opts = {}) ⇒ Array<(Destination, Integer, Hash)>

Create Data Export destination Create a new Data Export destination. In the `config` request body parameter, the fields required depend on the type of Data Export destination. <details> <summary>Click to expand <code>config</code> parameter details</summary> #### Azure Event Hubs To create a Data Export destination with a `kind` of `azure-event-hubs`, the `config` object requires the following fields: * `namespace`: The Event Hub Namespace name * `name`: The Event Hub name * `policyName`: The shared access signature policy name. You can find your policy name in the settings of your Azure Event Hubs Namespace. * `policyKey`: The shared access signature key. You can find your policy key in the settings of your Azure Event Hubs Namespace. #### Google Cloud Pub/Sub To create a Data Export destination with a `kind` of `google-pubsub`, the `config` object requires the following fields: * `project`: The Google PubSub project ID for the project to publish to * `topic`: The Google PubSub topic ID for the topic to publish to #### Amazon Kinesis To create a Data Export destination with a `kind` of `kinesis`, the `config` object requires the following fields: * `region`: The Kinesis stream's AWS region key * `roleArn`: The Amazon Resource Name (ARN) of the AWS role that will be writing to Kinesis * `streamName`: The name of the Kinesis stream that LaunchDarkly is sending events to. This is not the ARN of the stream. #### mParticle To create a Data Export destination with a `kind` of `mparticle`, the `config` object requires the following fields: * `apiKey`: The mParticle API key * `secret`: The mParticle API secret * `userIdentity`: The type of identifier you use to identify your end users in mParticle * `anonymousUserIdentity`: The type of identifier you use to identify your anonymous end users in mParticle #### Segment To create a Data Export destination with a `kind` of `segment`, the `config` object requires the following fields: * `writeKey`: The Segment write key. This is used to authenticate LaunchDarkly's calls to Segment. #### Snowflake To create a Data Export destination with a `kind` of `snowflake-v2`, the `config` object requires the following fields: * `publicKey`: The `publicKey` is returned as part of the Generate Snowflake destination key pair response. It is the `public_key` field. * `snowflakeHostAddress`: Your Snowflake account URL. </details>

Parameters:

  • project_key (String)

    The project key

  • environment_key (String)

    The environment key

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

    the optional parameters

Returns:

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

    Destination data, response status code and response headers



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
385
386
387
388
389
390
391
392
393
# File 'lib/launchdarkly_api/api/data_export_destinations_api.rb', line 334

def post_destination_with_http_info(project_key, environment_key, destination_post, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DataExportDestinationsApi.post_destination ...'
  end
  # verify the required parameter 'project_key' is set
  if @api_client.config.client_side_validation && project_key.nil?
    fail ArgumentError, "Missing the required parameter 'project_key' when calling DataExportDestinationsApi.post_destination"
  end
  # verify the required parameter 'environment_key' is set
  if @api_client.config.client_side_validation && environment_key.nil?
    fail ArgumentError, "Missing the required parameter 'environment_key' when calling DataExportDestinationsApi.post_destination"
  end
  # verify the required parameter 'destination_post' is set
  if @api_client.config.client_side_validation && destination_post.nil?
    fail ArgumentError, "Missing the required parameter 'destination_post' when calling DataExportDestinationsApi.post_destination"
  end
  # resource path
  local_var_path = '/api/v2/destinations/{projectKey}/{environmentKey}'.sub('{' + 'projectKey' + '}', CGI.escape(project_key.to_s)).sub('{' + 'environmentKey' + '}', CGI.escape(environment_key.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']) unless header_params['Accept']
  # 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(destination_post)

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

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

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

#post_generate_trust_policy(proj_key, env_key, opts = {}) ⇒ GenerateTrustPolicyPostRep

Generate trust policy Trust policy to allow Data Export to assume the role and perform operations on AWS resources

Parameters:

  • proj_key (String)

    The project key

  • env_key (String)

    The environment key

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

    the optional parameters

Returns:



401
402
403
404
# File 'lib/launchdarkly_api/api/data_export_destinations_api.rb', line 401

def post_generate_trust_policy(proj_key, env_key, opts = {})
  data, _status_code, _headers = post_generate_trust_policy_with_http_info(proj_key, env_key, opts)
  data
end

#post_generate_trust_policy_with_http_info(proj_key, env_key, opts = {}) ⇒ Array<(GenerateTrustPolicyPostRep, Integer, Hash)>

Generate trust policy Trust policy to allow Data Export to assume the role and perform operations on AWS resources

Parameters:

  • proj_key (String)

    The project key

  • env_key (String)

    The environment key

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

    the optional parameters

Returns:

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

    GenerateTrustPolicyPostRep data, response status code and response headers



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
449
450
451
452
453
454
455
456
457
458
459
460
461
462
# File 'lib/launchdarkly_api/api/data_export_destinations_api.rb', line 412

def post_generate_trust_policy_with_http_info(proj_key, env_key, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DataExportDestinationsApi.post_generate_trust_policy ...'
  end
  # verify the required parameter 'proj_key' is set
  if @api_client.config.client_side_validation && proj_key.nil?
    fail ArgumentError, "Missing the required parameter 'proj_key' when calling DataExportDestinationsApi.post_generate_trust_policy"
  end
  # verify the required parameter 'env_key' is set
  if @api_client.config.client_side_validation && env_key.nil?
    fail ArgumentError, "Missing the required parameter 'env_key' when calling DataExportDestinationsApi.post_generate_trust_policy"
  end
  # resource path
  local_var_path = '/api/v2/destinations/projects/{projKey}/environments/{envKey}/generate-trust-policy'.sub('{' + 'projKey' + '}', CGI.escape(proj_key.to_s)).sub('{' + 'envKey' + '}', CGI.escape(env_key.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']) unless header_params['Accept']

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

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

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

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

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

#post_generate_warehouse_destination_key_pair(opts = {}) ⇒ GenerateWarehouseDestinationKeyPairPostRep

Generate Snowflake destination key pair Generate key pair to allow Data Export to authenticate into a Snowflake warehouse destination

Parameters:

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

    the optional parameters

Returns:



468
469
470
471
# File 'lib/launchdarkly_api/api/data_export_destinations_api.rb', line 468

def post_generate_warehouse_destination_key_pair(opts = {})
  data, _status_code, _headers = post_generate_warehouse_destination_key_pair_with_http_info(opts)
  data
end

#post_generate_warehouse_destination_key_pair_with_http_info(opts = {}) ⇒ Array<(GenerateWarehouseDestinationKeyPairPostRep, Integer, Hash)>

Generate Snowflake destination key pair Generate key pair to allow Data Export to authenticate into a Snowflake warehouse destination

Parameters:

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

    the optional parameters

Returns:



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
513
514
515
516
517
518
519
# File 'lib/launchdarkly_api/api/data_export_destinations_api.rb', line 477

def post_generate_warehouse_destination_key_pair_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: DataExportDestinationsApi.post_generate_warehouse_destination_key_pair ...'
  end
  # resource path
  local_var_path = '/api/v2/destinations/generate-warehouse-destination-key-pair'

  # 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']) unless header_params['Accept']

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

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

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

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

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