ResourceDeploymentScriptPowerShellArgs

data class ResourceDeploymentScriptPowerShellArgs(val cleanupPreference: Output<String>? = null, val commandLine: Output<String>? = null, val container: Output<ResourceDeploymentScriptPowerShellContainerArgs>? = null, val environmentVariables: Output<List<ResourceDeploymentScriptPowerShellEnvironmentVariableArgs>>? = null, val forceUpdateTag: Output<String>? = null, val identity: Output<ResourceDeploymentScriptPowerShellIdentityArgs>? = null, val location: Output<String>? = null, val name: Output<String>? = null, val primaryScriptUri: Output<String>? = null, val resourceGroupName: Output<String>? = null, val retentionInterval: Output<String>? = null, val scriptContent: Output<String>? = null, val storageAccount: Output<ResourceDeploymentScriptPowerShellStorageAccountArgs>? = null, val supportingScriptUris: Output<List<String>>? = null, val tags: Output<Map<String, String>>? = null, val timeout: Output<String>? = null, val version: Output<String>? = null) : ConvertibleToJava<ResourceDeploymentScriptPowerShellArgs>

Manages a Resource Deployment Script of Azure PowerShell.

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
import com.pulumi.azure.authorization.UserAssignedIdentity;
import com.pulumi.azure.authorization.UserAssignedIdentityArgs;
import com.pulumi.azure.core.ResourceDeploymentScriptPowerShell;
import com.pulumi.azure.core.ResourceDeploymentScriptPowerShellArgs;
import com.pulumi.azure.core.inputs.ResourceDeploymentScriptPowerShellIdentityArgs;
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 exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()
.location("West Europe")
.build());
var exampleUserAssignedIdentity = new UserAssignedIdentity("exampleUserAssignedIdentity", UserAssignedIdentityArgs.builder()
.location(exampleResourceGroup.location())
.resourceGroupName(exampleResourceGroup.name())
.build());
var exampleResourceDeploymentScriptPowerShell = new ResourceDeploymentScriptPowerShell("exampleResourceDeploymentScriptPowerShell", ResourceDeploymentScriptPowerShellArgs.builder()
.resourceGroupName(exampleResourceGroup.name())
.location("West Europe")
.version("8.3")
.retentionInterval("P1D")
.commandLine("-name \"John Dole\"")
.cleanupPreference("OnSuccess")
.forceUpdateTag("1")
.timeout("PT30M")
.scriptContent("""
param([string] $name)
$output = 'Hello {0}.' -f $name
Write-Output $output
$DeploymentScriptOutputs = @{}
$DeploymentScriptOutputs['text'] = $output
""")
.identity(ResourceDeploymentScriptPowerShellIdentityArgs.builder()
.type("UserAssigned")
.identityIds(exampleUserAssignedIdentity.id())
.build())
.tags(Map.of("key", "value"))
.build());
}
}

Import

Resource Deployment Script can be imported using the resource id, e.g.

$ pulumi import azure:core/resourceDeploymentScriptPowerShell:ResourceDeploymentScriptPowerShell example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1/providers/Microsoft.Resources/deploymentScripts/script1

Constructors

Link copied to clipboard
fun ResourceDeploymentScriptPowerShellArgs(cleanupPreference: Output<String>? = null, commandLine: Output<String>? = null, container: Output<ResourceDeploymentScriptPowerShellContainerArgs>? = null, environmentVariables: Output<List<ResourceDeploymentScriptPowerShellEnvironmentVariableArgs>>? = null, forceUpdateTag: Output<String>? = null, identity: Output<ResourceDeploymentScriptPowerShellIdentityArgs>? = null, location: Output<String>? = null, name: Output<String>? = null, primaryScriptUri: Output<String>? = null, resourceGroupName: Output<String>? = null, retentionInterval: Output<String>? = null, scriptContent: Output<String>? = null, storageAccount: Output<ResourceDeploymentScriptPowerShellStorageAccountArgs>? = null, supportingScriptUris: Output<List<String>>? = null, tags: Output<Map<String, String>>? = null, timeout: Output<String>? = null, version: Output<String>? = null)

Functions

Link copied to clipboard
open override fun toJava(): ResourceDeploymentScriptPowerShellArgs

Properties

Link copied to clipboard
val cleanupPreference: Output<String>? = null

Specifies the cleanup preference when the script execution gets in a terminal state. Possible values are Always, OnExpiration, OnSuccess. Defaults to Always. Changing this forces a new Resource Deployment Script to be created.

Link copied to clipboard
val commandLine: Output<String>? = null

Command line arguments to pass to the script. Changing this forces a new Resource Deployment Script to be created.

Link copied to clipboard

A container block as defined below. Changing this forces a new Resource Deployment Script to be created.

Link copied to clipboard

An environment_variable block as defined below. Changing this forces a new Resource Deployment Script to be created.

Link copied to clipboard
val forceUpdateTag: Output<String>? = null

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. Changing this forces a new Resource Deployment Script to be created.

Link copied to clipboard

An identity block as defined below. Changing this forces a new Resource Deployment Script to be created.

Link copied to clipboard
val location: Output<String>? = null

Specifies the Azure Region where the Resource Deployment Script should exist. Changing this forces a new Resource Deployment Script to be created.

Link copied to clipboard
val name: Output<String>? = null

Specifies the name which should be used for this Resource Deployment Script. The name length must be from 1 to 260 characters. The name can only contain alphanumeric, underscore, parentheses, hyphen and period, and it cannot end with a period. Changing this forces a new Resource Deployment Script to be created.

Link copied to clipboard
val primaryScriptUri: Output<String>? = null

Uri for the script. This is the entry point for the external script. Changing this forces a new Resource Deployment Script to be created.

Link copied to clipboard
val resourceGroupName: Output<String>? = null

Specifies the name of the Resource Group where the Resource Deployment Script should exist. Changing this forces a new Resource Deployment Script to be created.

Link copied to clipboard
val retentionInterval: Output<String>? = null

Interval for which the service retains the script resource after it reaches a terminal state. Resource will be deleted when this duration expires. The time duration should be between 1 hour and 26 hours (inclusive) and should be specified in ISO 8601 format. Changing this forces a new Resource Deployment Script to be created.

Link copied to clipboard
val scriptContent: Output<String>? = null

Script body. Changing this forces a new Resource Deployment Script to be created.

Link copied to clipboard

A storage_account block as defined below. Changing this forces a new Resource Deployment Script to be created.

Link copied to clipboard
val supportingScriptUris: Output<List<String>>? = null

Supporting files for the external script. Changing this forces a new Resource Deployment Script to be created.

Link copied to clipboard
val tags: Output<Map<String, String>>? = null

A mapping of tags which should be assigned to the Resource Deployment Script.

Link copied to clipboard
val timeout: Output<String>? = null

Maximum allowed script execution time specified in ISO 8601 format. Needs to be greater than 0 and smaller than 1 day. Defaults to P1D. Changing this forces a new Resource Deployment Script to be created.

Link copied to clipboard
val version: Output<String>? = null

Specifies the version of the Azure PowerShell that should be used in the format X.Y (e.g. 9.7). A canonical list of versions is available from the Microsoft Container Registry API. Changing this forces a new Resource Deployment Script to be created.