azure-native.sql.ManagedInstanceAdministrator
Explore with Pulumi AI
An Azure SQL managed instance administrator. Azure REST API version: 2021-11-01. Prior API version in Azure Native 1.x: 2020-11-01-preview.
Other available API versions: 2022-11-01-preview, 2023-02-01-preview, 2023-05-01-preview, 2023-08-01-preview, 2024-05-01-preview.
Example Usage
Create administrator of managed instance
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var managedInstanceAdministrator = new AzureNative.Sql.ManagedInstanceAdministrator("managedInstanceAdministrator", new()
{
AdministratorName = "ActiveDirectory",
AdministratorType = AzureNative.Sql.ManagedInstanceAdministratorType.ActiveDirectory,
Login = "bob@contoso.com",
ManagedInstanceName = "managedInstance",
ResourceGroupName = "Default-SQL-SouthEastAsia",
Sid = "44444444-3333-2222-1111-000000000000",
TenantId = "55555555-4444-3333-2222-111111111111",
});
});
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.NewManagedInstanceAdministrator(ctx, "managedInstanceAdministrator", &sql.ManagedInstanceAdministratorArgs{
AdministratorName: pulumi.String("ActiveDirectory"),
AdministratorType: pulumi.String(sql.ManagedInstanceAdministratorTypeActiveDirectory),
Login: pulumi.String("bob@contoso.com"),
ManagedInstanceName: pulumi.String("managedInstance"),
ResourceGroupName: pulumi.String("Default-SQL-SouthEastAsia"),
Sid: pulumi.String("44444444-3333-2222-1111-000000000000"),
TenantId: pulumi.String("55555555-4444-3333-2222-111111111111"),
})
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.ManagedInstanceAdministrator;
import com.pulumi.azurenative.sql.ManagedInstanceAdministratorArgs;
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 managedInstanceAdministrator = new ManagedInstanceAdministrator("managedInstanceAdministrator", ManagedInstanceAdministratorArgs.builder()
.administratorName("ActiveDirectory")
.administratorType("ActiveDirectory")
.login("bob@contoso.com")
.managedInstanceName("managedInstance")
.resourceGroupName("Default-SQL-SouthEastAsia")
.sid("44444444-3333-2222-1111-000000000000")
.tenantId("55555555-4444-3333-2222-111111111111")
.build());
}
}
import pulumi
import pulumi_azure_native as azure_native
managed_instance_administrator = azure_native.sql.ManagedInstanceAdministrator("managedInstanceAdministrator",
administrator_name="ActiveDirectory",
administrator_type=azure_native.sql.ManagedInstanceAdministratorType.ACTIVE_DIRECTORY,
login="bob@contoso.com",
managed_instance_name="managedInstance",
resource_group_name="Default-SQL-SouthEastAsia",
sid="44444444-3333-2222-1111-000000000000",
tenant_id="55555555-4444-3333-2222-111111111111")
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const managedInstanceAdministrator = new azure_native.sql.ManagedInstanceAdministrator("managedInstanceAdministrator", {
administratorName: "ActiveDirectory",
administratorType: azure_native.sql.ManagedInstanceAdministratorType.ActiveDirectory,
login: "bob@contoso.com",
managedInstanceName: "managedInstance",
resourceGroupName: "Default-SQL-SouthEastAsia",
sid: "44444444-3333-2222-1111-000000000000",
tenantId: "55555555-4444-3333-2222-111111111111",
});
resources:
managedInstanceAdministrator:
type: azure-native:sql:ManagedInstanceAdministrator
properties:
administratorName: ActiveDirectory
administratorType: ActiveDirectory
login: bob@contoso.com
managedInstanceName: managedInstance
resourceGroupName: Default-SQL-SouthEastAsia
sid: 44444444-3333-2222-1111-000000000000
tenantId: 55555555-4444-3333-2222-111111111111
Update administrator of managed instance
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var managedInstanceAdministrator = new AzureNative.Sql.ManagedInstanceAdministrator("managedInstanceAdministrator", new()
{
AdministratorName = "ActiveDirectory",
AdministratorType = AzureNative.Sql.ManagedInstanceAdministratorType.ActiveDirectory,
Login = "bob@contoso.com",
ManagedInstanceName = "managedInstance",
ResourceGroupName = "Default-SQL-SouthEastAsia",
Sid = "44444444-3333-2222-1111-000000000000",
TenantId = "55555555-4444-3333-2222-111111111111",
});
});
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.NewManagedInstanceAdministrator(ctx, "managedInstanceAdministrator", &sql.ManagedInstanceAdministratorArgs{
AdministratorName: pulumi.String("ActiveDirectory"),
AdministratorType: pulumi.String(sql.ManagedInstanceAdministratorTypeActiveDirectory),
Login: pulumi.String("bob@contoso.com"),
ManagedInstanceName: pulumi.String("managedInstance"),
ResourceGroupName: pulumi.String("Default-SQL-SouthEastAsia"),
Sid: pulumi.String("44444444-3333-2222-1111-000000000000"),
TenantId: pulumi.String("55555555-4444-3333-2222-111111111111"),
})
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.ManagedInstanceAdministrator;
import com.pulumi.azurenative.sql.ManagedInstanceAdministratorArgs;
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 managedInstanceAdministrator = new ManagedInstanceAdministrator("managedInstanceAdministrator", ManagedInstanceAdministratorArgs.builder()
.administratorName("ActiveDirectory")
.administratorType("ActiveDirectory")
.login("bob@contoso.com")
.managedInstanceName("managedInstance")
.resourceGroupName("Default-SQL-SouthEastAsia")
.sid("44444444-3333-2222-1111-000000000000")
.tenantId("55555555-4444-3333-2222-111111111111")
.build());
}
}
import pulumi
import pulumi_azure_native as azure_native
managed_instance_administrator = azure_native.sql.ManagedInstanceAdministrator("managedInstanceAdministrator",
administrator_name="ActiveDirectory",
administrator_type=azure_native.sql.ManagedInstanceAdministratorType.ACTIVE_DIRECTORY,
login="bob@contoso.com",
managed_instance_name="managedInstance",
resource_group_name="Default-SQL-SouthEastAsia",
sid="44444444-3333-2222-1111-000000000000",
tenant_id="55555555-4444-3333-2222-111111111111")
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const managedInstanceAdministrator = new azure_native.sql.ManagedInstanceAdministrator("managedInstanceAdministrator", {
administratorName: "ActiveDirectory",
administratorType: azure_native.sql.ManagedInstanceAdministratorType.ActiveDirectory,
login: "bob@contoso.com",
managedInstanceName: "managedInstance",
resourceGroupName: "Default-SQL-SouthEastAsia",
sid: "44444444-3333-2222-1111-000000000000",
tenantId: "55555555-4444-3333-2222-111111111111",
});
resources:
managedInstanceAdministrator:
type: azure-native:sql:ManagedInstanceAdministrator
properties:
administratorName: ActiveDirectory
administratorType: ActiveDirectory
login: bob@contoso.com
managedInstanceName: managedInstance
resourceGroupName: Default-SQL-SouthEastAsia
sid: 44444444-3333-2222-1111-000000000000
tenantId: 55555555-4444-3333-2222-111111111111
Create ManagedInstanceAdministrator Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ManagedInstanceAdministrator(name: string, args: ManagedInstanceAdministratorArgs, opts?: CustomResourceOptions);
@overload
def ManagedInstanceAdministrator(resource_name: str,
args: ManagedInstanceAdministratorArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ManagedInstanceAdministrator(resource_name: str,
opts: Optional[ResourceOptions] = None,
administrator_type: Optional[Union[str, ManagedInstanceAdministratorType]] = None,
login: Optional[str] = None,
managed_instance_name: Optional[str] = None,
resource_group_name: Optional[str] = None,
sid: Optional[str] = None,
administrator_name: Optional[str] = None,
tenant_id: Optional[str] = None)
func NewManagedInstanceAdministrator(ctx *Context, name string, args ManagedInstanceAdministratorArgs, opts ...ResourceOption) (*ManagedInstanceAdministrator, error)
public ManagedInstanceAdministrator(string name, ManagedInstanceAdministratorArgs args, CustomResourceOptions? opts = null)
public ManagedInstanceAdministrator(String name, ManagedInstanceAdministratorArgs args)
public ManagedInstanceAdministrator(String name, ManagedInstanceAdministratorArgs args, CustomResourceOptions options)
type: azure-native:sql:ManagedInstanceAdministrator
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 ManagedInstanceAdministratorArgs
- 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 ManagedInstanceAdministratorArgs
- 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 ManagedInstanceAdministratorArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ManagedInstanceAdministratorArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ManagedInstanceAdministratorArgs
- 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 managedInstanceAdministratorResource = new AzureNative.Sql.ManagedInstanceAdministrator("managedInstanceAdministratorResource", new()
{
AdministratorType = "string",
Login = "string",
ManagedInstanceName = "string",
ResourceGroupName = "string",
Sid = "string",
AdministratorName = "string",
TenantId = "string",
});
example, err := sql.NewManagedInstanceAdministrator(ctx, "managedInstanceAdministratorResource", &sql.ManagedInstanceAdministratorArgs{
AdministratorType: pulumi.String("string"),
Login: pulumi.String("string"),
ManagedInstanceName: pulumi.String("string"),
ResourceGroupName: pulumi.String("string"),
Sid: pulumi.String("string"),
AdministratorName: pulumi.String("string"),
TenantId: pulumi.String("string"),
})
var managedInstanceAdministratorResource = new ManagedInstanceAdministrator("managedInstanceAdministratorResource", ManagedInstanceAdministratorArgs.builder()
.administratorType("string")
.login("string")
.managedInstanceName("string")
.resourceGroupName("string")
.sid("string")
.administratorName("string")
.tenantId("string")
.build());
managed_instance_administrator_resource = azure_native.sql.ManagedInstanceAdministrator("managedInstanceAdministratorResource",
administrator_type="string",
login="string",
managed_instance_name="string",
resource_group_name="string",
sid="string",
administrator_name="string",
tenant_id="string")
const managedInstanceAdministratorResource = new azure_native.sql.ManagedInstanceAdministrator("managedInstanceAdministratorResource", {
administratorType: "string",
login: "string",
managedInstanceName: "string",
resourceGroupName: "string",
sid: "string",
administratorName: "string",
tenantId: "string",
});
type: azure-native:sql:ManagedInstanceAdministrator
properties:
administratorName: string
administratorType: string
login: string
managedInstanceName: string
resourceGroupName: string
sid: string
tenantId: string
ManagedInstanceAdministrator 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 ManagedInstanceAdministrator resource accepts the following input properties:
- Administrator
Type string | Pulumi.Azure Native. Sql. Managed Instance Administrator Type - Type of the managed instance administrator.
- Login string
- Login name of the managed instance administrator.
- Managed
Instance stringName - The name of the managed instance.
- Resource
Group stringName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- Sid string
- SID (object ID) of the managed instance administrator.
- Administrator
Name string - Tenant
Id string - Tenant ID of the managed instance administrator.
- Administrator
Type string | ManagedInstance Administrator Type - Type of the managed instance administrator.
- Login string
- Login name of the managed instance administrator.
- Managed
Instance stringName - The name of the managed instance.
- Resource
Group stringName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- Sid string
- SID (object ID) of the managed instance administrator.
- Administrator
Name string - Tenant
Id string - Tenant ID of the managed instance administrator.
- administrator
Type String | ManagedInstance Administrator Type - Type of the managed instance administrator.
- login String
- Login name of the managed instance administrator.
- managed
Instance StringName - The name of the managed instance.
- resource
Group StringName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- sid String
- SID (object ID) of the managed instance administrator.
- administrator
Name String - tenant
Id String - Tenant ID of the managed instance administrator.
- administrator
Type string | ManagedInstance Administrator Type - Type of the managed instance administrator.
- login string
- Login name of the managed instance administrator.
- managed
Instance stringName - The name of the managed instance.
- resource
Group stringName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- sid string
- SID (object ID) of the managed instance administrator.
- administrator
Name string - tenant
Id string - Tenant ID of the managed instance administrator.
- administrator_
type str | ManagedInstance Administrator Type - Type of the managed instance administrator.
- login str
- Login name of the managed instance administrator.
- managed_
instance_ strname - The name of the managed instance.
- resource_
group_ strname - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- sid str
- SID (object ID) of the managed instance administrator.
- administrator_
name str - tenant_
id str - Tenant ID of the managed instance administrator.
- administrator
Type String | "ActiveDirectory" - Type of the managed instance administrator.
- login String
- Login name of the managed instance administrator.
- managed
Instance StringName - The name of the managed instance.
- resource
Group StringName - The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
- sid String
- SID (object ID) of the managed instance administrator.
- administrator
Name String - tenant
Id String - Tenant ID of the managed instance administrator.
Outputs
All input properties are implicitly available as output properties. Additionally, the ManagedInstanceAdministrator resource produces the following output properties:
Supporting Types
ManagedInstanceAdministratorType, ManagedInstanceAdministratorTypeArgs
- Active
Directory - ActiveDirectory
- Managed
Instance Administrator Type Active Directory - ActiveDirectory
- Active
Directory - ActiveDirectory
- Active
Directory - ActiveDirectory
- ACTIVE_DIRECTORY
- ActiveDirectory
- "Active
Directory" - ActiveDirectory
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:sql:ManagedInstanceAdministrator ActiveDirectory /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/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