ConfigurationClient.SetConfigurationSetting 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
SetConfigurationSetting(ConfigurationSetting, Boolean, CancellationToken) |
Creates a ConfigurationSetting if it doesn't exist or overwrites the existing setting in the configuration store. |
SetConfigurationSetting(String, String, String, CancellationToken) |
Creates a ConfigurationSetting, uniquely identified by key and label, if it doesn't exist or overwrites the existing setting in the configuration store. |
SetConfigurationSetting(ConfigurationSetting, Boolean, CancellationToken)
- Source:
- ConfigurationClient.cs
- Source:
- ConfigurationClient.cs
Creates a ConfigurationSetting if it doesn't exist or overwrites the existing setting in the configuration store.
public virtual Azure.Response<Azure.Data.AppConfiguration.ConfigurationSetting> SetConfigurationSetting (Azure.Data.AppConfiguration.ConfigurationSetting setting, bool onlyIfUnchanged = false, System.Threading.CancellationToken cancellationToken = default);
abstract member SetConfigurationSetting : Azure.Data.AppConfiguration.ConfigurationSetting * bool * System.Threading.CancellationToken -> Azure.Response<Azure.Data.AppConfiguration.ConfigurationSetting>
override this.SetConfigurationSetting : Azure.Data.AppConfiguration.ConfigurationSetting * bool * System.Threading.CancellationToken -> Azure.Response<Azure.Data.AppConfiguration.ConfigurationSetting>
Public Overridable Function SetConfigurationSetting (setting As ConfigurationSetting, Optional onlyIfUnchanged As Boolean = false, Optional cancellationToken As CancellationToken = Nothing) As Response(Of ConfigurationSetting)
Parameters
- setting
- ConfigurationSetting
The ConfigurationSetting to create.
- onlyIfUnchanged
- Boolean
If set to true and the configuration setting exists in the configuration store, overwrite the setting if the passed-in ConfigurationSetting is the same version as the one in the configuration store. The setting versions are the same if their ETag fields match. If the two settings are different versions, this method will throw an exception to indicate that the setting in the configuration store was modified since it was last obtained by the client.
- cancellationToken
- CancellationToken
A CancellationToken controlling the request lifetime.
Returns
A response containing the ConfigurationSetting written to the configuration store.
Applies to
SetConfigurationSetting(String, String, String, CancellationToken)
- Source:
- ConfigurationClient.cs
- Source:
- ConfigurationClient.cs
Creates a ConfigurationSetting, uniquely identified by key and label, if it doesn't exist or overwrites the existing setting in the configuration store.
public virtual Azure.Response<Azure.Data.AppConfiguration.ConfigurationSetting> SetConfigurationSetting (string key, string value, string label = default, System.Threading.CancellationToken cancellationToken = default);
abstract member SetConfigurationSetting : string * string * string * System.Threading.CancellationToken -> Azure.Response<Azure.Data.AppConfiguration.ConfigurationSetting>
override this.SetConfigurationSetting : string * string * string * System.Threading.CancellationToken -> Azure.Response<Azure.Data.AppConfiguration.ConfigurationSetting>
Public Overridable Function SetConfigurationSetting (key As String, value 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.
- value
- String
The configuration setting's value.
- 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 ConfigurationSetting written to the configuration store.
Applies to
Azure SDK for .NET