Share via


CloudServiceExtension Class

Definition

Describes a cloud service Extension.

public class CloudServiceExtension : System.ClientModel.Primitives.IJsonModel<Azure.ResourceManager.Compute.Models.CloudServiceExtension>, System.ClientModel.Primitives.IPersistableModel<Azure.ResourceManager.Compute.Models.CloudServiceExtension>
type CloudServiceExtension = class
    interface IJsonModel<CloudServiceExtension>
    interface IPersistableModel<CloudServiceExtension>
Public Class CloudServiceExtension
Implements IJsonModel(Of CloudServiceExtension), IPersistableModel(Of CloudServiceExtension)
Inheritance
CloudServiceExtension
Implements

Constructors

CloudServiceExtension()

Initializes a new instance of CloudServiceExtension.

Properties

AutoUpgradeMinorVersion

Explicitly specify whether platform can automatically upgrade typeHandlerVersion to higher minor versions when they become available.

CloudServiceExtensionPropertiesType

Specifies the type of the extension.

ForceUpdateTag

Tag to force apply the provided public and protected settings. Changing the tag value allows for re-running the extension without changing any of the public or protected settings. If forceUpdateTag is not changed, updates to public or protected settings would still be applied by the handler. If neither forceUpdateTag nor any of public or protected settings change, extension would flow to the role instance with the same sequence-number, and it is up to handler implementation whether to re-run it or not

Name

The name of the extension.

ProtectedSettings

Protected settings for the extension which are encrypted before sent to the role instance.

To assign an object to this property use FromObjectAsJson<T>(T, JsonSerializerOptions).

To assign an already formatted json string to this property use FromString(String).

Examples:

  • BinaryData.FromObjectAsJson("foo"): Creates a payload of "foo".
  • BinaryData.FromString("\"foo\""): Creates a payload of "foo".
  • BinaryData.FromObjectAsJson(new { key = "value" }): Creates a payload of { "key": "value" }.
  • BinaryData.FromString("{\"key\": \"value\"}"): Creates a payload of { "key": "value" }.

ProtectedSettingsFromKeyVault

Protected settings for the extension, referenced using KeyVault which are encrypted before sent to the role instance.

ProvisioningState

The provisioning state, which only appears in the response.

Publisher

The name of the extension handler publisher.

RolesAppliedTo

Optional list of roles to apply this extension. If property is not specified or '*' is specified, extension is applied to all roles in the cloud service.

Settings

Public settings for the extension. For JSON extensions, this is the JSON settings for the extension. For XML Extension (like RDP), this is the XML setting for the extension.

To assign an object to this property use FromObjectAsJson<T>(T, JsonSerializerOptions).

To assign an already formatted json string to this property use FromString(String).

Examples:

  • BinaryData.FromObjectAsJson("foo"): Creates a payload of "foo".
  • BinaryData.FromString("\"foo\""): Creates a payload of "foo".
  • BinaryData.FromObjectAsJson(new { key = "value" }): Creates a payload of { "key": "value" }.
  • BinaryData.FromString("{\"key\": \"value\"}"): Creates a payload of { "key": "value" }.

TypeHandlerVersion

Specifies the version of the extension. Specifies the version of the extension. If this element is not specified or an asterisk (*) is used as the value, the latest version of the extension is used. If the value is specified with a major version number and an asterisk as the minor version number (X.), the latest minor version of the specified major version is selected. If a major version number and a minor version number are specified (X.Y), the specific extension version is selected. If a version is specified, an auto-upgrade is performed on the role instance.

Methods

JsonModelWriteCore(Utf8JsonWriter, ModelReaderWriterOptions)

Explicit Interface Implementations

IJsonModel<CloudServiceExtension>.Create(Utf8JsonReader, ModelReaderWriterOptions)

Reads one JSON value (including objects or arrays) from the provided reader and converts it to a model.

IJsonModel<CloudServiceExtension>.Write(Utf8JsonWriter, ModelReaderWriterOptions)

Writes the model to the provided Utf8JsonWriter.

IPersistableModel<CloudServiceExtension>.Create(BinaryData, ModelReaderWriterOptions)

Converts the provided BinaryData into a model.

IPersistableModel<CloudServiceExtension>.GetFormatFromOptions(ModelReaderWriterOptions)

Gets the data interchange format (JSON, Xml, etc) that the model uses when communicating with the service.

IPersistableModel<CloudServiceExtension>.Write(ModelReaderWriterOptions)

Writes the model into a BinaryData.

Applies to