@pulumi/azuread
Version:
A Pulumi package for creating and managing Azure Active Directory (Azure AD) cloud resources.
128 lines • 6.7 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.ApplicationRegistration = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* Manages an application registration within Azure Active Directory.
*
* For a more comprehensive alternative, please see the azuread.Application resource. Please note that this resource should not be used together with the `azuread.Application` resource when managing the same 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 = new azuread.ApplicationRegistration("example", {
* displayName: "Example Application",
* description: "My example application",
* signInAudience: "AzureADMyOrg",
* homepageUrl: "https://app.example.com/",
* logoutUrl: "https://app.example.com/logout",
* marketingUrl: "https://example.com/",
* privacyStatementUrl: "https://example.com/privacy",
* supportUrl: "https://support.example.com/",
* termsOfServiceUrl: "https://example.com/terms",
* });
* ```
*
* ## Import
*
* Application Registrations can be imported using the object ID of the application, in the following format.
*
* ```sh
* $ pulumi import azuread:index/applicationRegistration:ApplicationRegistration example /applications/00000000-0000-0000-0000-000000000000
* ```
*/
class ApplicationRegistration extends pulumi.CustomResource {
/**
* Get an existing ApplicationRegistration 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 ApplicationRegistration(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of ApplicationRegistration. 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'] === ApplicationRegistration.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["clientId"] = state?.clientId;
resourceInputs["description"] = state?.description;
resourceInputs["disabledByMicrosoft"] = state?.disabledByMicrosoft;
resourceInputs["displayName"] = state?.displayName;
resourceInputs["groupMembershipClaims"] = state?.groupMembershipClaims;
resourceInputs["homepageUrl"] = state?.homepageUrl;
resourceInputs["implicitAccessTokenIssuanceEnabled"] = state?.implicitAccessTokenIssuanceEnabled;
resourceInputs["implicitIdTokenIssuanceEnabled"] = state?.implicitIdTokenIssuanceEnabled;
resourceInputs["logoutUrl"] = state?.logoutUrl;
resourceInputs["marketingUrl"] = state?.marketingUrl;
resourceInputs["notes"] = state?.notes;
resourceInputs["objectId"] = state?.objectId;
resourceInputs["privacyStatementUrl"] = state?.privacyStatementUrl;
resourceInputs["publisherDomain"] = state?.publisherDomain;
resourceInputs["requestedAccessTokenVersion"] = state?.requestedAccessTokenVersion;
resourceInputs["serviceManagementReference"] = state?.serviceManagementReference;
resourceInputs["signInAudience"] = state?.signInAudience;
resourceInputs["supportUrl"] = state?.supportUrl;
resourceInputs["termsOfServiceUrl"] = state?.termsOfServiceUrl;
}
else {
const args = argsOrState;
if (args?.displayName === undefined && !opts.urn) {
throw new Error("Missing required property 'displayName'");
}
resourceInputs["description"] = args?.description;
resourceInputs["displayName"] = args?.displayName;
resourceInputs["groupMembershipClaims"] = args?.groupMembershipClaims;
resourceInputs["homepageUrl"] = args?.homepageUrl;
resourceInputs["implicitAccessTokenIssuanceEnabled"] = args?.implicitAccessTokenIssuanceEnabled;
resourceInputs["implicitIdTokenIssuanceEnabled"] = args?.implicitIdTokenIssuanceEnabled;
resourceInputs["logoutUrl"] = args?.logoutUrl;
resourceInputs["marketingUrl"] = args?.marketingUrl;
resourceInputs["notes"] = args?.notes;
resourceInputs["privacyStatementUrl"] = args?.privacyStatementUrl;
resourceInputs["requestedAccessTokenVersion"] = args?.requestedAccessTokenVersion;
resourceInputs["serviceManagementReference"] = args?.serviceManagementReference;
resourceInputs["signInAudience"] = args?.signInAudience;
resourceInputs["supportUrl"] = args?.supportUrl;
resourceInputs["termsOfServiceUrl"] = args?.termsOfServiceUrl;
resourceInputs["clientId"] = undefined /*out*/;
resourceInputs["disabledByMicrosoft"] = undefined /*out*/;
resourceInputs["objectId"] = undefined /*out*/;
resourceInputs["publisherDomain"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(ApplicationRegistration.__pulumiType, name, resourceInputs, opts);
}
}
exports.ApplicationRegistration = ApplicationRegistration;
/** @internal */
ApplicationRegistration.__pulumiType = 'azuread:index/applicationRegistration:ApplicationRegistration';
//# sourceMappingURL=applicationRegistration.js.map