FeatureFlagClient.AddFeatureFlagAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| Name | Description |
|---|---|
| AddFeatureFlagAsync(FeatureFlag, CancellationToken) |
Creates a FeatureFlag only if the feature flag does not already exist in the configuration store. |
| AddFeatureFlagAsync(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. |
AddFeatureFlagAsync(FeatureFlag, CancellationToken)
- Source:
- FeatureFlagClient.cs
Creates a FeatureFlag only if the feature flag does not already exist in the configuration store.
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Data.AppConfiguration.FeatureFlag>> AddFeatureFlagAsync(Azure.Data.AppConfiguration.FeatureFlag flag, System.Threading.CancellationToken cancellationToken = default);
abstract member AddFeatureFlagAsync : Azure.Data.AppConfiguration.FeatureFlag * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Data.AppConfiguration.FeatureFlag>>
override this.AddFeatureFlagAsync : Azure.Data.AppConfiguration.FeatureFlag * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Data.AppConfiguration.FeatureFlag>>
Public Overridable Function AddFeatureFlagAsync (flag As FeatureFlag, Optional cancellationToken As CancellationToken = Nothing) As Task(Of 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
AddFeatureFlagAsync(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 System.Threading.Tasks.Task<Azure.Response<Azure.Data.AppConfiguration.FeatureFlag>> AddFeatureFlagAsync(string name, bool enabled, string label = default, System.Threading.CancellationToken cancellationToken = default);
abstract member AddFeatureFlagAsync : string * bool * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Data.AppConfiguration.FeatureFlag>>
override this.AddFeatureFlagAsync : string * bool * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Data.AppConfiguration.FeatureFlag>>
Public Overridable Function AddFeatureFlagAsync (name As String, enabled As Boolean, Optional label As String = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of 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.