UNPKG

@pulumi/azuread

Version:

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

132 lines 6 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.SynchronizationJobProvisionOnDemand = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * Manages synchronization job on demand provisioning associated with a service principal (enterprise application) within Azure Active Directory. * * ## 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: `Synchronization.ReadWrite.All` * * ## Example Usage * * *Basic example* * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as azuread from "@pulumi/azuread"; * * const current = azuread.getClientConfig({}); * const exampleGroup = new azuread.Group("example", { * displayName: "example", * owners: [current.then(current => current.objectId)], * securityEnabled: true, * }); * const example = azuread.getApplicationTemplate({ * displayName: "Azure Databricks SCIM Provisioning Connector", * }); * const exampleApplicationFromTemplate = new azuread.ApplicationFromTemplate("example", { * displayName: "example", * templateId: example.then(example => example.templateId), * }); * const exampleGetServicePrincipal = azuread.getServicePrincipalOutput({ * objectId: exampleApplicationFromTemplate.servicePrincipalObjectId, * }); * const exampleSynchronizationSecret = new azuread.SynchronizationSecret("example", { * servicePrincipalId: exampleGetServicePrincipal.apply(exampleGetServicePrincipal => exampleGetServicePrincipal.id), * credentials: [ * { * key: "BaseAddress", * value: "https://adb-example.azuredatabricks.net/api/2.0/preview/scim", * }, * { * key: "SecretToken", * value: "some-token", * }, * ], * }); * const exampleSynchronizationJob = new azuread.SynchronizationJob("example", { * servicePrincipalId: exampleGetServicePrincipal.apply(exampleGetServicePrincipal => exampleGetServicePrincipal.id), * templateId: "dataBricks", * enabled: true, * }); * const exampleSynchronizationJobProvisionOnDemand = new azuread.SynchronizationJobProvisionOnDemand("example", { * servicePrincipalId: exampleSynchronizationJob.servicePrincipalId, * synchronizationJobId: exampleSynchronizationJob.id, * parameters: [{ * ruleId: "", * subjects: [{ * objectId: exampleGroup.objectId, * objectTypeName: "Group", * }], * }], * }); * ``` * * ## Import * * This resource does not support importing. */ class SynchronizationJobProvisionOnDemand extends pulumi.CustomResource { /** * Get an existing SynchronizationJobProvisionOnDemand 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 SynchronizationJobProvisionOnDemand(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of SynchronizationJobProvisionOnDemand. 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'] === SynchronizationJobProvisionOnDemand.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["parameters"] = state ? state.parameters : undefined; resourceInputs["servicePrincipalId"] = state ? state.servicePrincipalId : undefined; resourceInputs["synchronizationJobId"] = state ? state.synchronizationJobId : undefined; resourceInputs["triggers"] = state ? state.triggers : undefined; } else { const args = argsOrState; if ((!args || args.parameters === undefined) && !opts.urn) { throw new Error("Missing required property 'parameters'"); } if ((!args || args.servicePrincipalId === undefined) && !opts.urn) { throw new Error("Missing required property 'servicePrincipalId'"); } if ((!args || args.synchronizationJobId === undefined) && !opts.urn) { throw new Error("Missing required property 'synchronizationJobId'"); } resourceInputs["parameters"] = args ? args.parameters : undefined; resourceInputs["servicePrincipalId"] = args ? args.servicePrincipalId : undefined; resourceInputs["synchronizationJobId"] = args ? args.synchronizationJobId : undefined; resourceInputs["triggers"] = args ? args.triggers : undefined; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(SynchronizationJobProvisionOnDemand.__pulumiType, name, resourceInputs, opts); } } exports.SynchronizationJobProvisionOnDemand = SynchronizationJobProvisionOnDemand; /** @internal */ SynchronizationJobProvisionOnDemand.__pulumiType = 'azuread:index/synchronizationJobProvisionOnDemand:SynchronizationJobProvisionOnDemand'; //# sourceMappingURL=synchronizationJobProvisionOnDemand.js.map