FeatureFlagClient.AddFeatureFlag Method

Definition

Overloads

Name Description
AddFeatureFlag(FeatureFlag, CancellationToken)

Creates a FeatureFlag only if the feature flag does not already exist in the configuration store.

AddFeatureFlag(String, Boolean, String, CancellationToken)

Creates a FeatureFlag if the feature flag, uniquely identified by name and label, does not already exist in the configuration store.

AddFeatureFlag(FeatureFlag, CancellationToken)

Source:
FeatureFlagClient.cs

Creates a FeatureFlag only if the feature flag does not already exist in the configuration store.

public virtual Azure.Response<Azure.Data.AppConfiguration.FeatureFlag> AddFeatureFlag(Azure.Data.AppConfiguration.FeatureFlag flag, System.Threading.CancellationToken cancellationToken = default);
abstract member AddFeatureFlag : Azure.Data.AppConfiguration.FeatureFlag * System.Threading.CancellationToken -> Azure.Response<Azure.Data.AppConfiguration.FeatureFlag>
override this.AddFeatureFlag : Azure.Data.AppConfiguration.FeatureFlag * System.Threading.CancellationToken -> Azure.Response<Azure.Data.AppConfiguration.FeatureFlag>
Public Overridable Function AddFeatureFlag (flag As FeatureFlag, Optional cancellationToken As CancellationToken = Nothing) As Response(Of FeatureFlag)

Parameters

flag
FeatureFlag

The FeatureFlag body to create. The feature flag is identified by its Name and Label.

cancellationToken
CancellationToken

A CancellationToken controlling the request lifetime.

Returns

A response containing the added FeatureFlag.

Applies to

AddFeatureFlag(String, Boolean, String, CancellationToken)

Source:
FeatureFlagClient.cs

Creates a FeatureFlag if the feature flag, uniquely identified by name and label, does not already exist in the configuration store.

public virtual Azure.Response<Azure.Data.AppConfiguration.FeatureFlag> AddFeatureFlag(string name, bool enabled, string label = default, System.Threading.CancellationToken cancellationToken = default);
abstract member AddFeatureFlag : string * bool * string * System.Threading.CancellationToken -> Azure.Response<Azure.Data.AppConfiguration.FeatureFlag>
override this.AddFeatureFlag : string * bool * string * System.Threading.CancellationToken -> Azure.Response<Azure.Data.AppConfiguration.FeatureFlag>
Public Overridable Function AddFeatureFlag (name As String, enabled As Boolean, Optional label As String = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Response(Of FeatureFlag)

Parameters

name
String

The name of the feature flag.

enabled
Boolean

The enabled state of the feature flag.

label
String

A label used to group this feature flag with others.

cancellationToken
CancellationToken

A CancellationToken controlling the request lifetime.

Returns

A response containing the added FeatureFlag.

Applies to