Azure Native

Pulumi Official
Package maintained by Pulumi
v1.68.2 published on Tuesday, Aug 16, 2022 by Pulumi

AzurePowerShellScript

Object model for the Azure PowerShell script. API Version: 2020-10-01.

Example Usage

DeploymentScriptsCreate

using System.Collections.Generic;
using Pulumi;
using AzureNative = Pulumi.AzureNative;

return await Deployment.RunAsync(() => 
{
    var azurePowerShellScript = new AzureNative.Resources.AzurePowerShellScript("azurePowerShellScript", new()
    {
        Arguments = "-Location 'westus' -Name \"*rg2\"",
        AzPowerShellVersion = "1.7.0",
        CleanupPreference = "Always",
        Identity = new AzureNative.Resources.Inputs.ManagedServiceIdentityArgs
        {
            Type = "UserAssigned",
            UserAssignedIdentities = 
            {
                { "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scriptRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/uai",  },
            },
        },
        Kind = "AzurePowerShell",
        Location = "westus",
        ResourceGroupName = "script-rg",
        RetentionInterval = "PT7D",
        ScriptContent = "Param([string]$Location,[string]$Name) $deploymentScriptOutputs['test'] = 'value' Get-AzResourceGroup -Location $Location -Name $Name",
        ScriptName = "MyDeploymentScript",
        SupportingScriptUris = new[]
        {
            "https://uri1.to.supporting.script",
            "https://uri2.to.supporting.script",
        },
        Timeout = "PT1H",
    });

});
package main

import (
	"fmt"

	resources "github.com/pulumi/pulumi-azure-native/sdk/go/azure/resources"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := resources.NewAzurePowerShellScript(ctx, "azurePowerShellScript", &resources.AzurePowerShellScriptArgs{
			Arguments:           pulumi.String("-Location 'westus' -Name \"*rg2\""),
			AzPowerShellVersion: pulumi.String("1.7.0"),
			CleanupPreference:   pulumi.String("Always"),
			Identity: &resources.ManagedServiceIdentityArgs{
				Type: pulumi.String("UserAssigned"),
				UserAssignedIdentities: pulumi.AnyMap{
					"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scriptRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/uai": nil,
				},
			},
			Kind:              pulumi.String("AzurePowerShell"),
			Location:          pulumi.String("westus"),
			ResourceGroupName: pulumi.String("script-rg"),
			RetentionInterval: pulumi.String("PT7D"),
			ScriptContent:     pulumi.String(fmt.Sprintf("Param([string]$Location,[string]$Name) $deploymentScriptOutputs['test'] = 'value' Get-AzResourceGroup -Location $Location -Name $Name")),
			ScriptName:        pulumi.String("MyDeploymentScript"),
			SupportingScriptUris: pulumi.StringArray{
				pulumi.String("https://uri1.to.supporting.script"),
				pulumi.String("https://uri2.to.supporting.script"),
			},
			Timeout: pulumi.String("PT1H"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.resources.AzurePowerShellScript;
import com.pulumi.azurenative.resources.AzurePowerShellScriptArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var azurePowerShellScript = new AzurePowerShellScript("azurePowerShellScript", AzurePowerShellScriptArgs.builder()        
            .arguments("-Location 'westus' -Name \"*rg2\"")
            .azPowerShellVersion("1.7.0")
            .cleanupPreference("Always")
            .identity(Map.ofEntries(
                Map.entry("type", "UserAssigned"),
                Map.entry("userAssignedIdentities", Map.of("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scriptRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/uai", ))
            ))
            .kind("AzurePowerShell")
            .location("westus")
            .resourceGroupName("script-rg")
            .retentionInterval("PT7D")
            .scriptContent("Param([string]$Location,[string]$Name) $deploymentScriptOutputs['test'] = 'value' Get-AzResourceGroup -Location $Location -Name $Name")
            .scriptName("MyDeploymentScript")
            .supportingScriptUris(            
                "https://uri1.to.supporting.script",
                "https://uri2.to.supporting.script")
            .timeout("PT1H")
            .build());

    }
}
import pulumi
import pulumi_azure_native as azure_native

azure_power_shell_script = azure_native.resources.AzurePowerShellScript("azurePowerShellScript",
    arguments="-Location 'westus' -Name \"*rg2\"",
    az_power_shell_version="1.7.0",
    cleanup_preference="Always",
    identity=azure_native.resources.ManagedServiceIdentityArgs(
        type="UserAssigned",
        user_assigned_identities={
            "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scriptRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/uai": {},
        },
    ),
    kind="AzurePowerShell",
    location="westus",
    resource_group_name="script-rg",
    retention_interval="PT7D",
    script_content="Param([string]$Location,[string]$Name) $deploymentScriptOutputs['test'] = 'value' Get-AzResourceGroup -Location $Location -Name $Name",
    script_name="MyDeploymentScript",
    supporting_script_uris=[
        "https://uri1.to.supporting.script",
        "https://uri2.to.supporting.script",
    ],
    timeout="PT1H")
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";

const azurePowerShellScript = new azure_native.resources.AzurePowerShellScript("azurePowerShellScript", {
    arguments: "-Location 'westus' -Name \"*rg2\"",
    azPowerShellVersion: "1.7.0",
    cleanupPreference: "Always",
    identity: {
        type: "UserAssigned",
        userAssignedIdentities: {
            "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scriptRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/uai": {},
        },
    },
    kind: "AzurePowerShell",
    location: "westus",
    resourceGroupName: "script-rg",
    retentionInterval: "PT7D",
    scriptContent: `Param([string]$Location,[string]$Name) $deploymentScriptOutputs['test'] = 'value' Get-AzResourceGroup -Location $Location -Name $Name`,
    scriptName: "MyDeploymentScript",
    supportingScriptUris: [
        "https://uri1.to.supporting.script",
        "https://uri2.to.supporting.script",
    ],
    timeout: "PT1H",
});
resources:
  azurePowerShellScript:
    type: azure-native:resources:AzurePowerShellScript
    properties:
      arguments: -Location 'westus' -Name "*rg2"
      azPowerShellVersion: 1.7.0
      cleanupPreference: Always
      identity:
        type: UserAssigned
        userAssignedIdentities:
          ? /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scriptRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/uai
          : {}
      kind: AzurePowerShell
      location: westus
      resourceGroupName: script-rg
      retentionInterval: PT7D
      scriptContent: Param([string]$Location,[string]$Name) $deploymentScriptOutputs['test'] = 'value' Get-AzResourceGroup -Location $Location -Name $Name
      scriptName: MyDeploymentScript
      supportingScriptUris:
        - https://uri1.to.supporting.script
        - https://uri2.to.supporting.script
      timeout: PT1H

DeploymentScriptsCreateNoUserManagedIdentity

using System.Collections.Generic;
using Pulumi;
using AzureNative = Pulumi.AzureNative;

return await Deployment.RunAsync(() => 
{
    var azurePowerShellScript = new AzureNative.Resources.AzurePowerShellScript("azurePowerShellScript", new()
    {
        Arguments = "-Location 'westus' -Name \"*rg2\"",
        AzPowerShellVersion = "1.7.0",
        CleanupPreference = "Always",
        Kind = "AzurePowerShell",
        Location = "westus",
        ResourceGroupName = "script-rg",
        RetentionInterval = "PT7D",
        ScriptContent = "Param([string]$Location,[string]$Name) $deploymentScriptOutputs['test'] = 'value' Get-AzResourceGroup -Location $Location -Name $Name",
        ScriptName = "MyDeploymentScript",
        SupportingScriptUris = new[]
        {
            "https://uri1.to.supporting.script",
            "https://uri2.to.supporting.script",
        },
        Timeout = "PT1H",
    });

});
package main

import (
	"fmt"

	resources "github.com/pulumi/pulumi-azure-native/sdk/go/azure/resources"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := resources.NewAzurePowerShellScript(ctx, "azurePowerShellScript", &resources.AzurePowerShellScriptArgs{
			Arguments:           pulumi.String("-Location 'westus' -Name \"*rg2\""),
			AzPowerShellVersion: pulumi.String("1.7.0"),
			CleanupPreference:   pulumi.String("Always"),
			Kind:                pulumi.String("AzurePowerShell"),
			Location:            pulumi.String("westus"),
			ResourceGroupName:   pulumi.String("script-rg"),
			RetentionInterval:   pulumi.String("PT7D"),
			ScriptContent:       pulumi.String(fmt.Sprintf("Param([string]$Location,[string]$Name) $deploymentScriptOutputs['test'] = 'value' Get-AzResourceGroup -Location $Location -Name $Name")),
			ScriptName:          pulumi.String("MyDeploymentScript"),
			SupportingScriptUris: pulumi.StringArray{
				pulumi.String("https://uri1.to.supporting.script"),
				pulumi.String("https://uri2.to.supporting.script"),
			},
			Timeout: pulumi.String("PT1H"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.resources.AzurePowerShellScript;
import com.pulumi.azurenative.resources.AzurePowerShellScriptArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var azurePowerShellScript = new AzurePowerShellScript("azurePowerShellScript", AzurePowerShellScriptArgs.builder()        
            .arguments("-Location 'westus' -Name \"*rg2\"")
            .azPowerShellVersion("1.7.0")
            .cleanupPreference("Always")
            .kind("AzurePowerShell")
            .location("westus")
            .resourceGroupName("script-rg")
            .retentionInterval("PT7D")
            .scriptContent("Param([string]$Location,[string]$Name) $deploymentScriptOutputs['test'] = 'value' Get-AzResourceGroup -Location $Location -Name $Name")
            .scriptName("MyDeploymentScript")
            .supportingScriptUris(            
                "https://uri1.to.supporting.script",
                "https://uri2.to.supporting.script")
            .timeout("PT1H")
            .build());

    }
}
import pulumi
import pulumi_azure_native as azure_native

azure_power_shell_script = azure_native.resources.AzurePowerShellScript("azurePowerShellScript",
    arguments="-Location 'westus' -Name \"*rg2\"",
    az_power_shell_version="1.7.0",
    cleanup_preference="Always",
    kind="AzurePowerShell",
    location="westus",
    resource_group_name="script-rg",
    retention_interval="PT7D",
    script_content="Param([string]$Location,[string]$Name) $deploymentScriptOutputs['test'] = 'value' Get-AzResourceGroup -Location $Location -Name $Name",
    script_name="MyDeploymentScript",
    supporting_script_uris=[
        "https://uri1.to.supporting.script",
        "https://uri2.to.supporting.script",
    ],
    timeout="PT1H")
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";

const azurePowerShellScript = new azure_native.resources.AzurePowerShellScript("azurePowerShellScript", {
    arguments: "-Location 'westus' -Name \"*rg2\"",
    azPowerShellVersion: "1.7.0",
    cleanupPreference: "Always",
    kind: "AzurePowerShell",
    location: "westus",
    resourceGroupName: "script-rg",
    retentionInterval: "PT7D",
    scriptContent: `Param([string]$Location,[string]$Name) $deploymentScriptOutputs['test'] = 'value' Get-AzResourceGroup -Location $Location -Name $Name`,
    scriptName: "MyDeploymentScript",
    supportingScriptUris: [
        "https://uri1.to.supporting.script",
        "https://uri2.to.supporting.script",
    ],
    timeout: "PT1H",
});
resources:
  azurePowerShellScript:
    type: azure-native:resources:AzurePowerShellScript
    properties:
      arguments: -Location 'westus' -Name "*rg2"
      azPowerShellVersion: 1.7.0
      cleanupPreference: Always
      kind: AzurePowerShell
      location: westus
      resourceGroupName: script-rg
      retentionInterval: PT7D
      scriptContent: Param([string]$Location,[string]$Name) $deploymentScriptOutputs['test'] = 'value' Get-AzResourceGroup -Location $Location -Name $Name
      scriptName: MyDeploymentScript
      supportingScriptUris:
        - https://uri1.to.supporting.script
        - https://uri2.to.supporting.script
      timeout: PT1H

DeploymentScriptsCreate_MinCreate

using System.Collections.Generic;
using Pulumi;
using AzureNative = Pulumi.AzureNative;

return await Deployment.RunAsync(() => 
{
    var azurePowerShellScript = new AzureNative.Resources.AzurePowerShellScript("azurePowerShellScript", new()
    {
        Arguments = "-Location 'westus' -Name \"*rg2\"",
        AzPowerShellVersion = "1.7.0",
        Identity = new AzureNative.Resources.Inputs.ManagedServiceIdentityArgs
        {
            Type = "UserAssigned",
            UserAssignedIdentities = 
            {
                { "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scriptRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/uai",  },
            },
        },
        Kind = "AzurePowerShell",
        Location = "westus",
        ResourceGroupName = "script-rg",
        RetentionInterval = "P7D",
        ScriptContent = "Param([string]$Location,[string]$Name) $deploymentScriptOutputs['test'] = 'value' Get-AzResourceGroup -Location $Location -Name $Name",
        ScriptName = "MyDeploymentScript",
    });

});
package main

import (
	"fmt"

	resources "github.com/pulumi/pulumi-azure-native/sdk/go/azure/resources"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := resources.NewAzurePowerShellScript(ctx, "azurePowerShellScript", &resources.AzurePowerShellScriptArgs{
			Arguments:           pulumi.String("-Location 'westus' -Name \"*rg2\""),
			AzPowerShellVersion: pulumi.String("1.7.0"),
			Identity: &resources.ManagedServiceIdentityArgs{
				Type: pulumi.String("UserAssigned"),
				UserAssignedIdentities: pulumi.AnyMap{
					"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scriptRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/uai": nil,
				},
			},
			Kind:              pulumi.String("AzurePowerShell"),
			Location:          pulumi.String("westus"),
			ResourceGroupName: pulumi.String("script-rg"),
			RetentionInterval: pulumi.String("P7D"),
			ScriptContent:     pulumi.String(fmt.Sprintf("Param([string]$Location,[string]$Name) $deploymentScriptOutputs['test'] = 'value' Get-AzResourceGroup -Location $Location -Name $Name")),
			ScriptName:        pulumi.String("MyDeploymentScript"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.resources.AzurePowerShellScript;
import com.pulumi.azurenative.resources.AzurePowerShellScriptArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var azurePowerShellScript = new AzurePowerShellScript("azurePowerShellScript", AzurePowerShellScriptArgs.builder()        
            .arguments("-Location 'westus' -Name \"*rg2\"")
            .azPowerShellVersion("1.7.0")
            .identity(Map.ofEntries(
                Map.entry("type", "UserAssigned"),
                Map.entry("userAssignedIdentities", Map.of("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scriptRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/uai", ))
            ))
            .kind("AzurePowerShell")
            .location("westus")
            .resourceGroupName("script-rg")
            .retentionInterval("P7D")
            .scriptContent("Param([string]$Location,[string]$Name) $deploymentScriptOutputs['test'] = 'value' Get-AzResourceGroup -Location $Location -Name $Name")
            .scriptName("MyDeploymentScript")
            .build());

    }
}
import pulumi
import pulumi_azure_native as azure_native

azure_power_shell_script = azure_native.resources.AzurePowerShellScript("azurePowerShellScript",
    arguments="-Location 'westus' -Name \"*rg2\"",
    az_power_shell_version="1.7.0",
    identity=azure_native.resources.ManagedServiceIdentityArgs(
        type="UserAssigned",
        user_assigned_identities={
            "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scriptRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/uai": {},
        },
    ),
    kind="AzurePowerShell",
    location="westus",
    resource_group_name="script-rg",
    retention_interval="P7D",
    script_content="Param([string]$Location,[string]$Name) $deploymentScriptOutputs['test'] = 'value' Get-AzResourceGroup -Location $Location -Name $Name",
    script_name="MyDeploymentScript")
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";

const azurePowerShellScript = new azure_native.resources.AzurePowerShellScript("azurePowerShellScript", {
    arguments: "-Location 'westus' -Name \"*rg2\"",
    azPowerShellVersion: "1.7.0",
    identity: {
        type: "UserAssigned",
        userAssignedIdentities: {
            "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scriptRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/uai": {},
        },
    },
    kind: "AzurePowerShell",
    location: "westus",
    resourceGroupName: "script-rg",
    retentionInterval: "P7D",
    scriptContent: `Param([string]$Location,[string]$Name) $deploymentScriptOutputs['test'] = 'value' Get-AzResourceGroup -Location $Location -Name $Name`,
    scriptName: "MyDeploymentScript",
});
resources:
  azurePowerShellScript:
    type: azure-native:resources:AzurePowerShellScript
    properties:
      arguments: -Location 'westus' -Name "*rg2"
      azPowerShellVersion: 1.7.0
      identity:
        type: UserAssigned
        userAssignedIdentities:
          ? /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scriptRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/uai
          : {}
      kind: AzurePowerShell
      location: westus
      resourceGroupName: script-rg
      retentionInterval: P7D
      scriptContent: Param([string]$Location,[string]$Name) $deploymentScriptOutputs['test'] = 'value' Get-AzResourceGroup -Location $Location -Name $Name
      scriptName: MyDeploymentScript

DeploymentScriptsCreate_UsingCustomACIName

using System.Collections.Generic;
using Pulumi;
using AzureNative = Pulumi.AzureNative;

return await Deployment.RunAsync(() => 
{
    var azurePowerShellScript = new AzureNative.Resources.AzurePowerShellScript("azurePowerShellScript", new()
    {
        Arguments = "-Location 'westus' -Name \"*rg2\"",
        AzPowerShellVersion = "1.7.0",
        CleanupPreference = "Always",
        ContainerSettings = new AzureNative.Resources.Inputs.ContainerConfigurationArgs
        {
            ContainerGroupName = "contoso-aci",
        },
        Identity = new AzureNative.Resources.Inputs.ManagedServiceIdentityArgs
        {
            Type = "UserAssigned",
            UserAssignedIdentities = 
            {
                { "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scriptRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/uai",  },
            },
        },
        Kind = "AzurePowerShell",
        Location = "westus",
        ResourceGroupName = "script-rg",
        RetentionInterval = "PT7D",
        ScriptContent = "Param([string]$Location,[string]$Name) $deploymentScriptOutputs['test'] = 'value' Get-AzResourceGroup -Location $Location -Name $Name",
        ScriptName = "MyDeploymentScript",
        SupportingScriptUris = new[]
        {
            "https://uri1.to.supporting.script",
            "https://uri2.to.supporting.script",
        },
        Timeout = "PT1H",
    });

});
package main

import (
	"fmt"

	resources "github.com/pulumi/pulumi-azure-native/sdk/go/azure/resources"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := resources.NewAzurePowerShellScript(ctx, "azurePowerShellScript", &resources.AzurePowerShellScriptArgs{
			Arguments:           pulumi.String("-Location 'westus' -Name \"*rg2\""),
			AzPowerShellVersion: pulumi.String("1.7.0"),
			CleanupPreference:   pulumi.String("Always"),
			ContainerSettings: &resources.ContainerConfigurationArgs{
				ContainerGroupName: pulumi.String("contoso-aci"),
			},
			Identity: &resources.ManagedServiceIdentityArgs{
				Type: pulumi.String("UserAssigned"),
				UserAssignedIdentities: pulumi.AnyMap{
					"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scriptRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/uai": nil,
				},
			},
			Kind:              pulumi.String("AzurePowerShell"),
			Location:          pulumi.String("westus"),
			ResourceGroupName: pulumi.String("script-rg"),
			RetentionInterval: pulumi.String("PT7D"),
			ScriptContent:     pulumi.String(fmt.Sprintf("Param([string]$Location,[string]$Name) $deploymentScriptOutputs['test'] = 'value' Get-AzResourceGroup -Location $Location -Name $Name")),
			ScriptName:        pulumi.String("MyDeploymentScript"),
			SupportingScriptUris: pulumi.StringArray{
				pulumi.String("https://uri1.to.supporting.script"),
				pulumi.String("https://uri2.to.supporting.script"),
			},
			Timeout: pulumi.String("PT1H"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.resources.AzurePowerShellScript;
import com.pulumi.azurenative.resources.AzurePowerShellScriptArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var azurePowerShellScript = new AzurePowerShellScript("azurePowerShellScript", AzurePowerShellScriptArgs.builder()        
            .arguments("-Location 'westus' -Name \"*rg2\"")
            .azPowerShellVersion("1.7.0")
            .cleanupPreference("Always")
            .containerSettings(Map.of("containerGroupName", "contoso-aci"))
            .identity(Map.ofEntries(
                Map.entry("type", "UserAssigned"),
                Map.entry("userAssignedIdentities", Map.of("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scriptRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/uai", ))
            ))
            .kind("AzurePowerShell")
            .location("westus")
            .resourceGroupName("script-rg")
            .retentionInterval("PT7D")
            .scriptContent("Param([string]$Location,[string]$Name) $deploymentScriptOutputs['test'] = 'value' Get-AzResourceGroup -Location $Location -Name $Name")
            .scriptName("MyDeploymentScript")
            .supportingScriptUris(            
                "https://uri1.to.supporting.script",
                "https://uri2.to.supporting.script")
            .timeout("PT1H")
            .build());

    }
}
import pulumi
import pulumi_azure_native as azure_native

azure_power_shell_script = azure_native.resources.AzurePowerShellScript("azurePowerShellScript",
    arguments="-Location 'westus' -Name \"*rg2\"",
    az_power_shell_version="1.7.0",
    cleanup_preference="Always",
    container_settings=azure_native.resources.ContainerConfigurationArgs(
        container_group_name="contoso-aci",
    ),
    identity=azure_native.resources.ManagedServiceIdentityArgs(
        type="UserAssigned",
        user_assigned_identities={
            "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scriptRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/uai": {},
        },
    ),
    kind="AzurePowerShell",
    location="westus",
    resource_group_name="script-rg",
    retention_interval="PT7D",
    script_content="Param([string]$Location,[string]$Name) $deploymentScriptOutputs['test'] = 'value' Get-AzResourceGroup -Location $Location -Name $Name",
    script_name="MyDeploymentScript",
    supporting_script_uris=[
        "https://uri1.to.supporting.script",
        "https://uri2.to.supporting.script",
    ],
    timeout="PT1H")
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";

const azurePowerShellScript = new azure_native.resources.AzurePowerShellScript("azurePowerShellScript", {
    arguments: "-Location 'westus' -Name \"*rg2\"",
    azPowerShellVersion: "1.7.0",
    cleanupPreference: "Always",
    containerSettings: {
        containerGroupName: "contoso-aci",
    },
    identity: {
        type: "UserAssigned",
        userAssignedIdentities: {
            "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scriptRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/uai": {},
        },
    },
    kind: "AzurePowerShell",
    location: "westus",
    resourceGroupName: "script-rg",
    retentionInterval: "PT7D",
    scriptContent: `Param([string]$Location,[string]$Name) $deploymentScriptOutputs['test'] = 'value' Get-AzResourceGroup -Location $Location -Name $Name`,
    scriptName: "MyDeploymentScript",
    supportingScriptUris: [
        "https://uri1.to.supporting.script",
        "https://uri2.to.supporting.script",
    ],
    timeout: "PT1H",
});
resources:
  azurePowerShellScript:
    type: azure-native:resources:AzurePowerShellScript
    properties:
      arguments: -Location 'westus' -Name "*rg2"
      azPowerShellVersion: 1.7.0
      cleanupPreference: Always
      containerSettings:
        containerGroupName: contoso-aci
      identity:
        type: UserAssigned
        userAssignedIdentities:
          ? /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scriptRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/uai
          : {}
      kind: AzurePowerShell
      location: westus
      resourceGroupName: script-rg
      retentionInterval: PT7D
      scriptContent: Param([string]$Location,[string]$Name) $deploymentScriptOutputs['test'] = 'value' Get-AzResourceGroup -Location $Location -Name $Name
      scriptName: MyDeploymentScript
      supportingScriptUris:
        - https://uri1.to.supporting.script
        - https://uri2.to.supporting.script
      timeout: PT1H

DeploymentScriptsCreate_UsingExistingStorageAccount

using System.Collections.Generic;
using Pulumi;
using AzureNative = Pulumi.AzureNative;

return await Deployment.RunAsync(() => 
{
    var azurePowerShellScript = new AzureNative.Resources.AzurePowerShellScript("azurePowerShellScript", new()
    {
        Arguments = "-Location 'westus' -Name \"*rg2\"",
        AzPowerShellVersion = "1.7.0",
        CleanupPreference = "Always",
        Identity = new AzureNative.Resources.Inputs.ManagedServiceIdentityArgs
        {
            Type = "UserAssigned",
            UserAssignedIdentities = 
            {
                { "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scriptRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/uai",  },
            },
        },
        Kind = "AzurePowerShell",
        Location = "westus",
        ResourceGroupName = "script-rg",
        RetentionInterval = "PT7D",
        ScriptContent = "Param([string]$Location,[string]$Name) $deploymentScriptOutputs['test'] = 'value' Get-AzResourceGroup -Location $Location -Name $Name",
        ScriptName = "MyDeploymentScript",
        StorageAccountSettings = new AzureNative.Resources.Inputs.StorageAccountConfigurationArgs
        {
            StorageAccountKey = "contosostoragekey",
            StorageAccountName = "contosostorage",
        },
        SupportingScriptUris = new[]
        {
            "https://uri1.to.supporting.script",
            "https://uri2.to.supporting.script",
        },
        Timeout = "PT1H",
    });

});
package main

import (
	"fmt"

	resources "github.com/pulumi/pulumi-azure-native/sdk/go/azure/resources"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := resources.NewAzurePowerShellScript(ctx, "azurePowerShellScript", &resources.AzurePowerShellScriptArgs{
			Arguments:           pulumi.String("-Location 'westus' -Name \"*rg2\""),
			AzPowerShellVersion: pulumi.String("1.7.0"),
			CleanupPreference:   pulumi.String("Always"),
			Identity: &resources.ManagedServiceIdentityArgs{
				Type: pulumi.String("UserAssigned"),
				UserAssignedIdentities: pulumi.AnyMap{
					"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scriptRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/uai": nil,
				},
			},
			Kind:              pulumi.String("AzurePowerShell"),
			Location:          pulumi.String("westus"),
			ResourceGroupName: pulumi.String("script-rg"),
			RetentionInterval: pulumi.String("PT7D"),
			ScriptContent:     pulumi.String(fmt.Sprintf("Param([string]$Location,[string]$Name) $deploymentScriptOutputs['test'] = 'value' Get-AzResourceGroup -Location $Location -Name $Name")),
			ScriptName:        pulumi.String("MyDeploymentScript"),
			StorageAccountSettings: &resources.StorageAccountConfigurationArgs{
				StorageAccountKey:  pulumi.String("contosostoragekey"),
				StorageAccountName: pulumi.String("contosostorage"),
			},
			SupportingScriptUris: pulumi.StringArray{
				pulumi.String("https://uri1.to.supporting.script"),
				pulumi.String("https://uri2.to.supporting.script"),
			},
			Timeout: pulumi.String("PT1H"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.resources.AzurePowerShellScript;
import com.pulumi.azurenative.resources.AzurePowerShellScriptArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var azurePowerShellScript = new AzurePowerShellScript("azurePowerShellScript", AzurePowerShellScriptArgs.builder()        
            .arguments("-Location 'westus' -Name \"*rg2\"")
            .azPowerShellVersion("1.7.0")
            .cleanupPreference("Always")
            .identity(Map.ofEntries(
                Map.entry("type", "UserAssigned"),
                Map.entry("userAssignedIdentities", Map.of("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scriptRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/uai", ))
            ))
            .kind("AzurePowerShell")
            .location("westus")
            .resourceGroupName("script-rg")
            .retentionInterval("PT7D")
            .scriptContent("Param([string]$Location,[string]$Name) $deploymentScriptOutputs['test'] = 'value' Get-AzResourceGroup -Location $Location -Name $Name")
            .scriptName("MyDeploymentScript")
            .storageAccountSettings(Map.ofEntries(
                Map.entry("storageAccountKey", "contosostoragekey"),
                Map.entry("storageAccountName", "contosostorage")
            ))
            .supportingScriptUris(            
                "https://uri1.to.supporting.script",
                "https://uri2.to.supporting.script")
            .timeout("PT1H")
            .build());

    }
}
import pulumi
import pulumi_azure_native as azure_native

azure_power_shell_script = azure_native.resources.AzurePowerShellScript("azurePowerShellScript",
    arguments="-Location 'westus' -Name \"*rg2\"",
    az_power_shell_version="1.7.0",
    cleanup_preference="Always",
    identity=azure_native.resources.ManagedServiceIdentityArgs(
        type="UserAssigned",
        user_assigned_identities={
            "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scriptRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/uai": {},
        },
    ),
    kind="AzurePowerShell",
    location="westus",
    resource_group_name="script-rg",
    retention_interval="PT7D",
    script_content="Param([string]$Location,[string]$Name) $deploymentScriptOutputs['test'] = 'value' Get-AzResourceGroup -Location $Location -Name $Name",
    script_name="MyDeploymentScript",
    storage_account_settings=azure_native.resources.StorageAccountConfigurationArgs(
        storage_account_key="contosostoragekey",
        storage_account_name="contosostorage",
    ),
    supporting_script_uris=[
        "https://uri1.to.supporting.script",
        "https://uri2.to.supporting.script",
    ],
    timeout="PT1H")
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";

const azurePowerShellScript = new azure_native.resources.AzurePowerShellScript("azurePowerShellScript", {
    arguments: "-Location 'westus' -Name \"*rg2\"",
    azPowerShellVersion: "1.7.0",
    cleanupPreference: "Always",
    identity: {
        type: "UserAssigned",
        userAssignedIdentities: {
            "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scriptRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/uai": {},
        },
    },
    kind: "AzurePowerShell",
    location: "westus",
    resourceGroupName: "script-rg",
    retentionInterval: "PT7D",
    scriptContent: `Param([string]$Location,[string]$Name) $deploymentScriptOutputs['test'] = 'value' Get-AzResourceGroup -Location $Location -Name $Name`,
    scriptName: "MyDeploymentScript",
    storageAccountSettings: {
        storageAccountKey: "contosostoragekey",
        storageAccountName: "contosostorage",
    },
    supportingScriptUris: [
        "https://uri1.to.supporting.script",
        "https://uri2.to.supporting.script",
    ],
    timeout: "PT1H",
});
resources:
  azurePowerShellScript:
    type: azure-native:resources:AzurePowerShellScript
    properties:
      arguments: -Location 'westus' -Name "*rg2"
      azPowerShellVersion: 1.7.0
      cleanupPreference: Always
      identity:
        type: UserAssigned
        userAssignedIdentities:
          ? /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/scriptRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/uai
          : {}
      kind: AzurePowerShell
      location: westus
      resourceGroupName: script-rg
      retentionInterval: PT7D
      scriptContent: Param([string]$Location,[string]$Name) $deploymentScriptOutputs['test'] = 'value' Get-AzResourceGroup -Location $Location -Name $Name
      scriptName: MyDeploymentScript
      storageAccountSettings:
        storageAccountKey: contosostoragekey
        storageAccountName: contosostorage
      supportingScriptUris:
        - https://uri1.to.supporting.script
        - https://uri2.to.supporting.script
      timeout: PT1H

Create a AzurePowerShellScript Resource

new AzurePowerShellScript(name: string, args: AzurePowerShellScriptArgs, opts?: CustomResourceOptions);
@overload
def AzurePowerShellScript(resource_name: str,
                          opts: Optional[ResourceOptions] = None,
                          arguments: Optional[str] = None,
                          az_power_shell_version: Optional[str] = None,
                          cleanup_preference: Optional[Union[str, CleanupOptions]] = None,
                          container_settings: Optional[ContainerConfigurationArgs] = None,
                          environment_variables: Optional[Sequence[EnvironmentVariableArgs]] = None,
                          force_update_tag: Optional[str] = None,
                          identity: Optional[ManagedServiceIdentityArgs] = None,
                          location: Optional[str] = None,
                          primary_script_uri: Optional[str] = None,
                          resource_group_name: Optional[str] = None,
                          retention_interval: Optional[str] = None,
                          script_content: Optional[str] = None,
                          script_name: Optional[str] = None,
                          storage_account_settings: Optional[StorageAccountConfigurationArgs] = None,
                          supporting_script_uris: Optional[Sequence[str]] = None,
                          tags: Optional[Mapping[str, str]] = None,
                          timeout: Optional[str] = None)
@overload
def AzurePowerShellScript(resource_name: str,
                          args: AzurePowerShellScriptArgs,
                          opts: Optional[ResourceOptions] = None)
func NewAzurePowerShellScript(ctx *Context, name string, args AzurePowerShellScriptArgs, opts ...ResourceOption) (*AzurePowerShellScript, error)
public AzurePowerShellScript(string name, AzurePowerShellScriptArgs args, CustomResourceOptions? opts = null)
public AzurePowerShellScript(String name, AzurePowerShellScriptArgs args)
public AzurePowerShellScript(String name, AzurePowerShellScriptArgs args, CustomResourceOptions options)
type: azure-native:resources:AzurePowerShellScript
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args AzurePowerShellScriptArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args AzurePowerShellScriptArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args AzurePowerShellScriptArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args AzurePowerShellScriptArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args AzurePowerShellScriptArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

AzurePowerShellScript Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The AzurePowerShellScript resource accepts the following input properties:

AzPowerShellVersion string

Azure PowerShell module version to be used.

ResourceGroupName string

The name of the resource group. The name is case insensitive.

RetentionInterval string

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).

Arguments string

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

CleanupPreference string | Pulumi.AzureNative.Resources.CleanupOptions

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

ContainerSettings Pulumi.AzureNative.Resources.Inputs.ContainerConfigurationArgs

Container settings.

EnvironmentVariables List<Pulumi.AzureNative.Resources.Inputs.EnvironmentVariableArgs>

The environment variables to pass over to the script.

ForceUpdateTag string

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.

Identity Pulumi.AzureNative.Resources.Inputs.ManagedServiceIdentityArgs

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

Location string

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

PrimaryScriptUri string

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

ScriptContent string

Script body.

ScriptName string

Name of the deployment script.

StorageAccountSettings Pulumi.AzureNative.Resources.Inputs.StorageAccountConfigurationArgs

Storage Account settings.

SupportingScriptUris List<string>

Supporting files for the external script.

Tags Dictionary<string, string>

Resource tags.

Timeout string

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

AzPowerShellVersion string

Azure PowerShell module version to be used.

ResourceGroupName string

The name of the resource group. The name is case insensitive.

RetentionInterval string

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).

Arguments string

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

CleanupPreference string | CleanupOptions

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

ContainerSettings ContainerConfigurationArgs

Container settings.

EnvironmentVariables []EnvironmentVariableArgs

The environment variables to pass over to the script.

ForceUpdateTag string

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.

Identity ManagedServiceIdentityArgs

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

Location string

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

PrimaryScriptUri string

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

ScriptContent string

Script body.

ScriptName string

Name of the deployment script.

StorageAccountSettings StorageAccountConfigurationArgs

Storage Account settings.

SupportingScriptUris []string

Supporting files for the external script.

Tags map[string]string

Resource tags.

Timeout string

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

azPowerShellVersion String

Azure PowerShell module version to be used.

resourceGroupName String

The name of the resource group. The name is case insensitive.

retentionInterval String

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).

arguments String

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

cleanupPreference String | CleanupOptions

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

containerSettings ContainerConfigurationArgs

Container settings.

environmentVariables List<EnvironmentVariableArgs>

The environment variables to pass over to the script.

forceUpdateTag String

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.

identity ManagedServiceIdentityArgs

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

location String

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

primaryScriptUri String

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

scriptContent String

Script body.

scriptName String

Name of the deployment script.

storageAccountSettings StorageAccountConfigurationArgs

Storage Account settings.

supportingScriptUris List<String>

Supporting files for the external script.

tags Map<String,String>

Resource tags.

timeout String

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

azPowerShellVersion string

Azure PowerShell module version to be used.

resourceGroupName string

The name of the resource group. The name is case insensitive.

retentionInterval string

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).

arguments string

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

cleanupPreference string | CleanupOptions

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

containerSettings ContainerConfigurationArgs

Container settings.

environmentVariables EnvironmentVariableArgs[]

The environment variables to pass over to the script.

forceUpdateTag string

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.

identity ManagedServiceIdentityArgs

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

location string

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

primaryScriptUri string

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

scriptContent string

Script body.

scriptName string

Name of the deployment script.

storageAccountSettings StorageAccountConfigurationArgs

Storage Account settings.

supportingScriptUris string[]

Supporting files for the external script.

tags {[key: string]: string}

Resource tags.

timeout string

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

az_power_shell_version str

Azure PowerShell module version to be used.

resource_group_name str

The name of the resource group. The name is case insensitive.

retention_interval str

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).

arguments str

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

cleanup_preference str | CleanupOptions

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

container_settings ContainerConfigurationArgs

Container settings.

environment_variables Sequence[EnvironmentVariableArgs]

The environment variables to pass over to the script.

force_update_tag str

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.

identity ManagedServiceIdentityArgs

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

location str

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

primary_script_uri str

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

script_content str

Script body.

script_name str

Name of the deployment script.

storage_account_settings StorageAccountConfigurationArgs

Storage Account settings.

supporting_script_uris Sequence[str]

Supporting files for the external script.

tags Mapping[str, str]

Resource tags.

timeout str

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

azPowerShellVersion String

Azure PowerShell module version to be used.

resourceGroupName String

The name of the resource group. The name is case insensitive.

retentionInterval String

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).

arguments String

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

cleanupPreference String | "Always" | "OnSuccess" | "OnExpiration"

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

containerSettings Property Map

Container settings.

environmentVariables List<Property Map>

The environment variables to pass over to the script.

forceUpdateTag String

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.

identity Property Map

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

location String

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

primaryScriptUri String

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

scriptContent String

Script body.

scriptName String

Name of the deployment script.

storageAccountSettings Property Map

Storage Account settings.

supportingScriptUris List<String>

Supporting files for the external script.

tags Map<String>

Resource tags.

timeout String

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

Outputs

All input properties are implicitly available as output properties. Additionally, the AzurePowerShellScript resource produces the following output properties:

Id string

The provider-assigned unique ID for this managed resource.

Name string

Name of this resource.

Outputs Dictionary<string, object>

List of script outputs.

ProvisioningState string

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

Status Pulumi.AzureNative.Resources.Outputs.ScriptStatusResponse

Contains the results of script execution.

SystemData Pulumi.AzureNative.Resources.Outputs.SystemDataResponse

The system metadata related to this resource.

Type string

Type of this resource.

Id string

The provider-assigned unique ID for this managed resource.

Name string

Name of this resource.

Outputs map[string]interface{}

List of script outputs.

ProvisioningState string

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

Status ScriptStatusResponse

Contains the results of script execution.

SystemData SystemDataResponse

The system metadata related to this resource.

Type string

Type of this resource.

id String

The provider-assigned unique ID for this managed resource.

name String

Name of this resource.

outputs Map<String,Object>

List of script outputs.

provisioningState String

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

status ScriptStatusResponse

Contains the results of script execution.

systemData SystemDataResponse

The system metadata related to this resource.

type String

Type of this resource.

id string

The provider-assigned unique ID for this managed resource.

name string

Name of this resource.

outputs {[key: string]: any}

List of script outputs.

provisioningState string

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

status ScriptStatusResponse

Contains the results of script execution.

systemData SystemDataResponse

The system metadata related to this resource.

type string

Type of this resource.

id str

The provider-assigned unique ID for this managed resource.

name str

Name of this resource.

outputs Mapping[str, Any]

List of script outputs.

provisioning_state str

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

status ScriptStatusResponse

Contains the results of script execution.

system_data SystemDataResponse

The system metadata related to this resource.

type str

Type of this resource.

id String

The provider-assigned unique ID for this managed resource.

name String

Name of this resource.

outputs Map<Any>

List of script outputs.

provisioningState String

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

status Property Map

Contains the results of script execution.

systemData Property Map

The system metadata related to this resource.

type String

Type of this resource.

Supporting Types

CleanupOptions

Always
Always
OnSuccess
OnSuccess
OnExpiration
OnExpiration
CleanupOptionsAlways
Always
CleanupOptionsOnSuccess
OnSuccess
CleanupOptionsOnExpiration
OnExpiration
Always
Always
OnSuccess
OnSuccess
OnExpiration
OnExpiration
Always
Always
OnSuccess
OnSuccess
OnExpiration
OnExpiration
ALWAYS
Always
ON_SUCCESS
OnSuccess
ON_EXPIRATION
OnExpiration
"Always"
Always
"OnSuccess"
OnSuccess
"OnExpiration"
OnExpiration

ContainerConfiguration

ContainerGroupName string

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.

ContainerGroupName string

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.

containerGroupName String

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.

containerGroupName string

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.

container_group_name str

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.

containerGroupName String

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.

ContainerConfigurationResponse

ContainerGroupName string

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.

ContainerGroupName string

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.

containerGroupName String

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.

containerGroupName string

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.

container_group_name str

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.

containerGroupName String

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.

EnvironmentVariable

Name string

The name of the environment variable.

SecureValue string

The value of the secure environment variable.

Value string

The value of the environment variable.

Name string

The name of the environment variable.

SecureValue string

The value of the secure environment variable.

Value string

The value of the environment variable.

name String

The name of the environment variable.

secureValue String

The value of the secure environment variable.

value String

The value of the environment variable.

name string

The name of the environment variable.

secureValue string

The value of the secure environment variable.

value string

The value of the environment variable.

name str

The name of the environment variable.

secure_value str

The value of the secure environment variable.

value str

The value of the environment variable.

name String

The name of the environment variable.

secureValue String

The value of the secure environment variable.

value String

The value of the environment variable.

EnvironmentVariableResponse

Name string

The name of the environment variable.

SecureValue string

The value of the secure environment variable.

Value string

The value of the environment variable.

Name string

The name of the environment variable.

SecureValue string

The value of the secure environment variable.

Value string

The value of the environment variable.

name String

The name of the environment variable.

secureValue String

The value of the secure environment variable.

value String

The value of the environment variable.

name string

The name of the environment variable.

secureValue string

The value of the secure environment variable.

value string

The value of the environment variable.

name str

The name of the environment variable.

secure_value str

The value of the secure environment variable.

value str

The value of the environment variable.

name String

The name of the environment variable.

secureValue String

The value of the secure environment variable.

value String

The value of the environment variable.

ErrorAdditionalInfoResponse

Info object

The additional info.

Type string

The additional info type.

Info interface{}

The additional info.

Type string

The additional info type.

info Object

The additional info.

type String

The additional info type.

info any

The additional info.

type string

The additional info type.

info Any

The additional info.

type str

The additional info type.

info Any

The additional info.

type String

The additional info type.

ErrorResponseResponse

AdditionalInfo List<Pulumi.AzureNative.Resources.Inputs.ErrorAdditionalInfoResponse>

The error additional info.

Code string

The error code.

Details List<Pulumi.AzureNative.Resources.Inputs.ErrorResponseResponse>

The error details.

Message string

The error message.

Target string

The error target.

AdditionalInfo []ErrorAdditionalInfoResponse

The error additional info.

Code string

The error code.

Details []ErrorResponseResponse

The error details.

Message string

The error message.

Target string

The error target.

additionalInfo List<ErrorAdditionalInfoResponse>

The error additional info.

code String

The error code.

details List<ErrorResponseResponse>

The error details.

message String

The error message.

target String

The error target.

additionalInfo ErrorAdditionalInfoResponse[]

The error additional info.

code string

The error code.

details ErrorResponseResponse[]

The error details.

message string

The error message.

target string

The error target.

additional_info Sequence[ErrorAdditionalInfoResponse]

The error additional info.

code str

The error code.

details Sequence[ErrorResponseResponse]

The error details.

message str

The error message.

target str

The error target.

additionalInfo List<Property Map>

The error additional info.

code String

The error code.

details List<Property Map>

The error details.

message String

The error message.

target String

The error target.

ManagedServiceIdentity

Type string | Pulumi.AzureNative.Resources.ManagedServiceIdentityType

Type of the managed identity.

UserAssignedIdentities Dictionary<string, object>

The list of user-assigned managed identities associated with the resource. Key is the Azure resource Id of the managed identity.

Type string | ManagedServiceIdentityType

Type of the managed identity.

UserAssignedIdentities map[string]interface{}

The list of user-assigned managed identities associated with the resource. Key is the Azure resource Id of the managed identity.

type String | ManagedServiceIdentityType

Type of the managed identity.

userAssignedIdentities Map<String,Object>

The list of user-assigned managed identities associated with the resource. Key is the Azure resource Id of the managed identity.

type string | ManagedServiceIdentityType

Type of the managed identity.

userAssignedIdentities {[key: string]: any}

The list of user-assigned managed identities associated with the resource. Key is the Azure resource Id of the managed identity.

type str | ManagedServiceIdentityType

Type of the managed identity.

user_assigned_identities Mapping[str, Any]

The list of user-assigned managed identities associated with the resource. Key is the Azure resource Id of the managed identity.

type String | "UserAssigned"

Type of the managed identity.

userAssignedIdentities Map<Any>

The list of user-assigned managed identities associated with the resource. Key is the Azure resource Id of the managed identity.

ManagedServiceIdentityResponse

TenantId string

ID of the Azure Active Directory.

Type string

Type of the managed identity.

UserAssignedIdentities Dictionary<string, Pulumi.AzureNative.Resources.Inputs.UserAssignedIdentityResponse>

The list of user-assigned managed identities associated with the resource. Key is the Azure resource Id of the managed identity.

TenantId string

ID of the Azure Active Directory.

Type string

Type of the managed identity.

UserAssignedIdentities map[string]UserAssignedIdentityResponse

The list of user-assigned managed identities associated with the resource. Key is the Azure resource Id of the managed identity.

tenantId String

ID of the Azure Active Directory.

type String

Type of the managed identity.

userAssignedIdentities Map<String,UserAssignedIdentityResponse>

The list of user-assigned managed identities associated with the resource. Key is the Azure resource Id of the managed identity.

tenantId string

ID of the Azure Active Directory.

type string

Type of the managed identity.

userAssignedIdentities {[key: string]: UserAssignedIdentityResponse}

The list of user-assigned managed identities associated with the resource. Key is the Azure resource Id of the managed identity.

tenant_id str

ID of the Azure Active Directory.

type str

Type of the managed identity.

user_assigned_identities Mapping[str, UserAssignedIdentityResponse]

The list of user-assigned managed identities associated with the resource. Key is the Azure resource Id of the managed identity.

tenantId String

ID of the Azure Active Directory.

type String

Type of the managed identity.

userAssignedIdentities Map<Property Map>

The list of user-assigned managed identities associated with the resource. Key is the Azure resource Id of the managed identity.

ManagedServiceIdentityType

UserAssigned
UserAssigned
ManagedServiceIdentityTypeUserAssigned
UserAssigned
UserAssigned
UserAssigned
UserAssigned
UserAssigned
USER_ASSIGNED
UserAssigned
"UserAssigned"
UserAssigned

ScriptStatusResponse

ContainerInstanceId string

ACI resource Id.

EndTime string

End time of the script execution.

ExpirationTime string

Time the deployment script resource will expire.

StartTime string

Start time of the script execution.

StorageAccountId string

Storage account resource Id.

Error Pulumi.AzureNative.Resources.Inputs.ErrorResponseResponse

Error that is relayed from the script execution.

ContainerInstanceId string

ACI resource Id.

EndTime string

End time of the script execution.

ExpirationTime string

Time the deployment script resource will expire.

StartTime string

Start time of the script execution.

StorageAccountId string

Storage account resource Id.

Error ErrorResponseResponse

Error that is relayed from the script execution.

containerInstanceId String

ACI resource Id.

endTime String

End time of the script execution.

expirationTime String

Time the deployment script resource will expire.

startTime String

Start time of the script execution.

storageAccountId String

Storage account resource Id.

error ErrorResponseResponse

Error that is relayed from the script execution.

containerInstanceId string

ACI resource Id.

endTime string

End time of the script execution.

expirationTime string

Time the deployment script resource will expire.

startTime string

Start time of the script execution.

storageAccountId string

Storage account resource Id.

error ErrorResponseResponse

Error that is relayed from the script execution.

container_instance_id str

ACI resource Id.

end_time str

End time of the script execution.

expiration_time str

Time the deployment script resource will expire.

start_time str

Start time of the script execution.

storage_account_id str

Storage account resource Id.

error ErrorResponseResponse

Error that is relayed from the script execution.

containerInstanceId String

ACI resource Id.

endTime String

End time of the script execution.

expirationTime String

Time the deployment script resource will expire.

startTime String

Start time of the script execution.

storageAccountId String

Storage account resource Id.

error Property Map

Error that is relayed from the script execution.

StorageAccountConfiguration

StorageAccountKey string

The storage account access key.

StorageAccountName string

The storage account name.

StorageAccountKey string

The storage account access key.

StorageAccountName string

The storage account name.

storageAccountKey String

The storage account access key.

storageAccountName String

The storage account name.

storageAccountKey string

The storage account access key.

storageAccountName string

The storage account name.

storage_account_key str

The storage account access key.

storage_account_name str

The storage account name.

storageAccountKey String

The storage account access key.

storageAccountName String

The storage account name.

StorageAccountConfigurationResponse

StorageAccountKey string

The storage account access key.

StorageAccountName string

The storage account name.

StorageAccountKey string

The storage account access key.

StorageAccountName string

The storage account name.

storageAccountKey String

The storage account access key.

storageAccountName String

The storage account name.

storageAccountKey string

The storage account access key.

storageAccountName string

The storage account name.

storage_account_key str

The storage account access key.

storage_account_name str

The storage account name.

storageAccountKey String

The storage account access key.

storageAccountName String

The storage account name.

SystemDataResponse

CreatedAt string

The timestamp of resource creation (UTC).

CreatedBy string

The identity that created the resource.

CreatedByType string

The type of identity that created the resource.

LastModifiedAt string

The timestamp of resource last modification (UTC)

LastModifiedBy string

The identity that last modified the resource.

LastModifiedByType string

The type of identity that last modified the resource.

CreatedAt string

The timestamp of resource creation (UTC).

CreatedBy string

The identity that created the resource.

CreatedByType string

The type of identity that created the resource.

LastModifiedAt string

The timestamp of resource last modification (UTC)

LastModifiedBy string

The identity that last modified the resource.

LastModifiedByType string

The type of identity that last modified the resource.

createdAt String

The timestamp of resource creation (UTC).

createdBy String

The identity that created the resource.

createdByType String

The type of identity that created the resource.

lastModifiedAt String

The timestamp of resource last modification (UTC)

lastModifiedBy String

The identity that last modified the resource.

lastModifiedByType String

The type of identity that last modified the resource.

createdAt string

The timestamp of resource creation (UTC).

createdBy string

The identity that created the resource.

createdByType string

The type of identity that created the resource.

lastModifiedAt string

The timestamp of resource last modification (UTC)

lastModifiedBy string

The identity that last modified the resource.

lastModifiedByType string

The type of identity that last modified the resource.

created_at str

The timestamp of resource creation (UTC).

created_by str

The identity that created the resource.

created_by_type str

The type of identity that created the resource.

last_modified_at str

The timestamp of resource last modification (UTC)

last_modified_by str

The identity that last modified the resource.

last_modified_by_type str

The type of identity that last modified the resource.

createdAt String

The timestamp of resource creation (UTC).

createdBy String

The identity that created the resource.

createdByType String

The type of identity that created the resource.

lastModifiedAt String

The timestamp of resource last modification (UTC)

lastModifiedBy String

The identity that last modified the resource.

lastModifiedByType String

The type of identity that last modified the resource.

UserAssignedIdentityResponse

ClientId string

Client App Id associated with this identity.

PrincipalId string

Azure Active Directory principal ID associated with this identity.

ClientId string

Client App Id associated with this identity.

PrincipalId string

Azure Active Directory principal ID associated with this identity.

clientId String

Client App Id associated with this identity.

principalId String

Azure Active Directory principal ID associated with this identity.

clientId string

Client App Id associated with this identity.

principalId string

Azure Active Directory principal ID associated with this identity.

client_id str

Client App Id associated with this identity.

principal_id str

Azure Active Directory principal ID associated with this identity.

clientId String

Client App Id associated with this identity.

principalId String

Azure Active Directory principal ID associated with this identity.

Import

An existing resource can be imported using its type token, name, and identifier, e.g.

$ pulumi import azure-native:resources:AzurePowerShellScript myresource1 /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Resources/deploymentScripts/{scriptName} 

Package Details

Repository
https://github.com/pulumi/pulumi-azure-native
License
Apache-2.0