UNPKG

@pulumi/azuread

Version:

A Pulumi package for creating and managing Azure Active Directory (Azure AD) cloud resources.

135 lines (134 loc) 5.58 kB
import * as pulumi from "@pulumi/pulumi"; /** * Creates an application registration and associated service principal from a gallery template. * * > The azuread.Application resource can also be used to instantiate a gallery application, however unlike the `azuread.Application` resource, this resource does not attempt to manage any properties of the resulting application. * * ## API Permissions * * The following API permissions are required in order to use this resource. * * When authenticated with a service principal, this resource requires one of the following application roles: `Application.ReadWrite.OwnedBy` or `Application.ReadWrite.All` * * When authenticated with a user principal, this resource may require one of the following directory roles: `Application Administrator` or `Global Administrator` * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as azuread from "@pulumi/azuread"; * * const example = azuread.getApplicationTemplate({ * displayName: "Marketo", * }); * const exampleApplicationFromTemplate = new azuread.ApplicationFromTemplate("example", { * displayName: "Example Application", * templateId: example.then(example => example.templateId), * }); * const exampleGetApplication = azuread.getApplicationOutput({ * objectId: exampleApplicationFromTemplate.applicationObjectId, * }); * const exampleGetServicePrincipal = azuread.getServicePrincipalOutput({ * objectId: exampleApplicationFromTemplate.servicePrincipalObjectId, * }); * ``` * * ## Import * * Templated Applications can be imported using the template ID, the object ID of the application, and the object ID of the service principal, in the following format. * * ```sh * $ pulumi import azuread:index/applicationFromTemplate:ApplicationFromTemplate example /applicationTemplates/00000000-0000-0000-0000-000000000000/instantiate/11111111-1111-1111-1111-111111111111/22222222-2222-2222-2222-222222222222 * ``` */ export declare class ApplicationFromTemplate extends pulumi.CustomResource { /** * Get an existing ApplicationFromTemplate 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 Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input<pulumi.ID>, state?: ApplicationFromTemplateState, opts?: pulumi.CustomResourceOptions): ApplicationFromTemplate; /** * Returns true if the given object is an instance of ApplicationFromTemplate. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is ApplicationFromTemplate; /** * The resource ID for the application. */ readonly applicationId: pulumi.Output<string>; /** * The object ID for the application. */ readonly applicationObjectId: pulumi.Output<string>; /** * The display name for the application. */ readonly displayName: pulumi.Output<string>; /** * The resource ID for the service principal. */ readonly servicePrincipalId: pulumi.Output<string>; /** * The object ID for the service principal. */ readonly servicePrincipalObjectId: pulumi.Output<string>; /** * Unique ID for a templated application in the Azure AD App Gallery, from which to create the application. Changing this forces a new resource to be created. */ readonly templateId: pulumi.Output<string>; /** * Create a ApplicationFromTemplate resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: ApplicationFromTemplateArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering ApplicationFromTemplate resources. */ export interface ApplicationFromTemplateState { /** * The resource ID for the application. */ applicationId?: pulumi.Input<string>; /** * The object ID for the application. */ applicationObjectId?: pulumi.Input<string>; /** * The display name for the application. */ displayName?: pulumi.Input<string>; /** * The resource ID for the service principal. */ servicePrincipalId?: pulumi.Input<string>; /** * The object ID for the service principal. */ servicePrincipalObjectId?: pulumi.Input<string>; /** * Unique ID for a templated application in the Azure AD App Gallery, from which to create the application. Changing this forces a new resource to be created. */ templateId?: pulumi.Input<string>; } /** * The set of arguments for constructing a ApplicationFromTemplate resource. */ export interface ApplicationFromTemplateArgs { /** * The display name for the application. */ displayName: pulumi.Input<string>; /** * Unique ID for a templated application in the Azure AD App Gallery, from which to create the application. Changing this forces a new resource to be created. */ templateId: pulumi.Input<string>; }