AzureCliScript Class

Definition

Object model for the Azure CLI script.

public class AzureCliScript : Azure.ResourceManager.Resources.ArmDeploymentScriptData, System.ClientModel.Primitives.IJsonModel<Azure.ResourceManager.Resources.Models.AzureCliScript>, System.ClientModel.Primitives.IPersistableModel<Azure.ResourceManager.Resources.Models.AzureCliScript>
public class AzureCliScript : Azure.ResourceManager.Resources.ArmDeploymentScriptData
type AzureCliScript = class
    inherit ArmDeploymentScriptData
    interface IJsonModel<AzureCliScript>
    interface IPersistableModel<AzureCliScript>
type AzureCliScript = class
    inherit ArmDeploymentScriptData
Public Class AzureCliScript
Inherits ArmDeploymentScriptData
Implements IJsonModel(Of AzureCliScript), IPersistableModel(Of AzureCliScript)
Public Class AzureCliScript
Inherits ArmDeploymentScriptData
Inheritance
Implements

Constructors

AzureCliScript(AzureLocation, TimeSpan, String)

Initializes a new instance of AzureCliScript.

Properties

Arguments

Command line arguments to pass to the script. Arguments are separated by spaces. ex: -Name blue* -Location 'West US 2'.

AzCliVersion

Azure CLI module version to be used.

CleanupPreference

The clean up preference when the script execution gets in a terminal state. Default setting is 'Always'.

ContainerGroupName

Container group name, if not specified then the name will get auto-generated. Not specifying a 'containerGroupName' indicates the system to generate a unique name which might end up flagging an Azure Policy as non-compliant. Use 'containerGroupName' when you have an Azure Policy that expects a specific naming convention or when you want to fully control the name. 'containerGroupName' property must be between 1 and 63 characters long, must contain only lowercase letters, numbers, and dashes and it cannot start or end with a dash and consecutive dashes are not allowed. To specify a 'containerGroupName', add the following object to properties: { "containerSettings": { "containerGroupName": "contoso-container" } }. If you do not want to specify a 'containerGroupName' then do not add 'containerSettings' property.

EnvironmentVariables

The environment variables to pass over to the script.

ForceUpdateTag

Gets or sets how the deployment script should be forced to execute even if the script resource has not changed. Can be current time stamp or a GUID.

Id

Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.

(Inherited from ResourceData)
Identity

Optional property. Managed identity to be used for this deployment script. Currently, only user-assigned MSI is supported.

(Inherited from ArmDeploymentScriptData)
Location

The location of the ACI and the storage account for the deployment script.

(Inherited from ArmDeploymentScriptData)
Name

The name of the resource.

(Inherited from ResourceData)
Outputs

List of script outputs.

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" }.

PrimaryScriptUri

Uri for the script. This is the entry point for the external script.

ProvisioningState

State of the script execution. This only appears in the response.

ResourceType

The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".

(Inherited from ResourceData)
RetentionInterval

Interval for which the service retains the script resource after it reaches a terminal state. Resource will be deleted when this duration expires. Duration is based on ISO 8601 pattern (for example P1D means one day).

ScriptContent

Script body.

Status

Contains the results of script execution.

StorageAccountSettings

Storage Account settings.

SupportingScriptUris

Supporting files for the external script.

SystemData

Azure Resource Manager metadata containing createdBy and modifiedBy information.

(Inherited from ResourceData)
Tags

Resource tags.

(Inherited from ArmDeploymentScriptData)
Timeout

Maximum allowed script execution time specified in ISO 8601 format. Default value is P1D.

Methods

JsonModelWriteCore(Utf8JsonWriter, ModelReaderWriterOptions) (Inherited from ResourceData)

Explicit Interface Implementations

IJsonModel<ArmDeploymentScriptData>.Create(Utf8JsonReader, ModelReaderWriterOptions)

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

(Inherited from ArmDeploymentScriptData)
IJsonModel<ArmDeploymentScriptData>.Write(Utf8JsonWriter, ModelReaderWriterOptions)

Writes the model to the provided Utf8JsonWriter.

(Inherited from ArmDeploymentScriptData)
IJsonModel<AzureCliScript>.Create(Utf8JsonReader, ModelReaderWriterOptions)

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

IJsonModel<AzureCliScript>.Write(Utf8JsonWriter, ModelReaderWriterOptions)

Writes the model to the provided Utf8JsonWriter.

IPersistableModel<ArmDeploymentScriptData>.Create(BinaryData, ModelReaderWriterOptions)

Converts the provided BinaryData into a model.

(Inherited from ArmDeploymentScriptData)
IPersistableModel<ArmDeploymentScriptData>.GetFormatFromOptions(ModelReaderWriterOptions)

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

(Inherited from ArmDeploymentScriptData)
IPersistableModel<ArmDeploymentScriptData>.Write(ModelReaderWriterOptions)

Writes the model into a BinaryData.

(Inherited from ArmDeploymentScriptData)
IPersistableModel<AzureCliScript>.Create(BinaryData, ModelReaderWriterOptions)

Converts the provided BinaryData into a model.

IPersistableModel<AzureCliScript>.GetFormatFromOptions(ModelReaderWriterOptions)

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

IPersistableModel<AzureCliScript>.Write(ModelReaderWriterOptions)

Writes the model into a BinaryData.

Applies to