Class: LaunchDarklyApi::DataExportDestinationsApi
- Inherits:
-
Object
- Object
- LaunchDarklyApi::DataExportDestinationsApi
- Defined in:
- lib/launchdarkly_api/api/data_export_destinations_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#delete_destination(project_key, environment_key, id, opts = {}) ⇒ nil
Delete Data Export destination Delete a Data Export destination by ID.
-
#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.
-
#get_destination(project_key, environment_key, id, opts = {}) ⇒ Destination
Get destination Get a single Data Export destination by ID.
-
#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.
-
#get_destinations(opts = {}) ⇒ Destinations
List destinations Get a list of Data Export destinations configured across all projects and environments.
-
#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.
-
#initialize(api_client = ApiClient.default) ⇒ DataExportDestinationsApi
constructor
A new instance of DataExportDestinationsApi.
-
#patch_destination(project_key, environment_key, id, patch_operation, opts = {}) ⇒ Destination
Update Data Export destination Update a Data Export destination.
-
#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.
-
#post_destination(project_key, environment_key, destination_post, opts = {}) ⇒ Destination
Create Data Export destination Create a new Data Export destination.
-
#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.
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_client ⇒ Object
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.
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.
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']) # 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'] = 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, ) 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.
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.
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']) # 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'] = 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, ) 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.
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.
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']) # 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'] = 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, ) 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. This requires a JSON Patch representation of the modified destination.
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. This requires a JSON Patch representation of the modified destination.
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']) # 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'] = 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, ) 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. <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 users in mParticle * `anonymousUserIdentity`: The type of identifier you use to identify your anonymous 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. </details>
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 users in mParticle * `anonymousUserIdentity`: The type of identifier you use to identify your anonymous 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. </details>
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']) # 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'] = 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, ) 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 |