com.pulumi.azurenative.testbase.Package Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-native Show documentation
Show all versions of azure-native Show documentation
A native Pulumi package for creating and managing Azure resources.
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package com.pulumi.azurenative.testbase;
import com.pulumi.azurenative.Utilities;
import com.pulumi.azurenative.testbase.PackageArgs;
import com.pulumi.azurenative.testbase.outputs.PackageValidationResultResponse;
import com.pulumi.azurenative.testbase.outputs.SystemDataResponse;
import com.pulumi.azurenative.testbase.outputs.TargetOSInfoResponse;
import com.pulumi.azurenative.testbase.outputs.TestResponse;
import com.pulumi.core.Alias;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import java.lang.Boolean;
import java.lang.String;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import javax.annotation.Nullable;
/**
* The Test Base Package resource.
* Azure REST API version: 2022-04-01-preview. Prior API version in Azure Native 1.x: 2022-04-01-preview.
*
* Other available API versions: 2023-11-01-preview.
*
* ## Example Usage
* ### PackageCreate
*
*
* {@code
* 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.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")
* .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")
* .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")
* .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")
* .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")
* .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.
*
* ```sh
* $ pulumi import azure-native:testbase:Package contoso-package2 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.TestBase/testBaseAccounts/{testBaseAccountName}/packages/{packageName}
* ```
*
*/
@ResourceType(type="azure-native:testbase:Package")
public class Package extends com.pulumi.resources.CustomResource {
/**
* Application name
*
*/
@Export(name="applicationName", refs={String.class}, tree="[0]")
private Output applicationName;
/**
* @return Application name
*
*/
public Output applicationName() {
return this.applicationName;
}
/**
* The file path of the package.
*
*/
@Export(name="blobPath", refs={String.class}, tree="[0]")
private Output blobPath;
/**
* @return The file path of the package.
*
*/
public Output blobPath() {
return this.blobPath;
}
/**
* Resource Etag.
*
*/
@Export(name="etag", refs={String.class}, tree="[0]")
private Output etag;
/**
* @return Resource Etag.
*
*/
public Output etag() {
return this.etag;
}
/**
* The flighting ring for feature update.
*
*/
@Export(name="flightingRing", refs={String.class}, tree="[0]")
private Output flightingRing;
/**
* @return The flighting ring for feature update.
*
*/
public Output flightingRing() {
return this.flightingRing;
}
/**
* Flag showing that whether the package is enabled. It doesn't schedule test for package which is not enabled.
*
*/
@Export(name="isEnabled", refs={Boolean.class}, tree="[0]")
private Output isEnabled;
/**
* @return Flag showing that whether the package is enabled. It doesn't schedule test for package which is not enabled.
*
*/
public Output isEnabled() {
return this.isEnabled;
}
/**
* The UTC timestamp when the package was last modified.
*
*/
@Export(name="lastModifiedTime", refs={String.class}, tree="[0]")
private Output lastModifiedTime;
/**
* @return The UTC timestamp when the package was last modified.
*
*/
public Output lastModifiedTime() {
return this.lastModifiedTime;
}
/**
* The geo-location where the resource lives
*
*/
@Export(name="location", refs={String.class}, tree="[0]")
private Output location;
/**
* @return The geo-location where the resource lives
*
*/
public Output location() {
return this.location;
}
/**
* Resource name.
*
*/
@Export(name="name", refs={String.class}, tree="[0]")
private Output name;
/**
* @return Resource name.
*
*/
public Output name() {
return this.name;
}
/**
* The status of the package.
*
*/
@Export(name="packageStatus", refs={String.class}, tree="[0]")
private Output packageStatus;
/**
* @return The status of the package.
*
*/
public Output packageStatus() {
return this.packageStatus;
}
/**
* The provisioning state of the resource.
*
*/
@Export(name="provisioningState", refs={String.class}, tree="[0]")
private Output provisioningState;
/**
* @return The provisioning state of the resource.
*
*/
public Output provisioningState() {
return this.provisioningState;
}
/**
* The system metadata relating to this resource
*
*/
@Export(name="systemData", refs={SystemDataResponse.class}, tree="[0]")
private Output systemData;
/**
* @return The system metadata relating to this resource
*
*/
public Output systemData() {
return this.systemData;
}
/**
* The tags of the resource.
*
*/
@Export(name="tags", refs={Map.class,String.class}, tree="[0,1,1]")
private Output* @Nullable */ Map> tags;
/**
* @return The tags of the resource.
*
*/
public Output>> tags() {
return Codegen.optional(this.tags);
}
/**
* Specifies the target OSs of specific OS Update types.
*
*/
@Export(name="targetOSList", refs={List.class,TargetOSInfoResponse.class}, tree="[0,1]")
private Output> targetOSList;
/**
* @return Specifies the target OSs of specific OS Update types.
*
*/
public Output> targetOSList() {
return this.targetOSList;
}
/**
* OOB, functional or both. Mapped to the data in 'tests' property.
*
*/
@Export(name="testTypes", refs={List.class,String.class}, tree="[0,1]")
private Output> testTypes;
/**
* @return OOB, functional or both. Mapped to the data in 'tests' property.
*
*/
public Output> testTypes() {
return this.testTypes;
}
/**
* The detailed test information.
*
*/
@Export(name="tests", refs={List.class,TestResponse.class}, tree="[0,1]")
private Output> tests;
/**
* @return The detailed test information.
*
*/
public Output> tests() {
return this.tests;
}
/**
* Resource type.
*
*/
@Export(name="type", refs={String.class}, tree="[0]")
private Output type;
/**
* @return Resource type.
*
*/
public Output type() {
return this.type;
}
/**
* The validation results. There's validation on package when it's created or updated.
*
*/
@Export(name="validationResults", refs={List.class,PackageValidationResultResponse.class}, tree="[0,1]")
private Output> validationResults;
/**
* @return The validation results. There's validation on package when it's created or updated.
*
*/
public Output> validationResults() {
return this.validationResults;
}
/**
* Application version
*
*/
@Export(name="version", refs={String.class}, tree="[0]")
private Output version;
/**
* @return Application version
*
*/
public Output version() {
return this.version;
}
/**
*
* @param name The _unique_ name of the resulting resource.
*/
public Package(java.lang.String name) {
this(name, PackageArgs.Empty);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
*/
public Package(java.lang.String name, PackageArgs args) {
this(name, args, null);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
* @param options A bag of options that control this resource's behavior.
*/
public Package(java.lang.String name, PackageArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure-native:testbase:Package", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false);
}
private Package(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure-native:testbase:Package", name, null, makeResourceOptions(options, id), false);
}
private static PackageArgs makeArgs(PackageArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
if (options != null && options.getUrn().isPresent()) {
return null;
}
return args == null ? PackageArgs.Empty : args;
}
private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) {
var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder()
.version(Utilities.getVersion())
.aliases(List.of(
Output.of(Alias.builder().type("azure-native:testbase/v20201216preview:Package").build()),
Output.of(Alias.builder().type("azure-native:testbase/v20220401preview:Package").build()),
Output.of(Alias.builder().type("azure-native:testbase/v20231101preview:Package").build())
))
.build();
return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id);
}
/**
* Get an existing Host 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 options Optional settings to control the behavior of the CustomResource.
*/
public static Package get(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) {
return new Package(name, id, options);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy