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

com.pulumi.azure.managedapplication.Application 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.azure.managedapplication;

import com.pulumi.azure.Utilities;
import com.pulumi.azure.managedapplication.ApplicationArgs;
import com.pulumi.azure.managedapplication.inputs.ApplicationState;
import com.pulumi.azure.managedapplication.outputs.ApplicationPlan;
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.Map;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * Manages a Managed Application.
 * 
 * ## Example Usage
 * 
 * <!--Start PulumiCodeChooser -->
 * 
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azure.core.CoreFunctions;
 * import com.pulumi.azure.authorization.AuthorizationFunctions;
 * import com.pulumi.azure.authorization.inputs.GetRoleDefinitionArgs;
 * import com.pulumi.azure.core.ResourceGroup;
 * import com.pulumi.azure.core.ResourceGroupArgs;
 * import com.pulumi.azure.managedapplication.Definition;
 * import com.pulumi.azure.managedapplication.DefinitionArgs;
 * import com.pulumi.azure.managedapplication.inputs.DefinitionAuthorizationArgs;
 * import com.pulumi.azure.managedapplication.Application;
 * import com.pulumi.azure.managedapplication.ApplicationArgs;
 * import static com.pulumi.codegen.internal.Serialization.*;
 * 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) {
 *         final var current = CoreFunctions.getClientConfig();
 * 
 *         final var builtin = AuthorizationFunctions.getRoleDefinition(GetRoleDefinitionArgs.builder()
 *             .name("Contributor")
 *             .build());
 * 
 *         var example = new ResourceGroup("example", ResourceGroupArgs.builder()
 *             .name("example-resources")
 *             .location("West Europe")
 *             .build());
 * 
 *         var exampleDefinition = new Definition("exampleDefinition", DefinitionArgs.builder()
 *             .name("examplemanagedapplicationdefinition")
 *             .location(example.location())
 *             .resourceGroupName(example.name())
 *             .lockLevel("ReadOnly")
 *             .packageFileUri("https://github.com/Azure/azure-managedapp-samples/raw/master/Managed Application Sample Packages/201-managed-storage-account/managedstorage.zip")
 *             .displayName("TestManagedAppDefinition")
 *             .description("Test Managed App Definition")
 *             .authorizations(DefinitionAuthorizationArgs.builder()
 *                 .servicePrincipalId(current.applyValue(getClientConfigResult -> getClientConfigResult.objectId()))
 *                 .roleDefinitionId(StdFunctions.split(SplitArgs.builder()
 *                     .separator("/")
 *                     .text(builtin.applyValue(getRoleDefinitionResult -> getRoleDefinitionResult.id()))
 *                     .build()).result()[StdFunctions.split(SplitArgs.builder()
 *                     .separator("/")
 *                     .text(builtin.applyValue(getRoleDefinitionResult -> getRoleDefinitionResult.id()))
 *                     .build()).result().length() - 1])
 *                 .build())
 *             .build());
 * 
 *         var exampleApplication = new Application("exampleApplication", ApplicationArgs.builder()
 *             .name("example-managedapplication")
 *             .location(example.location())
 *             .resourceGroupName(example.name())
 *             .kind("ServiceCatalog")
 *             .managedResourceGroupName("infrastructureGroup")
 *             .applicationDefinitionId(exampleDefinition.id())
 *             .parameterValues(example.location().applyValue(location -> serializeJson(
 *                 jsonObject(
 *                     jsonProperty("location", jsonObject(
 *                         jsonProperty("value", location)
 *                     )),
 *                     jsonProperty("storageAccountNamePrefix", jsonObject(
 *                         jsonProperty("value", "storeNamePrefix")
 *                     )),
 *                     jsonProperty("storageAccountType", jsonObject(
 *                         jsonProperty("value", "Standard_LRS")
 *                     ))
 *                 ))))
 *             .build());
 * 
 *     }
 * }
 * }
 * 
* <!--End PulumiCodeChooser --> * * ## Import * * Managed Application can be imported using the `resource id`, e.g. * * ```sh * $ pulumi import azure:managedapplication/application:Application example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Solutions/applications/app1 * ``` * */ @ResourceType(type="azure:managedapplication/application:Application") public class Application extends com.pulumi.resources.CustomResource { /** * The application definition ID to deploy. * */ @Export(name="applicationDefinitionId", refs={String.class}, tree="[0]") private Output applicationDefinitionId; /** * @return The application definition ID to deploy. * */ public Output> applicationDefinitionId() { return Codegen.optional(this.applicationDefinitionId); } /** * The kind of the managed application to deploy. Possible values are `MarketPlace` and `ServiceCatalog`. Changing this forces a new resource to be created. * */ @Export(name="kind", refs={String.class}, tree="[0]") private Output kind; /** * @return The kind of the managed application to deploy. Possible values are `MarketPlace` and `ServiceCatalog`. Changing this forces a new resource to be created. * */ public Output kind() { return this.kind; } /** * Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. * */ @Export(name="location", refs={String.class}, tree="[0]") private Output location; /** * @return Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. * */ public Output location() { return this.location; } /** * The name of the target resource group where all the resources deployed by the managed application will reside. Changing this forces a new resource to be created. * */ @Export(name="managedResourceGroupName", refs={String.class}, tree="[0]") private Output managedResourceGroupName; /** * @return The name of the target resource group where all the resources deployed by the managed application will reside. Changing this forces a new resource to be created. * */ public Output managedResourceGroupName() { return this.managedResourceGroupName; } /** * Specifies the name of the Managed Application. Changing this forces a new resource to be created. * */ @Export(name="name", refs={String.class}, tree="[0]") private Output name; /** * @return Specifies the name of the Managed Application. Changing this forces a new resource to be created. * */ public Output name() { return this.name; } /** * The name and value pairs that define the managed application outputs. * */ @Export(name="outputs", refs={Map.class,String.class}, tree="[0,1,1]") private Output> outputs; /** * @return The name and value pairs that define the managed application outputs. * */ public Output> outputs() { return this.outputs; } /** * The parameter values to pass to the Managed Application. This field is a JSON object that allows you to assign parameters to this Managed Application. * */ @Export(name="parameterValues", refs={String.class}, tree="[0]") private Output parameterValues; /** * @return The parameter values to pass to the Managed Application. This field is a JSON object that allows you to assign parameters to this Managed Application. * */ public Output parameterValues() { return this.parameterValues; } /** * One `plan` block as defined below. Changing this forces a new resource to be created. * */ @Export(name="plan", refs={ApplicationPlan.class}, tree="[0]") private Output plan; /** * @return One `plan` block as defined below. Changing this forces a new resource to be created. * */ public Output> plan() { return Codegen.optional(this.plan); } /** * The name of the Resource Group where the Managed Application should exist. Changing this forces a new resource to be created. * */ @Export(name="resourceGroupName", refs={String.class}, tree="[0]") private Output resourceGroupName; /** * @return The name of the Resource Group where the Managed Application should exist. Changing this forces a new resource to be created. * */ public Output resourceGroupName() { return this.resourceGroupName; } /** * A mapping of tags to assign to the resource. * */ @Export(name="tags", refs={Map.class,String.class}, tree="[0,1,1]") private Output> tags; /** * @return A mapping of tags to assign to the resource. * */ public Output>> tags() { return Codegen.optional(this.tags); } /** * * @param name The _unique_ name of the resulting resource. */ public Application(java.lang.String name) { this(name, ApplicationArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public Application(java.lang.String name, ApplicationArgs 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 Application(java.lang.String name, ApplicationArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure:managedapplication/application:Application", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private Application(java.lang.String name, Output id, @Nullable ApplicationState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure:managedapplication/application:Application", name, state, makeResourceOptions(options, id), false); } private static ApplicationArgs makeArgs(ApplicationArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? ApplicationArgs.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()) .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 state * @param options Optional settings to control the behavior of the CustomResource. */ public static Application get(java.lang.String name, Output id, @Nullable ApplicationState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new Application(name, id, state, options); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy