1. Packages
  2. Azure Active Directory (Azure AD)
  3. API Docs
  4. SynchronizationJob
Azure Active Directory (Azure AD) v5.42.0 published on Friday, Sep 22, 2023 by Pulumi

azuread.SynchronizationJob

Explore with Pulumi AI

azuread logo
Azure Active Directory (Azure AD) v5.42.0 published on Friday, Sep 22, 2023 by Pulumi

    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

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AzureAD = Pulumi.AzureAD;
    
    return await Deployment.RunAsync(() => 
    {
        var exampleApplicationTemplate = AzureAD.GetApplicationTemplate.Invoke(new()
        {
            DisplayName = "Azure Databricks SCIM Provisioning Connector",
        });
    
        var exampleApplication = new AzureAD.Application("exampleApplication", new()
        {
            DisplayName = "example",
            TemplateId = exampleApplicationTemplate.Apply(getApplicationTemplateResult => getApplicationTemplateResult.TemplateId),
            FeatureTags = new[]
            {
                new AzureAD.Inputs.ApplicationFeatureTagArgs
                {
                    Enterprise = true,
                    Gallery = true,
                },
            },
        });
    
        var exampleServicePrincipal = new AzureAD.ServicePrincipal("exampleServicePrincipal", new()
        {
            ApplicationId = exampleApplication.ApplicationId,
            UseExisting = true,
        });
    
        var exampleSynchronizationSecret = new AzureAD.SynchronizationSecret("exampleSynchronizationSecret", new()
        {
            ServicePrincipalId = exampleServicePrincipal.Id,
            Credentials = new[]
            {
                new AzureAD.Inputs.SynchronizationSecretCredentialArgs
                {
                    Key = "BaseAddress",
                    Value = "https://adb-example.azuredatabricks.net/api/2.0/preview/scim",
                },
                new AzureAD.Inputs.SynchronizationSecretCredentialArgs
                {
                    Key = "SecretToken",
                    Value = "some-token",
                },
            },
        });
    
        var exampleSynchronizationJob = new AzureAD.SynchronizationJob("exampleSynchronizationJob", new()
        {
            ServicePrincipalId = exampleServicePrincipal.Id,
            TemplateId = "dataBricks",
            Enabled = true,
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azuread/sdk/v5/go/azuread"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		exampleApplicationTemplate, err := azuread.GetApplicationTemplate(ctx, &azuread.GetApplicationTemplateArgs{
    			DisplayName: pulumi.StringRef("Azure Databricks SCIM Provisioning Connector"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		exampleApplication, err := azuread.NewApplication(ctx, "exampleApplication", &azuread.ApplicationArgs{
    			DisplayName: pulumi.String("example"),
    			TemplateId:  *pulumi.String(exampleApplicationTemplate.TemplateId),
    			FeatureTags: azuread.ApplicationFeatureTagArray{
    				&azuread.ApplicationFeatureTagArgs{
    					Enterprise: pulumi.Bool(true),
    					Gallery:    pulumi.Bool(true),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		exampleServicePrincipal, err := azuread.NewServicePrincipal(ctx, "exampleServicePrincipal", &azuread.ServicePrincipalArgs{
    			ApplicationId: exampleApplication.ApplicationId,
    			UseExisting:   pulumi.Bool(true),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = azuread.NewSynchronizationSecret(ctx, "exampleSynchronizationSecret", &azuread.SynchronizationSecretArgs{
    			ServicePrincipalId: exampleServicePrincipal.ID(),
    			Credentials: azuread.SynchronizationSecretCredentialArray{
    				&azuread.SynchronizationSecretCredentialArgs{
    					Key:   pulumi.String("BaseAddress"),
    					Value: pulumi.String("https://adb-example.azuredatabricks.net/api/2.0/preview/scim"),
    				},
    				&azuread.SynchronizationSecretCredentialArgs{
    					Key:   pulumi.String("SecretToken"),
    					Value: pulumi.String("some-token"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = azuread.NewSynchronizationJob(ctx, "exampleSynchronizationJob", &azuread.SynchronizationJobArgs{
    			ServicePrincipalId: exampleServicePrincipal.ID(),
    			TemplateId:         pulumi.String("dataBricks"),
    			Enabled:            pulumi.Bool(true),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azuread.AzureadFunctions;
    import com.pulumi.azuread.inputs.GetApplicationTemplateArgs;
    import com.pulumi.azuread.Application;
    import com.pulumi.azuread.ApplicationArgs;
    import com.pulumi.azuread.inputs.ApplicationFeatureTagArgs;
    import com.pulumi.azuread.ServicePrincipal;
    import com.pulumi.azuread.ServicePrincipalArgs;
    import com.pulumi.azuread.SynchronizationSecret;
    import com.pulumi.azuread.SynchronizationSecretArgs;
    import com.pulumi.azuread.inputs.SynchronizationSecretCredentialArgs;
    import com.pulumi.azuread.SynchronizationJob;
    import com.pulumi.azuread.SynchronizationJobArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var exampleApplicationTemplate = AzureadFunctions.getApplicationTemplate(GetApplicationTemplateArgs.builder()
                .displayName("Azure Databricks SCIM Provisioning Connector")
                .build());
    
            var exampleApplication = new Application("exampleApplication", ApplicationArgs.builder()        
                .displayName("example")
                .templateId(exampleApplicationTemplate.applyValue(getApplicationTemplateResult -> getApplicationTemplateResult.templateId()))
                .featureTags(ApplicationFeatureTagArgs.builder()
                    .enterprise(true)
                    .gallery(true)
                    .build())
                .build());
    
            var exampleServicePrincipal = new ServicePrincipal("exampleServicePrincipal", ServicePrincipalArgs.builder()        
                .applicationId(exampleApplication.applicationId())
                .useExisting(true)
                .build());
    
            var exampleSynchronizationSecret = new SynchronizationSecret("exampleSynchronizationSecret", SynchronizationSecretArgs.builder()        
                .servicePrincipalId(exampleServicePrincipal.id())
                .credentials(            
                    SynchronizationSecretCredentialArgs.builder()
                        .key("BaseAddress")
                        .value("https://adb-example.azuredatabricks.net/api/2.0/preview/scim")
                        .build(),
                    SynchronizationSecretCredentialArgs.builder()
                        .key("SecretToken")
                        .value("some-token")
                        .build())
                .build());
    
            var exampleSynchronizationJob = new SynchronizationJob("exampleSynchronizationJob", SynchronizationJobArgs.builder()        
                .servicePrincipalId(exampleServicePrincipal.id())
                .templateId("dataBricks")
                .enabled(true)
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_azuread as azuread
    
    example_application_template = azuread.get_application_template(display_name="Azure Databricks SCIM Provisioning Connector")
    example_application = azuread.Application("exampleApplication",
        display_name="example",
        template_id=example_application_template.template_id,
        feature_tags=[azuread.ApplicationFeatureTagArgs(
            enterprise=True,
            gallery=True,
        )])
    example_service_principal = azuread.ServicePrincipal("exampleServicePrincipal",
        application_id=example_application.application_id,
        use_existing=True)
    example_synchronization_secret = azuread.SynchronizationSecret("exampleSynchronizationSecret",
        service_principal_id=example_service_principal.id,
        credentials=[
            azuread.SynchronizationSecretCredentialArgs(
                key="BaseAddress",
                value="https://adb-example.azuredatabricks.net/api/2.0/preview/scim",
            ),
            azuread.SynchronizationSecretCredentialArgs(
                key="SecretToken",
                value="some-token",
            ),
        ])
    example_synchronization_job = azuread.SynchronizationJob("exampleSynchronizationJob",
        service_principal_id=example_service_principal.id,
        template_id="dataBricks",
        enabled=True)
    
    import * as pulumi from "@pulumi/pulumi";
    import * as azuread from "@pulumi/azuread";
    
    const exampleApplicationTemplate = azuread.getApplicationTemplate({
        displayName: "Azure Databricks SCIM Provisioning Connector",
    });
    const exampleApplication = new azuread.Application("exampleApplication", {
        displayName: "example",
        templateId: exampleApplicationTemplate.then(exampleApplicationTemplate => exampleApplicationTemplate.templateId),
        featureTags: [{
            enterprise: true,
            gallery: true,
        }],
    });
    const exampleServicePrincipal = new azuread.ServicePrincipal("exampleServicePrincipal", {
        applicationId: exampleApplication.applicationId,
        useExisting: true,
    });
    const exampleSynchronizationSecret = new azuread.SynchronizationSecret("exampleSynchronizationSecret", {
        servicePrincipalId: exampleServicePrincipal.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("exampleSynchronizationJob", {
        servicePrincipalId: exampleServicePrincipal.id,
        templateId: "dataBricks",
        enabled: true,
    });
    
    resources:
      exampleApplication:
        type: azuread:Application
        properties:
          displayName: example
          templateId: ${exampleApplicationTemplate.templateId}
          featureTags:
            - enterprise: true
              gallery: true
      exampleServicePrincipal:
        type: azuread:ServicePrincipal
        properties:
          applicationId: ${exampleApplication.applicationId}
          useExisting: true
      exampleSynchronizationSecret:
        type: azuread:SynchronizationSecret
        properties:
          servicePrincipalId: ${exampleServicePrincipal.id}
          credentials:
            - key: BaseAddress
              value: https://adb-example.azuredatabricks.net/api/2.0/preview/scim
            - key: SecretToken
              value: some-token
      exampleSynchronizationJob:
        type: azuread:SynchronizationJob
        properties:
          servicePrincipalId: ${exampleServicePrincipal.id}
          templateId: dataBricks
          enabled: true
    variables:
      exampleApplicationTemplate:
        fn::invoke:
          Function: azuread:getApplicationTemplate
          Arguments:
            displayName: Azure Databricks SCIM Provisioning Connector
    

    Create SynchronizationJob Resource

    new SynchronizationJob(name: string, args: SynchronizationJobArgs, opts?: CustomResourceOptions);
    @overload
    def SynchronizationJob(resource_name: str,
                           opts: Optional[ResourceOptions] = None,
                           enabled: Optional[bool] = None,
                           service_principal_id: Optional[str] = None,
                           template_id: Optional[str] = None)
    @overload
    def SynchronizationJob(resource_name: str,
                           args: SynchronizationJobArgs,
                           opts: Optional[ResourceOptions] = None)
    func NewSynchronizationJob(ctx *Context, name string, args SynchronizationJobArgs, opts ...ResourceOption) (*SynchronizationJob, error)
    public SynchronizationJob(string name, SynchronizationJobArgs args, CustomResourceOptions? opts = null)
    public SynchronizationJob(String name, SynchronizationJobArgs args)
    public SynchronizationJob(String name, SynchronizationJobArgs args, CustomResourceOptions options)
    
    type: azuread:SynchronizationJob
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args SynchronizationJobArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args SynchronizationJobArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args SynchronizationJobArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SynchronizationJobArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args SynchronizationJobArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    SynchronizationJob Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The SynchronizationJob resource accepts the following input properties:

    ServicePrincipalId string

    The object ID of the service principal for which this synchronization job should be created. Changing this field forces a new resource to be created.

    TemplateId string

    Identifier of the synchronization template this job is based on.

    Enabled bool

    Whether or not the provisioning job is enabled. Default state is true.

    ServicePrincipalId string

    The object ID of the service principal for which this synchronization job should be created. Changing this field forces a new resource to be created.

    TemplateId string

    Identifier of the synchronization template this job is based on.

    Enabled bool

    Whether or not the provisioning job is enabled. Default state is true.

    servicePrincipalId String

    The object ID of the service principal for which this synchronization job should be created. Changing this field forces a new resource to be created.

    templateId String

    Identifier of the synchronization template this job is based on.

    enabled Boolean

    Whether or not the provisioning job is enabled. Default state is true.

    servicePrincipalId string

    The object ID of the service principal for which this synchronization job should be created. Changing this field forces a new resource to be created.

    templateId string

    Identifier of the synchronization template this job is based on.

    enabled boolean

    Whether or not the provisioning job is enabled. Default state is true.

    service_principal_id str

    The object ID of the service principal for which this synchronization job should be created. Changing this field forces a new resource to be created.

    template_id str

    Identifier of the synchronization template this job is based on.

    enabled bool

    Whether or not the provisioning job is enabled. Default state is true.

    servicePrincipalId String

    The object ID of the service principal for which this synchronization job should be created. Changing this field forces a new resource to be created.

    templateId String

    Identifier of the synchronization template this job is based on.

    enabled Boolean

    Whether or not the provisioning job is enabled. Default state is true.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the SynchronizationJob resource produces the following output properties:

    Id string

    The provider-assigned unique ID for this managed resource.

    Schedules List<Pulumi.AzureAD.Outputs.SynchronizationJobSchedule>

    A schedule list as documented below.

    Id string

    The provider-assigned unique ID for this managed resource.

    Schedules []SynchronizationJobSchedule

    A schedule list as documented below.

    id String

    The provider-assigned unique ID for this managed resource.

    schedules List<SynchronizationJobSchedule>

    A schedule list as documented below.

    id string

    The provider-assigned unique ID for this managed resource.

    schedules SynchronizationJobSchedule[]

    A schedule list as documented below.

    id str

    The provider-assigned unique ID for this managed resource.

    schedules Sequence[SynchronizationJobSchedule]

    A schedule list as documented below.

    id String

    The provider-assigned unique ID for this managed resource.

    schedules List<Property Map>

    A schedule list as documented below.

    Look up Existing SynchronizationJob Resource

    Get an existing SynchronizationJob resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: SynchronizationJobState, opts?: CustomResourceOptions): SynchronizationJob
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            enabled: Optional[bool] = None,
            schedules: Optional[Sequence[SynchronizationJobScheduleArgs]] = None,
            service_principal_id: Optional[str] = None,
            template_id: Optional[str] = None) -> SynchronizationJob
    func GetSynchronizationJob(ctx *Context, name string, id IDInput, state *SynchronizationJobState, opts ...ResourceOption) (*SynchronizationJob, error)
    public static SynchronizationJob Get(string name, Input<string> id, SynchronizationJobState? state, CustomResourceOptions? opts = null)
    public static SynchronizationJob get(String name, Output<String> id, SynchronizationJobState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Enabled bool

    Whether or not the provisioning job is enabled. Default state is true.

    Schedules List<Pulumi.AzureAD.Inputs.SynchronizationJobSchedule>

    A schedule list as documented below.

    ServicePrincipalId string

    The object ID of the service principal for which this synchronization job should be created. Changing this field forces a new resource to be created.

    TemplateId string

    Identifier of the synchronization template this job is based on.

    Enabled bool

    Whether or not the provisioning job is enabled. Default state is true.

    Schedules []SynchronizationJobScheduleArgs

    A schedule list as documented below.

    ServicePrincipalId string

    The object ID of the service principal for which this synchronization job should be created. Changing this field forces a new resource to be created.

    TemplateId string

    Identifier of the synchronization template this job is based on.

    enabled Boolean

    Whether or not the provisioning job is enabled. Default state is true.

    schedules List<SynchronizationJobSchedule>

    A schedule list as documented below.

    servicePrincipalId String

    The object ID of the service principal for which this synchronization job should be created. Changing this field forces a new resource to be created.

    templateId String

    Identifier of the synchronization template this job is based on.

    enabled boolean

    Whether or not the provisioning job is enabled. Default state is true.

    schedules SynchronizationJobSchedule[]

    A schedule list as documented below.

    servicePrincipalId string

    The object ID of the service principal for which this synchronization job should be created. Changing this field forces a new resource to be created.

    templateId string

    Identifier of the synchronization template this job is based on.

    enabled bool

    Whether or not the provisioning job is enabled. Default state is true.

    schedules Sequence[SynchronizationJobScheduleArgs]

    A schedule list as documented below.

    service_principal_id str

    The object ID of the service principal for which this synchronization job should be created. Changing this field forces a new resource to be created.

    template_id str

    Identifier of the synchronization template this job is based on.

    enabled Boolean

    Whether or not the provisioning job is enabled. Default state is true.

    schedules List<Property Map>

    A schedule list as documented below.

    servicePrincipalId String

    The object ID of the service principal for which this synchronization job should be created. Changing this field forces a new resource to be created.

    templateId String

    Identifier of the synchronization template this job is based on.

    Supporting Types

    SynchronizationJobSchedule, SynchronizationJobScheduleArgs

    Expiration string

    Date and time when this job will expire, formatted as an RFC3339 date string (e.g. 2018-01-01T01:02:03Z).

    Interval string

    The interval between synchronization iterations ISO8601. E.g. PT40M run every 40 minutes.

    State string

    State of the job.

    Expiration string

    Date and time when this job will expire, formatted as an RFC3339 date string (e.g. 2018-01-01T01:02:03Z).

    Interval string

    The interval between synchronization iterations ISO8601. E.g. PT40M run every 40 minutes.

    State string

    State of the job.

    expiration String

    Date and time when this job will expire, formatted as an RFC3339 date string (e.g. 2018-01-01T01:02:03Z).

    interval String

    The interval between synchronization iterations ISO8601. E.g. PT40M run every 40 minutes.

    state String

    State of the job.

    expiration string

    Date and time when this job will expire, formatted as an RFC3339 date string (e.g. 2018-01-01T01:02:03Z).

    interval string

    The interval between synchronization iterations ISO8601. E.g. PT40M run every 40 minutes.

    state string

    State of the job.

    expiration str

    Date and time when this job will expire, formatted as an RFC3339 date string (e.g. 2018-01-01T01:02:03Z).

    interval str

    The interval between synchronization iterations ISO8601. E.g. PT40M run every 40 minutes.

    state str

    State of the job.

    expiration String

    Date and time when this job will expire, formatted as an RFC3339 date string (e.g. 2018-01-01T01:02:03Z).

    interval String

    The interval between synchronization iterations ISO8601. E.g. PT40M run every 40 minutes.

    state String

    State of the job.

    Import

    Synchronization jobs can be imported using the id, e.g.

     $ 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}.

    Package Details

    Repository
    Azure Active Directory (Azure AD) pulumi/pulumi-azuread
    License
    Apache-2.0
    Notes

    This Pulumi package is based on the azuread Terraform Provider.

    azuread logo
    Azure Active Directory (Azure AD) v5.42.0 published on Friday, Sep 22, 2023 by Pulumi