1. Registry
  2. Packages
  3. Databricks Provider
  4. API Docs
  5. AccountIamServicePrincipalV2
Viewing docs for Databricks v1.109.0
published on Tuesday, Sep 8, 2026 by Pulumi
databricks logo databricks logo
Viewing docs for Databricks v1.109.0
published on Tuesday, Sep 8, 2026 by Pulumi

    Public Beta

    API Documentation

    Manages an account-level service principal. Creating the resource provisions the service principal; deleting it removes the service principal. applicationId is immutable — changing it replaces the resource.

    When Automatic Identity Management (AIM) is enabled for the account, this resource manages local service principals only: a service principal cannot be created with externalId set. Service principals that already have an externalId can still be read through this resource, but only their externalId may be updated — their other fields are sourced from the identity provider.

    Example Usage

    Example usage:

    Creates an account-level service principal. When AIM is enabled, the service principal cannot be created with externalId set.

    import * as pulumi from "@pulumi/pulumi";
    import * as databricks from "@pulumi/databricks";
    
    const _this = new databricks.AccountIamServicePrincipalV2("this", {
        displayName: "ci-runner",
        accountSpStatus: "ACTIVE",
    });
    
    import pulumi
    import pulumi_databricks as databricks
    
    this = databricks.AccountIamServicePrincipalV2("this",
        display_name="ci-runner",
        account_sp_status="ACTIVE")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-databricks/sdk/go/databricks"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := databricks.NewAccountIamServicePrincipalV2(ctx, "this", &databricks.AccountIamServicePrincipalV2Args{
    			DisplayName:     pulumi.String("ci-runner"),
    			AccountSpStatus: pulumi.String("ACTIVE"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Databricks = Pulumi.Databricks;
    
    return await Deployment.RunAsync(() => 
    {
        var @this = new Databricks.AccountIamServicePrincipalV2("this", new()
        {
            DisplayName = "ci-runner",
            AccountSpStatus = "ACTIVE",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.databricks.AccountIamServicePrincipalV2;
    import com.pulumi.databricks.AccountIamServicePrincipalV2Args;
    import java.util.ArrayList;
    import java.util.Arrays;
    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) {
            var this_ = new AccountIamServicePrincipalV2("this", AccountIamServicePrincipalV2Args.builder()
                .displayName("ci-runner")
                .accountSpStatus("ACTIVE")
                .build());
    
        }
    }
    
    resources:
      this:
        type: databricks:AccountIamServicePrincipalV2
        properties:
          displayName: ci-runner
          accountSpStatus: ACTIVE
    
    pulumi {
      required_providers {
        databricks = {
          source = "pulumi/databricks"
        }
      }
    }
    
    resource "databricks_accountiamserviceprincipalv2" "this" {
      display_name      = "ci-runner"
      account_sp_status = "ACTIVE"
    }
    

    Create AccountIamServicePrincipalV2 Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new AccountIamServicePrincipalV2(name: string, args: AccountIamServicePrincipalV2Args, opts?: CustomResourceOptions);
    @overload
    def AccountIamServicePrincipalV2(resource_name: str,
                                     args: AccountIamServicePrincipalV2Args,
                                     opts: Optional[ResourceOptions] = None)
    
    @overload
    def AccountIamServicePrincipalV2(resource_name: str,
                                     opts: Optional[ResourceOptions] = None,
                                     account_sp_status: Optional[str] = None,
                                     display_name: Optional[str] = None,
                                     application_id: Optional[str] = None,
                                     external_id: Optional[str] = None)
    func NewAccountIamServicePrincipalV2(ctx *Context, name string, args AccountIamServicePrincipalV2Args, opts ...ResourceOption) (*AccountIamServicePrincipalV2, error)
    public AccountIamServicePrincipalV2(string name, AccountIamServicePrincipalV2Args args, CustomResourceOptions? opts = null)
    public AccountIamServicePrincipalV2(String name, AccountIamServicePrincipalV2Args args)
    public AccountIamServicePrincipalV2(String name, AccountIamServicePrincipalV2Args args, CustomResourceOptions options)
    
    type: databricks:AccountIamServicePrincipalV2
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "databricks_account_iam_service_principal_v2" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args AccountIamServicePrincipalV2Args
    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 AccountIamServicePrincipalV2Args
    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 AccountIamServicePrincipalV2Args
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args AccountIamServicePrincipalV2Args
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args AccountIamServicePrincipalV2Args
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var accountIamServicePrincipalV2Resource = new Databricks.AccountIamServicePrincipalV2("accountIamServicePrincipalV2Resource", new()
    {
        AccountSpStatus = "string",
        DisplayName = "string",
        ApplicationId = "string",
        ExternalId = "string",
    });
    
    example, err := databricks.NewAccountIamServicePrincipalV2(ctx, "accountIamServicePrincipalV2Resource", &databricks.AccountIamServicePrincipalV2Args{
    	AccountSpStatus: pulumi.String("string"),
    	DisplayName:     pulumi.String("string"),
    	ApplicationId:   pulumi.String("string"),
    	ExternalId:      pulumi.String("string"),
    })
    
    resource "databricks_account_iam_service_principal_v2" "accountIamServicePrincipalV2Resource" {
      lifecycle {
        create_before_destroy = true
      }
      account_sp_status = "string"
      display_name      = "string"
      application_id    = "string"
      external_id       = "string"
    }
    
    var accountIamServicePrincipalV2Resource = new AccountIamServicePrincipalV2("accountIamServicePrincipalV2Resource", AccountIamServicePrincipalV2Args.builder()
        .accountSpStatus("string")
        .displayName("string")
        .applicationId("string")
        .externalId("string")
        .build());
    
    account_iam_service_principal_v2_resource = databricks.AccountIamServicePrincipalV2("accountIamServicePrincipalV2Resource",
        account_sp_status="string",
        display_name="string",
        application_id="string",
        external_id="string")
    
    const accountIamServicePrincipalV2Resource = new databricks.AccountIamServicePrincipalV2("accountIamServicePrincipalV2Resource", {
        accountSpStatus: "string",
        displayName: "string",
        applicationId: "string",
        externalId: "string",
    });
    
    type: databricks:AccountIamServicePrincipalV2
    properties:
        accountSpStatus: string
        applicationId: string
        displayName: string
        externalId: string
    

    AccountIamServicePrincipalV2 Resource Properties

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

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The AccountIamServicePrincipalV2 resource accepts the following input properties:

    AccountSpStatus string
    The activity status of a service principal in a Databricks account. Possible values are: ACTIVE, INACTIVE
    DisplayName string
    Display name of the service principal
    ApplicationId string
    (string) - Application ID of the service principal. Set at creation time and cannot be changed afterwards; when omitted, the server generates one
    ExternalId string
    ExternalId of the service principal in the customer's IdP
    AccountSpStatus string
    The activity status of a service principal in a Databricks account. Possible values are: ACTIVE, INACTIVE
    DisplayName string
    Display name of the service principal
    ApplicationId string
    (string) - Application ID of the service principal. Set at creation time and cannot be changed afterwards; when omitted, the server generates one
    ExternalId string
    ExternalId of the service principal in the customer's IdP
    account_sp_status string
    The activity status of a service principal in a Databricks account. Possible values are: ACTIVE, INACTIVE
    display_name string
    Display name of the service principal
    application_id string
    (string) - Application ID of the service principal. Set at creation time and cannot be changed afterwards; when omitted, the server generates one
    external_id string
    ExternalId of the service principal in the customer's IdP
    accountSpStatus String
    The activity status of a service principal in a Databricks account. Possible values are: ACTIVE, INACTIVE
    displayName String
    Display name of the service principal
    applicationId String
    (string) - Application ID of the service principal. Set at creation time and cannot be changed afterwards; when omitted, the server generates one
    externalId String
    ExternalId of the service principal in the customer's IdP
    accountSpStatus string
    The activity status of a service principal in a Databricks account. Possible values are: ACTIVE, INACTIVE
    displayName string
    Display name of the service principal
    applicationId string
    (string) - Application ID of the service principal. Set at creation time and cannot be changed afterwards; when omitted, the server generates one
    externalId string
    ExternalId of the service principal in the customer's IdP
    account_sp_status str
    The activity status of a service principal in a Databricks account. Possible values are: ACTIVE, INACTIVE
    display_name str
    Display name of the service principal
    application_id str
    (string) - Application ID of the service principal. Set at creation time and cannot be changed afterwards; when omitted, the server generates one
    external_id str
    ExternalId of the service principal in the customer's IdP
    accountSpStatus String
    The activity status of a service principal in a Databricks account. Possible values are: ACTIVE, INACTIVE
    displayName String
    Display name of the service principal
    applicationId String
    (string) - Application ID of the service principal. Set at creation time and cannot be changed afterwards; when omitted, the server generates one
    externalId String
    ExternalId of the service principal in the customer's IdP

    Outputs

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

    AccountId string
    (string) - The parent account ID for the service principal in Databricks
    Id string
    The provider-assigned unique ID for this managed resource.
    ServicePrincipalId string
    (string) - Internal service principal ID of the service principal in Databricks
    AccountId string
    (string) - The parent account ID for the service principal in Databricks
    Id string
    The provider-assigned unique ID for this managed resource.
    ServicePrincipalId string
    (string) - Internal service principal ID of the service principal in Databricks
    account_id string
    (string) - The parent account ID for the service principal in Databricks
    id string
    The provider-assigned unique ID for this managed resource.
    service_principal_id string
    (string) - Internal service principal ID of the service principal in Databricks
    accountId String
    (string) - The parent account ID for the service principal in Databricks
    id String
    The provider-assigned unique ID for this managed resource.
    servicePrincipalId String
    (string) - Internal service principal ID of the service principal in Databricks
    accountId string
    (string) - The parent account ID for the service principal in Databricks
    id string
    The provider-assigned unique ID for this managed resource.
    servicePrincipalId string
    (string) - Internal service principal ID of the service principal in Databricks
    account_id str
    (string) - The parent account ID for the service principal in Databricks
    id str
    The provider-assigned unique ID for this managed resource.
    service_principal_id str
    (string) - Internal service principal ID of the service principal in Databricks
    accountId String
    (string) - The parent account ID for the service principal in Databricks
    id String
    The provider-assigned unique ID for this managed resource.
    servicePrincipalId String
    (string) - Internal service principal ID of the service principal in Databricks

    Look up Existing AccountIamServicePrincipalV2 Resource

    Get an existing AccountIamServicePrincipalV2 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?: AccountIamServicePrincipalV2State, opts?: CustomResourceOptions): AccountIamServicePrincipalV2
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            account_id: Optional[str] = None,
            account_sp_status: Optional[str] = None,
            application_id: Optional[str] = None,
            display_name: Optional[str] = None,
            external_id: Optional[str] = None,
            service_principal_id: Optional[str] = None) -> AccountIamServicePrincipalV2
    func GetAccountIamServicePrincipalV2(ctx *Context, name string, id IDInput, state *AccountIamServicePrincipalV2State, opts ...ResourceOption) (*AccountIamServicePrincipalV2, error)
    public static AccountIamServicePrincipalV2 Get(string name, Input<string> id, AccountIamServicePrincipalV2State? state, CustomResourceOptions? opts = null)
    public static AccountIamServicePrincipalV2 get(String name, Output<String> id, AccountIamServicePrincipalV2State state, CustomResourceOptions options)
    resources:  _:    type: databricks:AccountIamServicePrincipalV2    get:      id: ${id}
    import {
      to = databricks_account_iam_service_principal_v2.example
      id = "${id}"
    }
    
    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:
    AccountId string
    (string) - The parent account ID for the service principal in Databricks
    AccountSpStatus string
    The activity status of a service principal in a Databricks account. Possible values are: ACTIVE, INACTIVE
    ApplicationId string
    (string) - Application ID of the service principal. Set at creation time and cannot be changed afterwards; when omitted, the server generates one
    DisplayName string
    Display name of the service principal
    ExternalId string
    ExternalId of the service principal in the customer's IdP
    ServicePrincipalId string
    (string) - Internal service principal ID of the service principal in Databricks
    AccountId string
    (string) - The parent account ID for the service principal in Databricks
    AccountSpStatus string
    The activity status of a service principal in a Databricks account. Possible values are: ACTIVE, INACTIVE
    ApplicationId string
    (string) - Application ID of the service principal. Set at creation time and cannot be changed afterwards; when omitted, the server generates one
    DisplayName string
    Display name of the service principal
    ExternalId string
    ExternalId of the service principal in the customer's IdP
    ServicePrincipalId string
    (string) - Internal service principal ID of the service principal in Databricks
    account_id string
    (string) - The parent account ID for the service principal in Databricks
    account_sp_status string
    The activity status of a service principal in a Databricks account. Possible values are: ACTIVE, INACTIVE
    application_id string
    (string) - Application ID of the service principal. Set at creation time and cannot be changed afterwards; when omitted, the server generates one
    display_name string
    Display name of the service principal
    external_id string
    ExternalId of the service principal in the customer's IdP
    service_principal_id string
    (string) - Internal service principal ID of the service principal in Databricks
    accountId String
    (string) - The parent account ID for the service principal in Databricks
    accountSpStatus String
    The activity status of a service principal in a Databricks account. Possible values are: ACTIVE, INACTIVE
    applicationId String
    (string) - Application ID of the service principal. Set at creation time and cannot be changed afterwards; when omitted, the server generates one
    displayName String
    Display name of the service principal
    externalId String
    ExternalId of the service principal in the customer's IdP
    servicePrincipalId String
    (string) - Internal service principal ID of the service principal in Databricks
    accountId string
    (string) - The parent account ID for the service principal in Databricks
    accountSpStatus string
    The activity status of a service principal in a Databricks account. Possible values are: ACTIVE, INACTIVE
    applicationId string
    (string) - Application ID of the service principal. Set at creation time and cannot be changed afterwards; when omitted, the server generates one
    displayName string
    Display name of the service principal
    externalId string
    ExternalId of the service principal in the customer's IdP
    servicePrincipalId string
    (string) - Internal service principal ID of the service principal in Databricks
    account_id str
    (string) - The parent account ID for the service principal in Databricks
    account_sp_status str
    The activity status of a service principal in a Databricks account. Possible values are: ACTIVE, INACTIVE
    application_id str
    (string) - Application ID of the service principal. Set at creation time and cannot be changed afterwards; when omitted, the server generates one
    display_name str
    Display name of the service principal
    external_id str
    ExternalId of the service principal in the customer's IdP
    service_principal_id str
    (string) - Internal service principal ID of the service principal in Databricks
    accountId String
    (string) - The parent account ID for the service principal in Databricks
    accountSpStatus String
    The activity status of a service principal in a Databricks account. Possible values are: ACTIVE, INACTIVE
    applicationId String
    (string) - Application ID of the service principal. Set at creation time and cannot be changed afterwards; when omitted, the server generates one
    displayName String
    Display name of the service principal
    externalId String
    ExternalId of the service principal in the customer's IdP
    servicePrincipalId String
    (string) - Internal service principal ID of the service principal in Databricks

    Package Details

    Repository
    databricks pulumi/pulumi-databricks
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the databricks Terraform Provider.
    databricks logo databricks logo
    Viewing docs for Databricks v1.109.0
    published on Tuesday, Sep 8, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial