Share via


ConfigurationClient.SetConfigurationSettingAsync Method

Definition

Overloads

SetConfigurationSettingAsync(ConfigurationSetting, Boolean, CancellationToken)

Creates a ConfigurationSetting if it doesn't exist or overwrites the existing setting in the configuration store.

SetConfigurationSettingAsync(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.

SetConfigurationSettingAsync(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 System.Threading.Tasks.Task<Azure.Response<Azure.Data.AppConfiguration.ConfigurationSetting>> SetConfigurationSettingAsync (Azure.Data.AppConfiguration.ConfigurationSetting setting, bool onlyIfUnchanged = false, System.Threading.CancellationToken cancellationToken = default);
abstract member SetConfigurationSettingAsync : Azure.Data.AppConfiguration.ConfigurationSetting * bool * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Data.AppConfiguration.ConfigurationSetting>>
override this.SetConfigurationSettingAsync : Azure.Data.AppConfiguration.ConfigurationSetting * bool * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Data.AppConfiguration.ConfigurationSetting>>
Public Overridable Function SetConfigurationSettingAsync (setting As ConfigurationSetting, Optional onlyIfUnchanged As Boolean = false, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of ConfigurationSetting))

Parameters

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

SetConfigurationSettingAsync(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 System.Threading.Tasks.Task<Azure.Response<Azure.Data.AppConfiguration.ConfigurationSetting>> SetConfigurationSettingAsync (string key, string value, string label = default, System.Threading.CancellationToken cancellationToken = default);
abstract member SetConfigurationSettingAsync : string * string * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Data.AppConfiguration.ConfigurationSetting>>
override this.SetConfigurationSettingAsync : string * string * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Data.AppConfiguration.ConfigurationSetting>>
Public Overridable Function SetConfigurationSettingAsync (key As String, value 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.

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