Azure Classic

Pulumi Official
Package maintained by Pulumi
v5.14.0 published on Thursday, Jul 28, 2022 by Pulumi

Definition

Manages a Managed Application Definition.

Example Usage

using Pulumi;
using Azure = Pulumi.Azure;

class MyStack : Stack
{
    public MyStack()
    {
        var current = Output.Create(Azure.Core.GetClientConfig.InvokeAsync());
        var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new Azure.Core.ResourceGroupArgs
        {
            Location = "West Europe",
        });
        var exampleDefinition = new Azure.ManagedApplication.Definition("exampleDefinition", new Azure.ManagedApplication.DefinitionArgs
        {
            Location = exampleResourceGroup.Location,
            ResourceGroupName = exampleResourceGroup.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 Azure.ManagedApplication.Inputs.DefinitionAuthorizationArgs
                {
                    ServicePrincipalId = current.Apply(current => current.ObjectId),
                    RoleDefinitionId = "a094b430-dad3-424d-ae58-13f72fd72591",
                },
            },
        });
    }

}
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
		}
		exampleResourceGroup, err := core.NewResourceGroup(ctx, "exampleResourceGroup", &core.ResourceGroupArgs{
			Location: pulumi.String("West Europe"),
		})
		if err != nil {
			return err
		}
		_, err = managedapplication.NewDefinition(ctx, "exampleDefinition", &managedapplication.DefinitionArgs{
			Location:          exampleResourceGroup.Location,
			ResourceGroupName: exampleResourceGroup.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
	})
}

Coming soon!

import pulumi
import pulumi_azure as azure

current = azure.core.get_client_config()
example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe")
example_definition = azure.managedapplication.Definition("exampleDefinition",
    location=example_resource_group.location,
    resource_group_name=example_resource_group.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=[azure.managedapplication.DefinitionAuthorizationArgs(
        service_principal_id=current.object_id,
        role_definition_id="a094b430-dad3-424d-ae58-13f72fd72591",
    )])
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const current = azure.core.getClientConfig({});
const exampleResourceGroup = new azure.core.ResourceGroup("exampleResourceGroup", {location: "West Europe"});
const exampleDefinition = new azure.managedapplication.Definition("exampleDefinition", {
    location: exampleResourceGroup.location,
    resourceGroupName: exampleResourceGroup.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",
    }],
});
resources:
  exampleResourceGroup:
    type: azure:core:ResourceGroup
    properties:
      location: West Europe
  exampleDefinition:
    type: azure:managedapplication:Definition
    properties:
      location: ${exampleResourceGroup.location}
      resourceGroupName: ${exampleResourceGroup.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: {}

Create a Definition Resource

new Definition(name: string, args: DefinitionArgs, opts?: CustomResourceOptions);
@overload
def Definition(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               authorizations: Optional[Sequence[DefinitionAuthorizationArgs]] = None,
               create_ui_definition: Optional[str] = None,
               description: Optional[str] = None,
               display_name: Optional[str] = None,
               location: Optional[str] = None,
               lock_level: Optional[str] = None,
               main_template: Optional[str] = None,
               name: Optional[str] = None,
               package_enabled: Optional[bool] = None,
               package_file_uri: Optional[str] = None,
               resource_group_name: Optional[str] = None,
               tags: Optional[Mapping[str, str]] = None)
@overload
def Definition(resource_name: str,
               args: DefinitionArgs,
               opts: Optional[ResourceOptions] = None)
func NewDefinition(ctx *Context, name string, args DefinitionArgs, opts ...ResourceOption) (*Definition, error)
public Definition(string name, DefinitionArgs args, CustomResourceOptions? opts = null)
public Definition(String name, DefinitionArgs args)
public Definition(String name, DefinitionArgs args, CustomResourceOptions options)
type: azure:managedapplication:Definition
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args DefinitionArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args DefinitionArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args DefinitionArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args DefinitionArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args DefinitionArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Definition Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The Definition resource accepts the following input properties:

DisplayName string

Specifies the managed application definition display name.

LockLevel string

Specifies the managed application lock level. Valid values include CanNotDelete, None, ReadOnly. Changing this forces a new resource to be created.

ResourceGroupName string

The name of the Resource Group where the Managed Application Definition should exist. Changing this forces a new resource to be created.

Authorizations List<DefinitionAuthorizationArgs>

One or more authorization block defined below.

CreateUiDefinition string

Specifies the createUiDefinition JSON for the backing template with Microsoft.Solutions/applications resource.

Description string

Specifies the managed application definition description.

Location string

Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

MainTemplate string

Specifies the inline main template JSON which has resources to be provisioned.

Name string

Specifies the name of the Managed Application Definition. Changing this forces a new resource to be created.

PackageEnabled bool

Is the package enabled? Defaults to true.

PackageFileUri string

Specifies the managed application definition package file Uri.

Tags Dictionary<string, string>

A mapping of tags to assign to the resource.

DisplayName string

Specifies the managed application definition display name.

LockLevel string

Specifies the managed application lock level. Valid values include CanNotDelete, None, ReadOnly. Changing this forces a new resource to be created.

ResourceGroupName string

The name of the Resource Group where the Managed Application Definition should exist. Changing this forces a new resource to be created.

Authorizations []DefinitionAuthorizationArgs

One or more authorization block defined below.

CreateUiDefinition string

Specifies the createUiDefinition JSON for the backing template with Microsoft.Solutions/applications resource.

Description string

Specifies the managed application definition description.

Location string

Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

MainTemplate string

Specifies the inline main template JSON which has resources to be provisioned.

Name string

Specifies the name of the Managed Application Definition. Changing this forces a new resource to be created.

PackageEnabled bool

Is the package enabled? Defaults to true.

PackageFileUri string

Specifies the managed application definition package file Uri.

Tags map[string]string

A mapping of tags to assign to the resource.

displayName String

Specifies the managed application definition display name.

lockLevel String

Specifies the managed application lock level. Valid values include CanNotDelete, None, ReadOnly. Changing this forces a new resource to be created.

resourceGroupName String

The name of the Resource Group where the Managed Application Definition should exist. Changing this forces a new resource to be created.

authorizations List<DefinitionAuthorizationArgs>

One or more authorization block defined below.

createUiDefinition String

Specifies the createUiDefinition JSON for the backing template with Microsoft.Solutions/applications resource.

description String

Specifies the managed application definition description.

location String

Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

mainTemplate String

Specifies the inline main template JSON which has resources to be provisioned.

name String

Specifies the name of the Managed Application Definition. Changing this forces a new resource to be created.

packageEnabled Boolean

Is the package enabled? Defaults to true.

packageFileUri String

Specifies the managed application definition package file Uri.

tags Map<String,String>

A mapping of tags to assign to the resource.

displayName string

Specifies the managed application definition display name.

lockLevel string

Specifies the managed application lock level. Valid values include CanNotDelete, None, ReadOnly. Changing this forces a new resource to be created.

resourceGroupName string

The name of the Resource Group where the Managed Application Definition should exist. Changing this forces a new resource to be created.

authorizations DefinitionAuthorizationArgs[]

One or more authorization block defined below.

createUiDefinition string

Specifies the createUiDefinition JSON for the backing template with Microsoft.Solutions/applications resource.

description string

Specifies the managed application definition description.

location string

Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

mainTemplate string

Specifies the inline main template JSON which has resources to be provisioned.

name string

Specifies the name of the Managed Application Definition. Changing this forces a new resource to be created.

packageEnabled boolean

Is the package enabled? Defaults to true.

packageFileUri string

Specifies the managed application definition package file Uri.

tags {[key: string]: string}

A mapping of tags to assign to the resource.

display_name str

Specifies the managed application definition display name.

lock_level str

Specifies the managed application lock level. Valid values include CanNotDelete, None, ReadOnly. Changing this forces a new resource to be created.

resource_group_name str

The name of the Resource Group where the Managed Application Definition should exist. Changing this forces a new resource to be created.

authorizations Sequence[DefinitionAuthorizationArgs]

One or more authorization block defined below.

create_ui_definition str

Specifies the createUiDefinition JSON for the backing template with Microsoft.Solutions/applications resource.

description str

Specifies the managed application definition description.

location str

Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

main_template str

Specifies the inline main template JSON which has resources to be provisioned.

name str

Specifies the name of the Managed Application Definition. Changing this forces a new resource to be created.

package_enabled bool

Is the package enabled? Defaults to true.

package_file_uri str

Specifies the managed application definition package file Uri.

tags Mapping[str, str]

A mapping of tags to assign to the resource.

displayName String

Specifies the managed application definition display name.

lockLevel String

Specifies the managed application lock level. Valid values include CanNotDelete, None, ReadOnly. Changing this forces a new resource to be created.

resourceGroupName String

The name of the Resource Group where the Managed Application Definition should exist. Changing this forces a new resource to be created.

authorizations List<Property Map>

One or more authorization block defined below.

createUiDefinition String

Specifies the createUiDefinition JSON for the backing template with Microsoft.Solutions/applications resource.

description String

Specifies the managed application definition description.

location String

Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

mainTemplate String

Specifies the inline main template JSON which has resources to be provisioned.

name String

Specifies the name of the Managed Application Definition. Changing this forces a new resource to be created.

packageEnabled Boolean

Is the package enabled? Defaults to true.

packageFileUri String

Specifies the managed application definition package file Uri.

tags Map<String>

A mapping of tags to assign to the resource.

Outputs

All input properties are implicitly available as output properties. Additionally, the Definition resource produces the following output properties:

Id string

The provider-assigned unique ID for this managed resource.

Id string

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

id string

The provider-assigned unique ID for this managed resource.

id str

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

Look up an Existing Definition Resource

Get an existing Definition resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: DefinitionState, opts?: CustomResourceOptions): Definition
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        authorizations: Optional[Sequence[DefinitionAuthorizationArgs]] = None,
        create_ui_definition: Optional[str] = None,
        description: Optional[str] = None,
        display_name: Optional[str] = None,
        location: Optional[str] = None,
        lock_level: Optional[str] = None,
        main_template: Optional[str] = None,
        name: Optional[str] = None,
        package_enabled: Optional[bool] = None,
        package_file_uri: Optional[str] = None,
        resource_group_name: Optional[str] = None,
        tags: Optional[Mapping[str, str]] = None) -> Definition
func GetDefinition(ctx *Context, name string, id IDInput, state *DefinitionState, opts ...ResourceOption) (*Definition, error)
public static Definition Get(string name, Input<string> id, DefinitionState? state, CustomResourceOptions? opts = null)
public static Definition get(String name, Output<String> id, DefinitionState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
Authorizations List<DefinitionAuthorizationArgs>

One or more authorization block defined below.

CreateUiDefinition string

Specifies the createUiDefinition JSON for the backing template with Microsoft.Solutions/applications resource.

Description string

Specifies the managed application definition description.

DisplayName string

Specifies the managed application definition display name.

Location string

Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

LockLevel string

Specifies the managed application lock level. Valid values include CanNotDelete, None, ReadOnly. Changing this forces a new resource to be created.

MainTemplate string

Specifies the inline main template JSON which has resources to be provisioned.

Name string

Specifies the name of the Managed Application Definition. Changing this forces a new resource to be created.

PackageEnabled bool

Is the package enabled? Defaults to true.

PackageFileUri string

Specifies the managed application definition package file Uri.

ResourceGroupName string

The name of the Resource Group where the Managed Application Definition should exist. Changing this forces a new resource to be created.

Tags Dictionary<string, string>

A mapping of tags to assign to the resource.

Authorizations []DefinitionAuthorizationArgs

One or more authorization block defined below.

CreateUiDefinition string

Specifies the createUiDefinition JSON for the backing template with Microsoft.Solutions/applications resource.

Description string

Specifies the managed application definition description.

DisplayName string

Specifies the managed application definition display name.

Location string

Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

LockLevel string

Specifies the managed application lock level. Valid values include CanNotDelete, None, ReadOnly. Changing this forces a new resource to be created.

MainTemplate string

Specifies the inline main template JSON which has resources to be provisioned.

Name string

Specifies the name of the Managed Application Definition. Changing this forces a new resource to be created.

PackageEnabled bool

Is the package enabled? Defaults to true.

PackageFileUri string

Specifies the managed application definition package file Uri.

ResourceGroupName string

The name of the Resource Group where the Managed Application Definition should exist. Changing this forces a new resource to be created.

Tags map[string]string

A mapping of tags to assign to the resource.

authorizations List<DefinitionAuthorizationArgs>

One or more authorization block defined below.

createUiDefinition String

Specifies the createUiDefinition JSON for the backing template with Microsoft.Solutions/applications resource.

description String

Specifies the managed application definition description.

displayName String

Specifies the managed application definition display name.

location String

Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

lockLevel String

Specifies the managed application lock level. Valid values include CanNotDelete, None, ReadOnly. Changing this forces a new resource to be created.

mainTemplate String

Specifies the inline main template JSON which has resources to be provisioned.

name String

Specifies the name of the Managed Application Definition. Changing this forces a new resource to be created.

packageEnabled Boolean

Is the package enabled? Defaults to true.

packageFileUri String

Specifies the managed application definition package file Uri.

resourceGroupName String

The name of the Resource Group where the Managed Application Definition should exist. Changing this forces a new resource to be created.

tags Map<String,String>

A mapping of tags to assign to the resource.

authorizations DefinitionAuthorizationArgs[]

One or more authorization block defined below.

createUiDefinition string

Specifies the createUiDefinition JSON for the backing template with Microsoft.Solutions/applications resource.

description string

Specifies the managed application definition description.

displayName string

Specifies the managed application definition display name.

location string

Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

lockLevel string

Specifies the managed application lock level. Valid values include CanNotDelete, None, ReadOnly. Changing this forces a new resource to be created.

mainTemplate string

Specifies the inline main template JSON which has resources to be provisioned.

name string

Specifies the name of the Managed Application Definition. Changing this forces a new resource to be created.

packageEnabled boolean

Is the package enabled? Defaults to true.

packageFileUri string

Specifies the managed application definition package file Uri.

resourceGroupName string

The name of the Resource Group where the Managed Application Definition should exist. Changing this forces a new resource to be created.

tags {[key: string]: string}

A mapping of tags to assign to the resource.

authorizations Sequence[DefinitionAuthorizationArgs]

One or more authorization block defined below.

create_ui_definition str

Specifies the createUiDefinition JSON for the backing template with Microsoft.Solutions/applications resource.

description str

Specifies the managed application definition description.

display_name str

Specifies the managed application definition display name.

location str

Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

lock_level str

Specifies the managed application lock level. Valid values include CanNotDelete, None, ReadOnly. Changing this forces a new resource to be created.

main_template str

Specifies the inline main template JSON which has resources to be provisioned.

name str

Specifies the name of the Managed Application Definition. Changing this forces a new resource to be created.

package_enabled bool

Is the package enabled? Defaults to true.

package_file_uri str

Specifies the managed application definition package file Uri.

resource_group_name str

The name of the Resource Group where the Managed Application Definition should exist. Changing this forces a new resource to be created.

tags Mapping[str, str]

A mapping of tags to assign to the resource.

authorizations List<Property Map>

One or more authorization block defined below.

createUiDefinition String

Specifies the createUiDefinition JSON for the backing template with Microsoft.Solutions/applications resource.

description String

Specifies the managed application definition description.

displayName String

Specifies the managed application definition display name.

location String

Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

lockLevel String

Specifies the managed application lock level. Valid values include CanNotDelete, None, ReadOnly. Changing this forces a new resource to be created.

mainTemplate String

Specifies the inline main template JSON which has resources to be provisioned.

name String

Specifies the name of the Managed Application Definition. Changing this forces a new resource to be created.

packageEnabled Boolean

Is the package enabled? Defaults to true.

packageFileUri String

Specifies the managed application definition package file Uri.

resourceGroupName String

The name of the Resource Group where the Managed Application Definition should exist. Changing this forces a new resource to be created.

tags Map<String>

A mapping of tags to assign to the resource.

Supporting Types

DefinitionAuthorization

RoleDefinitionId string

Specifies a role definition identifier for the provider. This role will define all the permissions that the provider must have on the managed application's container resource group. This role definition cannot have permission to delete the resource group.

ServicePrincipalId string

Specifies a service principal identifier for the provider. This is the identity that the provider will use to call ARM to manage the managed application resources.

RoleDefinitionId string

Specifies a role definition identifier for the provider. This role will define all the permissions that the provider must have on the managed application's container resource group. This role definition cannot have permission to delete the resource group.

ServicePrincipalId string

Specifies a service principal identifier for the provider. This is the identity that the provider will use to call ARM to manage the managed application resources.

roleDefinitionId String

Specifies a role definition identifier for the provider. This role will define all the permissions that the provider must have on the managed application's container resource group. This role definition cannot have permission to delete the resource group.

servicePrincipalId String

Specifies a service principal identifier for the provider. This is the identity that the provider will use to call ARM to manage the managed application resources.

roleDefinitionId string

Specifies a role definition identifier for the provider. This role will define all the permissions that the provider must have on the managed application's container resource group. This role definition cannot have permission to delete the resource group.

servicePrincipalId string

Specifies a service principal identifier for the provider. This is the identity that the provider will use to call ARM to manage the managed application resources.

role_definition_id str

Specifies a role definition identifier for the provider. This role will define all the permissions that the provider must have on the managed application's container resource group. This role definition cannot have permission to delete the resource group.

service_principal_id str

Specifies a service principal identifier for the provider. This is the identity that the provider will use to call ARM to manage the managed application resources.

roleDefinitionId String

Specifies a role definition identifier for the provider. This role will define all the permissions that the provider must have on the managed application's container resource group. This role definition cannot have permission to delete the resource group.

servicePrincipalId String

Specifies a service principal identifier for the provider. This is the identity that the provider will use to call ARM to manage the managed application resources.

Import

Managed Application Definition can be imported using the resource id, e.g.

 $ pulumi import azure:managedapplication/definition:Definition example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Solutions/applicationDefinitions/appDefinition1

Package Details

Repository
https://github.com/pulumi/pulumi-azure
License
Apache-2.0
Notes

This Pulumi package is based on the azurerm Terraform Provider.