Delen via


ConfigurationClient.SetReadOnly Method

Definition

Overloads

SetReadOnly(String, Boolean, CancellationToken)

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

SetReadOnly(ConfigurationSetting, Boolean, Boolean, CancellationToken)

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

SetReadOnly(String, String, Boolean, CancellationToken)

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

SetReadOnly(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 Azure.Response<Azure.Data.AppConfiguration.ConfigurationSetting> SetReadOnly (string key, bool isReadOnly, System.Threading.CancellationToken cancellationToken = default);
abstract member SetReadOnly : string * bool * System.Threading.CancellationToken -> Azure.Response<Azure.Data.AppConfiguration.ConfigurationSetting>
override this.SetReadOnly : string * bool * System.Threading.CancellationToken -> Azure.Response<Azure.Data.AppConfiguration.ConfigurationSetting>
Public Overridable Function SetReadOnly (key As String, isReadOnly As Boolean, Optional cancellationToken As CancellationToken = Nothing) As 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

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

SetReadOnly(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 Azure.Response<Azure.Data.AppConfiguration.ConfigurationSetting> SetReadOnly (string key, string label, bool isReadOnly, System.Threading.CancellationToken cancellationToken = default);
abstract member SetReadOnly : string * string * bool * System.Threading.CancellationToken -> Azure.Response<Azure.Data.AppConfiguration.ConfigurationSetting>
override this.SetReadOnly : string * string * bool * System.Threading.CancellationToken -> Azure.Response<Azure.Data.AppConfiguration.ConfigurationSetting>
Public Overridable Function SetReadOnly (key As String, label As String, isReadOnly As Boolean, Optional cancellationToken As CancellationToken = Nothing) As 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