@pulumi/azuread
Version:
A Pulumi package for creating and managing Azure Active Directory (Azure AD) cloud resources.
255 lines • 12.5 kB
JavaScript
;
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.Application = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* ## Example Usage
*
* *Create an application*
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as azuread from "@pulumi/azuread";
* import * as std from "@pulumi/std";
*
* const current = azuread.getClientConfig({});
* const example = new azuread.Application("example", {
* displayName: "example",
* identifierUris: ["api://example-app"],
* logoImage: std.filebase64({
* input: "/path/to/logo.png",
* }).then(invoke => invoke.result),
* owners: [current.then(current => current.objectId)],
* signInAudience: "AzureADMultipleOrgs",
* api: {
* mappedClaimsEnabled: true,
* requestedAccessTokenVersion: 2,
* knownClientApplications: [
* known1.clientId,
* known2.clientId,
* ],
* oauth2PermissionScopes: [
* {
* adminConsentDescription: "Allow the application to access example on behalf of the signed-in user.",
* adminConsentDisplayName: "Access example",
* enabled: true,
* id: "96183846-204b-4b43-82e1-5d2222eb4b9b",
* type: "User",
* userConsentDescription: "Allow the application to access example on your behalf.",
* userConsentDisplayName: "Access example",
* value: "user_impersonation",
* },
* {
* adminConsentDescription: "Administer the example application",
* adminConsentDisplayName: "Administer",
* enabled: true,
* id: "be98fa3e-ab5b-4b11-83d9-04ba2b7946bc",
* type: "Admin",
* value: "administer",
* },
* ],
* },
* appRoles: [
* {
* allowedMemberTypes: [
* "User",
* "Application",
* ],
* description: "Admins can manage roles and perform all task actions",
* displayName: "Admin",
* enabled: true,
* id: "1b19509b-32b1-4e9f-b71d-4992aa991967",
* value: "admin",
* },
* {
* allowedMemberTypes: ["User"],
* description: "ReadOnly roles have limited query access",
* displayName: "ReadOnly",
* enabled: true,
* id: "497406e4-012a-4267-bf18-45a1cb148a01",
* value: "User",
* },
* ],
* featureTags: [{
* enterprise: true,
* gallery: true,
* }],
* optionalClaims: {
* accessTokens: [
* {
* name: "myclaim",
* },
* {
* name: "otherclaim",
* },
* ],
* idTokens: [{
* name: "userclaim",
* source: "user",
* essential: true,
* additionalProperties: ["emit_as_roles"],
* }],
* saml2Tokens: [{
* name: "samlexample",
* }],
* },
* requiredResourceAccesses: [
* {
* resourceAppId: "00000003-0000-0000-c000-000000000000",
* resourceAccesses: [
* {
* id: "df021288-bdef-4463-88db-98f22de89214",
* type: "Role",
* },
* {
* id: "b4e74841-8e56-480b-be8b-910348b18b4c",
* type: "Scope",
* },
* ],
* },
* {
* resourceAppId: "c5393580-f805-4401-95e8-94b7a6ef2fc2",
* resourceAccesses: [{
* id: "594c1fb6-4f81-4475-ae41-0c394909246c",
* type: "Role",
* }],
* },
* ],
* web: {
* homepageUrl: "https://app.example.net",
* logoutUrl: "https://app.example.net/logout",
* redirectUris: ["https://app.example.net/account"],
* implicitGrant: {
* accessTokenIssuanceEnabled: true,
* idTokenIssuanceEnabled: true,
* },
* },
* });
* ```
*
* *Create application and generate a password*
*
* ## Import
*
* Applications can be imported using the object ID of the application, in the following format.
*
* ```sh
* $ pulumi import azuread:index/application:Application example /applications/00000000-0000-0000-0000-000000000000
* ```
*/
class Application extends pulumi.CustomResource {
/**
* Get an existing Application 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, id, state, opts) {
return new Application(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of Application. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj) {
if (obj === undefined || obj === null) {
return false;
}
return obj['__pulumiType'] === Application.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["api"] = state ? state.api : undefined;
resourceInputs["appRoleIds"] = state ? state.appRoleIds : undefined;
resourceInputs["appRoles"] = state ? state.appRoles : undefined;
resourceInputs["clientId"] = state ? state.clientId : undefined;
resourceInputs["description"] = state ? state.description : undefined;
resourceInputs["deviceOnlyAuthEnabled"] = state ? state.deviceOnlyAuthEnabled : undefined;
resourceInputs["disabledByMicrosoft"] = state ? state.disabledByMicrosoft : undefined;
resourceInputs["displayName"] = state ? state.displayName : undefined;
resourceInputs["fallbackPublicClientEnabled"] = state ? state.fallbackPublicClientEnabled : undefined;
resourceInputs["featureTags"] = state ? state.featureTags : undefined;
resourceInputs["groupMembershipClaims"] = state ? state.groupMembershipClaims : undefined;
resourceInputs["identifierUris"] = state ? state.identifierUris : undefined;
resourceInputs["logoImage"] = state ? state.logoImage : undefined;
resourceInputs["logoUrl"] = state ? state.logoUrl : undefined;
resourceInputs["marketingUrl"] = state ? state.marketingUrl : undefined;
resourceInputs["notes"] = state ? state.notes : undefined;
resourceInputs["oauth2PermissionScopeIds"] = state ? state.oauth2PermissionScopeIds : undefined;
resourceInputs["oauth2PostResponseRequired"] = state ? state.oauth2PostResponseRequired : undefined;
resourceInputs["objectId"] = state ? state.objectId : undefined;
resourceInputs["optionalClaims"] = state ? state.optionalClaims : undefined;
resourceInputs["owners"] = state ? state.owners : undefined;
resourceInputs["password"] = state ? state.password : undefined;
resourceInputs["preventDuplicateNames"] = state ? state.preventDuplicateNames : undefined;
resourceInputs["privacyStatementUrl"] = state ? state.privacyStatementUrl : undefined;
resourceInputs["publicClient"] = state ? state.publicClient : undefined;
resourceInputs["publisherDomain"] = state ? state.publisherDomain : undefined;
resourceInputs["requiredResourceAccesses"] = state ? state.requiredResourceAccesses : undefined;
resourceInputs["serviceManagementReference"] = state ? state.serviceManagementReference : undefined;
resourceInputs["signInAudience"] = state ? state.signInAudience : undefined;
resourceInputs["singlePageApplication"] = state ? state.singlePageApplication : undefined;
resourceInputs["supportUrl"] = state ? state.supportUrl : undefined;
resourceInputs["tags"] = state ? state.tags : undefined;
resourceInputs["templateId"] = state ? state.templateId : undefined;
resourceInputs["termsOfServiceUrl"] = state ? state.termsOfServiceUrl : undefined;
resourceInputs["web"] = state ? state.web : undefined;
}
else {
const args = argsOrState;
if ((!args || args.displayName === undefined) && !opts.urn) {
throw new Error("Missing required property 'displayName'");
}
resourceInputs["api"] = args ? args.api : undefined;
resourceInputs["appRoles"] = args ? args.appRoles : undefined;
resourceInputs["description"] = args ? args.description : undefined;
resourceInputs["deviceOnlyAuthEnabled"] = args ? args.deviceOnlyAuthEnabled : undefined;
resourceInputs["displayName"] = args ? args.displayName : undefined;
resourceInputs["fallbackPublicClientEnabled"] = args ? args.fallbackPublicClientEnabled : undefined;
resourceInputs["featureTags"] = args ? args.featureTags : undefined;
resourceInputs["groupMembershipClaims"] = args ? args.groupMembershipClaims : undefined;
resourceInputs["identifierUris"] = args ? args.identifierUris : undefined;
resourceInputs["logoImage"] = args ? args.logoImage : undefined;
resourceInputs["marketingUrl"] = args ? args.marketingUrl : undefined;
resourceInputs["notes"] = args ? args.notes : undefined;
resourceInputs["oauth2PostResponseRequired"] = args ? args.oauth2PostResponseRequired : undefined;
resourceInputs["optionalClaims"] = args ? args.optionalClaims : undefined;
resourceInputs["owners"] = args ? args.owners : undefined;
resourceInputs["password"] = args ? args.password : undefined;
resourceInputs["preventDuplicateNames"] = args ? args.preventDuplicateNames : undefined;
resourceInputs["privacyStatementUrl"] = args ? args.privacyStatementUrl : undefined;
resourceInputs["publicClient"] = args ? args.publicClient : undefined;
resourceInputs["requiredResourceAccesses"] = args ? args.requiredResourceAccesses : undefined;
resourceInputs["serviceManagementReference"] = args ? args.serviceManagementReference : undefined;
resourceInputs["signInAudience"] = args ? args.signInAudience : undefined;
resourceInputs["singlePageApplication"] = args ? args.singlePageApplication : undefined;
resourceInputs["supportUrl"] = args ? args.supportUrl : undefined;
resourceInputs["tags"] = args ? args.tags : undefined;
resourceInputs["templateId"] = args ? args.templateId : undefined;
resourceInputs["termsOfServiceUrl"] = args ? args.termsOfServiceUrl : undefined;
resourceInputs["web"] = args ? args.web : undefined;
resourceInputs["appRoleIds"] = undefined /*out*/;
resourceInputs["clientId"] = undefined /*out*/;
resourceInputs["disabledByMicrosoft"] = undefined /*out*/;
resourceInputs["logoUrl"] = undefined /*out*/;
resourceInputs["oauth2PermissionScopeIds"] = undefined /*out*/;
resourceInputs["objectId"] = undefined /*out*/;
resourceInputs["publisherDomain"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(Application.__pulumiType, name, resourceInputs, opts);
}
}
exports.Application = Application;
/** @internal */
Application.__pulumiType = 'azuread:index/application:Application';
//# sourceMappingURL=application.js.map