共用方式為


ConfigurationClient.AddConfigurationSetting Method

Definition

Overloads

AddConfigurationSetting(ConfigurationSetting, CancellationToken)

Creates a ConfigurationSetting only if the setting does not already exist in the configuration store.

AddConfigurationSetting(String, String, String, CancellationToken)

Creates a ConfigurationSetting if the setting, uniquely identified by key and label, does not already exist in the configuration store.

AddConfigurationSetting(ConfigurationSetting, CancellationToken)

Source:
ConfigurationClient.cs
Source:
ConfigurationClient.cs

Creates a ConfigurationSetting only if the setting does not already exist in the configuration store.

public virtual Azure.Response<Azure.Data.AppConfiguration.ConfigurationSetting> AddConfigurationSetting (Azure.Data.AppConfiguration.ConfigurationSetting setting, System.Threading.CancellationToken cancellationToken = default);
abstract member AddConfigurationSetting : Azure.Data.AppConfiguration.ConfigurationSetting * System.Threading.CancellationToken -> Azure.Response<Azure.Data.AppConfiguration.ConfigurationSetting>
override this.AddConfigurationSetting : Azure.Data.AppConfiguration.ConfigurationSetting * System.Threading.CancellationToken -> Azure.Response<Azure.Data.AppConfiguration.ConfigurationSetting>
Public Overridable Function AddConfigurationSetting (setting As ConfigurationSetting, Optional cancellationToken As CancellationToken = Nothing) As Response(Of ConfigurationSetting)

Parameters

cancellationToken
CancellationToken

A CancellationToken controlling the request lifetime.

Returns

A response containing the added ConfigurationSetting.

Applies to

AddConfigurationSetting(String, String, String, CancellationToken)

Source:
ConfigurationClient.cs
Source:
ConfigurationClient.cs

Creates a ConfigurationSetting if the setting, uniquely identified by key and label, does not already exist in the configuration store.

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

Applies to