1. Packages
  2. Azure Native v2
  3. API Docs
  4. sql
  5. ServerAzureADAdministrator
These are the docs for Azure Native v2. We recommenend using the latest version, Azure Native v3.
Azure Native v2 v2.90.0 published on Thursday, Mar 27, 2025 by Pulumi

azure-native-v2.sql.ServerAzureADAdministrator

Explore with Pulumi AI

Azure Active Directory administrator. Azure REST API version: 2021-11-01. Prior API version in Azure Native 1.x: 2020-11-01-preview.

Other available API versions: 2014-04-01, 2022-11-01-preview, 2023-02-01-preview, 2023-05-01-preview, 2023-08-01-preview, 2024-05-01-preview.

Example Usage

Creates or updates an existing Azure Active Directory administrator.

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;

return await Deployment.RunAsync(() => 
{
    var serverAzureADAdministrator = new AzureNative.Sql.ServerAzureADAdministrator("serverAzureADAdministrator", new()
    {
        AdministratorName = "ActiveDirectory",
        AdministratorType = AzureNative.Sql.AdministratorType.ActiveDirectory,
        Login = "bob@contoso.com",
        ResourceGroupName = "sqlcrudtest-4799",
        ServerName = "sqlcrudtest-6440",
        Sid = "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c",
        TenantId = "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c",
    });

});
Copy
package main

import (
	sql "github.com/pulumi/pulumi-azure-native-sdk/sql/v2"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := sql.NewServerAzureADAdministrator(ctx, "serverAzureADAdministrator", &sql.ServerAzureADAdministratorArgs{
			AdministratorName: pulumi.String("ActiveDirectory"),
			AdministratorType: pulumi.String(sql.AdministratorTypeActiveDirectory),
			Login:             pulumi.String("bob@contoso.com"),
			ResourceGroupName: pulumi.String("sqlcrudtest-4799"),
			ServerName:        pulumi.String("sqlcrudtest-6440"),
			Sid:               pulumi.String("c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c"),
			TenantId:          pulumi.String("c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.sql.ServerAzureADAdministrator;
import com.pulumi.azurenative.sql.ServerAzureADAdministratorArgs;
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) {
        var serverAzureADAdministrator = new ServerAzureADAdministrator("serverAzureADAdministrator", ServerAzureADAdministratorArgs.builder()
            .administratorName("ActiveDirectory")
            .administratorType("ActiveDirectory")
            .login("bob@contoso.com")
            .resourceGroupName("sqlcrudtest-4799")
            .serverName("sqlcrudtest-6440")
            .sid("c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c")
            .tenantId("c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c")
            .build());

    }
}
Copy
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";

const serverAzureADAdministrator = new azure_native.sql.ServerAzureADAdministrator("serverAzureADAdministrator", {
    administratorName: "ActiveDirectory",
    administratorType: azure_native.sql.AdministratorType.ActiveDirectory,
    login: "bob@contoso.com",
    resourceGroupName: "sqlcrudtest-4799",
    serverName: "sqlcrudtest-6440",
    sid: "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c",
    tenantId: "c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c",
});
Copy
import pulumi
import pulumi_azure_native as azure_native

server_azure_ad_administrator = azure_native.sql.ServerAzureADAdministrator("serverAzureADAdministrator",
    administrator_name="ActiveDirectory",
    administrator_type=azure_native.sql.AdministratorType.ACTIVE_DIRECTORY,
    login="bob@contoso.com",
    resource_group_name="sqlcrudtest-4799",
    server_name="sqlcrudtest-6440",
    sid="c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c",
    tenant_id="c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c")
Copy
resources:
  serverAzureADAdministrator:
    type: azure-native:sql:ServerAzureADAdministrator
    properties:
      administratorName: ActiveDirectory
      administratorType: ActiveDirectory
      login: bob@contoso.com
      resourceGroupName: sqlcrudtest-4799
      serverName: sqlcrudtest-6440
      sid: c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c
      tenantId: c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c
Copy

Create ServerAzureADAdministrator Resource

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

Constructor syntax

new ServerAzureADAdministrator(name: string, args: ServerAzureADAdministratorArgs, opts?: CustomResourceOptions);
@overload
def ServerAzureADAdministrator(resource_name: str,
                               args: ServerAzureADAdministratorArgs,
                               opts: Optional[ResourceOptions] = None)

@overload
def ServerAzureADAdministrator(resource_name: str,
                               opts: Optional[ResourceOptions] = None,
                               administrator_type: Optional[Union[str, AdministratorType]] = None,
                               login: Optional[str] = None,
                               resource_group_name: Optional[str] = None,
                               server_name: Optional[str] = None,
                               sid: Optional[str] = None,
                               administrator_name: Optional[str] = None,
                               tenant_id: Optional[str] = None)
func NewServerAzureADAdministrator(ctx *Context, name string, args ServerAzureADAdministratorArgs, opts ...ResourceOption) (*ServerAzureADAdministrator, error)
public ServerAzureADAdministrator(string name, ServerAzureADAdministratorArgs args, CustomResourceOptions? opts = null)
public ServerAzureADAdministrator(String name, ServerAzureADAdministratorArgs args)
public ServerAzureADAdministrator(String name, ServerAzureADAdministratorArgs args, CustomResourceOptions options)
type: azure-native:sql:ServerAzureADAdministrator
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. ServerAzureADAdministratorArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. ServerAzureADAdministratorArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. ServerAzureADAdministratorArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. ServerAzureADAdministratorArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. ServerAzureADAdministratorArgs
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 serverAzureADAdministratorResource = new AzureNative.Sql.ServerAzureADAdministrator("serverAzureADAdministratorResource", new()
{
    AdministratorType = "string",
    Login = "string",
    ResourceGroupName = "string",
    ServerName = "string",
    Sid = "string",
    AdministratorName = "string",
    TenantId = "string",
});
Copy
example, err := sql.NewServerAzureADAdministrator(ctx, "serverAzureADAdministratorResource", &sql.ServerAzureADAdministratorArgs{
	AdministratorType: "string",
	Login:             "string",
	ResourceGroupName: "string",
	ServerName:        "string",
	Sid:               "string",
	AdministratorName: "string",
	TenantId:          "string",
})
Copy
var serverAzureADAdministratorResource = new ServerAzureADAdministrator("serverAzureADAdministratorResource", ServerAzureADAdministratorArgs.builder()
    .administratorType("string")
    .login("string")
    .resourceGroupName("string")
    .serverName("string")
    .sid("string")
    .administratorName("string")
    .tenantId("string")
    .build());
Copy
server_azure_ad_administrator_resource = azure_native.sql.ServerAzureADAdministrator("serverAzureADAdministratorResource",
    administrator_type=string,
    login=string,
    resource_group_name=string,
    server_name=string,
    sid=string,
    administrator_name=string,
    tenant_id=string)
Copy
const serverAzureADAdministratorResource = new azure_native.sql.ServerAzureADAdministrator("serverAzureADAdministratorResource", {
    administratorType: "string",
    login: "string",
    resourceGroupName: "string",
    serverName: "string",
    sid: "string",
    administratorName: "string",
    tenantId: "string",
});
Copy
type: azure-native:sql:ServerAzureADAdministrator
properties:
    administratorName: string
    administratorType: string
    login: string
    resourceGroupName: string
    serverName: string
    sid: string
    tenantId: string
Copy

ServerAzureADAdministrator 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 ServerAzureADAdministrator resource accepts the following input properties:

AdministratorType This property is required. string | Pulumi.AzureNative.Sql.AdministratorType
Type of the sever administrator.
Login This property is required. string
Login name of the server administrator.
ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
ServerName
This property is required.
Changes to this property will trigger replacement.
string
The name of the server.
Sid This property is required. string
SID (object ID) of the server administrator.
AdministratorName Changes to this property will trigger replacement. string
The name of server active directory administrator.
TenantId string
Tenant ID of the administrator.
AdministratorType This property is required. string | AdministratorType
Type of the sever administrator.
Login This property is required. string
Login name of the server administrator.
ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
ServerName
This property is required.
Changes to this property will trigger replacement.
string
The name of the server.
Sid This property is required. string
SID (object ID) of the server administrator.
AdministratorName Changes to this property will trigger replacement. string
The name of server active directory administrator.
TenantId string
Tenant ID of the administrator.
administratorType This property is required. String | AdministratorType
Type of the sever administrator.
login This property is required. String
Login name of the server administrator.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
serverName
This property is required.
Changes to this property will trigger replacement.
String
The name of the server.
sid This property is required. String
SID (object ID) of the server administrator.
administratorName Changes to this property will trigger replacement. String
The name of server active directory administrator.
tenantId String
Tenant ID of the administrator.
administratorType This property is required. string | AdministratorType
Type of the sever administrator.
login This property is required. string
Login name of the server administrator.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
serverName
This property is required.
Changes to this property will trigger replacement.
string
The name of the server.
sid This property is required. string
SID (object ID) of the server administrator.
administratorName Changes to this property will trigger replacement. string
The name of server active directory administrator.
tenantId string
Tenant ID of the administrator.
administrator_type This property is required. str | AdministratorType
Type of the sever administrator.
login This property is required. str
Login name of the server administrator.
resource_group_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
server_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the server.
sid This property is required. str
SID (object ID) of the server administrator.
administrator_name Changes to this property will trigger replacement. str
The name of server active directory administrator.
tenant_id str
Tenant ID of the administrator.
administratorType This property is required. String | "ActiveDirectory"
Type of the sever administrator.
login This property is required. String
Login name of the server administrator.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
serverName
This property is required.
Changes to this property will trigger replacement.
String
The name of the server.
sid This property is required. String
SID (object ID) of the server administrator.
administratorName Changes to this property will trigger replacement. String
The name of server active directory administrator.
tenantId String
Tenant ID of the administrator.

Outputs

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

AzureADOnlyAuthentication bool
Azure Active Directory only Authentication enabled.
Id string
The provider-assigned unique ID for this managed resource.
Name string
Resource name.
Type string
Resource type.
AzureADOnlyAuthentication bool
Azure Active Directory only Authentication enabled.
Id string
The provider-assigned unique ID for this managed resource.
Name string
Resource name.
Type string
Resource type.
azureADOnlyAuthentication Boolean
Azure Active Directory only Authentication enabled.
id String
The provider-assigned unique ID for this managed resource.
name String
Resource name.
type String
Resource type.
azureADOnlyAuthentication boolean
Azure Active Directory only Authentication enabled.
id string
The provider-assigned unique ID for this managed resource.
name string
Resource name.
type string
Resource type.
azure_ad_only_authentication bool
Azure Active Directory only Authentication enabled.
id str
The provider-assigned unique ID for this managed resource.
name str
Resource name.
type str
Resource type.
azureADOnlyAuthentication Boolean
Azure Active Directory only Authentication enabled.
id String
The provider-assigned unique ID for this managed resource.
name String
Resource name.
type String
Resource type.

Supporting Types

AdministratorType
, AdministratorTypeArgs

ActiveDirectory
ActiveDirectory
AdministratorTypeActiveDirectory
ActiveDirectory
ActiveDirectory
ActiveDirectory
ActiveDirectory
ActiveDirectory
ACTIVE_DIRECTORY
ActiveDirectory
"ActiveDirectory"
ActiveDirectory

Import

An existing resource can be imported using its type token, name, and identifier, e.g.

$ pulumi import azure-native:sql:ServerAzureADAdministrator ActiveDirectory /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/administrators/{administratorName} 
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
azure-native-v2 pulumi/pulumi-azure-native
License
Apache-2.0