1. Packages
  2. Azure Native
  3. API Docs
  4. sql
  5. ServerAzureADAdministrator
This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
Azure Native v2.49.1 published on Tuesday, Jul 9, 2024 by Pulumi

azure-native.sql.ServerAzureADAdministrator

Explore with Pulumi AI

azure-native logo
This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
Azure Native v2.49.1 published on Tuesday, Jul 9, 2024 by Pulumi

    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.

    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",
        });
    
    });
    
    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
    	})
    }
    
    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());
    
        }
    }
    
    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")
    
    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",
    });
    
    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
    

    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 string
    The unique name of the resource.
    args ServerAzureADAdministratorArgs
    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 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 string
    The unique name of the resource.
    args ServerAzureADAdministratorArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ServerAzureADAdministratorArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args 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",
    });
    
    example, err := sql.NewServerAzureADAdministrator(ctx, "serverAzureADAdministratorResource", &sql.ServerAzureADAdministratorArgs{
    AdministratorType: pulumi.String("string"),
    Login: pulumi.String("string"),
    ResourceGroupName: pulumi.String("string"),
    ServerName: pulumi.String("string"),
    Sid: pulumi.String("string"),
    AdministratorName: pulumi.String("string"),
    TenantId: pulumi.String("string"),
    })
    
    var serverAzureADAdministratorResource = new ServerAzureADAdministrator("serverAzureADAdministratorResource", ServerAzureADAdministratorArgs.builder()
        .administratorType("string")
        .login("string")
        .resourceGroupName("string")
        .serverName("string")
        .sid("string")
        .administratorName("string")
        .tenantId("string")
        .build());
    
    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")
    
    const serverAzureADAdministratorResource = new azure_native.sql.ServerAzureADAdministrator("serverAzureADAdministratorResource", {
        administratorType: "string",
        login: "string",
        resourceGroupName: "string",
        serverName: "string",
        sid: "string",
        administratorName: "string",
        tenantId: "string",
    });
    
    type: azure-native:sql:ServerAzureADAdministrator
    properties:
        administratorName: string
        administratorType: string
        login: string
        resourceGroupName: string
        serverName: string
        sid: string
        tenantId: string
    

    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

    The ServerAzureADAdministrator resource accepts the following input properties:

    AdministratorType string | Pulumi.AzureNative.Sql.AdministratorType
    Type of the sever administrator.
    Login string
    Login name of the server administrator.
    ResourceGroupName 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 string
    The name of the server.
    Sid string
    SID (object ID) of the server administrator.
    AdministratorName string
    The name of server active directory administrator.
    TenantId string
    Tenant ID of the administrator.
    AdministratorType string | AdministratorType
    Type of the sever administrator.
    Login string
    Login name of the server administrator.
    ResourceGroupName 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 string
    The name of the server.
    Sid string
    SID (object ID) of the server administrator.
    AdministratorName string
    The name of server active directory administrator.
    TenantId string
    Tenant ID of the administrator.
    administratorType String | AdministratorType
    Type of the sever administrator.
    login String
    Login name of the server administrator.
    resourceGroupName 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 String
    The name of the server.
    sid String
    SID (object ID) of the server administrator.
    administratorName String
    The name of server active directory administrator.
    tenantId String
    Tenant ID of the administrator.
    administratorType string | AdministratorType
    Type of the sever administrator.
    login string
    Login name of the server administrator.
    resourceGroupName 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 string
    The name of the server.
    sid string
    SID (object ID) of the server administrator.
    administratorName string
    The name of server active directory administrator.
    tenantId string
    Tenant ID of the administrator.
    administrator_type str | AdministratorType
    Type of the sever administrator.
    login str
    Login name of the server administrator.
    resource_group_name 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 str
    The name of the server.
    sid str
    SID (object ID) of the server administrator.
    administrator_name str
    The name of server active directory administrator.
    tenant_id str
    Tenant ID of the administrator.
    administratorType String | "ActiveDirectory"
    Type of the sever administrator.
    login String
    Login name of the server administrator.
    resourceGroupName 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 String
    The name of the server.
    sid String
    SID (object ID) of the server administrator.
    administratorName 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} 
    

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

    Package Details

    Repository
    Azure Native pulumi/pulumi-azure-native
    License
    Apache-2.0
    azure-native logo
    This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
    Azure Native v2.49.1 published on Tuesday, Jul 9, 2024 by Pulumi