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

com.pulumi.azurenative.web.ContainerApp Maven / Gradle / Ivy

There is a newer version: 2.78.0
Show newest version
// *** 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.web;

import com.pulumi.azurenative.Utilities;
import com.pulumi.azurenative.web.ContainerAppArgs;
import com.pulumi.azurenative.web.outputs.ConfigurationResponse;
import com.pulumi.azurenative.web.outputs.TemplateResponse;
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.Map;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * Container App.
 * Azure REST API version: 2023-01-01.
 * 
 * Other available API versions: 2023-12-01, 2024-04-01.
 * 
 * ## Example Usage
 * ### Create or Update Container App
 * 
 * 
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.web.ContainerApp;
 * import com.pulumi.azurenative.web.ContainerAppArgs;
 * import com.pulumi.azurenative.web.inputs.ConfigurationArgs;
 * import com.pulumi.azurenative.web.inputs.IngressArgs;
 * import com.pulumi.azurenative.web.inputs.TemplateArgs;
 * import com.pulumi.azurenative.web.inputs.DaprArgs;
 * import com.pulumi.azurenative.web.inputs.ScaleArgs;
 * 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 containerApp = new ContainerApp("containerApp", ContainerAppArgs.builder()
 *             .configuration(ConfigurationArgs.builder()
 *                 .ingress(IngressArgs.builder()
 *                     .external(true)
 *                     .targetPort(3000)
 *                     .build())
 *                 .build())
 *             .kind("containerApp")
 *             .kubeEnvironmentId("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.Web/kubeEnvironments/demokube")
 *             .location("East US")
 *             .name("testcontainerApp0")
 *             .resourceGroupName("rg")
 *             .template(TemplateArgs.builder()
 *                 .containers(ContainerArgs.builder()
 *                     .image("repo/testcontainerApp0:v1")
 *                     .name("testcontainerApp0")
 *                     .build())
 *                 .dapr(DaprArgs.builder()
 *                     .appPort(3000)
 *                     .enabled(true)
 *                     .build())
 *                 .scale(ScaleArgs.builder()
 *                     .maxReplicas(5)
 *                     .minReplicas(1)
 *                     .rules(ScaleRuleArgs.builder()
 *                         .custom(CustomScaleRuleArgs.builder()
 *                             .metadata(Map.of("concurrentRequests", "50"))
 *                             .type("http")
 *                             .build())
 *                         .name("httpscalingrule")
 *                         .build())
 *                     .build())
 *                 .build())
 *             .build());
 * 
 *     }
 * }
 * 
 * }
 * 
* * ## Import * * An existing resource can be imported using its type token, name, and identifier, e.g. * * ```sh * $ pulumi import azure-native:web:ContainerApp testcontainerApp0 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/containerApps/{name} * ``` * */ @ResourceType(type="azure-native:web:ContainerApp") public class ContainerApp extends com.pulumi.resources.CustomResource { /** * Non versioned Container App configuration properties. * */ @Export(name="configuration", refs={ConfigurationResponse.class}, tree="[0]") private Output configuration; /** * @return Non versioned Container App configuration properties. * */ public Output> configuration() { return Codegen.optional(this.configuration); } /** * Kind of resource. * */ @Export(name="kind", refs={String.class}, tree="[0]") private Output kind; /** * @return Kind of resource. * */ public Output> kind() { return Codegen.optional(this.kind); } /** * Resource ID of the Container App's KubeEnvironment. * */ @Export(name="kubeEnvironmentId", refs={String.class}, tree="[0]") private Output kubeEnvironmentId; /** * @return Resource ID of the Container App's KubeEnvironment. * */ public Output> kubeEnvironmentId() { return Codegen.optional(this.kubeEnvironmentId); } /** * Fully Qualified Domain Name of the latest revision of the Container App. * */ @Export(name="latestRevisionFqdn", refs={String.class}, tree="[0]") private Output latestRevisionFqdn; /** * @return Fully Qualified Domain Name of the latest revision of the Container App. * */ public Output latestRevisionFqdn() { return this.latestRevisionFqdn; } /** * Name of the latest revision of the Container App. * */ @Export(name="latestRevisionName", refs={String.class}, tree="[0]") private Output latestRevisionName; /** * @return Name of the latest revision of the Container App. * */ public Output latestRevisionName() { return this.latestRevisionName; } /** * Resource Location. * */ @Export(name="location", refs={String.class}, tree="[0]") private Output location; /** * @return Resource Location. * */ 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; } /** * Provisioning state of the Container App. * */ @Export(name="provisioningState", refs={String.class}, tree="[0]") private Output provisioningState; /** * @return Provisioning state of the Container App. * */ public Output provisioningState() { return this.provisioningState; } /** * Resource tags. * */ @Export(name="tags", refs={Map.class,String.class}, tree="[0,1,1]") private Output> tags; /** * @return Resource tags. * */ public Output>> tags() { return Codegen.optional(this.tags); } /** * Container App versioned application definition. * */ @Export(name="template", refs={TemplateResponse.class}, tree="[0]") private Output template; /** * @return Container App versioned application definition. * */ public Output> template() { return Codegen.optional(this.template); } /** * Resource type. * */ @Export(name="type", refs={String.class}, tree="[0]") private Output type; /** * @return Resource type. * */ public Output type() { return this.type; } /** * * @param name The _unique_ name of the resulting resource. */ public ContainerApp(java.lang.String name) { this(name, ContainerAppArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public ContainerApp(java.lang.String name, ContainerAppArgs 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 ContainerApp(java.lang.String name, ContainerAppArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure-native:web:ContainerApp", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private ContainerApp(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure-native:web:ContainerApp", name, null, makeResourceOptions(options, id), false); } private static ContainerAppArgs makeArgs(ContainerAppArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? ContainerAppArgs.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:web/v20210301:ContainerApp").build()), Output.of(Alias.builder().type("azure-native:web/v20220301:ContainerApp").build()), Output.of(Alias.builder().type("azure-native:web/v20220901:ContainerApp").build()), Output.of(Alias.builder().type("azure-native:web/v20230101:ContainerApp").build()), Output.of(Alias.builder().type("azure-native:web/v20231201:ContainerApp").build()), Output.of(Alias.builder().type("azure-native:web/v20240401:ContainerApp").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 ContainerApp get(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new ContainerApp(name, id, options); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy