ScriptExecution

class ScriptExecution : KotlinCustomResource

An instance of a script executed by a user - custom or AVS Uses Azure REST API version 2023-09-01. In version 2.x of the Azure Native provider, it used API version 2022-05-01. Other available API versions: 2022-05-01, 2023-03-01, 2024-09-01. These can be accessed by generating a local SDK package using the CLI command pulumi package add azure-native avs [ApiVersion]. See the ../../../version-guide/#accessing-any-api-version-via-local-packages for details.

Example Usage

ScriptExecutions_CreateOrUpdate

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var scriptExecution = new AzureNative.AVS.ScriptExecution("scriptExecution", new()
{
HiddenParameters = new[]
{
new AzureNative.AVS.Inputs.ScriptSecureStringExecutionParameterArgs
{
Name = "Password",
SecureValue = "PlaceholderPassword",
Type = "SecureValue",
},
},
Parameters = new[]
{
new AzureNative.AVS.Inputs.ScriptStringExecutionParameterArgs
{
Name = "DomainName",
Type = "Value",
Value = "placeholderDomain.local",
},
new AzureNative.AVS.Inputs.ScriptStringExecutionParameterArgs
{
Name = "BaseUserDN",
Type = "Value",
Value = "DC=placeholder, DC=placeholder",
},
},
PrivateCloudName = "cloud1",
ResourceGroupName = "group1",
Retention = "P0Y0M60DT0H60M60S",
ScriptCmdletId = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/scriptPackages/AVS.PowerCommands@1.0.0/scriptCmdlets/New-SsoExternalIdentitySource",
ScriptExecutionName = "addSsoServer",
Timeout = "P0Y0M0DT0H60M60S",
});
});
package main
import (
avs "github.com/pulumi/pulumi-azure-native-sdk/avs/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := avs.NewScriptExecution(ctx, "scriptExecution", &avs.ScriptExecutionArgs{
HiddenParameters: pulumi.Array{
avs.ScriptSecureStringExecutionParameter{
Name: "Password",
SecureValue: "PlaceholderPassword",
Type: "SecureValue",
},
},
Parameters: pulumi.Array{
avs.ScriptStringExecutionParameter{
Name: "DomainName",
Type: "Value",
Value: "placeholderDomain.local",
},
avs.ScriptStringExecutionParameter{
Name: "BaseUserDN",
Type: "Value",
Value: "DC=placeholder, DC=placeholder",
},
},
PrivateCloudName: pulumi.String("cloud1"),
ResourceGroupName: pulumi.String("group1"),
Retention: pulumi.String("P0Y0M60DT0H60M60S"),
ScriptCmdletId: pulumi.String("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/scriptPackages/AVS.PowerCommands@1.0.0/scriptCmdlets/New-SsoExternalIdentitySource"),
ScriptExecutionName: pulumi.String("addSsoServer"),
Timeout: pulumi.String("P0Y0M0DT0H60M60S"),
})
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.avs.ScriptExecution;
import com.pulumi.azurenative.avs.ScriptExecutionArgs;
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 scriptExecution = new ScriptExecution("scriptExecution", ScriptExecutionArgs.builder()
.hiddenParameters(ScriptSecureStringExecutionParameterArgs.builder()
.name("Password")
.secureValue("PlaceholderPassword")
.type("SecureValue")
.build())
.parameters(
ScriptStringExecutionParameterArgs.builder()
.name("DomainName")
.type("Value")
.value("placeholderDomain.local")
.build(),
ScriptStringExecutionParameterArgs.builder()
.name("BaseUserDN")
.type("Value")
.value("DC=placeholder, DC=placeholder")
.build())
.privateCloudName("cloud1")
.resourceGroupName("group1")
.retention("P0Y0M60DT0H60M60S")
.scriptCmdletId("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.AVS/privateClouds/cloud1/scriptPackages/AVS.PowerCommands@1.0.0/scriptCmdlets/New-SsoExternalIdentitySource")
.scriptExecutionName("addSsoServer")
.timeout("P0Y0M0DT0H60M60S")
.build());
}
}

Import

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

$ pulumi import azure-native:avs:ScriptExecution addSsoServer /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/scriptExecutions/{scriptExecutionName}

Properties

Link copied to clipboard
val azureApiVersion: Output<String>

The Azure API version of the resource.

Link copied to clipboard
val errors: Output<List<String>>

Standard error output stream from the powershell execution

Link copied to clipboard
val failureReason: Output<String>?

Error message if the script was able to run, but if the script itself had errors or powershell threw an exception

Link copied to clipboard
val finishedAt: Output<String>

Time the script execution was finished

Link copied to clipboard
val hiddenParameters: Output<List<Any>>?

Parameters that will be hidden/not visible to ARM, such as passwords and credentials

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val information: Output<List<String>>

Standard information out stream from the powershell execution

Link copied to clipboard
val name: Output<String>

The name of the resource

Link copied to clipboard
val namedOutputs: Output<Map<String, Any>>?

User-defined dictionary.

Link copied to clipboard
val output: Output<List<String>>?

Standard output stream from the powershell execution

Link copied to clipboard
val parameters: Output<List<Any>>?

Parameters the script will accept

Link copied to clipboard

The state of the script execution resource

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val retention: Output<String>?

Time to live for the resource. If not provided, will be available for 60 days

Link copied to clipboard
val scriptCmdletId: Output<String>?

A reference to the script cmdlet resource if user is running a AVS script

Link copied to clipboard
val startedAt: Output<String>

Time the script execution was started

Link copied to clipboard
val submittedAt: Output<String>

Time the script execution was submitted

Link copied to clipboard

Azure Resource Manager metadata containing createdBy and modifiedBy information.

Link copied to clipboard
val timeout: Output<String>

Time limit for execution

Link copied to clipboard
val type: Output<String>

The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

Link copied to clipboard
val urn: Output<String>
Link copied to clipboard
val warnings: Output<List<String>>

Standard warning out stream from the powershell execution