import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Manages a Resource Deployment Script of Azure PowerShell. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as azure from "@pulumi/azure"; * * const example = new azure.core.ResourceGroup("example", { * name: "example-resources", * location: "West Europe", * }); * const exampleUserAssignedIdentity = new azure.authorization.UserAssignedIdentity("example", { * name: "example-uai", * location: example.location, * resourceGroupName: example.name, * }); * const exampleResourceDeploymentScriptPowerShell = new azure.core.ResourceDeploymentScriptPowerShell("example", { * name: "example-rdsaps", * resourceGroupName: example.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: { * type: "UserAssigned", * identityIds: [exampleUserAssignedIdentity.id], * }, * tags: { * key: "value", * }, * }); * ``` * * ## API Providers * * * This resource uses the following Azure API Providers: * * * `Microsoft.Resources` - 2020-10-01 * * ## Import * * Resource Deployment Script can be imported using the `resource id`, e.g. * * ```sh * $ pulumi import azure:core/resourceDeploymentScriptPowerShell:ResourceDeploymentScriptPowerShell example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1/providers/Microsoft.Resources/deploymentScripts/script1 * ``` */ export declare class ResourceDeploymentScriptPowerShell extends pulumi.CustomResource { /** * Get an existing ResourceDeploymentScriptPowerShell resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: ResourceDeploymentScriptPowerShellState, opts?: pulumi.CustomResourceOptions): ResourceDeploymentScriptPowerShell; /** * Returns true if the given object is an instance of ResourceDeploymentScriptPowerShell. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is ResourceDeploymentScriptPowerShell; /** * 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. */ readonly cleanupPreference: pulumi.Output; /** * Command line arguments to pass to the script. Changing this forces a new Resource Deployment Script to be created. */ readonly commandLine: pulumi.Output; /** * A `container` block as defined below. Changing this forces a new Resource Deployment Script to be created. */ readonly container: pulumi.Output; /** * An `environmentVariable` block as defined below. Changing this forces a new Resource Deployment Script to be created. */ readonly environmentVariables: pulumi.Output; /** * 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. */ readonly forceUpdateTag: pulumi.Output; /** * An `identity` block as defined below. Changing this forces a new Resource Deployment Script to be created. */ readonly identity: pulumi.Output; /** * Specifies the Azure Region where the Resource Deployment Script should exist. Changing this forces a new Resource Deployment Script to be created. */ readonly location: pulumi.Output; /** * 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. */ readonly name: pulumi.Output; /** * List of script outputs. */ readonly outputs: pulumi.Output; /** * Uri for the script. This is the entry point for the external script. Changing this forces a new Resource Deployment Script to be created. */ readonly primaryScriptUri: pulumi.Output; /** * 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. */ readonly resourceGroupName: pulumi.Output; /** * 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. */ readonly retentionInterval: pulumi.Output; /** * Script body. Changing this forces a new Resource Deployment Script to be created. */ readonly scriptContent: pulumi.Output; /** * A `storageAccount` block as defined below. Changing this forces a new Resource Deployment Script to be created. */ readonly storageAccount: pulumi.Output; /** * Supporting files for the external script. Changing this forces a new Resource Deployment Script to be created. */ readonly supportingScriptUris: pulumi.Output; /** * A mapping of tags which should be assigned to the Resource Deployment Script. */ readonly tags: pulumi.Output<{ [key: string]: string; } | undefined>; /** * 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. */ readonly timeout: pulumi.Output; /** * 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](https://mcr.microsoft.com/v2/azure-powershell/tags/list). Changing this forces a new Resource Deployment Script to be created. */ readonly version: pulumi.Output; /** * Create a ResourceDeploymentScriptPowerShell resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: ResourceDeploymentScriptPowerShellArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering ResourceDeploymentScriptPowerShell resources. */ export interface ResourceDeploymentScriptPowerShellState { /** * 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. */ cleanupPreference?: pulumi.Input; /** * Command line arguments to pass to the script. Changing this forces a new Resource Deployment Script to be created. */ commandLine?: pulumi.Input; /** * A `container` block as defined below. Changing this forces a new Resource Deployment Script to be created. */ container?: pulumi.Input; /** * An `environmentVariable` block as defined below. Changing this forces a new Resource Deployment Script to be created. */ environmentVariables?: pulumi.Input[]>; /** * 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. */ forceUpdateTag?: pulumi.Input; /** * An `identity` block as defined below. Changing this forces a new Resource Deployment Script to be created. */ identity?: pulumi.Input; /** * Specifies the Azure Region where the Resource Deployment Script should exist. Changing this forces a new Resource Deployment Script to be created. */ location?: pulumi.Input; /** * 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. */ name?: pulumi.Input; /** * List of script outputs. */ outputs?: pulumi.Input; /** * Uri for the script. This is the entry point for the external script. Changing this forces a new Resource Deployment Script to be created. */ primaryScriptUri?: pulumi.Input; /** * 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. */ resourceGroupName?: pulumi.Input; /** * 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. */ retentionInterval?: pulumi.Input; /** * Script body. Changing this forces a new Resource Deployment Script to be created. */ scriptContent?: pulumi.Input; /** * A `storageAccount` block as defined below. Changing this forces a new Resource Deployment Script to be created. */ storageAccount?: pulumi.Input; /** * Supporting files for the external script. Changing this forces a new Resource Deployment Script to be created. */ supportingScriptUris?: pulumi.Input[]>; /** * A mapping of tags which should be assigned to the Resource Deployment Script. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * 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. */ timeout?: pulumi.Input; /** * 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](https://mcr.microsoft.com/v2/azure-powershell/tags/list). Changing this forces a new Resource Deployment Script to be created. */ version?: pulumi.Input; } /** * The set of arguments for constructing a ResourceDeploymentScriptPowerShell resource. */ export interface ResourceDeploymentScriptPowerShellArgs { /** * 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. */ cleanupPreference?: pulumi.Input; /** * Command line arguments to pass to the script. Changing this forces a new Resource Deployment Script to be created. */ commandLine?: pulumi.Input; /** * A `container` block as defined below. Changing this forces a new Resource Deployment Script to be created. */ container?: pulumi.Input; /** * An `environmentVariable` block as defined below. Changing this forces a new Resource Deployment Script to be created. */ environmentVariables?: pulumi.Input[]>; /** * 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. */ forceUpdateTag?: pulumi.Input; /** * An `identity` block as defined below. Changing this forces a new Resource Deployment Script to be created. */ identity?: pulumi.Input; /** * Specifies the Azure Region where the Resource Deployment Script should exist. Changing this forces a new Resource Deployment Script to be created. */ location?: pulumi.Input; /** * 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. */ name?: pulumi.Input; /** * Uri for the script. This is the entry point for the external script. Changing this forces a new Resource Deployment Script to be created. */ primaryScriptUri?: pulumi.Input; /** * 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. */ resourceGroupName: pulumi.Input; /** * 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. */ retentionInterval: pulumi.Input; /** * Script body. Changing this forces a new Resource Deployment Script to be created. */ scriptContent?: pulumi.Input; /** * A `storageAccount` block as defined below. Changing this forces a new Resource Deployment Script to be created. */ storageAccount?: pulumi.Input; /** * Supporting files for the external script. Changing this forces a new Resource Deployment Script to be created. */ supportingScriptUris?: pulumi.Input[]>; /** * A mapping of tags which should be assigned to the Resource Deployment Script. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * 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. */ timeout?: pulumi.Input; /** * 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](https://mcr.microsoft.com/v2/azure-powershell/tags/list). Changing this forces a new Resource Deployment Script to be created. */ version: pulumi.Input; }