ConfigurationClient.GetConfigurationSettingAsync 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
GetConfigurationSettingAsync(ConfigurationSetting, Boolean, CancellationToken) |
Retrieve an existing ConfigurationSetting from the configuration store. |
GetConfigurationSettingAsync(ConfigurationSetting, DateTimeOffset, CancellationToken) |
Retrieve an existing ConfigurationSetting from the configuration store. |
GetConfigurationSettingAsync(String, String, CancellationToken) |
Retrieve an existing ConfigurationSetting, uniquely identified by key and label, from the configuration store. |
GetConfigurationSettingAsync(ConfigurationSetting, Boolean, CancellationToken)
- Source:
- ConfigurationClient.cs
- Source:
- ConfigurationClient.cs
Retrieve an existing ConfigurationSetting from the configuration store.
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Data.AppConfiguration.ConfigurationSetting>> GetConfigurationSettingAsync (Azure.Data.AppConfiguration.ConfigurationSetting setting, bool onlyIfChanged = false, System.Threading.CancellationToken cancellationToken = default);
abstract member GetConfigurationSettingAsync : Azure.Data.AppConfiguration.ConfigurationSetting * bool * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Data.AppConfiguration.ConfigurationSetting>>
override this.GetConfigurationSettingAsync : Azure.Data.AppConfiguration.ConfigurationSetting * bool * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Data.AppConfiguration.ConfigurationSetting>>
Public Overridable Function GetConfigurationSettingAsync (setting As ConfigurationSetting, Optional onlyIfChanged As Boolean = false, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of ConfigurationSetting))
Parameters
- setting
- ConfigurationSetting
The ConfigurationSetting to retrieve.
- onlyIfChanged
- Boolean
If set to true, only retrieve the setting from the configuration store if it has changed since the client last retrieved it. It is determined to have changed if the ETag field on the passed-in ConfigurationSetting is different from the ETag of the setting in the configuration store. If it has not changed, the returned response will have have no value, and will throw if response.Value is accessed. Callers may check the status code on the response to avoid triggering the exception.
- cancellationToken
- CancellationToken
A CancellationToken controlling the request lifetime.
Returns
A response containing the retrieved ConfigurationSetting.
Applies to
GetConfigurationSettingAsync(ConfigurationSetting, DateTimeOffset, CancellationToken)
- Source:
- ConfigurationClient.cs
- Source:
- ConfigurationClient.cs
Retrieve an existing ConfigurationSetting from the configuration store.
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Data.AppConfiguration.ConfigurationSetting>> GetConfigurationSettingAsync (Azure.Data.AppConfiguration.ConfigurationSetting setting, DateTimeOffset acceptDateTime, System.Threading.CancellationToken cancellationToken = default);
abstract member GetConfigurationSettingAsync : Azure.Data.AppConfiguration.ConfigurationSetting * DateTimeOffset * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Data.AppConfiguration.ConfigurationSetting>>
override this.GetConfigurationSettingAsync : Azure.Data.AppConfiguration.ConfigurationSetting * DateTimeOffset * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Data.AppConfiguration.ConfigurationSetting>>
Public Overridable Function GetConfigurationSettingAsync (setting As ConfigurationSetting, acceptDateTime As DateTimeOffset, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of ConfigurationSetting))
Parameters
- setting
- ConfigurationSetting
The ConfigurationSetting to retrieve.
- acceptDateTime
- DateTimeOffset
The setting 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 ConfigurationSetting.
Applies to
GetConfigurationSettingAsync(String, String, CancellationToken)
- Source:
- ConfigurationClient.cs
- Source:
- ConfigurationClient.cs
Retrieve an existing ConfigurationSetting, uniquely identified by key and label, from the configuration store.
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Data.AppConfiguration.ConfigurationSetting>> GetConfigurationSettingAsync (string key, string label = default, System.Threading.CancellationToken cancellationToken = default);
abstract member GetConfigurationSettingAsync : string * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Data.AppConfiguration.ConfigurationSetting>>
override this.GetConfigurationSettingAsync : string * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Data.AppConfiguration.ConfigurationSetting>>
Public Overridable Function GetConfigurationSettingAsync (key As String, Optional label As String = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of ConfigurationSetting))
Parameters
- key
- String
The primary identifier of the configuration setting to retrieve.
- label
- String
A label used to group this configuration setting with others.
- cancellationToken
- CancellationToken
A CancellationToken controlling the request lifetime.
Returns
A response containing the retrieved ConfigurationSetting.
Applies to
Azure SDK for .NET