共用方式為


ConfigurationClient.SetReadOnlyAsync Method

Definition

Overloads

SetReadOnlyAsync(String, Boolean, CancellationToken)

Sets an existing ConfigurationSetting to read only or read write state in the configuration store.

SetReadOnlyAsync(ConfigurationSetting, Boolean, Boolean, CancellationToken)

Sets an existing ConfigurationSetting to read only or read write state in the configuration store.

SetReadOnlyAsync(String, String, Boolean, CancellationToken)

Sets an existing ConfigurationSetting to read only or read write state in the configuration store.

SetReadOnlyAsync(String, Boolean, CancellationToken)

Source:
ConfigurationClient.cs
Source:
ConfigurationClient.cs

Sets an existing ConfigurationSetting to read only or read write state in the configuration store.

public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Data.AppConfiguration.ConfigurationSetting>> SetReadOnlyAsync (string key, bool isReadOnly, System.Threading.CancellationToken cancellationToken = default);
abstract member SetReadOnlyAsync : string * bool * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Data.AppConfiguration.ConfigurationSetting>>
override this.SetReadOnlyAsync : string * bool * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Data.AppConfiguration.ConfigurationSetting>>
Public Overridable Function SetReadOnlyAsync (key As String, isReadOnly As Boolean, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of ConfigurationSetting))

Parameters

key
String

The primary identifier of the configuration setting.

isReadOnly
Boolean

If true, the ConfigurationSetting will be set to read only in the configuration store. If false, it will be set to read write.

cancellationToken
CancellationToken

A CancellationToken controlling the request lifetime.

Returns

Applies to

SetReadOnlyAsync(ConfigurationSetting, Boolean, Boolean, CancellationToken)

Source:
ConfigurationClient.cs
Source:
ConfigurationClient.cs

Sets an existing ConfigurationSetting to read only or read write state in the configuration store.

public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Data.AppConfiguration.ConfigurationSetting>> SetReadOnlyAsync (Azure.Data.AppConfiguration.ConfigurationSetting setting, bool isReadOnly, bool onlyIfUnchanged = false, System.Threading.CancellationToken cancellationToken = default);
abstract member SetReadOnlyAsync : Azure.Data.AppConfiguration.ConfigurationSetting * bool * bool * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Data.AppConfiguration.ConfigurationSetting>>
override this.SetReadOnlyAsync : Azure.Data.AppConfiguration.ConfigurationSetting * bool * bool * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Data.AppConfiguration.ConfigurationSetting>>
Public Overridable Function SetReadOnlyAsync (setting As ConfigurationSetting, isReadOnly As Boolean, Optional onlyIfUnchanged As Boolean = false, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of ConfigurationSetting))

Parameters

isReadOnly
Boolean

If true, the ConfigurationSetting will be set to read only in the configuration store. If false, it will be set to read write.

onlyIfUnchanged
Boolean

If set to true and the configuration setting exists in the configuration store, update 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

Applies to

SetReadOnlyAsync(String, String, Boolean, CancellationToken)

Source:
ConfigurationClient.cs
Source:
ConfigurationClient.cs

Sets an existing ConfigurationSetting to read only or read write state in the configuration store.

public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Data.AppConfiguration.ConfigurationSetting>> SetReadOnlyAsync (string key, string label, bool isReadOnly, System.Threading.CancellationToken cancellationToken = default);
abstract member SetReadOnlyAsync : string * string * bool * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Data.AppConfiguration.ConfigurationSetting>>
override this.SetReadOnlyAsync : string * string * bool * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Data.AppConfiguration.ConfigurationSetting>>
Public Overridable Function SetReadOnlyAsync (key As String, label As String, isReadOnly As Boolean, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of ConfigurationSetting))

Parameters

key
String

The primary identifier of the configuration setting.

label
String

A label used to group this configuration setting with others.

isReadOnly
Boolean

If true, the ConfigurationSetting will be set to read only in the configuration store. If false, it will be set to read write.

cancellationToken
CancellationToken

A CancellationToken controlling the request lifetime.

Returns

Applies to