ServerArgs

data class ServerArgs(val administratorLogin: Output<String>? = null, val administratorLoginPassword: Output<String>? = null, val administrators: Output<ServerExternalAdministratorArgs>? = null, val identity: Output<ResourceIdentityArgs>? = null, val keyId: Output<String>? = null, val location: Output<String>? = null, val minimalTlsVersion: Output<String>? = null, val primaryUserAssignedIdentityId: Output<String>? = null, val publicNetworkAccess: Output<Either<String, ServerPublicNetworkAccess>>? = null, val resourceGroupName: Output<String>? = null, val serverName: Output<String>? = null, val tags: Output<Map<String, String>>? = null, val version: Output<String>? = null) : ConvertibleToJava<ServerArgs>

An Azure SQL Database server. API Version: 2020-11-01-preview.

Example Usage

Create server

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var server = new AzureNative.Sql.Server("server", new()
{
AdministratorLogin = "dummylogin",
AdministratorLoginPassword = "PLACEHOLDER",
Administrators = new AzureNative.Sql.Inputs.ServerExternalAdministratorArgs
{
AzureADOnlyAuthentication = true,
Login = "bob@contoso.com",
PrincipalType = "User",
Sid = "00000011-1111-2222-2222-123456789111",
TenantId = "00000011-1111-2222-2222-123456789111",
},
Location = "Japan East",
ResourceGroupName = "sqlcrudtest-7398",
ServerName = "sqlcrudtest-4645",
});
});
package main
import (
sql "github.com/pulumi/pulumi-azure-native-sdk/sql"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := sql.NewServer(ctx, "server", &sql.ServerArgs{
AdministratorLogin: pulumi.String("dummylogin"),
AdministratorLoginPassword: pulumi.String("PLACEHOLDER"),
Administrators: &sql.ServerExternalAdministratorArgs{
AzureADOnlyAuthentication: pulumi.Bool(true),
Login: pulumi.String("bob@contoso.com"),
PrincipalType: pulumi.String("User"),
Sid: pulumi.String("00000011-1111-2222-2222-123456789111"),
TenantId: pulumi.String("00000011-1111-2222-2222-123456789111"),
},
Location: pulumi.String("Japan East"),
ResourceGroupName: pulumi.String("sqlcrudtest-7398"),
ServerName: pulumi.String("sqlcrudtest-4645"),
})
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.Server;
import com.pulumi.azurenative.sql.ServerArgs;
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 server = new Server("server", ServerArgs.builder()
.administratorLogin("dummylogin")
.administratorLoginPassword("PLACEHOLDER")
.administrators(Map.ofEntries(
Map.entry("azureADOnlyAuthentication", true),
Map.entry("login", "bob@contoso.com"),
Map.entry("principalType", "User"),
Map.entry("sid", "00000011-1111-2222-2222-123456789111"),
Map.entry("tenantId", "00000011-1111-2222-2222-123456789111")
))
.location("Japan East")
.resourceGroupName("sqlcrudtest-7398")
.serverName("sqlcrudtest-4645")
.build());
}
}

Import

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

$ pulumi import azure-native:sql:Server sqlcrudtest-4645 /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645

Constructors

Link copied to clipboard
constructor(administratorLogin: Output<String>? = null, administratorLoginPassword: Output<String>? = null, administrators: Output<ServerExternalAdministratorArgs>? = null, identity: Output<ResourceIdentityArgs>? = null, keyId: Output<String>? = null, location: Output<String>? = null, minimalTlsVersion: Output<String>? = null, primaryUserAssignedIdentityId: Output<String>? = null, publicNetworkAccess: Output<Either<String, ServerPublicNetworkAccess>>? = null, resourceGroupName: Output<String>? = null, serverName: Output<String>? = null, tags: Output<Map<String, String>>? = null, version: Output<String>? = null)

Properties

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

Administrator username for the server. Once created it cannot be changed.

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

The administrator login password (required for server creation).

Link copied to clipboard

The Azure Active Directory identity of the server.

Link copied to clipboard
val identity: Output<ResourceIdentityArgs>? = null

The Azure Active Directory identity of the server.

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

A CMK URI of the key to use for encryption.

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

Resource location.

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

Minimal TLS version. Allowed values: '1.0', '1.1', '1.2'

Link copied to clipboard

The resource id of a user assigned identity to be used by default.

Link copied to clipboard

Whether or not public endpoint access is allowed for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled'

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

The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.

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

The name of the server.

Link copied to clipboard
val tags: Output<Map<String, String>>? = null

Resource tags.

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

The version of the server.

Functions

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