Azure Power Shell Script Args
data class AzurePowerShellScriptArgs(val arguments: Output<String>? = null, val azPowerShellVersion: Output<String>? = null, val cleanupPreference: Output<Either<String, CleanupOptions>>? = null, val containerSettings: Output<ContainerConfigurationArgs>? = null, val environmentVariables: Output<List<EnvironmentVariableArgs>>? = null, val forceUpdateTag: Output<String>? = null, val identity: Output<ManagedServiceIdentityArgs>? = null, val kind: Output<String>? = null, val location: Output<String>? = null, val primaryScriptUri: Output<String>? = null, val resourceGroupName: Output<String>? = null, val retentionInterval: Output<String>? = null, val scriptContent: Output<String>? = null, val scriptName: Output<String>? = null, val storageAccountSettings: Output<StorageAccountConfigurationArgs>? = null, val supportingScriptUris: Output<List<String>>? = null, val tags: Output<Map<String, String>>? = null, val timeout: Output<String>? = null) : ConvertibleToJava<AzurePowerShellScriptArgs>
Object model for the Azure PowerShell script. Azure REST API version: 2020-10-01. Prior API version in Azure Native 1.x: 2020-10-01.
Example Usage
DeploymentScriptsCreateNoUserManagedIdentity
using System.Collections.Generic;
using System.Linq;
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",
});
});
Content copied to clipboard
package main
import (
"github.com/pulumi/pulumi-azure-native-sdk/resources/v2"
"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("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
})
}
Content copied to clipboard
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());
}
}
Content copied to clipboard
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}
Content copied to clipboard
Constructors
Link copied to clipboard
fun AzurePowerShellScriptArgs(arguments: Output<String>? = null, azPowerShellVersion: Output<String>? = null, cleanupPreference: Output<Either<String, CleanupOptions>>? = null, containerSettings: Output<ContainerConfigurationArgs>? = null, environmentVariables: Output<List<EnvironmentVariableArgs>>? = null, forceUpdateTag: Output<String>? = null, identity: Output<ManagedServiceIdentityArgs>? = null, kind: Output<String>? = null, location: Output<String>? = null, primaryScriptUri: Output<String>? = null, resourceGroupName: Output<String>? = null, retentionInterval: Output<String>? = null, scriptContent: Output<String>? = null, scriptName: Output<String>? = null, storageAccountSettings: Output<StorageAccountConfigurationArgs>? = null, supportingScriptUris: Output<List<String>>? = null, tags: Output<Map<String, String>>? = null, timeout: Output<String>? = null)
Functions
Properties
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard