Share via


AzurePowerShellScript Class

Definition

AzurePowerShellScript.

public class AzurePowerShellScript : Azure.Provisioning.Resources.ArmDeploymentScript
type AzurePowerShellScript = class
    inherit ArmDeploymentScript
Public Class AzurePowerShellScript
Inherits ArmDeploymentScript
Inheritance

Constructors

AzurePowerShellScript(String, String)

Creates a new AzurePowerShellScript.

Properties

Arguments

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

AzPowerShellVersion

Azure PowerShell module version to be used.

BicepIdentifier

Gets or sets the the Bicep identifier name of the resource. This can be used to refer to the resource in expressions, but is not the Azure name of the resource. This value can contain letters, numbers, and underscores.

(Inherited from NamedProvisionableConstruct)
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.

ContainerSettings

Container settings.

DependsOn

Declares explicit dependencies on other resources.

(Inherited from ProvisionableResource)
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

Gets the Id.

(Inherited from ArmDeploymentScript)
Identity

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

(Inherited from ArmDeploymentScript)
IsExistingResource

Gets whether this is referencing an existing resource or we're defining a new resource.

(Inherited from ProvisionableResource)
Location

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

(Inherited from ArmDeploymentScript)
Name

Name of the deployment script.

(Inherited from ArmDeploymentScript)
Outputs

List of script outputs. To assign an object to this property use System.BinaryData.FromObjectAsJson1(0,System.Text.Json.JsonSerializerOptions). To assign an already formatted json string to this property use System.BinaryData.FromString(System.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

Gets the type of the resource.

(Inherited from ProvisionableResource)
ResourceVersion

Gets or sets the version of the resource.

(Inherited from ProvisionableResource)
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

Gets the SystemData.

(Inherited from ArmDeploymentScript)
Tags

Resource tags.

(Inherited from ArmDeploymentScript)
Timeout

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

Methods

AssignOrReplace<T>(T, T) (Inherited from ProvisionableConstruct)
Build(ProvisioningBuildOptions)

Compose the resource into a provisioning plan that can be saved as Bicep or deployed directly.

(Inherited from ProvisionableResource)
Compile()

Compile the resource into a set of Bicep statements.

(Inherited from ProvisionableResource)
DefineDictionaryProperty<T>(String, String[], Boolean, Boolean) (Inherited from ProvisionableConstruct)
DefineListProperty<T>(String, String[], Boolean, Boolean) (Inherited from ProvisionableConstruct)
DefineModelProperty<T>(String, String[], Boolean, Boolean, Boolean, String) (Inherited from ProvisionableConstruct)
DefineProperty<T>(String, String[], Boolean, Boolean, Boolean, BicepValue<T>, String) (Inherited from ProvisionableConstruct)
DefineProvisionableProperties()

Define all the provisionable properties of AzurePowerShellScript.

DefineResource<T>(String, String[], Boolean, Boolean, T) (Inherited from ProvisionableResource)
GetProvisionableResources()

Get any resources represented by this object. This will typically only be the object itself for everything but Infrastructure.

(Inherited from Provisionable)
Initialize()

Initialize this construct.

(Inherited from ProvisionableConstruct)
OverrideWithExpression(BicepExpression) (Inherited from ProvisionableConstruct)
Resolve(ProvisioningBuildOptions)

Resolve any resources or properties that were not explicitly specified.

(Inherited from ProvisionableConstruct)
Validate(ProvisioningBuildOptions)

Validate the presence of any required members.

(Inherited from ProvisionableResource)

Explicit Interface Implementations

IBicepValue.Assign(IBicepValue)

Assign a value to this property.

(Inherited from ProvisionableConstruct)
IBicepValue.Compile()

Compile this value to a Bicep expression.

(Inherited from ProvisionableConstruct)
IBicepValue.Expression

Gets the expression for this value if it's not a literal.

(Inherited from ProvisionableConstruct)
IBicepValue.IsEmpty

Gets whether this value is unset or empty.

(Inherited from ProvisionableConstruct)
IBicepValue.IsOutput

Tracks whether this is an output only property.

(Inherited from ProvisionableConstruct)
IBicepValue.IsRequired

Tracks whether this property is required.

(Inherited from ProvisionableConstruct)
IBicepValue.IsSecure

Tracks whether this contains a secure value.

(Inherited from ProvisionableConstruct)
IBicepValue.Kind

Gets the kind of this value (a literal value, an expression, or it's unset).

(Inherited from ProvisionableConstruct)
IBicepValue.LiteralValue

Get the value of this expression, if it's literal.

(Inherited from ProvisionableConstruct)
IBicepValue.Self

Gets information about where this value was defined.

(Inherited from ProvisionableConstruct)
IBicepValue.SetReadOnly()

Make this value readonly.

(Inherited from ProvisionableConstruct)
IBicepValue.Source

Gets information about where this value was assigned from.

(Inherited from ProvisionableConstruct)

Applies to