FeatureFlagClient.GetFeatureFlag 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 |
|---|---|
| GetFeatureFlag(String, String, CancellationToken) |
Retrieve an existing FeatureFlag, uniquely identified by name and label, from the configuration store. |
| GetFeatureFlag(FeatureFlag, DateTimeOffset, CancellationToken) |
Retrieve an existing FeatureFlag from the configuration store. |
| GetFeatureFlag(FeatureFlag, Boolean, CancellationToken) |
Retrieve an existing FeatureFlag from the configuration store. |
GetFeatureFlag(String, String, CancellationToken)
- Source:
- FeatureFlagClient.cs
Retrieve an existing FeatureFlag, uniquely identified by name and label, from the configuration store.
public virtual Azure.Response<Azure.Data.AppConfiguration.FeatureFlag> GetFeatureFlag(string name, string label = default, System.Threading.CancellationToken cancellationToken = default);
abstract member GetFeatureFlag : string * string * System.Threading.CancellationToken -> Azure.Response<Azure.Data.AppConfiguration.FeatureFlag>
override this.GetFeatureFlag : string * string * System.Threading.CancellationToken -> Azure.Response<Azure.Data.AppConfiguration.FeatureFlag>
Public Overridable Function GetFeatureFlag (name As String, Optional label As String = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Response(Of FeatureFlag)
Parameters
- name
- String
The name of the feature flag to retrieve.
- 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 retrieved FeatureFlag.
Applies to
GetFeatureFlag(FeatureFlag, DateTimeOffset, CancellationToken)
- Source:
- FeatureFlagClient.cs
Retrieve an existing FeatureFlag from the configuration store.
public virtual Azure.Response<Azure.Data.AppConfiguration.FeatureFlag> GetFeatureFlag(Azure.Data.AppConfiguration.FeatureFlag flag, DateTimeOffset acceptDateTime, System.Threading.CancellationToken cancellationToken = default);
abstract member GetFeatureFlag : Azure.Data.AppConfiguration.FeatureFlag * DateTimeOffset * System.Threading.CancellationToken -> Azure.Response<Azure.Data.AppConfiguration.FeatureFlag>
override this.GetFeatureFlag : Azure.Data.AppConfiguration.FeatureFlag * DateTimeOffset * System.Threading.CancellationToken -> Azure.Response<Azure.Data.AppConfiguration.FeatureFlag>
Public Overridable Function GetFeatureFlag (flag As FeatureFlag, acceptDateTime As DateTimeOffset, Optional cancellationToken As CancellationToken = Nothing) As Response(Of FeatureFlag)
Parameters
- flag
- FeatureFlag
The FeatureFlag to retrieve.
- acceptDateTime
- DateTimeOffset
The feature flag will be retrieved exactly as it existed at the provided time.
- cancellationToken
- CancellationToken
A CancellationToken controlling the request lifetime.
Returns
A response containing the retrieved FeatureFlag.
Applies to
GetFeatureFlag(FeatureFlag, Boolean, CancellationToken)
- Source:
- FeatureFlagClient.cs
Retrieve an existing FeatureFlag from the configuration store.
public virtual Azure.Response<Azure.Data.AppConfiguration.FeatureFlag> GetFeatureFlag(Azure.Data.AppConfiguration.FeatureFlag flag, bool onlyIfChanged = false, System.Threading.CancellationToken cancellationToken = default);
abstract member GetFeatureFlag : Azure.Data.AppConfiguration.FeatureFlag * bool * System.Threading.CancellationToken -> Azure.Response<Azure.Data.AppConfiguration.FeatureFlag>
override this.GetFeatureFlag : Azure.Data.AppConfiguration.FeatureFlag * bool * System.Threading.CancellationToken -> Azure.Response<Azure.Data.AppConfiguration.FeatureFlag>
Public Overridable Function GetFeatureFlag (flag As FeatureFlag, Optional onlyIfChanged As Boolean = false, Optional cancellationToken As CancellationToken = Nothing) As Response(Of FeatureFlag)
Parameters
- flag
- FeatureFlag
The FeatureFlag to retrieve.
- onlyIfChanged
- Boolean
If set to true, only retrieve the feature flag from the configuration store if it has changed since the client last retrieved it. The feature flag is considered unchanged if its Etag matches the version in the configuration store. If it is unchanged, the returned Response<T> will have a status of 304 (not modified) and its Value will be null.
- cancellationToken
- CancellationToken
A CancellationToken controlling the request lifetime.
Returns
A response containing the retrieved FeatureFlag.