PackageArgs

data class PackageArgs(val applicationName: Output<String>? = null, val blobPath: Output<String>? = null, val draftPackageId: Output<String>? = null, val firstPartyApps: Output<List<FirstPartyAppDefinitionArgs>>? = null, val flightingRing: Output<String>? = null, val inplaceUpgradeOSPair: Output<InplaceUpgradeOSInfoArgs>? = null, val intuneEnrollmentMetadata: Output<IntuneEnrollmentMetadataArgs>? = null, val location: Output<String>? = null, val packageName: Output<String>? = null, val resourceGroupName: Output<String>? = null, val tags: Output<Map<String, String>>? = null, val targetOSList: Output<List<TargetOSInfoArgs>>? = null, val testBaseAccountName: Output<String>? = null, val tests: Output<List<TestArgs>>? = null, val version: Output<String>? = null) : ConvertibleToJava<PackageArgs>

The Test Base Package resource. Uses Azure REST API version 2023-11-01-preview. In version 2.x of the Azure Native provider, it used API version 2022-04-01-preview. Other available API versions: 2022-04-01-preview. These can be accessed by generating a local SDK package using the CLI command pulumi package add azure-native testbase [ApiVersion]. See the ../../../version-guide/#accessing-any-api-version-via-local-packages for details.

Example Usage

PackageCreate

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var package = new AzureNative.TestBase.Package("package", new()
{
ApplicationName = "contoso-package2",
BlobPath = "storageAccountPath/package.zip",
FirstPartyApps = new[]
{
new AzureNative.TestBase.Inputs.FirstPartyAppDefinitionArgs
{
Architecture = AzureNative.TestBase.Architecture.X64,
Channel = "Current Channel",
InteropExecutionMode = AzureNative.TestBase.InteropExecutionMode.FirstPartyAppWithTests,
Name = "Office",
Ring = "Insider",
},
},
FlightingRing = "Insider Beta Channel",
Location = "westus",
PackageName = "contoso-package2",
ResourceGroupName = "contoso-rg1",
Tags = null,
TargetOSList = new[]
{
new AzureNative.TestBase.Inputs.TargetOSInfoArgs
{
OsUpdateType = "Security updates",
TargetOSs = new[]
{
"Windows 10 2004",
"Windows 10 1903",
},
},
},
TestBaseAccountName = "contoso-testBaseAccount1",
Tests = new[]
{
new AzureNative.TestBase.Inputs.TestArgs
{
Commands = new[]
{
new AzureNative.TestBase.Inputs.CommandArgs
{
Action = AzureNative.TestBase.Action.Install,
AlwaysRun = true,
ApplyUpdateBefore = false,
Content = "app/scripts/install/job.ps1",
ContentType = AzureNative.TestBase.ContentType.Path,
Install1PAppBefore = true,
MaxRunTime = 1800,
Name = "Install",
RestartAfter = true,
RunAsInteractive = true,
RunElevated = true,
},
new AzureNative.TestBase.Inputs.CommandArgs
{
Action = AzureNative.TestBase.Action.Launch,
AlwaysRun = false,
ApplyUpdateBefore = true,
Content = "app/scripts/launch/job.ps1",
ContentType = AzureNative.TestBase.ContentType.Path,
Install1PAppBefore = false,
MaxRunTime = 1800,
Name = "Launch",
RestartAfter = false,
RunAsInteractive = true,
RunElevated = true,
},
new AzureNative.TestBase.Inputs.CommandArgs
{
Action = AzureNative.TestBase.Action.Close,
AlwaysRun = false,
ApplyUpdateBefore = false,
Content = "app/scripts/close/job.ps1",
ContentType = AzureNative.TestBase.ContentType.Path,
Install1PAppBefore = false,
MaxRunTime = 1800,
Name = "Close",
RestartAfter = false,
RunAsInteractive = true,
RunElevated = true,
},
new AzureNative.TestBase.Inputs.CommandArgs
{
Action = AzureNative.TestBase.Action.Uninstall,
AlwaysRun = true,
ApplyUpdateBefore = false,
Content = "app/scripts/uninstall/job.ps1",
ContentType = AzureNative.TestBase.ContentType.Path,
Install1PAppBefore = false,
MaxRunTime = 1800,
Name = "Uninstall",
RestartAfter = false,
RunAsInteractive = true,
RunElevated = true,
},
},
IsActive = true,
TestType = AzureNative.TestBase.TestType.OutOfBoxTest,
},
},
Version = "1.0.0",
});
});
package main
import (
testbase "github.com/pulumi/pulumi-azure-native-sdk/testbase/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := testbase.NewPackage(ctx, "package", &testbase.PackageArgs{
ApplicationName: pulumi.String("contoso-package2"),
BlobPath: pulumi.String("storageAccountPath/package.zip"),
FirstPartyApps: testbase.FirstPartyAppDefinitionArray{
&testbase.FirstPartyAppDefinitionArgs{
Architecture: pulumi.String(testbase.ArchitectureX64),
Channel: pulumi.String("Current Channel"),
InteropExecutionMode: pulumi.String(testbase.InteropExecutionModeFirstPartyAppWithTests),
Name: pulumi.String("Office"),
Ring: pulumi.String("Insider"),
},
},
FlightingRing: pulumi.String("Insider Beta Channel"),
Location: pulumi.String("westus"),
PackageName: pulumi.String("contoso-package2"),
ResourceGroupName: pulumi.String("contoso-rg1"),
Tags: pulumi.StringMap{},
TargetOSList: testbase.TargetOSInfoArray{
&testbase.TargetOSInfoArgs{
OsUpdateType: pulumi.String("Security updates"),
TargetOSs: pulumi.StringArray{
pulumi.String("Windows 10 2004"),
pulumi.String("Windows 10 1903"),
},
},
},
TestBaseAccountName: pulumi.String("contoso-testBaseAccount1"),
Tests: testbase.TestArray{
&testbase.TestArgs{
Commands: testbase.CommandArray{
&testbase.CommandArgs{
Action: pulumi.String(testbase.ActionInstall),
AlwaysRun: pulumi.Bool(true),
ApplyUpdateBefore: pulumi.Bool(false),
Content: pulumi.String("app/scripts/install/job.ps1"),
ContentType: pulumi.String(testbase.ContentTypePath),
Install1PAppBefore: pulumi.Bool(true),
MaxRunTime: pulumi.Int(1800),
Name: pulumi.String("Install"),
RestartAfter: pulumi.Bool(true),
RunAsInteractive: pulumi.Bool(true),
RunElevated: pulumi.Bool(true),
},
&testbase.CommandArgs{
Action: pulumi.String(testbase.ActionLaunch),
AlwaysRun: pulumi.Bool(false),
ApplyUpdateBefore: pulumi.Bool(true),
Content: pulumi.String("app/scripts/launch/job.ps1"),
ContentType: pulumi.String(testbase.ContentTypePath),
Install1PAppBefore: pulumi.Bool(false),
MaxRunTime: pulumi.Int(1800),
Name: pulumi.String("Launch"),
RestartAfter: pulumi.Bool(false),
RunAsInteractive: pulumi.Bool(true),
RunElevated: pulumi.Bool(true),
},
&testbase.CommandArgs{
Action: pulumi.String(testbase.ActionClose),
AlwaysRun: pulumi.Bool(false),
ApplyUpdateBefore: pulumi.Bool(false),
Content: pulumi.String("app/scripts/close/job.ps1"),
ContentType: pulumi.String(testbase.ContentTypePath),
Install1PAppBefore: pulumi.Bool(false),
MaxRunTime: pulumi.Int(1800),
Name: pulumi.String("Close"),
RestartAfter: pulumi.Bool(false),
RunAsInteractive: pulumi.Bool(true),
RunElevated: pulumi.Bool(true),
},
&testbase.CommandArgs{
Action: pulumi.String(testbase.ActionUninstall),
AlwaysRun: pulumi.Bool(true),
ApplyUpdateBefore: pulumi.Bool(false),
Content: pulumi.String("app/scripts/uninstall/job.ps1"),
ContentType: pulumi.String(testbase.ContentTypePath),
Install1PAppBefore: pulumi.Bool(false),
MaxRunTime: pulumi.Int(1800),
Name: pulumi.String("Uninstall"),
RestartAfter: pulumi.Bool(false),
RunAsInteractive: pulumi.Bool(true),
RunElevated: pulumi.Bool(true),
},
},
IsActive: pulumi.Bool(true),
TestType: pulumi.String(testbase.TestTypeOutOfBoxTest),
},
},
Version: pulumi.String("1.0.0"),
})
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.testbase.Package;
import com.pulumi.azurenative.testbase.PackageArgs;
import com.pulumi.azurenative.testbase.inputs.FirstPartyAppDefinitionArgs;
import com.pulumi.azurenative.testbase.inputs.TargetOSInfoArgs;
import com.pulumi.azurenative.testbase.inputs.TestArgs;
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 package_ = new Package("package", PackageArgs.builder()
.applicationName("contoso-package2")
.blobPath("storageAccountPath/package.zip")
.firstPartyApps(FirstPartyAppDefinitionArgs.builder()
.architecture("x64")
.channel("Current Channel")
.interopExecutionMode("firstPartyAppWithTests")
.name("Office")
.ring("Insider")
.build())
.flightingRing("Insider Beta Channel")
.location("westus")
.packageName("contoso-package2")
.resourceGroupName("contoso-rg1")
.tags()
.targetOSList(TargetOSInfoArgs.builder()
.osUpdateType("Security updates")
.targetOSs(
"Windows 10 2004",
"Windows 10 1903")
.build())
.testBaseAccountName("contoso-testBaseAccount1")
.tests(TestArgs.builder()
.commands(
CommandArgs.builder()
.action("Install")
.alwaysRun(true)
.applyUpdateBefore(false)
.content("app/scripts/install/job.ps1")
.contentType("Path")
.install1PAppBefore(true)
.maxRunTime(1800)
.name("Install")
.restartAfter(true)
.runAsInteractive(true)
.runElevated(true)
.build(),
CommandArgs.builder()
.action("Launch")
.alwaysRun(false)
.applyUpdateBefore(true)
.content("app/scripts/launch/job.ps1")
.contentType("Path")
.install1PAppBefore(false)
.maxRunTime(1800)
.name("Launch")
.restartAfter(false)
.runAsInteractive(true)
.runElevated(true)
.build(),
CommandArgs.builder()
.action("Close")
.alwaysRun(false)
.applyUpdateBefore(false)
.content("app/scripts/close/job.ps1")
.contentType("Path")
.install1PAppBefore(false)
.maxRunTime(1800)
.name("Close")
.restartAfter(false)
.runAsInteractive(true)
.runElevated(true)
.build(),
CommandArgs.builder()
.action("Uninstall")
.alwaysRun(true)
.applyUpdateBefore(false)
.content("app/scripts/uninstall/job.ps1")
.contentType("Path")
.install1PAppBefore(false)
.maxRunTime(1800)
.name("Uninstall")
.restartAfter(false)
.runAsInteractive(true)
.runElevated(true)
.build())
.isActive(true)
.testType("OutOfBoxTest")
.build())
.version("1.0.0")
.build());
}
}

Import

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

$ pulumi import azure-native:testbase:Package contoso-package2 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TestBase/testBaseAccounts/{testBaseAccountName}/packages/{packageName}

Constructors

Link copied to clipboard
constructor(applicationName: Output<String>? = null, blobPath: Output<String>? = null, draftPackageId: Output<String>? = null, firstPartyApps: Output<List<FirstPartyAppDefinitionArgs>>? = null, flightingRing: Output<String>? = null, inplaceUpgradeOSPair: Output<InplaceUpgradeOSInfoArgs>? = null, intuneEnrollmentMetadata: Output<IntuneEnrollmentMetadataArgs>? = null, location: Output<String>? = null, packageName: Output<String>? = null, resourceGroupName: Output<String>? = null, tags: Output<Map<String, String>>? = null, targetOSList: Output<List<TargetOSInfoArgs>>? = null, testBaseAccountName: Output<String>? = null, tests: Output<List<TestArgs>>? = null, version: Output<String>? = null)

Properties

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

Application name

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

The file path of the package.

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

The id of draft package. Used to create or update this package from a draft package.

Link copied to clipboard

The list of first party applications to test along with user application.

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

The flighting ring for feature update.

Link copied to clipboard

Specifies the baseline os and target os for inplace upgrade.

Link copied to clipboard

The metadata of Intune enrollment.

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

The geo-location where the resource lives

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

The resource name of the Test Base Package.

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

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

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

Resource tags.

Link copied to clipboard
val targetOSList: Output<List<TargetOSInfoArgs>>? = null

Specifies the target OSs of specific OS Update types.

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

The resource name of the Test Base Account.

Link copied to clipboard
val tests: Output<List<TestArgs>>? = null

The detailed test information.

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

Application version

Functions

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