All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.azurenative.app.Build Maven / Gradle / Ivy

// *** 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.app;

import com.pulumi.azurenative.Utilities;
import com.pulumi.azurenative.app.BuildArgs;
import com.pulumi.azurenative.app.outputs.BuildConfigurationResponse;
import com.pulumi.azurenative.app.outputs.ContainerRegistryWithCustomImageResponse;
import com.pulumi.azurenative.app.outputs.SystemDataResponse;
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.String;
import java.util.List;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * Information pertaining to an individual build.
 * Azure REST API version: 2023-08-01-preview.
 * 
 * Other available API versions: 2023-11-02-preview, 2024-02-02-preview.
 * 
 * ## Example Usage
 * ### Builds_CreateOrUpdate_NoConfig
 * 
 * 
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.app.Build;
 * import com.pulumi.azurenative.app.BuildArgs;
 * 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 build = new Build("build", BuildArgs.builder()
 *             .buildName("testBuild")
 *             .builderName("testBuilder")
 *             .resourceGroupName("rg")
 *             .build());
 * 
 *     }
 * }
 * 
 * }
 * 
* ### Builds_CreateOrUpdate_WithConfig * *
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.app.Build;
 * import com.pulumi.azurenative.app.BuildArgs;
 * import com.pulumi.azurenative.app.inputs.BuildConfigurationArgs;
 * import com.pulumi.azurenative.app.inputs.ContainerRegistryWithCustomImageArgs;
 * 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 build = new Build("build", BuildArgs.builder()
 *             .buildName("testBuild-123456789az")
 *             .builderName("testBuilder")
 *             .configuration(BuildConfigurationArgs.builder()
 *                 .baseOs("DebianBullseye")
 *                 .environmentVariables(                
 *                     EnvironmentVariableArgs.builder()
 *                         .name("foo1")
 *                         .value("bar1")
 *                         .build(),
 *                     EnvironmentVariableArgs.builder()
 *                         .name("foo2")
 *                         .value("bar2")
 *                         .build())
 *                 .platform("dotnetcore")
 *                 .platformVersion("7.0")
 *                 .preBuildSteps(                
 *                     PreBuildStepArgs.builder()
 *                         .description("First pre build step.")
 *                         .httpGet(HttpGetArgs.builder()
 *                             .fileName("output.txt")
 *                             .headers(                            
 *                                 "foo",
 *                                 "bar")
 *                             .url("https://microsoft.com")
 *                             .build())
 *                         .scripts(                        
 *                             "echo 'hello'",
 *                             "echo 'world'")
 *                         .build(),
 *                     PreBuildStepArgs.builder()
 *                         .description("Second pre build step.")
 *                         .httpGet(HttpGetArgs.builder()
 *                             .fileName("output.txt")
 *                             .headers("foo")
 *                             .url("https://microsoft.com")
 *                             .build())
 *                         .scripts(                        
 *                             "echo 'hello'",
 *                             "echo 'again'")
 *                         .build())
 *                 .build())
 *             .destinationContainerRegistry(ContainerRegistryWithCustomImageArgs.builder()
 *                 .image("test.azurecr.io/repo:tag")
 *                 .server("test.azurecr.io")
 *                 .build())
 *             .resourceGroupName("rg")
 *             .build());
 * 
 *     }
 * }
 * 
 * }
 * 
* * ## Import * * An existing resource can be imported using its type token, name, and identifier, e.g. * * ```sh * $ pulumi import azure-native:app:Build testBuild-123456789az /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/builds/{buildName} * ``` * */ @ResourceType(type="azure-native:app:Build") public class Build extends com.pulumi.resources.CustomResource { /** * Status of the build once it has been provisioned. * */ @Export(name="buildStatus", refs={String.class}, tree="[0]") private Output buildStatus; /** * @return Status of the build once it has been provisioned. * */ public Output buildStatus() { return this.buildStatus; } /** * Configuration of the build. * */ @Export(name="configuration", refs={BuildConfigurationResponse.class}, tree="[0]") private Output configuration; /** * @return Configuration of the build. * */ public Output> configuration() { return Codegen.optional(this.configuration); } /** * Container registry that the final image will be uploaded to. * */ @Export(name="destinationContainerRegistry", refs={ContainerRegistryWithCustomImageResponse.class}, tree="[0]") private Output destinationContainerRegistry; /** * @return Container registry that the final image will be uploaded to. * */ public Output> destinationContainerRegistry() { return Codegen.optional(this.destinationContainerRegistry); } /** * Endpoint from which the build logs can be streamed. * */ @Export(name="logStreamEndpoint", refs={String.class}, tree="[0]") private Output logStreamEndpoint; /** * @return Endpoint from which the build logs can be streamed. * */ public Output logStreamEndpoint() { return this.logStreamEndpoint; } /** * The name of the resource * */ @Export(name="name", refs={String.class}, tree="[0]") private Output name; /** * @return The name of the resource * */ public Output name() { return this.name; } /** * Build provisioning state. * */ @Export(name="provisioningState", refs={String.class}, tree="[0]") private Output provisioningState; /** * @return Build provisioning state. * */ public Output provisioningState() { return this.provisioningState; } /** * Azure Resource Manager metadata containing createdBy and modifiedBy information. * */ @Export(name="systemData", refs={SystemDataResponse.class}, tree="[0]") private Output systemData; /** * @return Azure Resource Manager metadata containing createdBy and modifiedBy information. * */ public Output systemData() { return this.systemData; } /** * Endpoint to use to retrieve an authentication token for log streaming and uploading source code. * */ @Export(name="tokenEndpoint", refs={String.class}, tree="[0]") private Output tokenEndpoint; /** * @return Endpoint to use to retrieve an authentication token for log streaming and uploading source code. * */ public Output tokenEndpoint() { return this.tokenEndpoint; } /** * The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" * */ @Export(name="type", refs={String.class}, tree="[0]") private Output type; /** * @return The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" * */ public Output type() { return this.type; } /** * Endpoint to which the source code should be uploaded. * */ @Export(name="uploadEndpoint", refs={String.class}, tree="[0]") private Output uploadEndpoint; /** * @return Endpoint to which the source code should be uploaded. * */ public Output uploadEndpoint() { return this.uploadEndpoint; } /** * * @param name The _unique_ name of the resulting resource. */ public Build(java.lang.String name) { this(name, BuildArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public Build(java.lang.String name, BuildArgs 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 Build(java.lang.String name, BuildArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure-native:app:Build", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private Build(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure-native:app:Build", name, null, makeResourceOptions(options, id), false); } private static BuildArgs makeArgs(BuildArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? BuildArgs.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:app/v20230801preview:Build").build()), Output.of(Alias.builder().type("azure-native:app/v20231102preview:Build").build()), Output.of(Alias.builder().type("azure-native:app/v20240202preview:Build").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 Build get(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new Build(name, id, options); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy