feature_flag_environment_allocations
Creates, updates, deletes, gets or lists a feature_flag_environment_allocations resource.
Overview
| Name | feature_flag_environment_allocations |
| Type | Resource |
| Id | datadog.software_delivery.feature_flag_environment_allocations |
Fields
The following fields are returned by SELECT queries:
SELECT not supported for this resource, use SHOW METHODS to view available operations for the resource.
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
create_allocations_for_feature_flag_in_environment | insert | feature_flag_id, environment_id, data | Creates a new targeting rule (allocation) for a specific feature flag in a specific environment. | |
update_allocations_for_feature_flag_in_environment | replace | feature_flag_id, environment_id, data | Updates targeting rules (allocations) for a specific feature flag in a specific environment.<br />This operation replaces the existing allocation set with the request payload. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
environment_id | string (uuid) | The ID of the environment. |
feature_flag_id | string (uuid) | The ID of the feature flag. |
site | string | The Datadog site (region) for your organization, for example datadoghq.com, us3.datadoghq.com, us5.datadoghq.com, ap1.datadoghq.com, ap2.datadoghq.com, datadoghq.eu, ddog-gov.com. Resolved from the DD_SITE environment variable when set. Optional: defaults to datadoghq.com, or the value of the DD_SITE environment variable when set; a WHERE value overrides both. |
INSERT examples
- create_allocations_for_feature_flag_in_environment
- Manifest
Creates a new targeting rule (allocation) for a specific feature flag in a specific environment.
INSERT INTO datadog.software_delivery.feature_flag_environment_allocations (
data,
feature_flag_id,
environment_id
)
SELECT
'{{ data }}' /* required */,
'{{ feature_flag_id }}',
'{{ environment_id }}'
RETURNING
data
;
# Description fields are for documentation purposes
- name: feature_flag_environment_allocations
props:
- name: feature_flag_id
value: "{{ feature_flag_id }}"
description: Required parameter for the feature_flag_environment_allocations resource.
- name: environment_id
value: "{{ environment_id }}"
description: Required parameter for the feature_flag_environment_allocations resource.
- name: data
description: |
Data wrapper for allocation request payloads.
value:
attributes:
experiment_id: "{{ experiment_id }}"
exposure_schedule:
absolute_start_time: "{{ absolute_start_time }}"
control_variant_id: "{{ control_variant_id }}"
control_variant_key: "{{ control_variant_key }}"
id: "{{ id }}"
rollout_options:
autostart: {{ autostart }}
selection_interval_ms: {{ selection_interval_ms }}
strategy: "{{ strategy }}"
rollout_steps:
- exposure_ratio: {{ exposure_ratio }}
grouped_step_index: {{ grouped_step_index }}
id: "{{ id }}"
interval_ms: {{ interval_ms }}
is_pause_record: {{ is_pause_record }}
guardrail_metrics:
- metric_id: "{{ metric_id }}"
trigger_action: "{{ trigger_action }}"
id: "{{ id }}"
key: "{{ key }}"
name: "{{ name }}"
targeting_rules:
- conditions: "{{ conditions }}"
type: "{{ type }}"
variant_weights:
- value: {{ value }}
variant_id: "{{ variant_id }}"
variant_key: "{{ variant_key }}"
type: "{{ type }}"
REPLACE examples
- update_allocations_for_feature_flag_in_environment
Updates targeting rules (allocations) for a specific feature flag in a specific environment.<br />This operation replaces the existing allocation set with the request payload.
REPLACE datadog.software_delivery.feature_flag_environment_allocations
SET
data = '{{ data }}'
WHERE
feature_flag_id = '{{ feature_flag_id }}' --required
AND environment_id = '{{ environment_id }}' --required
AND data = '{{ data }}' --required
RETURNING
data;