AdministratorArgs

data class AdministratorArgs(val objectId: Output<String>? = null, val principalName: Output<String>? = null, val principalType: Output<Either<String, PrincipalType>>? = null, val resourceGroupName: Output<String>? = null, val serverName: Output<String>? = null, val tenantId: Output<String>? = null) : ConvertibleToJava<AdministratorArgs>

Represents an Active Directory administrator. Uses Azure REST API version 2024-08-01. In version 2.x of the Azure Native provider, it used API version 2022-12-01. Other available API versions: 2022-12-01, 2023-03-01-preview, 2023-06-01-preview, 2023-12-01-preview, 2024-03-01-preview, 2024-11-01-preview, 2025-01-01-preview. These can be accessed by generating a local SDK package using the CLI command pulumi package add azure-native dbforpostgresql [ApiVersion]. See the ../../../version-guide/#accessing-any-api-version-via-local-packages for details.

Example Usage

Adds an Active DIrectory Administrator for the server

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var administrator = new AzureNative.DBforPostgreSQL.Administrator("administrator", new()
{
ObjectId = "oooooooo-oooo-oooo-oooo-oooooooooooo",
PrincipalName = "testuser1@microsoft.com",
PrincipalType = "User",
ResourceGroupName = "testrg",
ServerName = "testserver",
TenantId = "tttttttt-tttt-tttt-tttt-tttttttttttt",
});
});
package main
import (
dbforpostgresql "github.com/pulumi/pulumi-azure-native-sdk/dbforpostgresql/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := dbforpostgresql.NewAdministrator(ctx, "administrator", &dbforpostgresql.AdministratorArgs{
ObjectId: pulumi.String("oooooooo-oooo-oooo-oooo-oooooooooooo"),
PrincipalName: pulumi.String("testuser1@microsoft.com"),
PrincipalType: pulumi.String("User"),
ResourceGroupName: pulumi.String("testrg"),
ServerName: pulumi.String("testserver"),
TenantId: pulumi.String("tttttttt-tttt-tttt-tttt-tttttttttttt"),
})
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.dbforpostgresql.Administrator;
import com.pulumi.azurenative.dbforpostgresql.AdministratorArgs;
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 administrator = new Administrator("administrator", AdministratorArgs.builder()
.objectId("oooooooo-oooo-oooo-oooo-oooooooooooo")
.principalName("testuser1@microsoft.com")
.principalType("User")
.resourceGroupName("testrg")
.serverName("testserver")
.tenantId("tttttttt-tttt-tttt-tttt-tttttttttttt")
.build());
}
}

Import

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

$ pulumi import azure-native:dbforpostgresql:Administrator testuser1@microsoft.com /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/administrators/{objectId}

Constructors

Link copied to clipboard
constructor(objectId: Output<String>? = null, principalName: Output<String>? = null, principalType: Output<Either<String, PrincipalType>>? = null, resourceGroupName: Output<String>? = null, serverName: Output<String>? = null, tenantId: Output<String>? = null)

Properties

Link copied to clipboard
val objectId: Output<String>? = null

Guid of the objectId for the administrator.

Link copied to clipboard
val principalName: Output<String>? = null

Active Directory administrator principal name.

Link copied to clipboard
val principalType: Output<Either<String, PrincipalType>>? = null

The principal type used to represent the type of Active Directory Administrator.

Link copied to clipboard
val resourceGroupName: Output<String>? = null

The name of the resource group. The name is case insensitive.

Link copied to clipboard
val serverName: Output<String>? = null

The name of the server.

Link copied to clipboard
val tenantId: Output<String>? = null

The tenantId of the Active Directory administrator.

Functions

Link copied to clipboard
open override fun toJava(): AdministratorArgs