1. Packages
  2. Azure Native
  3. API Docs
  4. sql
  5. ServerDnsAlias
This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
Azure Native v3.2.0 published on Monday, Apr 14, 2025 by Pulumi

azure-native.sql.ServerDnsAlias

Explore with Pulumi AI

This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
Azure Native v3.2.0 published on Monday, Apr 14, 2025 by Pulumi

A server DNS alias.

Uses Azure REST API version 2023-08-01. In version 2.x of the Azure Native provider, it used API version 2021-11-01.

Other available API versions: 2017-03-01-preview, 2020-02-02-preview, 2020-08-01-preview, 2020-11-01-preview, 2021-02-01-preview, 2021-05-01-preview, 2021-08-01-preview, 2021-11-01, 2021-11-01-preview, 2022-02-01-preview, 2022-05-01-preview, 2022-08-01-preview, 2022-11-01-preview, 2023-02-01-preview, 2023-05-01-preview, 2023-08-01-preview, 2024-05-01-preview. These can be accessed by generating a local SDK package using the CLI command pulumi package add azure-native sql [ApiVersion]. See the version guide for details.

Example Usage

Create server DNS alias

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

return await Deployment.RunAsync(() => 
{
    var serverDnsAlias = new AzureNative.Sql.ServerDnsAlias("serverDnsAlias", new()
    {
        DnsAliasName = "dns-alias-name-1",
        ResourceGroupName = "Default",
        ServerName = "dns-alias-server",
    });

});
Copy
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := sql.NewServerDnsAlias(ctx, "serverDnsAlias", &sql.ServerDnsAliasArgs{
			DnsAliasName:      pulumi.String("dns-alias-name-1"),
			ResourceGroupName: pulumi.String("Default"),
			ServerName:        pulumi.String("dns-alias-server"),
		})
		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.ServerDnsAlias;
import com.pulumi.azurenative.sql.ServerDnsAliasArgs;
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 serverDnsAlias = new ServerDnsAlias("serverDnsAlias", ServerDnsAliasArgs.builder()
            .dnsAliasName("dns-alias-name-1")
            .resourceGroupName("Default")
            .serverName("dns-alias-server")
            .build());

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

const serverDnsAlias = new azure_native.sql.ServerDnsAlias("serverDnsAlias", {
    dnsAliasName: "dns-alias-name-1",
    resourceGroupName: "Default",
    serverName: "dns-alias-server",
});
Copy
import pulumi
import pulumi_azure_native as azure_native

server_dns_alias = azure_native.sql.ServerDnsAlias("serverDnsAlias",
    dns_alias_name="dns-alias-name-1",
    resource_group_name="Default",
    server_name="dns-alias-server")
Copy
resources:
  serverDnsAlias:
    type: azure-native:sql:ServerDnsAlias
    properties:
      dnsAliasName: dns-alias-name-1
      resourceGroupName: Default
      serverName: dns-alias-server
Copy

Create ServerDnsAlias Resource

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

Constructor syntax

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

@overload
def ServerDnsAlias(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   resource_group_name: Optional[str] = None,
                   server_name: Optional[str] = None,
                   dns_alias_name: Optional[str] = None)
func NewServerDnsAlias(ctx *Context, name string, args ServerDnsAliasArgs, opts ...ResourceOption) (*ServerDnsAlias, error)
public ServerDnsAlias(string name, ServerDnsAliasArgs args, CustomResourceOptions? opts = null)
public ServerDnsAlias(String name, ServerDnsAliasArgs args)
public ServerDnsAlias(String name, ServerDnsAliasArgs args, CustomResourceOptions options)
type: azure-native:sql:ServerDnsAlias
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. ServerDnsAliasArgs
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. ServerDnsAliasArgs
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. ServerDnsAliasArgs
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. ServerDnsAliasArgs
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. ServerDnsAliasArgs
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 serverDnsAliasResource = new AzureNative.Sql.ServerDnsAlias("serverDnsAliasResource", new()
{
    ResourceGroupName = "string",
    ServerName = "string",
    DnsAliasName = "string",
});
Copy
example, err := sql.NewServerDnsAlias(ctx, "serverDnsAliasResource", &sql.ServerDnsAliasArgs{
	ResourceGroupName: pulumi.String("string"),
	ServerName:        pulumi.String("string"),
	DnsAliasName:      pulumi.String("string"),
})
Copy
var serverDnsAliasResource = new ServerDnsAlias("serverDnsAliasResource", ServerDnsAliasArgs.builder()
    .resourceGroupName("string")
    .serverName("string")
    .dnsAliasName("string")
    .build());
Copy
server_dns_alias_resource = azure_native.sql.ServerDnsAlias("serverDnsAliasResource",
    resource_group_name="string",
    server_name="string",
    dns_alias_name="string")
Copy
const serverDnsAliasResource = new azure_native.sql.ServerDnsAlias("serverDnsAliasResource", {
    resourceGroupName: "string",
    serverName: "string",
    dnsAliasName: "string",
});
Copy
type: azure-native:sql:ServerDnsAlias
properties:
    dnsAliasName: string
    resourceGroupName: string
    serverName: string
Copy

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

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 that the alias is pointing to.
DnsAliasName Changes to this property will trigger replacement. string
The name of the server dns alias.
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 that the alias is pointing to.
DnsAliasName Changes to this property will trigger replacement. string
The name of the server dns alias.
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 that the alias is pointing to.
dnsAliasName Changes to this property will trigger replacement. String
The name of the server dns alias.
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 that the alias is pointing to.
dnsAliasName Changes to this property will trigger replacement. string
The name of the server dns alias.
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 that the alias is pointing to.
dns_alias_name Changes to this property will trigger replacement. str
The name of the server dns alias.
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 that the alias is pointing to.
dnsAliasName Changes to this property will trigger replacement. String
The name of the server dns alias.

Outputs

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

AzureApiVersion string
The Azure API version of the resource.
AzureDnsRecord string
The fully qualified DNS record for alias
Id string
The provider-assigned unique ID for this managed resource.
Name string
Resource name.
Type string
Resource type.
AzureApiVersion string
The Azure API version of the resource.
AzureDnsRecord string
The fully qualified DNS record for alias
Id string
The provider-assigned unique ID for this managed resource.
Name string
Resource name.
Type string
Resource type.
azureApiVersion String
The Azure API version of the resource.
azureDnsRecord String
The fully qualified DNS record for alias
id String
The provider-assigned unique ID for this managed resource.
name String
Resource name.
type String
Resource type.
azureApiVersion string
The Azure API version of the resource.
azureDnsRecord string
The fully qualified DNS record for alias
id string
The provider-assigned unique ID for this managed resource.
name string
Resource name.
type string
Resource type.
azure_api_version str
The Azure API version of the resource.
azure_dns_record str
The fully qualified DNS record for alias
id str
The provider-assigned unique ID for this managed resource.
name str
Resource name.
type str
Resource type.
azureApiVersion String
The Azure API version of the resource.
azureDnsRecord String
The fully qualified DNS record for alias
id String
The provider-assigned unique ID for this managed resource.
name String
Resource name.
type String
Resource type.

Import

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

$ pulumi import azure-native:sql:ServerDnsAlias dns-alias-name-1 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/dnsAliases/{dnsAliasName} 
Copy

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

Package Details

Repository
Azure Native pulumi/pulumi-azure-native
License
Apache-2.0
This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
Azure Native v3.2.0 published on Monday, Apr 14, 2025 by Pulumi