ConfigurationClient.GetConfigurationSetting 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
GetConfigurationSetting(ConfigurationSetting, Boolean, CancellationToken) |
Retrieve an existing ConfigurationSetting from the configuration store. |
GetConfigurationSetting(ConfigurationSetting, DateTimeOffset, CancellationToken) |
Retrieve an existing ConfigurationSetting from the configuration store. |
GetConfigurationSetting(String, String, CancellationToken) |
Retrieve an existing ConfigurationSetting, uniquely identified by key and label, from the configuration store. |
GetConfigurationSetting(ConfigurationSetting, Boolean, CancellationToken)
- Source:
- ConfigurationClient.cs
- Source:
- ConfigurationClient.cs
Retrieve an existing ConfigurationSetting from the configuration store.
public virtual Azure.Response<Azure.Data.AppConfiguration.ConfigurationSetting> GetConfigurationSetting (Azure.Data.AppConfiguration.ConfigurationSetting setting, bool onlyIfChanged = false, System.Threading.CancellationToken cancellationToken = default);
abstract member GetConfigurationSetting : Azure.Data.AppConfiguration.ConfigurationSetting * bool * System.Threading.CancellationToken -> Azure.Response<Azure.Data.AppConfiguration.ConfigurationSetting>
override this.GetConfigurationSetting : Azure.Data.AppConfiguration.ConfigurationSetting * bool * System.Threading.CancellationToken -> Azure.Response<Azure.Data.AppConfiguration.ConfigurationSetting>
Public Overridable Function GetConfigurationSetting (setting As ConfigurationSetting, Optional onlyIfChanged As Boolean = false, Optional cancellationToken As CancellationToken = Nothing) As 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
GetConfigurationSetting(ConfigurationSetting, DateTimeOffset, CancellationToken)
- Source:
- ConfigurationClient.cs
- Source:
- ConfigurationClient.cs
Retrieve an existing ConfigurationSetting from the configuration store.
public virtual Azure.Response<Azure.Data.AppConfiguration.ConfigurationSetting> GetConfigurationSetting (Azure.Data.AppConfiguration.ConfigurationSetting setting, DateTimeOffset acceptDateTime, System.Threading.CancellationToken cancellationToken = default);
abstract member GetConfigurationSetting : Azure.Data.AppConfiguration.ConfigurationSetting * DateTimeOffset * System.Threading.CancellationToken -> Azure.Response<Azure.Data.AppConfiguration.ConfigurationSetting>
override this.GetConfigurationSetting : Azure.Data.AppConfiguration.ConfigurationSetting * DateTimeOffset * System.Threading.CancellationToken -> Azure.Response<Azure.Data.AppConfiguration.ConfigurationSetting>
Public Overridable Function GetConfigurationSetting (setting As ConfigurationSetting, acceptDateTime As DateTimeOffset, Optional cancellationToken As CancellationToken = Nothing) As 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
GetConfigurationSetting(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 Azure.Response<Azure.Data.AppConfiguration.ConfigurationSetting> GetConfigurationSetting (string key, string label = default, System.Threading.CancellationToken cancellationToken = default);
abstract member GetConfigurationSetting : string * string * System.Threading.CancellationToken -> Azure.Response<Azure.Data.AppConfiguration.ConfigurationSetting>
override this.GetConfigurationSetting : string * string * System.Threading.CancellationToken -> Azure.Response<Azure.Data.AppConfiguration.ConfigurationSetting>
Public Overridable Function GetConfigurationSetting (key As String, Optional label As String = Nothing, Optional cancellationToken As CancellationToken = Nothing) As 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