@pulumi/azuread
Version:
A Pulumi package for creating and managing Azure Active Directory (Azure AD) cloud resources.
100 lines • 4.14 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.SynchronizationSecret = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* Manages synchronization secrets 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: `Application.ReadWrite.All` or `Directory.ReadWrite.All`
*
* ## Example Usage
*
* *Basic example*
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as azuread from "@pulumi/azuread";
*
* 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: "abc",
* },
* {
* key: "SecretToken",
* value: "some-token",
* },
* ],
* });
* ```
*
* ## Import
*
* This resource does not support importing.
*/
class SynchronizationSecret extends pulumi.CustomResource {
/**
* Get an existing SynchronizationSecret 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 SynchronizationSecret(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of SynchronizationSecret. 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'] === SynchronizationSecret.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["credentials"] = state ? state.credentials : undefined;
resourceInputs["servicePrincipalId"] = state ? state.servicePrincipalId : undefined;
}
else {
const args = argsOrState;
if ((!args || args.servicePrincipalId === undefined) && !opts.urn) {
throw new Error("Missing required property 'servicePrincipalId'");
}
resourceInputs["credentials"] = args ? args.credentials : undefined;
resourceInputs["servicePrincipalId"] = args ? args.servicePrincipalId : undefined;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(SynchronizationSecret.__pulumiType, name, resourceInputs, opts);
}
}
exports.SynchronizationSecret = SynchronizationSecret;
/** @internal */
SynchronizationSecret.__pulumiType = 'azuread:index/synchronizationSecret:SynchronizationSecret';
//# sourceMappingURL=synchronizationSecret.js.map