Skip to main content

feature_flag_environment_allocations

Creates, updates, deletes, gets or lists a feature_flag_environment_allocations resource.

Overview

Namefeature_flag_environment_allocations
TypeResource
Iddatadog.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:

NameAccessible byRequired ParamsOptional ParamsDescription
create_allocations_for_feature_flag_in_environmentinsertfeature_flag_id, environment_id, dataCreates a new targeting rule (allocation) for a specific feature flag in a specific environment.
update_allocations_for_feature_flag_in_environmentreplacefeature_flag_id, environment_id, dataUpdates 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.

NameDatatypeDescription
environment_idstring (uuid)The ID of the environment.
feature_flag_idstring (uuid)The ID of the feature flag.
sitestringThe 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

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
;

REPLACE examples

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;