![JAR search and dependency download from the Maven repository](/logo.png)
com.pulumi.azure.managedapplication.kotlin.DefinitionArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-azure-kotlin Show documentation
Show all versions of pulumi-azure-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azure.managedapplication.kotlin
import com.pulumi.azure.managedapplication.DefinitionArgs.builder
import com.pulumi.azure.managedapplication.kotlin.inputs.DefinitionAuthorizationArgs
import com.pulumi.azure.managedapplication.kotlin.inputs.DefinitionAuthorizationArgsBuilder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Boolean
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName
/**
* Manages a Managed Application Definition.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as azure from "@pulumi/azure";
* const current = azure.core.getClientConfig({});
* const example = new azure.core.ResourceGroup("example", {
* name: "example-resources",
* location: "West Europe",
* });
* const exampleDefinition = new azure.managedapplication.Definition("example", {
* 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: [{
* servicePrincipalId: current.then(current => current.objectId),
* roleDefinitionId: "a094b430-dad3-424d-ae58-13f72fd72591",
* }],
* });
* ```
* ```python
* import pulumi
* import pulumi_azure as azure
* current = azure.core.get_client_config()
* example = azure.core.ResourceGroup("example",
* name="example-resources",
* location="West Europe")
* example_definition = azure.managedapplication.Definition("example",
* name="examplemanagedapplicationdefinition",
* location=example.location,
* resource_group_name=example.name,
* lock_level="ReadOnly",
* package_file_uri="https://github.com/Azure/azure-managedapp-samples/raw/master/Managed Application Sample Packages/201-managed-storage-account/managedstorage.zip",
* display_name="TestManagedApplicationDefinition",
* description="Test Managed Application Definition",
* authorizations=[{
* "service_principal_id": current.object_id,
* "role_definition_id": "a094b430-dad3-424d-ae58-13f72fd72591",
* }])
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Azure = Pulumi.Azure;
* return await Deployment.RunAsync(() =>
* {
* var current = Azure.Core.GetClientConfig.Invoke();
* var example = new Azure.Core.ResourceGroup("example", new()
* {
* Name = "example-resources",
* Location = "West Europe",
* });
* var exampleDefinition = new Azure.ManagedApplication.Definition("example", new()
* {
* 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 = new[]
* {
* new Azure.ManagedApplication.Inputs.DefinitionAuthorizationArgs
* {
* ServicePrincipalId = current.Apply(getClientConfigResult => getClientConfigResult.ObjectId),
* RoleDefinitionId = "a094b430-dad3-424d-ae58-13f72fd72591",
* },
* },
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/managedapplication"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* current, err := core.GetClientConfig(ctx, nil, nil)
* if err != nil {
* return err
* }
* example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
* Name: pulumi.String("example-resources"),
* Location: pulumi.String("West Europe"),
* })
* if err != nil {
* return err
* }
* _, err = managedapplication.NewDefinition(ctx, "example", &managedapplication.DefinitionArgs{
* Name: pulumi.String("examplemanagedapplicationdefinition"),
* Location: example.Location,
* ResourceGroupName: example.Name,
* LockLevel: pulumi.String("ReadOnly"),
* PackageFileUri: pulumi.String("https://github.com/Azure/azure-managedapp-samples/raw/master/Managed Application Sample Packages/201-managed-storage-account/managedstorage.zip"),
* DisplayName: pulumi.String("TestManagedApplicationDefinition"),
* Description: pulumi.String("Test Managed Application Definition"),
* Authorizations: managedapplication.DefinitionAuthorizationArray{
* &managedapplication.DefinitionAuthorizationArgs{
* ServicePrincipalId: pulumi.String(current.ObjectId),
* RoleDefinitionId: pulumi.String("a094b430-dad3-424d-ae58-13f72fd72591"),
* },
* },
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* 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());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: azure:core:ResourceGroup
* properties:
* name: example-resources
* location: West Europe
* exampleDefinition:
* type: azure:managedapplication:Definition
* name: example
* properties:
* 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:
* - servicePrincipalId: ${current.objectId}
* roleDefinitionId: a094b430-dad3-424d-ae58-13f72fd72591
* variables:
* current:
* fn::invoke:
* Function: azure:core:getClientConfig
* Arguments: {}
* ```
*
* ## 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
* ```
* @property authorizations One or more `authorization` block defined below.
* @property createUiDefinition Specifies the `createUiDefinition` JSON for the backing template with `Microsoft.Solutions/applications` resource.
* @property description Specifies the managed application definition description.
* @property displayName Specifies the managed application definition display name.
* @property location Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
* @property lockLevel Specifies the managed application lock level. Valid values include `CanNotDelete`, `None`, `ReadOnly`. Changing this forces a new resource to be created.
* @property mainTemplate Specifies the inline main template JSON which has resources to be provisioned.
* @property name Specifies the name of the Managed Application Definition. Changing this forces a new resource to be created.
* @property packageEnabled Is the package enabled? Defaults to `true`.
* @property packageFileUri Specifies the managed application definition package file Uri.
* @property resourceGroupName The name of the Resource Group where the Managed Application Definition should exist. Changing this forces a new resource to be created.
* @property tags 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 data class DefinitionArgs(
public val authorizations: Output>? = null,
public val createUiDefinition: Output? = null,
public val description: Output? = null,
public val displayName: Output? = null,
public val location: Output? = null,
public val lockLevel: Output? = null,
public val mainTemplate: Output? = null,
public val name: Output? = null,
public val packageEnabled: Output? = null,
public val packageFileUri: Output? = null,
public val resourceGroupName: Output? = null,
public val tags: Output
© 2015 - 2025 Weber Informatics LLC | Privacy Policy