launchdarkly_api 18.1.0 → 19.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +8 -4
- data/docs/AIConfig.md +3 -1
- data/docs/AiConfigsMetricDataSourceRefRep.md +1 -1
- data/docs/AiConfigsMetricListingRep.md +1 -1
- data/docs/DataExportDestinationsApi.md +74 -0
- data/docs/FeatureFlagsApi.md +2 -2
- data/docs/GenerateTrustPolicyPostRep.md +18 -0
- data/docs/MetricDataSourceRefRep.md +1 -1
- data/docs/MetricGroupRep.md +1 -5
- data/docs/MetricListingRep.md +1 -1
- data/docs/MetricRep.md +1 -1
- data/docs/Metrics.md +7 -1
- data/docs/MetricsApi.md +3 -3
- data/docs/PostReleasePolicyRequest.md +1 -1
- data/docs/PutReleasePolicyRequest.md +1 -1
- data/docs/RelayAutoConfigRep.md +1 -1
- data/docs/ReleasePolicy.md +1 -1
- data/docs/ScheduledChangesApi.md +1 -1
- data/docs/SegmentsApi.md +1 -1
- data/docs/TrustPolicyDetails.md +20 -0
- data/docs/TrustPolicyStatement.md +24 -0
- data/lib/launchdarkly_api/api/data_export_destinations_api.rb +69 -0
- data/lib/launchdarkly_api/api/feature_flags_api.rb +2 -2
- data/lib/launchdarkly_api/api/metrics_api.rb +4 -4
- data/lib/launchdarkly_api/api/scheduled_changes_api.rb +2 -2
- data/lib/launchdarkly_api/api/segments_api.rb +2 -2
- data/lib/launchdarkly_api/models/ai_config.rb +16 -4
- data/lib/launchdarkly_api/models/ai_configs_metric_data_source_ref_rep.rb +17 -0
- data/lib/launchdarkly_api/models/ai_configs_metric_listing_rep.rb +17 -0
- data/lib/launchdarkly_api/models/destination.rb +2 -2
- data/lib/launchdarkly_api/models/destination_post.rb +2 -2
- data/lib/launchdarkly_api/models/generate_trust_policy_post_rep.rb +220 -0
- data/lib/launchdarkly_api/models/iteration_rep.rb +29 -5
- data/lib/launchdarkly_api/models/metric_data_source_ref_rep.rb +17 -0
- data/lib/launchdarkly_api/models/metric_group_rep.rb +4 -24
- data/lib/launchdarkly_api/models/metric_listing_rep.rb +17 -0
- data/lib/launchdarkly_api/models/metric_rep.rb +17 -0
- data/lib/launchdarkly_api/models/metrics.rb +118 -4
- data/lib/launchdarkly_api/models/naming_convention.rb +2 -2
- data/lib/launchdarkly_api/models/relay_auto_config_rep.rb +0 -17
- data/lib/launchdarkly_api/models/trust_policy_details.rb +233 -0
- data/lib/launchdarkly_api/models/trust_policy_statement.rb +255 -0
- data/lib/launchdarkly_api/version.rb +1 -1
- data/lib/launchdarkly_api.rb +3 -0
- data/spec/api/data_export_destinations_api_spec.rb +13 -0
- data/spec/api/feature_flags_api_spec.rb +1 -1
- data/spec/api/metrics_api_spec.rb +2 -2
- data/spec/api/scheduled_changes_api_spec.rb +1 -1
- data/spec/api/segments_api_spec.rb +1 -1
- data/spec/models/ai_config_spec.rb +6 -0
- data/spec/models/destination_post_spec.rb +1 -1
- data/spec/models/destination_spec.rb +1 -1
- data/spec/models/generate_trust_policy_post_rep_spec.rb +36 -0
- data/spec/models/iteration_rep_spec.rb +4 -0
- data/spec/models/metric_group_rep_spec.rb +0 -12
- data/spec/models/metrics_spec.rb +18 -0
- data/spec/models/naming_convention_spec.rb +1 -1
- data/spec/models/trust_policy_details_spec.rb +42 -0
- data/spec/models/trust_policy_statement_spec.rb +54 -0
- metadata +14 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ad93d6895baf203aae44ab7fdac20097c1414688f896a63bd11a433af4ef13c9
|
|
4
|
+
data.tar.gz: baf83e9e847b9058059d685f63a7032b1e8b9e25702e92ba8b562f9a04df3ca4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f95a953790d14f0a9bdbc8cfef428f30e827946f2213e129fdb7ace95595f32f5ad9cc02b32f24b9ea1704f96730594c3297f6125461b4f1c7861e925c66e69b
|
|
7
|
+
data.tar.gz: 96f51a5b63fac69eac67397d6965193573c89158c53c23083871c3e3d7111a907ffdec399a5b1a86cf3f2bbea276bbdb6751b9e2302f6a619e4d8dd76547594b
|
data/README.md
CHANGED
|
@@ -450,7 +450,7 @@ To learn more about how EOL is determined, read LaunchDarkly's [End of Life (EOL
|
|
|
450
450
|
This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
|
451
451
|
|
|
452
452
|
- API version: 2.0
|
|
453
|
-
- Package version:
|
|
453
|
+
- Package version: 19.0.0
|
|
454
454
|
- Generator version: 7.16.0
|
|
455
455
|
- Build package: org.openapitools.codegen.languages.RubyClientCodegen
|
|
456
456
|
For more information, please visit [https://support.launchdarkly.com](https://support.launchdarkly.com)
|
|
@@ -468,16 +468,16 @@ gem build launchdarkly_api.gemspec
|
|
|
468
468
|
Then either install the gem locally:
|
|
469
469
|
|
|
470
470
|
```shell
|
|
471
|
-
gem install ./launchdarkly_api-
|
|
471
|
+
gem install ./launchdarkly_api-19.0.0.gem
|
|
472
472
|
```
|
|
473
473
|
|
|
474
|
-
(for development, run `gem install --dev ./launchdarkly_api-
|
|
474
|
+
(for development, run `gem install --dev ./launchdarkly_api-19.0.0.gem` to install the development dependencies)
|
|
475
475
|
|
|
476
476
|
or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
|
|
477
477
|
|
|
478
478
|
Finally add this to the Gemfile:
|
|
479
479
|
|
|
480
|
-
gem 'launchdarkly_api', '~>
|
|
480
|
+
gem 'launchdarkly_api', '~> 19.0.0'
|
|
481
481
|
|
|
482
482
|
### Install from Git
|
|
483
483
|
|
|
@@ -651,6 +651,7 @@ Class | Method | HTTP request | Description
|
|
|
651
651
|
*LaunchDarklyApi::DataExportDestinationsApi* | [**get_destinations**](docs/DataExportDestinationsApi.md#get_destinations) | **GET** /api/v2/destinations | List destinations
|
|
652
652
|
*LaunchDarklyApi::DataExportDestinationsApi* | [**patch_destination**](docs/DataExportDestinationsApi.md#patch_destination) | **PATCH** /api/v2/destinations/{projectKey}/{environmentKey}/{id} | Update Data Export destination
|
|
653
653
|
*LaunchDarklyApi::DataExportDestinationsApi* | [**post_destination**](docs/DataExportDestinationsApi.md#post_destination) | **POST** /api/v2/destinations/{projectKey}/{environmentKey} | Create Data Export destination
|
|
654
|
+
*LaunchDarklyApi::DataExportDestinationsApi* | [**post_generate_trust_policy**](docs/DataExportDestinationsApi.md#post_generate_trust_policy) | **POST** /api/v2/destinations/projects/{projKey}/environments/{envKey}/generate-trust-policy | Generate trust policy
|
|
654
655
|
*LaunchDarklyApi::DataExportDestinationsApi* | [**post_generate_warehouse_destination_key_pair**](docs/DataExportDestinationsApi.md#post_generate_warehouse_destination_key_pair) | **POST** /api/v2/destinations/generate-warehouse-destination-key-pair | Generate Snowflake destination key pair
|
|
655
656
|
*LaunchDarklyApi::EnvironmentsApi* | [**delete_environment**](docs/EnvironmentsApi.md#delete_environment) | **DELETE** /api/v2/projects/{projectKey}/environments/{environmentKey} | Delete environment
|
|
656
657
|
*LaunchDarklyApi::EnvironmentsApi* | [**get_environment**](docs/EnvironmentsApi.md#get_environment) | **GET** /api/v2/projects/{projectKey}/environments/{environmentKey} | Get environment
|
|
@@ -1143,6 +1144,7 @@ Class | Method | HTTP request | Description
|
|
|
1143
1144
|
- [LaunchDarklyApi::FollowersPerFlag](docs/FollowersPerFlag.md)
|
|
1144
1145
|
- [LaunchDarklyApi::ForbiddenErrorRep](docs/ForbiddenErrorRep.md)
|
|
1145
1146
|
- [LaunchDarklyApi::FormVariable](docs/FormVariable.md)
|
|
1147
|
+
- [LaunchDarklyApi::GenerateTrustPolicyPostRep](docs/GenerateTrustPolicyPostRep.md)
|
|
1146
1148
|
- [LaunchDarklyApi::GenerateWarehouseDestinationKeyPairPostRep](docs/GenerateWarehouseDestinationKeyPairPostRep.md)
|
|
1147
1149
|
- [LaunchDarklyApi::GetAnnouncementsPublic200Response](docs/GetAnnouncementsPublic200Response.md)
|
|
1148
1150
|
- [LaunchDarklyApi::GuardedReleaseConfig](docs/GuardedReleaseConfig.md)
|
|
@@ -1392,6 +1394,8 @@ Class | Method | HTTP request | Description
|
|
|
1392
1394
|
- [LaunchDarklyApi::TriggerPost](docs/TriggerPost.md)
|
|
1393
1395
|
- [LaunchDarklyApi::TriggerWorkflowCollectionRep](docs/TriggerWorkflowCollectionRep.md)
|
|
1394
1396
|
- [LaunchDarklyApi::TriggerWorkflowRep](docs/TriggerWorkflowRep.md)
|
|
1397
|
+
- [LaunchDarklyApi::TrustPolicyDetails](docs/TrustPolicyDetails.md)
|
|
1398
|
+
- [LaunchDarklyApi::TrustPolicyStatement](docs/TrustPolicyStatement.md)
|
|
1395
1399
|
- [LaunchDarklyApi::UnauthorizedErrorRep](docs/UnauthorizedErrorRep.md)
|
|
1396
1400
|
- [LaunchDarklyApi::UnlinkResourceSuccessResponse](docs/UnlinkResourceSuccessResponse.md)
|
|
1397
1401
|
- [LaunchDarklyApi::UpdatePhaseStatusInput](docs/UpdatePhaseStatusInput.md)
|
data/docs/AIConfig.md
CHANGED
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
| **variations** | [**Array<AIConfigVariation>**](AIConfigVariation.md) | | |
|
|
17
17
|
| **created_at** | **Integer** | | |
|
|
18
18
|
| **updated_at** | **Integer** | | |
|
|
19
|
+
| **evaluation_metric_keys** | **Array<String>** | List of evaluation metric keys for this AI config | [optional] |
|
|
19
20
|
|
|
20
21
|
## Example
|
|
21
22
|
|
|
@@ -34,7 +35,8 @@ instance = LaunchDarklyApi::AIConfig.new(
|
|
|
34
35
|
version: null,
|
|
35
36
|
variations: null,
|
|
36
37
|
created_at: null,
|
|
37
|
-
updated_at: null
|
|
38
|
+
updated_at: null,
|
|
39
|
+
evaluation_metric_keys: null
|
|
38
40
|
)
|
|
39
41
|
```
|
|
40
42
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
| Name | Type | Description | Notes |
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **key** | **String** | |
|
|
7
|
+
| **key** | **String** | | |
|
|
8
8
|
| **environment_key** | **String** | | [optional] |
|
|
9
9
|
| **_name** | **String** | | [optional] |
|
|
10
10
|
| **_integration_key** | **String** | | [optional] |
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
| **analysis_type** | **String** | The method for analyzing metric events | [optional] |
|
|
37
37
|
| **percentile_value** | **Integer** | The percentile for the analysis method. An integer denoting the target percentile between 0 and 100. Required when <code>analysisType</code> is <code>percentile</code>. | [optional] |
|
|
38
38
|
| **event_default** | [**AiConfigsMetricEventDefaultRep**](AiConfigsMetricEventDefaultRep.md) | | [optional] |
|
|
39
|
-
| **data_source** | [**AiConfigsMetricDataSourceRefRep**](AiConfigsMetricDataSourceRefRep.md) | |
|
|
39
|
+
| **data_source** | [**AiConfigsMetricDataSourceRefRep**](AiConfigsMetricDataSourceRefRep.md) | | |
|
|
40
40
|
| **archived** | **Boolean** | Whether the metric version is archived | [optional] |
|
|
41
41
|
| **archived_at** | **Integer** | | [optional] |
|
|
42
42
|
| **selector** | **String** | For click metrics, the CSS selectors | [optional] |
|
|
@@ -9,6 +9,7 @@ All URIs are relative to *https://app.launchdarkly.com*
|
|
|
9
9
|
| [**get_destinations**](DataExportDestinationsApi.md#get_destinations) | **GET** /api/v2/destinations | List destinations |
|
|
10
10
|
| [**patch_destination**](DataExportDestinationsApi.md#patch_destination) | **PATCH** /api/v2/destinations/{projectKey}/{environmentKey}/{id} | Update Data Export destination |
|
|
11
11
|
| [**post_destination**](DataExportDestinationsApi.md#post_destination) | **POST** /api/v2/destinations/{projectKey}/{environmentKey} | Create Data Export destination |
|
|
12
|
+
| [**post_generate_trust_policy**](DataExportDestinationsApi.md#post_generate_trust_policy) | **POST** /api/v2/destinations/projects/{projKey}/environments/{envKey}/generate-trust-policy | Generate trust policy |
|
|
12
13
|
| [**post_generate_warehouse_destination_key_pair**](DataExportDestinationsApi.md#post_generate_warehouse_destination_key_pair) | **POST** /api/v2/destinations/generate-warehouse-destination-key-pair | Generate Snowflake destination key pair |
|
|
13
14
|
|
|
14
15
|
|
|
@@ -381,6 +382,79 @@ end
|
|
|
381
382
|
- **Accept**: application/json
|
|
382
383
|
|
|
383
384
|
|
|
385
|
+
## post_generate_trust_policy
|
|
386
|
+
|
|
387
|
+
> <GenerateTrustPolicyPostRep> post_generate_trust_policy(proj_key, env_key)
|
|
388
|
+
|
|
389
|
+
Generate trust policy
|
|
390
|
+
|
|
391
|
+
Trust policy to allow Data Export to assume the role and perform operations on AWS resources
|
|
392
|
+
|
|
393
|
+
### Examples
|
|
394
|
+
|
|
395
|
+
```ruby
|
|
396
|
+
require 'time'
|
|
397
|
+
require 'launchdarkly_api'
|
|
398
|
+
# setup authorization
|
|
399
|
+
LaunchDarklyApi.configure do |config|
|
|
400
|
+
# Configure API key authorization: ApiKey
|
|
401
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
|
402
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
403
|
+
# config.api_key_prefix['Authorization'] = 'Bearer'
|
|
404
|
+
end
|
|
405
|
+
|
|
406
|
+
api_instance = LaunchDarklyApi::DataExportDestinationsApi.new
|
|
407
|
+
proj_key = 'proj_key_example' # String | The project key
|
|
408
|
+
env_key = 'env_key_example' # String | The environment key
|
|
409
|
+
|
|
410
|
+
begin
|
|
411
|
+
# Generate trust policy
|
|
412
|
+
result = api_instance.post_generate_trust_policy(proj_key, env_key)
|
|
413
|
+
p result
|
|
414
|
+
rescue LaunchDarklyApi::ApiError => e
|
|
415
|
+
puts "Error when calling DataExportDestinationsApi->post_generate_trust_policy: #{e}"
|
|
416
|
+
end
|
|
417
|
+
```
|
|
418
|
+
|
|
419
|
+
#### Using the post_generate_trust_policy_with_http_info variant
|
|
420
|
+
|
|
421
|
+
This returns an Array which contains the response data, status code and headers.
|
|
422
|
+
|
|
423
|
+
> <Array(<GenerateTrustPolicyPostRep>, Integer, Hash)> post_generate_trust_policy_with_http_info(proj_key, env_key)
|
|
424
|
+
|
|
425
|
+
```ruby
|
|
426
|
+
begin
|
|
427
|
+
# Generate trust policy
|
|
428
|
+
data, status_code, headers = api_instance.post_generate_trust_policy_with_http_info(proj_key, env_key)
|
|
429
|
+
p status_code # => 2xx
|
|
430
|
+
p headers # => { ... }
|
|
431
|
+
p data # => <GenerateTrustPolicyPostRep>
|
|
432
|
+
rescue LaunchDarklyApi::ApiError => e
|
|
433
|
+
puts "Error when calling DataExportDestinationsApi->post_generate_trust_policy_with_http_info: #{e}"
|
|
434
|
+
end
|
|
435
|
+
```
|
|
436
|
+
|
|
437
|
+
### Parameters
|
|
438
|
+
|
|
439
|
+
| Name | Type | Description | Notes |
|
|
440
|
+
| ---- | ---- | ----------- | ----- |
|
|
441
|
+
| **proj_key** | **String** | The project key | |
|
|
442
|
+
| **env_key** | **String** | The environment key | |
|
|
443
|
+
|
|
444
|
+
### Return type
|
|
445
|
+
|
|
446
|
+
[**GenerateTrustPolicyPostRep**](GenerateTrustPolicyPostRep.md)
|
|
447
|
+
|
|
448
|
+
### Authorization
|
|
449
|
+
|
|
450
|
+
[ApiKey](../README.md#ApiKey)
|
|
451
|
+
|
|
452
|
+
### HTTP request headers
|
|
453
|
+
|
|
454
|
+
- **Content-Type**: Not defined
|
|
455
|
+
- **Accept**: application/json
|
|
456
|
+
|
|
457
|
+
|
|
384
458
|
## post_generate_warehouse_destination_key_pair
|
|
385
459
|
|
|
386
460
|
> <GenerateWarehouseDestinationKeyPairPostRep> post_generate_warehouse_destination_key_pair
|
data/docs/FeatureFlagsApi.md
CHANGED
|
@@ -650,7 +650,7 @@ opts = {
|
|
|
650
650
|
limit: 789, # Integer | The number of feature flags to return. Defaults to 20.
|
|
651
651
|
offset: 789, # Integer | Where to start in the list. Use this with pagination. For example, an offset of 10 skips the first ten items and then returns the next items in the list, up to the query `limit`.
|
|
652
652
|
archived: true, # Boolean | Deprecated, use `filter=archived:true` instead. A boolean to filter the list to archived flags. When this is absent, only unarchived flags will be returned
|
|
653
|
-
summary: true, # Boolean | By default, flags do _not_ include their lists of prerequisites, targets, or rules for each environment. Set `summary=0` to include these fields for each flag returned.
|
|
653
|
+
summary: true, # Boolean | By default, flags do _not_ include their lists of prerequisites, targets, or rules for each environment. Set `summary=0` and include the `env` query parameter to include these fields for each flag returned.
|
|
654
654
|
filter: 'filter_example', # String | A comma-separated list of filters. Each filter is of the form field:value. Read the endpoint description for a full list of available filter fields.
|
|
655
655
|
sort: 'sort_example', # String | A comma-separated list of fields to sort by. Fields prefixed by a dash ( - ) sort in descending order. Read the endpoint description for a full list of available sort fields.
|
|
656
656
|
compare: true, # Boolean | Deprecated, unavailable in API version `20240415`. A boolean to filter results by only flags that have differences between environments.
|
|
@@ -694,7 +694,7 @@ end
|
|
|
694
694
|
| **limit** | **Integer** | The number of feature flags to return. Defaults to 20. | [optional] |
|
|
695
695
|
| **offset** | **Integer** | Where to start in the list. Use this with pagination. For example, an offset of 10 skips the first ten items and then returns the next items in the list, up to the query `limit`. | [optional] |
|
|
696
696
|
| **archived** | **Boolean** | Deprecated, use `filter=archived:true` instead. A boolean to filter the list to archived flags. When this is absent, only unarchived flags will be returned | [optional] |
|
|
697
|
-
| **summary** | **Boolean** | By default, flags do _not_ include their lists of prerequisites, targets, or rules for each environment. Set `summary=0` to include these fields for each flag returned. | [optional] |
|
|
697
|
+
| **summary** | **Boolean** | By default, flags do _not_ include their lists of prerequisites, targets, or rules for each environment. Set `summary=0` and include the `env` query parameter to include these fields for each flag returned. | [optional] |
|
|
698
698
|
| **filter** | **String** | A comma-separated list of filters. Each filter is of the form field:value. Read the endpoint description for a full list of available filter fields. | [optional] |
|
|
699
699
|
| **sort** | **String** | A comma-separated list of fields to sort by. Fields prefixed by a dash ( - ) sort in descending order. Read the endpoint description for a full list of available sort fields. | [optional] |
|
|
700
700
|
| **compare** | **Boolean** | Deprecated, unavailable in API version `20240415`. A boolean to filter results by only flags that have differences between environments. | [optional] |
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# LaunchDarklyApi::GenerateTrustPolicyPostRep
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **aws_trust_policy** | [**TrustPolicyDetails**](TrustPolicyDetails.md) | | [optional] |
|
|
8
|
+
|
|
9
|
+
## Example
|
|
10
|
+
|
|
11
|
+
```ruby
|
|
12
|
+
require 'launchdarkly_api'
|
|
13
|
+
|
|
14
|
+
instance = LaunchDarklyApi::GenerateTrustPolicyPostRep.new(
|
|
15
|
+
aws_trust_policy: null
|
|
16
|
+
)
|
|
17
|
+
```
|
|
18
|
+
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
| Name | Type | Description | Notes |
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **key** | **String** | |
|
|
7
|
+
| **key** | **String** | | |
|
|
8
8
|
| **environment_key** | **String** | | [optional] |
|
|
9
9
|
| **_name** | **String** | | [optional] |
|
|
10
10
|
| **_integration_key** | **String** | | [optional] |
|
data/docs/MetricGroupRep.md
CHANGED
|
@@ -21,8 +21,6 @@
|
|
|
21
21
|
| **experiment_count** | **Integer** | The number of experiments using this metric group | [optional] |
|
|
22
22
|
| **active_experiment_count** | **Integer** | The number of active experiments using this metric group | [optional] |
|
|
23
23
|
| **active_guarded_rollout_count** | **Integer** | The number of active guarded rollouts using this metric group | [optional] |
|
|
24
|
-
| **total_connections_count** | **Integer** | The total number of connections using this metric group | [optional] |
|
|
25
|
-
| **total_active_connections_count** | **Integer** | The total number of active connections using this metric group | [optional] |
|
|
26
24
|
|
|
27
25
|
## Example
|
|
28
26
|
|
|
@@ -46,9 +44,7 @@ instance = LaunchDarklyApi::MetricGroupRep.new(
|
|
|
46
44
|
experiments: null,
|
|
47
45
|
experiment_count: 0,
|
|
48
46
|
active_experiment_count: 0,
|
|
49
|
-
active_guarded_rollout_count: 0
|
|
50
|
-
total_connections_count: 0,
|
|
51
|
-
total_active_connections_count: 0
|
|
47
|
+
active_guarded_rollout_count: 0
|
|
52
48
|
)
|
|
53
49
|
```
|
|
54
50
|
|
data/docs/MetricListingRep.md
CHANGED
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
| **analysis_type** | **String** | The method for analyzing metric events | [optional] |
|
|
36
36
|
| **percentile_value** | **Integer** | The percentile for the analysis method. An integer denoting the target percentile between 0 and 100. Required when <code>analysisType</code> is <code>percentile</code>. | [optional] |
|
|
37
37
|
| **event_default** | [**MetricEventDefaultRep**](MetricEventDefaultRep.md) | | [optional] |
|
|
38
|
-
| **data_source** | [**MetricDataSourceRefRep**](MetricDataSourceRefRep.md) | |
|
|
38
|
+
| **data_source** | [**MetricDataSourceRefRep**](MetricDataSourceRefRep.md) | | |
|
|
39
39
|
| **archived** | **Boolean** | Whether the metric version is archived | [optional] |
|
|
40
40
|
| **archived_at** | **Integer** | | [optional] |
|
|
41
41
|
| **selector** | **String** | For click metrics, the CSS selectors | [optional] |
|
data/docs/MetricRep.md
CHANGED
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
| **analysis_type** | **String** | The method for analyzing metric events | [optional] |
|
|
36
36
|
| **percentile_value** | **Integer** | The percentile for the analysis method. An integer denoting the target percentile between 0 and 100. Required when <code>analysisType</code> is <code>percentile</code>. | [optional] |
|
|
37
37
|
| **event_default** | [**MetricEventDefaultRep**](MetricEventDefaultRep.md) | | [optional] |
|
|
38
|
-
| **data_source** | [**MetricDataSourceRefRep**](MetricDataSourceRefRep.md) | |
|
|
38
|
+
| **data_source** | [**MetricDataSourceRefRep**](MetricDataSourceRefRep.md) | | |
|
|
39
39
|
| **archived** | **Boolean** | Whether the metric version is archived | [optional] |
|
|
40
40
|
| **archived_at** | **Integer** | | [optional] |
|
|
41
41
|
| **selector** | **String** | For click metrics, the CSS selectors | [optional] |
|
data/docs/Metrics.md
CHANGED
|
@@ -17,6 +17,9 @@
|
|
|
17
17
|
| **satisfaction_rating** | **Float** | A value between 0 and 1 representing satisfaction rating | [optional] |
|
|
18
18
|
| **input_cost** | **Float** | Cost of input tokens in USD | [optional] |
|
|
19
19
|
| **output_cost** | **Float** | Cost of output tokens in USD | [optional] |
|
|
20
|
+
| **judge_accuracy** | **Float** | Average accuracy judge score (0.0-1.0) | [optional] |
|
|
21
|
+
| **judge_relevance** | **Float** | Average relevance judge score (0.0-1.0) | [optional] |
|
|
22
|
+
| **judge_toxicity** | **Float** | Average toxicity judge score (0.0-1.0) | [optional] |
|
|
20
23
|
|
|
21
24
|
## Example
|
|
22
25
|
|
|
@@ -36,7 +39,10 @@ instance = LaunchDarklyApi::Metrics.new(
|
|
|
36
39
|
time_to_first_token_ms: null,
|
|
37
40
|
satisfaction_rating: null,
|
|
38
41
|
input_cost: null,
|
|
39
|
-
output_cost: null
|
|
42
|
+
output_cost: null,
|
|
43
|
+
judge_accuracy: null,
|
|
44
|
+
judge_relevance: null,
|
|
45
|
+
judge_toxicity: null
|
|
40
46
|
)
|
|
41
47
|
```
|
|
42
48
|
|
data/docs/MetricsApi.md
CHANGED
|
@@ -168,7 +168,7 @@ end
|
|
|
168
168
|
|
|
169
169
|
List metrics
|
|
170
170
|
|
|
171
|
-
Get a list of all metrics for the specified project. ### Filtering metrics The `filter` parameter supports the following operators: `contains`, `equals`, `anyOf`. #### Supported fields and operators You can only filter certain fields in metrics when using the `filter` parameter. Additionally, you can only filter some fields with certain operators. When you search for metrics, the `filter` parameter supports the following fields and operators: |<div style=\"width:120px\">Field</div> |Description |Supported operators | |---|---|---| | `eventKind` | The metric event kind. One of `custom`, `pageview`, `click`. | `equals` | | `hasConnections` | Whether the metric has connections to experiments or guarded rollouts. One of `true`, `false`. | `equals` | | `isNumeric` | Whether the metric is numeric. One of `true`, `false`. | `equals` | | `maintainerIds` | A comma-separated list of metric maintainer IDs. | `anyOf` | | `maintainerTeamKey` | The metric maintainer team key. | `equals` | | `query` | A \"fuzzy\" search across metric key and name. Supply a string or list of strings to the operator. | `equals` | | `tags` | The metric tags. | `contains` | | `unitAggregationType` | The metric's unit aggregation type. One of `sum`, `average`. | `equals` | For example, the filter `?filter=tags contains [\"tag1\", \"tag2\", \"tag3\"]` matches metrics that have all three tags. The documented values for `filter` query parameters are prior to URL encoding. For example, the `[` in `?filter=tags contains [\"tag1\", \"tag2\", \"tag3\"]` must be encoded to `%5B`. ### Expanding the metric list response LaunchDarkly supports expanding the \"List metrics\" response. By default, the expandable field is **not** included in the response. To expand the response, append the `expand` query parameter and add the following supported field: - `experimentCount` includes the number of experiments from the specific project that use the metric For example, `expand=experimentCount` includes the `experimentCount` field for each metric in the response.
|
|
171
|
+
Get a list of all metrics for the specified project. ### Filtering metrics The `filter` parameter supports the following operators: `contains`, `equals`, `anyOf`. #### Supported fields and operators You can only filter certain fields in metrics when using the `filter` parameter. Additionally, you can only filter some fields with certain operators. When you search for metrics, the `filter` parameter supports the following fields and operators: |<div style=\"width:120px\">Field</div> |Description |Supported operators | |---|---|---| | `eventKind` | The metric event kind. One of `custom`, `pageview`, `click`. | `equals` | | `hasConnections` | Whether the metric has connections to experiments or guarded rollouts. One of `true`, `false`. | `equals` | | `isNumeric` | Whether the metric is numeric. One of `true`, `false`. | `equals` | | `maintainerIds` | A comma-separated list of metric maintainer IDs. | `anyOf` | | `maintainerTeamKey` | The metric maintainer team key. | `equals` | | `metricUsedIn` | Filter by where the metric is used. One of `experiments`, `guarded_rollouts`, `any`, `none`. | `equals` | | `query` | A \"fuzzy\" search across metric key and name. Supply a string or list of strings to the operator. | `equals` | | `tags` | The metric tags. | `contains` | | `unitAggregationType` | The metric's unit aggregation type. One of `sum`, `average`. | `equals` | For example, the filter `?filter=tags contains [\"tag1\", \"tag2\", \"tag3\"]` matches metrics that have all three tags. The documented values for `filter` query parameters are prior to URL encoding. For example, the `[` in `?filter=tags contains [\"tag1\", \"tag2\", \"tag3\"]` must be encoded to `%5B`. ### Expanding the metric list response LaunchDarkly supports expanding the \"List metrics\" response. By default, the expandable field is **not** included in the response. To expand the response, append the `expand` query parameter and add the following supported field: - `experimentCount` includes the number of experiments from the specific project that use the metric For example, `expand=experimentCount` includes the `experimentCount` field for each metric in the response.
|
|
172
172
|
|
|
173
173
|
### Examples
|
|
174
174
|
|
|
@@ -190,7 +190,7 @@ opts = {
|
|
|
190
190
|
limit: 789, # Integer | The number of metrics to return in the response. Defaults to 20. Maximum limit is 50.
|
|
191
191
|
offset: 789, # Integer | Where to start in the list. Use this with pagination. For example, an offset of 10 skips the first ten items and returns the next `limit` items.
|
|
192
192
|
sort: 'sort_example', # String | A field to sort the items by. Prefix field by a dash ( - ) to sort in descending order. This endpoint supports sorting by `createdAt` or `name`.
|
|
193
|
-
filter: 'filter_example' # String | A comma-separated list of filters. This endpoint accepts filtering by `query`, `tags`, 'eventKind', 'isNumeric', 'unitAggregationType`, `hasConnections`, `maintainerIds`, `maintainerTeamKey`, `view`, and `
|
|
193
|
+
filter: 'filter_example' # String | A comma-separated list of filters. This endpoint accepts filtering by `query`, `tags`, 'eventKind', 'isNumeric', 'unitAggregationType`, `hasConnections`, `maintainerIds`, `maintainerTeamKey`, `view`, `dataSourceKeys`, and `metricUsedIn`. To learn more about the filter syntax, read the 'Filtering metrics' section above.
|
|
194
194
|
}
|
|
195
195
|
|
|
196
196
|
begin
|
|
@@ -229,7 +229,7 @@ end
|
|
|
229
229
|
| **limit** | **Integer** | The number of metrics to return in the response. Defaults to 20. Maximum limit is 50. | [optional] |
|
|
230
230
|
| **offset** | **Integer** | Where to start in the list. Use this with pagination. For example, an offset of 10 skips the first ten items and returns the next `limit` items. | [optional] |
|
|
231
231
|
| **sort** | **String** | A field to sort the items by. Prefix field by a dash ( - ) to sort in descending order. This endpoint supports sorting by `createdAt` or `name`. | [optional] |
|
|
232
|
-
| **filter** | **String** | A comma-separated list of filters. This endpoint accepts filtering by `query`, `tags`, 'eventKind', 'isNumeric', 'unitAggregationType`, `hasConnections`, `maintainerIds`, `maintainerTeamKey`, `view`, and `
|
|
232
|
+
| **filter** | **String** | A comma-separated list of filters. This endpoint accepts filtering by `query`, `tags`, 'eventKind', 'isNumeric', 'unitAggregationType`, `hasConnections`, `maintainerIds`, `maintainerTeamKey`, `view`, `dataSourceKeys`, and `metricUsedIn`. To learn more about the filter syntax, read the 'Filtering metrics' section above. | [optional] |
|
|
233
233
|
|
|
234
234
|
### Return type
|
|
235
235
|
|
|
@@ -20,7 +20,7 @@ instance = LaunchDarklyApi::PostReleasePolicyRequest.new(
|
|
|
20
20
|
scope: null,
|
|
21
21
|
release_method: null,
|
|
22
22
|
guarded_release_config: null,
|
|
23
|
-
progressive_release_config: {"rolloutContextKindKey":"user"},
|
|
23
|
+
progressive_release_config: {"rolloutContextKindKey":"user","stages":[{"allocation":25000,"durationMillis":60000},{"allocation":25000,"durationMillis":60000}]},
|
|
24
24
|
name: Production Release,
|
|
25
25
|
key: production-release
|
|
26
26
|
)
|
|
@@ -19,7 +19,7 @@ instance = LaunchDarklyApi::PutReleasePolicyRequest.new(
|
|
|
19
19
|
scope: null,
|
|
20
20
|
release_method: null,
|
|
21
21
|
guarded_release_config: null,
|
|
22
|
-
progressive_release_config: {"rolloutContextKindKey":"user"},
|
|
22
|
+
progressive_release_config: {"rolloutContextKindKey":"user","stages":[{"allocation":25000,"durationMillis":60000},{"allocation":25000,"durationMillis":60000}]},
|
|
23
23
|
name: Production Release
|
|
24
24
|
)
|
|
25
25
|
```
|
data/docs/RelayAutoConfigRep.md
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
| **_access** | [**Access**](Access.md) | | [optional] |
|
|
10
10
|
| **name** | **String** | A human-friendly name for the Relay Proxy configuration | |
|
|
11
11
|
| **policy** | [**Array<Statement>**](Statement.md) | A description of what environments and projects the Relay Proxy should include or exclude | |
|
|
12
|
-
| **full_key** | **String** | The Relay Proxy configuration key |
|
|
12
|
+
| **full_key** | **String** | The Relay Proxy configuration key | [optional] |
|
|
13
13
|
| **display_key** | **String** | The last few characters of the Relay Proxy configuration key, displayed in the LaunchDarkly UI | |
|
|
14
14
|
| **creation_date** | **Integer** | | |
|
|
15
15
|
| **last_modified** | **Integer** | | |
|
data/docs/ReleasePolicy.md
CHANGED
|
@@ -26,7 +26,7 @@ instance = LaunchDarklyApi::ReleasePolicy.new(
|
|
|
26
26
|
rank: 1,
|
|
27
27
|
release_method: null,
|
|
28
28
|
guarded_release_config: null,
|
|
29
|
-
progressive_release_config: {"rolloutContextKindKey":"user"},
|
|
29
|
+
progressive_release_config: {"rolloutContextKindKey":"user","stages":[{"allocation":25000,"durationMillis":60000},{"allocation":25000,"durationMillis":60000}]},
|
|
30
30
|
name: Production Release,
|
|
31
31
|
key: production-release
|
|
32
32
|
)
|
data/docs/ScheduledChangesApi.md
CHANGED
|
@@ -328,7 +328,7 @@ end
|
|
|
328
328
|
|
|
329
329
|
Create scheduled changes workflow
|
|
330
330
|
|
|
331
|
-
Create scheduled changes for a feature flag. The changes you schedule may include any semantic patch instructions available when [updating a feature flag](https://launchdarkly.com/docs/api/feature-flags/patch-feature-flag#using-semantic-patches-on-a-feature-flag). If the `
|
|
331
|
+
Create scheduled changes for a feature flag. The changes you schedule may include any semantic patch instructions available when [updating a feature flag](https://launchdarkly.com/docs/api/feature-flags/patch-feature-flag#using-semantic-patches-on-a-feature-flag). If the `ignoreConflicts` query parameter is false and there are conflicts between these instructions and existing scheduled changes, the request will fail. If the parameter is true and there are conflicts, the request will succeed.
|
|
332
332
|
|
|
333
333
|
### Examples
|
|
334
334
|
|
data/docs/SegmentsApi.md
CHANGED
|
@@ -1105,7 +1105,7 @@ end
|
|
|
1105
1105
|
|
|
1106
1106
|
Patch segment
|
|
1107
1107
|
|
|
1108
|
-
Update a segment. The request body must be a valid semantic patch, JSON patch, or JSON merge patch. To learn more the different formats, read [Updates](https://launchdarkly.com/docs/api#updates). ### Using semantic patches on a segment To make a semantic patch request, you must append `domain-model=launchdarkly.semanticpatch` to your `Content-Type` header. To learn more, read [Updates using semantic patch](https://launchdarkly.com/docs/api#updates-using-semantic-patch). The body of a semantic patch request for updating segments requires an `environmentKey` in addition to `instructions` and an optional `comment`. The body of the request takes the following properties: * `comment` (string): (Optional) A description of the update. * `environmentKey` (string): (Required) The key of the LaunchDarkly environment. * `instructions` (array): (Required) A list of actions the update should perform. Each action in the list must be an object with a `kind` property that indicates the instruction. If the action requires parameters, you must include those parameters as additional fields in the object. ### Instructions Semantic patch requests support the following `kind` instructions for updating segments. <details> <summary>Click to expand instructions for <strong>updating segment details and settings</strong></summary> #### addTags Adds tags to the segment. ##### Parameters - `values`: A list of tags to add. Here's an example: ```json { \"instructions\": [{ \"kind\": \"addTags\", \"values\": [\"tag1\", \"tag2\"] }] } ``` #### removeTags Removes tags from the segment. ##### Parameters - `values`: A list of tags to remove. Here's an example: ```json { \"instructions\": [{ \"kind\": \"removeTags\", \"values\": [\"tag1\", \"tag2\"] }] } ``` #### updateName Updates the name of the segment. ##### Parameters - `value`: Name of the segment. Here's an example: ```json { \"instructions\": [{ \"kind\": \"updateName\", \"value\": \"Updated segment name\" }] } ``` </details> <details> <summary>Click to expand instructions for <strong>updating segment individual targets</strong></summary> #### addExcludedTargets Adds context keys to the individual context targets excluded from the segment for the specified `contextKind`. Returns an error if this causes the same context key to be both included and excluded. ##### Parameters - `contextKind`: The context kind the targets should be added to. - `values`: List of keys. Here's an example: ```json { \"instructions\": [{ \"kind\": \"addExcludedTargets\", \"contextKind\": \"org\", \"values\": [ \"org-key-123abc\", \"org-key-456def\" ] }] } ``` #### addExcludedUsers Adds user keys to the individual user targets excluded from the segment. Returns an error if this causes the same user key to be both included and excluded. If you are working with contexts, use `addExcludedTargets` instead of this instruction. ##### Parameters - `values`: List of user keys. Here's an example: ```json { \"instructions\": [{ \"kind\": \"addExcludedUsers\", \"values\": [ \"user-key-123abc\", \"user-key-456def\" ] }] } ``` #### addIncludedTargets Adds context keys to the individual context targets included in the segment for the specified `contextKind`. Returns an error if this causes the same context key to be both included and excluded. ##### Parameters - `contextKind`: The context kind the targets should be added to. - `values`: List of keys. Here's an example: ```json { \"instructions\": [{ \"kind\": \"addIncludedTargets\", \"contextKind\": \"org\", \"values\": [ \"org-key-123abc\", \"org-key-456def\" ] }] } ``` #### addIncludedUsers Adds user keys to the individual user targets included in the segment. Returns an error if this causes the same user key to be both included and excluded. If you are working with contexts, use `addIncludedTargets` instead of this instruction. ##### Parameters - `values`: List of user keys. Here's an example: ```json { \"instructions\": [{ \"kind\": \"addIncludedUsers\", \"values\": [ \"user-key-123abc\", \"user-key-456def\" ] }] } ``` #### removeExcludedTargets Removes context keys from the individual context targets excluded from the segment for the specified `contextKind`. ##### Parameters - `contextKind`: The context kind the targets should be removed from. - `values`: List of keys. Here's an example: ```json { \"instructions\": [{ \"kind\": \"removeExcludedTargets\", \"contextKind\": \"org\", \"values\": [ \"org-key-123abc\", \"org-key-456def\" ] }] } ``` #### removeExcludedUsers Removes user keys from the individual user targets excluded from the segment. If you are working with contexts, use `removeExcludedTargets` instead of this instruction. ##### Parameters - `values`: List of user keys. Here's an example: ```json { \"instructions\": [{ \"kind\": \"removeExcludedUsers\", \"values\": [ \"user-key-123abc\", \"user-key-456def\" ] }] } ``` #### removeIncludedTargets Removes context keys from the individual context targets included in the segment for the specified `contextKind`. ##### Parameters - `contextKind`: The context kind the targets should be removed from. - `values`: List of keys. Here's an example: ```json { \"instructions\": [{ \"kind\": \"removeIncludedTargets\", \"contextKind\": \"org\", \"values\": [ \"org-key-123abc\", \"org-key-456def\" ] }] } ``` #### removeIncludedUsers Removes user keys from the individual user targets included in the segment. If you are working with contexts, use `removeIncludedTargets` instead of this instruction. ##### Parameters - `values`: List of user keys. Here's an example: ```json { \"instructions\": [{ \"kind\": \"removeIncludedUsers\", \"values\": [ \"user-key-123abc\", \"user-key-456def\" ] }] } ``` </details> <details> <summary>Click to expand instructions for <strong>updating segment targeting rules</strong></summary> #### addClauses Adds the given clauses to the rule indicated by `ruleId`. ##### Parameters - `clauses`: Array of clause objects, with `contextKind` (string), `attribute` (string), `op` (string), `negate` (boolean), and `values` (array of strings, numbers, or dates) properties. The `contextKind`, if not provided, defaults to `user`. The `contextKind`, `attribute`, and `values` are case sensitive. The `op` must be lower-case. - `ruleId`: ID of a rule in the segment. Here's an example: ```json { \"instructions\": [{ \"kind\": \"addClauses\", \"clauses\": [ { \"attribute\": \"email\", \"negate\": false, \"op\": \"contains\", \"values\": [\"value1\"] } ], \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", }] } ``` #### addRule Adds a new targeting rule to the segment. The rule may contain `clauses`. ##### Parameters - `clauses`: Array of clause objects, with `contextKind` (string), `attribute` (string), `op` (string), `negate` (boolean), and `values` (array of strings, numbers, or dates) properties. The `contextKind`, if not provided, defaults to `user`. The `contextKind`, `attribute`, and `values` are case sensitive. The `op` must be lower-case. - `description`: A description of the rule. Here's an example: ```json { \"instructions\": [{ \"kind\": \"addRule\", \"clauses\": [ { \"attribute\": \"email\", \"op\": \"contains\", \"negate\": false, \"values\": [\"@launchdarkly.com\"] } ], \"description\": \"Targeting rule for LaunchDarkly employees\", }] } ``` #### addValuesToClause Adds `values` to the values of the clause that `ruleId` and `clauseId` indicate. Does not update the context kind, attribute, or operator. ##### Parameters - `ruleId`: ID of a rule in the segment. - `clauseId`: ID of a clause in that rule. - `values`: Array of strings, case sensitive. Here's an example: ```json { \"instructions\": [{ \"kind\": \"addValuesToClause\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"clauseId\": \"10a58772-3121-400f-846b-b8a04e8944ed\", \"values\": [\"beta_testers\"] }] } ``` #### removeClauses Removes the clauses specified by `clauseIds` from the rule indicated by `ruleId`. ##### Parameters - `ruleId`: ID of a rule in the segment. - `clauseIds`: Array of IDs of clauses in the rule. Here's an example: ```json { \"instructions\": [{ \"kind\": \"removeClauses\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"clauseIds\": [\"10a58772-3121-400f-846b-b8a04e8944ed\", \"36a461dc-235e-4b08-97b9-73ce9365873e\"] }] } ``` #### removeRule Removes the targeting rule specified by `ruleId`. Does nothing if the rule does not exist. ##### Parameters - `ruleId`: ID of a rule in the segment. Here's an example: ```json { \"instructions\": [{ \"kind\": \"removeRule\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\" }] } ``` #### removeValuesFromClause Removes `values` from the values of the clause indicated by `ruleId` and `clauseId`. Does not update the context kind, attribute, or operator. ##### Parameters - `ruleId`: ID of a rule in the segment. - `clauseId`: ID of a clause in that rule. - `values`: Array of strings, case sensitive. Here's an example: ```json { \"instructions\": [{ \"kind\": \"removeValuesFromClause\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"clauseId\": \"10a58772-3121-400f-846b-b8a04e8944ed\", \"values\": [\"beta_testers\"] }] } ``` #### reorderRules Rearranges the rules to match the order given in `ruleIds`. Returns an error if `ruleIds` does not match the current set of rules in the segment. ##### Parameters - `ruleIds`: Array of IDs of all targeting rules in the segment. Here's an example: ```json { \"instructions\": [{ \"kind\": \"reorderRules\", \"ruleIds\": [\"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"63c238d1-835d-435e-8f21-c8d5e40b2a3d\"] }] } ``` #### updateClause Replaces the clause indicated by `ruleId` and `clauseId` with `clause`. ##### Parameters - `ruleId`: ID of a rule in the segment. - `clauseId`: ID of a clause in that rule. - `clause`: New `clause` object, with `contextKind` (string), `attribute` (string), `op` (string), `negate` (boolean), and `values` (array of strings, numbers, or dates) properties. The `contextKind`, if not provided, defaults to `user`. The `contextKind`, `attribute`, and `values` are case sensitive. The `op` must be lower-case. Here's an example: ```json { \"instructions\": [{ \"kind\": \"updateClause\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"clauseId\": \"10c7462a-2062-45ba-a8bb-dfb3de0f8af5\", \"clause\": { \"contextKind\": \"user\", \"attribute\": \"country\", \"op\": \"in\", \"negate\": false, \"values\": [\"Mexico\", \"Canada\"] } }] } ``` #### updateRuleDescription Updates the description of the segment targeting rule. ##### Parameters - `description`: The new human-readable description for this rule. - `ruleId`: The ID of the rule. You can retrieve this by making a GET request for the segment. Here's an example: ```json { \"instructions\": [{ \"kind\": \"updateRuleDescription\", \"description\": \"New rule description\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\" }] } ``` #### updateRuleRolloutAndContextKind For a rule that includes a percentage of targets, updates the percentage and the context kind of the targets to include. ##### Parameters - `ruleId`: The ID of a targeting rule in the segment that includes a percentage of targets. - `weight`: The weight, in thousandths of a percent (0-100000). - `contextKind`: The context kind. Here's an example: ```json { \"instructions\": [{ \"kind\": \"reorderRules\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"weight\": \"20000\", \"contextKind\": \"device\" }] } ``` </details> <details> <summary>Click to expand instructions for <strong>working with Big Segments</strong></summary> A \"big segment\" is a segment that is either a synced segment, or a list-based segment with more than 15,000 entries that includes only one targeted context kind. LaunchDarkly uses different implementations for different types of segments so that all of your segments have good performance. The following semantic patch instructions apply only to these [larger list-based segments](https://launchdarkly.com/docs/home/flags/segments-create#create-larger-list-based-segments). #### addBigSegmentExcludedTargets For use with [larger list-based segments](https://launchdarkly.com/docs/home/flags/segments-create#create-larger-list-based-segments) ONLY. Adds context keys to the context targets excluded from the segment. Returns an error if this causes the same context key to be both included and excluded. ##### Parameters - `values`: List of context keys. Here's an example: ```json { \"instructions\": [{ \"kind\": \"addBigSegmentExcludedTargets\", \"values\": [ \"org-key-123abc\", \"org-key-456def\" ] }] } ``` #### addBigSegmentIncludedTargets For use with [larger list-based segments](https://launchdarkly.com/docs/home/flags/segments-create#create-larger-list-based-segments) ONLY. Adds context keys to the context targets included in the segment. Returns an error if this causes the same context key to be both included and excluded. ##### Parameters - `values`: List of context keys. Here's an example: ```json { \"instructions\": [{ \"kind\": \"addBigSegmentIncludedTargets\", \"values\": [ \"org-key-123abc\", \"org-key-456def\" ] }] } ``` #### processBigSegmentImport For use with [larger list-based segments](https://launchdarkly.com/docs/home/flags/segments-create#create-larger-list-based-segments) ONLY. Processes a segment import. ##### Parameters - `importId`: The ID of the import. The import ID is returned in the `Location` header as part of the [Create big segment import](https://launchdarkly.com/docs/api/segments/create-big-segment-import) request. Here's an example: ```json { \"instructions\": [{ \"kind\": \"processBigSegmentImport\", \"importId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\" }] } ``` #### removeBigSegmentExcludedTargets For use with [larger list-based segments](https://launchdarkly.com/docs/home/flags/segments-create#create-larger-list-based-segments) ONLY. Removes context keys from the context targets excluded from the segment. ##### Parameters - `values`: List of context keys. Here's an example: ```json { \"instructions\": [{ \"kind\": \"removeBigSegmentExcludedTargets\", \"values\": [ \"org-key-123abc\", \"org-key-456def\" ] }] } ``` #### removeBigSegmentIncludedTargets For use with [larger list-based segments](https://launchdarkly.com/docs/home/flags/segments-create#create-larger-list-based-segments) ONLY. Removes context keys from the context targets included in the segment. ##### Parameters - `values`: List of context keys. Here's an example: ```json { \"instructions\": [{ \"kind\": \"removeBigSegmentIncludedTargets\", \"values\": [ \"org-key-123abc\", \"org-key-456def\" ] }] } ``` </details> ### Using JSON patches on a segment If you do not include the header described above, you can use a [JSON patch](https://launchdarkly.com/docs/api#updates-using-json-patch) or [JSON merge patch](https://datatracker.ietf.org/doc/html/rfc7386) representation of the desired changes. For example, to update the description for a segment with a JSON patch, use the following request body: ```json { \"patch\": [ { \"op\": \"replace\", \"path\": \"/description\", \"value\": \"new description\" } ] } ``` To update fields in the segment that are arrays, set the `path` to the name of the field and then append `/<array index>`. Use `/0` to add the new entry to the beginning of the array. Use `/-` to add the new entry to the end of the array. For example, to add a rule to a segment, use the following request body: ```json { \"patch\":[ { \"op\": \"add\", \"path\": \"/rules/0\", \"value\": { \"clauses\": [{ \"contextKind\": \"user\", \"attribute\": \"email\", \"op\": \"endsWith\", \"values\": [\".edu\"], \"negate\": false }] } } ] } ``` To add or remove targets from segments, we recommend using semantic patch. Semantic patch for segments includes specific instructions for adding and removing both included and excluded targets.
|
|
1108
|
+
Update a segment. The request body must be a valid semantic patch, JSON patch, or JSON merge patch. To learn more the different formats, read [Updates](https://launchdarkly.com/docs/api#updates). ### Using semantic patches on a segment To make a semantic patch request, you must append `domain-model=launchdarkly.semanticpatch` to your `Content-Type` header. To learn more, read [Updates using semantic patch](https://launchdarkly.com/docs/api#updates-using-semantic-patch). The body of a semantic patch request for updating segments requires an `environmentKey` in addition to `instructions` and an optional `comment`. The body of the request takes the following properties: * `comment` (string): (Optional) A description of the update. * `environmentKey` (string): (Required) The key of the LaunchDarkly environment. * `instructions` (array): (Required) A list of actions the update should perform. Each action in the list must be an object with a `kind` property that indicates the instruction. If the action requires parameters, you must include those parameters as additional fields in the object. ### Instructions Semantic patch requests support the following `kind` instructions for updating segments. <details> <summary>Click to expand instructions for <strong>updating segment details and settings</strong></summary> #### addTags Adds tags to the segment. ##### Parameters - `values`: A list of tags to add. Here's an example: ```json { \"instructions\": [{ \"kind\": \"addTags\", \"values\": [\"tag1\", \"tag2\"] }] } ``` #### removeTags Removes tags from the segment. ##### Parameters - `values`: A list of tags to remove. Here's an example: ```json { \"instructions\": [{ \"kind\": \"removeTags\", \"values\": [\"tag1\", \"tag2\"] }] } ``` #### updateName Updates the name of the segment. ##### Parameters - `value`: Name of the segment. Here's an example: ```json { \"instructions\": [{ \"kind\": \"updateName\", \"value\": \"Updated segment name\" }] } ``` </details> <details> <summary>Click to expand instructions for <strong>updating segment individual targets</strong></summary> #### addExcludedTargets Adds context keys to the individual context targets excluded from the segment for the specified `contextKind`. Returns an error if this causes the same context key to be both included and excluded, or if the number of operations on targets exceeds the batch limit of 1,500. ##### Parameters - `contextKind`: The context kind the targets should be added to. - `values`: List of keys. Here's an example: ```json { \"instructions\": [{ \"kind\": \"addExcludedTargets\", \"contextKind\": \"org\", \"values\": [ \"org-key-123abc\", \"org-key-456def\" ] }] } ``` #### addExcludedUsers Adds user keys to the individual user targets excluded from the segment. Returns an error if this causes the same user key to be both included and excluded, or if the number of operations on targets exceeds the batch limit of 1,500. If you are working with contexts, use `addExcludedTargets` instead of this instruction. ##### Parameters - `values`: List of user keys. Here's an example: ```json { \"instructions\": [{ \"kind\": \"addExcludedUsers\", \"values\": [ \"user-key-123abc\", \"user-key-456def\" ] }] } ``` #### addIncludedTargets Adds context keys to the individual context targets included in the segment for the specified `contextKind`. Returns an error if this causes the same context key to be both included and excluded, or if the number of operations on targets exceeds the batch limit of 1,500. ##### Parameters - `contextKind`: The context kind the targets should be added to. - `values`: List of keys. Here's an example: ```json { \"instructions\": [{ \"kind\": \"addIncludedTargets\", \"contextKind\": \"org\", \"values\": [ \"org-key-123abc\", \"org-key-456def\" ] }] } ``` #### addIncludedUsers Adds user keys to the individual user targets included in the segment. Returns an error if this causes the same user key to be both included and excluded, or if the number of operations on targets exceeds the batch limit of 1,500. If you are working with contexts, use `addIncludedTargets` instead of this instruction. ##### Parameters - `values`: List of user keys. Here's an example: ```json { \"instructions\": [{ \"kind\": \"addIncludedUsers\", \"values\": [ \"user-key-123abc\", \"user-key-456def\" ] }] } ``` #### removeExcludedTargets Removes context keys from the individual context targets excluded from the segment for the specified `contextKind`. Returns an error if the number of operations on targets exceeds the batch limit of 1,500. ##### Parameters - `contextKind`: The context kind the targets should be removed from. - `values`: List of keys. Here's an example: ```json { \"instructions\": [{ \"kind\": \"removeExcludedTargets\", \"contextKind\": \"org\", \"values\": [ \"org-key-123abc\", \"org-key-456def\" ] }] } ``` #### removeExcludedUsers Removes user keys from the individual user targets excluded from the segment. If you are working with contexts, use `removeExcludedTargets` instead of this instruction. Returns an error if the number of operations on targets exceeds the batch limit of 1,500. ##### Parameters - `values`: List of user keys. Here's an example: ```json { \"instructions\": [{ \"kind\": \"removeExcludedUsers\", \"values\": [ \"user-key-123abc\", \"user-key-456def\" ] }] } ``` #### removeIncludedTargets Removes context keys from the individual context targets included in the segment for the specified `contextKind`. Returns an error if the number of operations on targets exceeds the batch limit of 1,500. ##### Parameters - `contextKind`: The context kind the targets should be removed from. - `values`: List of keys. Here's an example: ```json { \"instructions\": [{ \"kind\": \"removeIncludedTargets\", \"contextKind\": \"org\", \"values\": [ \"org-key-123abc\", \"org-key-456def\" ] }] } ``` #### removeIncludedUsers Removes user keys from the individual user targets included in the segment. If you are working with contexts, use `removeIncludedTargets` instead of this instruction. Returns an error if the number of operations on targets exceeds the batch limit of 1,500. ##### Parameters - `values`: List of user keys. Here's an example: ```json { \"instructions\": [{ \"kind\": \"removeIncludedUsers\", \"values\": [ \"user-key-123abc\", \"user-key-456def\" ] }] } ``` </details> <details> <summary>Click to expand instructions for <strong>updating segment targeting rules</strong></summary> #### addClauses Adds the given clauses to the rule indicated by `ruleId`. ##### Parameters - `clauses`: Array of clause objects, with `contextKind` (string), `attribute` (string), `op` (string), `negate` (boolean), and `values` (array of strings, numbers, or dates) properties. The `contextKind`, if not provided, defaults to `user`. The `contextKind`, `attribute`, and `values` are case sensitive. The `op` must be lower-case. - `ruleId`: ID of a rule in the segment. Here's an example: ```json { \"instructions\": [{ \"kind\": \"addClauses\", \"clauses\": [ { \"attribute\": \"email\", \"negate\": false, \"op\": \"contains\", \"values\": [\"value1\"] } ], \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", }] } ``` #### addRule Adds a new targeting rule to the segment. The rule may contain `clauses`. ##### Parameters - `clauses`: Array of clause objects, with `contextKind` (string), `attribute` (string), `op` (string), `negate` (boolean), and `values` (array of strings, numbers, or dates) properties. The `contextKind`, if not provided, defaults to `user`. The `contextKind`, `attribute`, and `values` are case sensitive. The `op` must be lower-case. - `description`: A description of the rule. Here's an example: ```json { \"instructions\": [{ \"kind\": \"addRule\", \"clauses\": [ { \"attribute\": \"email\", \"op\": \"contains\", \"negate\": false, \"values\": [\"@launchdarkly.com\"] } ], \"description\": \"Targeting rule for LaunchDarkly employees\", }] } ``` #### addValuesToClause Adds `values` to the values of the clause that `ruleId` and `clauseId` indicate. Does not update the context kind, attribute, or operator. ##### Parameters - `ruleId`: ID of a rule in the segment. - `clauseId`: ID of a clause in that rule. - `values`: Array of strings, case sensitive. Here's an example: ```json { \"instructions\": [{ \"kind\": \"addValuesToClause\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"clauseId\": \"10a58772-3121-400f-846b-b8a04e8944ed\", \"values\": [\"beta_testers\"] }] } ``` #### removeClauses Removes the clauses specified by `clauseIds` from the rule indicated by `ruleId`. ##### Parameters - `ruleId`: ID of a rule in the segment. - `clauseIds`: Array of IDs of clauses in the rule. Here's an example: ```json { \"instructions\": [{ \"kind\": \"removeClauses\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"clauseIds\": [\"10a58772-3121-400f-846b-b8a04e8944ed\", \"36a461dc-235e-4b08-97b9-73ce9365873e\"] }] } ``` #### removeRule Removes the targeting rule specified by `ruleId`. Does nothing if the rule does not exist. ##### Parameters - `ruleId`: ID of a rule in the segment. Here's an example: ```json { \"instructions\": [{ \"kind\": \"removeRule\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\" }] } ``` #### removeValuesFromClause Removes `values` from the values of the clause indicated by `ruleId` and `clauseId`. Does not update the context kind, attribute, or operator. ##### Parameters - `ruleId`: ID of a rule in the segment. - `clauseId`: ID of a clause in that rule. - `values`: Array of strings, case sensitive. Here's an example: ```json { \"instructions\": [{ \"kind\": \"removeValuesFromClause\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"clauseId\": \"10a58772-3121-400f-846b-b8a04e8944ed\", \"values\": [\"beta_testers\"] }] } ``` #### reorderRules Rearranges the rules to match the order given in `ruleIds`. Returns an error if `ruleIds` does not match the current set of rules in the segment. ##### Parameters - `ruleIds`: Array of IDs of all targeting rules in the segment. Here's an example: ```json { \"instructions\": [{ \"kind\": \"reorderRules\", \"ruleIds\": [\"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"63c238d1-835d-435e-8f21-c8d5e40b2a3d\"] }] } ``` #### updateClause Replaces the clause indicated by `ruleId` and `clauseId` with `clause`. ##### Parameters - `ruleId`: ID of a rule in the segment. - `clauseId`: ID of a clause in that rule. - `clause`: New `clause` object, with `contextKind` (string), `attribute` (string), `op` (string), `negate` (boolean), and `values` (array of strings, numbers, or dates) properties. The `contextKind`, if not provided, defaults to `user`. The `contextKind`, `attribute`, and `values` are case sensitive. The `op` must be lower-case. Here's an example: ```json { \"instructions\": [{ \"kind\": \"updateClause\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"clauseId\": \"10c7462a-2062-45ba-a8bb-dfb3de0f8af5\", \"clause\": { \"contextKind\": \"user\", \"attribute\": \"country\", \"op\": \"in\", \"negate\": false, \"values\": [\"Mexico\", \"Canada\"] } }] } ``` #### updateRuleDescription Updates the description of the segment targeting rule. ##### Parameters - `description`: The new human-readable description for this rule. - `ruleId`: The ID of the rule. You can retrieve this by making a GET request for the segment. Here's an example: ```json { \"instructions\": [{ \"kind\": \"updateRuleDescription\", \"description\": \"New rule description\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\" }] } ``` #### updateRuleRolloutAndContextKind For a rule that includes a percentage of targets, updates the percentage and the context kind of the targets to include. ##### Parameters - `ruleId`: The ID of a targeting rule in the segment that includes a percentage of targets. - `weight`: The weight, in thousandths of a percent (0-100000). - `contextKind`: The context kind. Here's an example: ```json { \"instructions\": [{ \"kind\": \"reorderRules\", \"ruleId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\", \"weight\": \"20000\", \"contextKind\": \"device\" }] } ``` </details> <details> <summary>Click to expand instructions for <strong>working with Big Segments</strong></summary> A \"big segment\" is a segment that is either a synced segment, or a list-based segment with more than 15,000 entries that includes only one targeted context kind. LaunchDarkly uses different implementations for different types of segments so that all of your segments have good performance. The following semantic patch instructions apply only to these [larger list-based segments](https://launchdarkly.com/docs/home/flags/segments-create#create-larger-list-based-segments). #### addBigSegmentExcludedTargets For use with [larger list-based segments](https://launchdarkly.com/docs/home/flags/segments-create#create-larger-list-based-segments) ONLY. Adds context keys to the context targets excluded from the segment. Returns an error if this causes the same context key to be both included and excluded. ##### Parameters - `values`: List of context keys. Here's an example: ```json { \"instructions\": [{ \"kind\": \"addBigSegmentExcludedTargets\", \"values\": [ \"org-key-123abc\", \"org-key-456def\" ] }] } ``` #### addBigSegmentIncludedTargets For use with [larger list-based segments](https://launchdarkly.com/docs/home/flags/segments-create#create-larger-list-based-segments) ONLY. Adds context keys to the context targets included in the segment. Returns an error if this causes the same context key to be both included and excluded. ##### Parameters - `values`: List of context keys. Here's an example: ```json { \"instructions\": [{ \"kind\": \"addBigSegmentIncludedTargets\", \"values\": [ \"org-key-123abc\", \"org-key-456def\" ] }] } ``` #### processBigSegmentImport For use with [larger list-based segments](https://launchdarkly.com/docs/home/flags/segments-create#create-larger-list-based-segments) ONLY. Processes a segment import. ##### Parameters - `importId`: The ID of the import. The import ID is returned in the `Location` header as part of the [Create big segment import](https://launchdarkly.com/docs/api/segments/create-big-segment-import) request. Here's an example: ```json { \"instructions\": [{ \"kind\": \"processBigSegmentImport\", \"importId\": \"a902ef4a-2faf-4eaf-88e1-ecc356708a29\" }] } ``` #### removeBigSegmentExcludedTargets For use with [larger list-based segments](https://launchdarkly.com/docs/home/flags/segments-create#create-larger-list-based-segments) ONLY. Removes context keys from the context targets excluded from the segment. ##### Parameters - `values`: List of context keys. Here's an example: ```json { \"instructions\": [{ \"kind\": \"removeBigSegmentExcludedTargets\", \"values\": [ \"org-key-123abc\", \"org-key-456def\" ] }] } ``` #### removeBigSegmentIncludedTargets For use with [larger list-based segments](https://launchdarkly.com/docs/home/flags/segments-create#create-larger-list-based-segments) ONLY. Removes context keys from the context targets included in the segment. ##### Parameters - `values`: List of context keys. Here's an example: ```json { \"instructions\": [{ \"kind\": \"removeBigSegmentIncludedTargets\", \"values\": [ \"org-key-123abc\", \"org-key-456def\" ] }] } ``` </details> ### Using JSON patches on a segment If you do not include the header described above, you can use a [JSON patch](https://launchdarkly.com/docs/api#updates-using-json-patch) or [JSON merge patch](https://datatracker.ietf.org/doc/html/rfc7386) representation of the desired changes. For example, to update the description for a segment with a JSON patch, use the following request body: ```json { \"patch\": [ { \"op\": \"replace\", \"path\": \"/description\", \"value\": \"new description\" } ] } ``` To update fields in the segment that are arrays, set the `path` to the name of the field and then append `/<array index>`. Use `/0` to add the new entry to the beginning of the array. Use `/-` to add the new entry to the end of the array. For example, to add a rule to a segment, use the following request body: ```json { \"patch\":[ { \"op\": \"add\", \"path\": \"/rules/0\", \"value\": { \"clauses\": [{ \"contextKind\": \"user\", \"attribute\": \"email\", \"op\": \"endsWith\", \"values\": [\".edu\"], \"negate\": false }] } } ] } ``` To add or remove targets from segments, we recommend using semantic patch. Semantic patch for segments includes specific instructions for adding and removing both included and excluded targets.
|
|
1109
1109
|
|
|
1110
1110
|
### Examples
|
|
1111
1111
|
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# LaunchDarklyApi::TrustPolicyDetails
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **version** | **String** | The version of the trust policy | [optional] |
|
|
8
|
+
| **statement** | [**Array<TrustPolicyStatement>**](TrustPolicyStatement.md) | The statements of the trust policy | [optional] |
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```ruby
|
|
13
|
+
require 'launchdarkly_api'
|
|
14
|
+
|
|
15
|
+
instance = LaunchDarklyApi::TrustPolicyDetails.new(
|
|
16
|
+
version: null,
|
|
17
|
+
statement: null
|
|
18
|
+
)
|
|
19
|
+
```
|
|
20
|
+
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# LaunchDarklyApi::TrustPolicyStatement
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **effect** | **String** | The effect of trust policy statement | [optional] |
|
|
8
|
+
| **action** | **Array<String>** | The action of trust policy statement | [optional] |
|
|
9
|
+
| **principal** | **Object** | The principal of trust policy statement | [optional] |
|
|
10
|
+
| **condition** | **Object** | The condition of trust policy statement | [optional] |
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```ruby
|
|
15
|
+
require 'launchdarkly_api'
|
|
16
|
+
|
|
17
|
+
instance = LaunchDarklyApi::TrustPolicyStatement.new(
|
|
18
|
+
effect: null,
|
|
19
|
+
action: null,
|
|
20
|
+
principal: null,
|
|
21
|
+
condition: null
|
|
22
|
+
)
|
|
23
|
+
```
|
|
24
|
+
|
|
@@ -392,6 +392,75 @@ module LaunchDarklyApi
|
|
|
392
392
|
return data, status_code, headers
|
|
393
393
|
end
|
|
394
394
|
|
|
395
|
+
# Generate trust policy
|
|
396
|
+
# Trust policy to allow Data Export to assume the role and perform operations on AWS resources
|
|
397
|
+
# @param proj_key [String] The project key
|
|
398
|
+
# @param env_key [String] The environment key
|
|
399
|
+
# @param [Hash] opts the optional parameters
|
|
400
|
+
# @return [GenerateTrustPolicyPostRep]
|
|
401
|
+
def post_generate_trust_policy(proj_key, env_key, opts = {})
|
|
402
|
+
data, _status_code, _headers = post_generate_trust_policy_with_http_info(proj_key, env_key, opts)
|
|
403
|
+
data
|
|
404
|
+
end
|
|
405
|
+
|
|
406
|
+
# Generate trust policy
|
|
407
|
+
# Trust policy to allow Data Export to assume the role and perform operations on AWS resources
|
|
408
|
+
# @param proj_key [String] The project key
|
|
409
|
+
# @param env_key [String] The environment key
|
|
410
|
+
# @param [Hash] opts the optional parameters
|
|
411
|
+
# @return [Array<(GenerateTrustPolicyPostRep, Integer, Hash)>] GenerateTrustPolicyPostRep data, response status code and response headers
|
|
412
|
+
def post_generate_trust_policy_with_http_info(proj_key, env_key, opts = {})
|
|
413
|
+
if @api_client.config.debugging
|
|
414
|
+
@api_client.config.logger.debug 'Calling API: DataExportDestinationsApi.post_generate_trust_policy ...'
|
|
415
|
+
end
|
|
416
|
+
# verify the required parameter 'proj_key' is set
|
|
417
|
+
if @api_client.config.client_side_validation && proj_key.nil?
|
|
418
|
+
fail ArgumentError, "Missing the required parameter 'proj_key' when calling DataExportDestinationsApi.post_generate_trust_policy"
|
|
419
|
+
end
|
|
420
|
+
# verify the required parameter 'env_key' is set
|
|
421
|
+
if @api_client.config.client_side_validation && env_key.nil?
|
|
422
|
+
fail ArgumentError, "Missing the required parameter 'env_key' when calling DataExportDestinationsApi.post_generate_trust_policy"
|
|
423
|
+
end
|
|
424
|
+
# resource path
|
|
425
|
+
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))
|
|
426
|
+
|
|
427
|
+
# query parameters
|
|
428
|
+
query_params = opts[:query_params] || {}
|
|
429
|
+
|
|
430
|
+
# header parameters
|
|
431
|
+
header_params = opts[:header_params] || {}
|
|
432
|
+
# HTTP header 'Accept' (if needed)
|
|
433
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
434
|
+
|
|
435
|
+
# form parameters
|
|
436
|
+
form_params = opts[:form_params] || {}
|
|
437
|
+
|
|
438
|
+
# http body (model)
|
|
439
|
+
post_body = opts[:debug_body]
|
|
440
|
+
|
|
441
|
+
# return_type
|
|
442
|
+
return_type = opts[:debug_return_type] || 'GenerateTrustPolicyPostRep'
|
|
443
|
+
|
|
444
|
+
# auth_names
|
|
445
|
+
auth_names = opts[:debug_auth_names] || ['ApiKey']
|
|
446
|
+
|
|
447
|
+
new_options = opts.merge(
|
|
448
|
+
:operation => :"DataExportDestinationsApi.post_generate_trust_policy",
|
|
449
|
+
:header_params => header_params,
|
|
450
|
+
:query_params => query_params,
|
|
451
|
+
:form_params => form_params,
|
|
452
|
+
:body => post_body,
|
|
453
|
+
:auth_names => auth_names,
|
|
454
|
+
:return_type => return_type
|
|
455
|
+
)
|
|
456
|
+
|
|
457
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
458
|
+
if @api_client.config.debugging
|
|
459
|
+
@api_client.config.logger.debug "API called: DataExportDestinationsApi#post_generate_trust_policy\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
460
|
+
end
|
|
461
|
+
return data, status_code, headers
|
|
462
|
+
end
|
|
463
|
+
|
|
395
464
|
# Generate Snowflake destination key pair
|
|
396
465
|
# Generate key pair to allow Data Export to authenticate into a Snowflake warehouse destination
|
|
397
466
|
# @param [Hash] opts the optional parameters
|