@pulumi/azuread
Version:
A Pulumi package for creating and managing Azure Active Directory (Azure AD) cloud resources.
128 lines • 7.37 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, Object.assign(Object.assign({}, 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 ? state.clientId : undefined;
resourceInputs["description"] = state ? state.description : undefined;
resourceInputs["disabledByMicrosoft"] = state ? state.disabledByMicrosoft : undefined;
resourceInputs["displayName"] = state ? state.displayName : undefined;
resourceInputs["groupMembershipClaims"] = state ? state.groupMembershipClaims : undefined;
resourceInputs["homepageUrl"] = state ? state.homepageUrl : undefined;
resourceInputs["implicitAccessTokenIssuanceEnabled"] = state ? state.implicitAccessTokenIssuanceEnabled : undefined;
resourceInputs["implicitIdTokenIssuanceEnabled"] = state ? state.implicitIdTokenIssuanceEnabled : undefined;
resourceInputs["logoutUrl"] = state ? state.logoutUrl : undefined;
resourceInputs["marketingUrl"] = state ? state.marketingUrl : undefined;
resourceInputs["notes"] = state ? state.notes : undefined;
resourceInputs["objectId"] = state ? state.objectId : undefined;
resourceInputs["privacyStatementUrl"] = state ? state.privacyStatementUrl : undefined;
resourceInputs["publisherDomain"] = state ? state.publisherDomain : undefined;
resourceInputs["requestedAccessTokenVersion"] = state ? state.requestedAccessTokenVersion : undefined;
resourceInputs["serviceManagementReference"] = state ? state.serviceManagementReference : undefined;
resourceInputs["signInAudience"] = state ? state.signInAudience : undefined;
resourceInputs["supportUrl"] = state ? state.supportUrl : undefined;
resourceInputs["termsOfServiceUrl"] = state ? state.termsOfServiceUrl : undefined;
}
else {
const args = argsOrState;
if ((!args || args.displayName === undefined) && !opts.urn) {
throw new Error("Missing required property 'displayName'");
}
resourceInputs["description"] = args ? args.description : undefined;
resourceInputs["displayName"] = args ? args.displayName : undefined;
resourceInputs["groupMembershipClaims"] = args ? args.groupMembershipClaims : undefined;
resourceInputs["homepageUrl"] = args ? args.homepageUrl : undefined;
resourceInputs["implicitAccessTokenIssuanceEnabled"] = args ? args.implicitAccessTokenIssuanceEnabled : undefined;
resourceInputs["implicitIdTokenIssuanceEnabled"] = args ? args.implicitIdTokenIssuanceEnabled : undefined;
resourceInputs["logoutUrl"] = args ? args.logoutUrl : undefined;
resourceInputs["marketingUrl"] = args ? args.marketingUrl : undefined;
resourceInputs["notes"] = args ? args.notes : undefined;
resourceInputs["privacyStatementUrl"] = args ? args.privacyStatementUrl : undefined;
resourceInputs["requestedAccessTokenVersion"] = args ? args.requestedAccessTokenVersion : undefined;
resourceInputs["serviceManagementReference"] = args ? args.serviceManagementReference : undefined;
resourceInputs["signInAudience"] = args ? args.signInAudience : undefined;
resourceInputs["supportUrl"] = args ? args.supportUrl : undefined;
resourceInputs["termsOfServiceUrl"] = args ? args.termsOfServiceUrl : undefined;
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