UNPKG

@pulumi/azuread

Version:

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

102 lines 4.59 kB
"use strict"; // *** 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.ApplicationPassword = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * ## Example Usage * * *Basic example* * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as azuread from "@pulumi/azuread"; * * const example = new azuread.ApplicationRegistration("example", {displayName: "example"}); * const exampleApplicationPassword = new azuread.ApplicationPassword("example", {applicationId: example.id}); * ``` * * *Time-based rotation* * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as azuread from "@pulumi/azuread"; * import * as time from "@pulumiverse/time"; * * const example = new azuread.ApplicationRegistration("example", {displayName: "example"}); * const exampleRotating = new time.Rotating("example", {rotationDays: 7}); * const exampleApplicationPassword = new azuread.ApplicationPassword("example", { * applicationId: example.id, * rotateWhenChanged: { * rotation: exampleRotating.id, * }, * }); * ``` * * ## Import * * This resource does not support importing. */ class ApplicationPassword extends pulumi.CustomResource { /** * Get an existing ApplicationPassword 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 ApplicationPassword(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of ApplicationPassword. 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'] === ApplicationPassword.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["applicationId"] = state ? state.applicationId : undefined; resourceInputs["displayName"] = state ? state.displayName : undefined; resourceInputs["endDate"] = state ? state.endDate : undefined; resourceInputs["endDateRelative"] = state ? state.endDateRelative : undefined; resourceInputs["keyId"] = state ? state.keyId : undefined; resourceInputs["rotateWhenChanged"] = state ? state.rotateWhenChanged : undefined; resourceInputs["startDate"] = state ? state.startDate : undefined; resourceInputs["value"] = state ? state.value : undefined; } else { const args = argsOrState; if ((!args || args.applicationId === undefined) && !opts.urn) { throw new Error("Missing required property 'applicationId'"); } resourceInputs["applicationId"] = args ? args.applicationId : undefined; resourceInputs["displayName"] = args ? args.displayName : undefined; resourceInputs["endDate"] = args ? args.endDate : undefined; resourceInputs["endDateRelative"] = args ? args.endDateRelative : undefined; resourceInputs["rotateWhenChanged"] = args ? args.rotateWhenChanged : undefined; resourceInputs["startDate"] = args ? args.startDate : undefined; resourceInputs["keyId"] = undefined /*out*/; resourceInputs["value"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); const secretOpts = { additionalSecretOutputs: ["value"] }; opts = pulumi.mergeOptions(opts, secretOpts); super(ApplicationPassword.__pulumiType, name, resourceInputs, opts); } } exports.ApplicationPassword = ApplicationPassword; /** @internal */ ApplicationPassword.__pulumiType = 'azuread:index/applicationPassword:ApplicationPassword'; //# sourceMappingURL=applicationPassword.js.map