UNPKG

@pulumi/azuread

Version:

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

140 lines (139 loc) 5.78 kB
import * as pulumi from "@pulumi/pulumi"; import * as inputs from "./types/input"; import * as outputs from "./types/output"; /** * Manages a synchronization job 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: "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, * }); * ``` * * ## Import * * Synchronization jobs can be imported using the `id`, e.g. * * ```sh * $ pulumi import azuread:index/synchronizationJob:SynchronizationJob example 00000000-0000-0000-0000-000000000000/job/dataBricks.f5532fc709734b1a90e8a1fa9fd03a82.8442fd39-2183-419c-8732-74b6ce866bd5 * ``` * * -> This ID format is unique to Terraform and is composed of the Service Principal Object ID and the ID of the Synchronization Job Id in the format `{servicePrincipalId}/job/{jobId}`. */ export declare class SynchronizationJob extends pulumi.CustomResource { /** * Get an existing SynchronizationJob 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: string, id: pulumi.Input<pulumi.ID>, state?: SynchronizationJobState, opts?: pulumi.CustomResourceOptions): SynchronizationJob; /** * Returns true if the given object is an instance of SynchronizationJob. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is SynchronizationJob; /** * Whether the provisioning job is enabled. Default state is `true`. */ readonly enabled: pulumi.Output<boolean | undefined>; /** * A `schedule` list as documented below. */ readonly schedules: pulumi.Output<outputs.SynchronizationJobSchedule[]>; /** * The ID of the service principal for which this synchronization job should be created. Changing this field forces a new resource to be created. */ readonly servicePrincipalId: pulumi.Output<string>; /** * Identifier of the synchronization template this job is based on. */ readonly templateId: pulumi.Output<string>; /** * Create a SynchronizationJob resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: SynchronizationJobArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering SynchronizationJob resources. */ export interface SynchronizationJobState { /** * Whether the provisioning job is enabled. Default state is `true`. */ enabled?: pulumi.Input<boolean>; /** * A `schedule` list as documented below. */ schedules?: pulumi.Input<pulumi.Input<inputs.SynchronizationJobSchedule>[]>; /** * The ID of the service principal for which this synchronization job should be created. Changing this field forces a new resource to be created. */ servicePrincipalId?: pulumi.Input<string>; /** * Identifier of the synchronization template this job is based on. */ templateId?: pulumi.Input<string>; } /** * The set of arguments for constructing a SynchronizationJob resource. */ export interface SynchronizationJobArgs { /** * Whether the provisioning job is enabled. Default state is `true`. */ enabled?: pulumi.Input<boolean>; /** * The ID of the service principal for which this synchronization job should be created. Changing this field forces a new resource to be created. */ servicePrincipalId: pulumi.Input<string>; /** * Identifier of the synchronization template this job is based on. */ templateId: pulumi.Input<string>; }