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

com.pulumi.azure.managedapplication.Definition 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.DefinitionArgs;
import com.pulumi.azure.managedapplication.inputs.DefinitionState;
import com.pulumi.azure.managedapplication.outputs.DefinitionAuthorization;
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;

/**
 * Manages a Managed Application Definition.
 * 
 * ## 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.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 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();
 * 
 *         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("TestManagedApplicationDefinition")
 *             .description("Test Managed Application Definition")
 *             .authorizations(DefinitionAuthorizationArgs.builder()
 *                 .servicePrincipalId(current.applyValue(getClientConfigResult -> getClientConfigResult.objectId()))
 *                 .roleDefinitionId("a094b430-dad3-424d-ae58-13f72fd72591")
 *                 .build())
 *             .build());
 * 
 *     }
 * }
 * }
 * 
* <!--End PulumiCodeChooser --> * * ## Import * * Managed Application Definition can be imported using the `resource id`, e.g. * * ```sh * $ pulumi import azure:managedapplication/definition:Definition example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Solutions/applicationDefinitions/appDefinition1 * ``` * */ @ResourceType(type="azure:managedapplication/definition:Definition") public class Definition extends com.pulumi.resources.CustomResource { /** * One or more `authorization` block defined below. * */ @Export(name="authorizations", refs={List.class,DefinitionAuthorization.class}, tree="[0,1]") private Output> authorizations; /** * @return One or more `authorization` block defined below. * */ public Output>> authorizations() { return Codegen.optional(this.authorizations); } /** * Specifies the `createUiDefinition` JSON for the backing template with `Microsoft.Solutions/applications` resource. * */ @Export(name="createUiDefinition", refs={String.class}, tree="[0]") private Output createUiDefinition; /** * @return Specifies the `createUiDefinition` JSON for the backing template with `Microsoft.Solutions/applications` resource. * */ public Output> createUiDefinition() { return Codegen.optional(this.createUiDefinition); } /** * Specifies the managed application definition description. * */ @Export(name="description", refs={String.class}, tree="[0]") private Output description; /** * @return Specifies the managed application definition description. * */ public Output> description() { return Codegen.optional(this.description); } /** * Specifies the managed application definition display name. * */ @Export(name="displayName", refs={String.class}, tree="[0]") private Output displayName; /** * @return Specifies the managed application definition display name. * */ public Output displayName() { return this.displayName; } /** * 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; } /** * Specifies the managed application lock level. Valid values include `CanNotDelete`, `None`, `ReadOnly`. Changing this forces a new resource to be created. * */ @Export(name="lockLevel", refs={String.class}, tree="[0]") private Output lockLevel; /** * @return Specifies the managed application lock level. Valid values include `CanNotDelete`, `None`, `ReadOnly`. Changing this forces a new resource to be created. * */ public Output lockLevel() { return this.lockLevel; } /** * Specifies the inline main template JSON which has resources to be provisioned. * */ @Export(name="mainTemplate", refs={String.class}, tree="[0]") private Output mainTemplate; /** * @return Specifies the inline main template JSON which has resources to be provisioned. * */ public Output> mainTemplate() { return Codegen.optional(this.mainTemplate); } /** * Specifies the name of the Managed Application Definition. 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 Definition. Changing this forces a new resource to be created. * */ public Output name() { return this.name; } /** * Is the package enabled? Defaults to `true`. * */ @Export(name="packageEnabled", refs={Boolean.class}, tree="[0]") private Output packageEnabled; /** * @return Is the package enabled? Defaults to `true`. * */ public Output> packageEnabled() { return Codegen.optional(this.packageEnabled); } /** * Specifies the managed application definition package file Uri. * */ @Export(name="packageFileUri", refs={String.class}, tree="[0]") private Output packageFileUri; /** * @return Specifies the managed application definition package file Uri. * */ public Output> packageFileUri() { return Codegen.optional(this.packageFileUri); } /** * The name of the Resource Group where the Managed Application Definition 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 Definition 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. * * > **NOTE:** If either `create_ui_definition` or `main_template` is set they both must be set. * */ @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. * * > **NOTE:** If either `create_ui_definition` or `main_template` is set they both must be set. * */ public Output>> tags() { return Codegen.optional(this.tags); } /** * * @param name The _unique_ name of the resulting resource. */ public Definition(java.lang.String name) { this(name, DefinitionArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public Definition(java.lang.String name, DefinitionArgs 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 Definition(java.lang.String name, DefinitionArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure:managedapplication/definition:Definition", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private Definition(java.lang.String name, Output id, @Nullable DefinitionState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure:managedapplication/definition:Definition", name, state, makeResourceOptions(options, id), false); } private static DefinitionArgs makeArgs(DefinitionArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? DefinitionArgs.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 Definition get(java.lang.String name, Output id, @Nullable DefinitionState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new Definition(name, id, state, options); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy