azure-native.sql.ServerDnsAlias
Explore with Pulumi AI
A server DNS alias. 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.
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",
});
});
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.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
})
}
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());
}
}
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")
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",
});
resources:
serverDnsAlias:
type: azure-native:sql:ServerDnsAlias
properties:
dnsAliasName: dns-alias-name-1
resourceGroupName: Default
serverName: dns-alias-server
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 string
- The unique name of the resource.
- args ServerDnsAliasArgs
- 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 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 string
- The unique name of the resource.
- args ServerDnsAliasArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ServerDnsAliasArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args 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",
});
example, err := sql.NewServerDnsAlias(ctx, "serverDnsAliasResource", &sql.ServerDnsAliasArgs{
ResourceGroupName: pulumi.String("string"),
ServerName: pulumi.String("string"),
DnsAliasName: pulumi.String("string"),
})
var serverDnsAliasResource = new ServerDnsAlias("serverDnsAliasResource", ServerDnsAliasArgs.builder()
.resourceGroupName("string")
.serverName("string")
.dnsAliasName("string")
.build());
server_dns_alias_resource = azure_native.sql.ServerDnsAlias("serverDnsAliasResource",
resource_group_name="string",
server_name="string",
dns_alias_name="string")
const serverDnsAliasResource = new azure_native.sql.ServerDnsAlias("serverDnsAliasResource", {
resourceGroupName: "string",
serverName: "string",
dnsAliasName: "string",
});
type: azure-native:sql:ServerDnsAlias
properties:
dnsAliasName: string
resourceGroupName: string
serverName: string
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
The ServerDnsAlias resource accepts the following input properties:
- 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.
- Server
Name string - The name of the server that the alias is pointing to.
- Dns
Alias stringName - The name of the server dns alias.
- 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.
- Server
Name string - The name of the server that the alias is pointing to.
- Dns
Alias stringName - The name of the server dns alias.
- 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.
- server
Name String - The name of the server that the alias is pointing to.
- dns
Alias StringName - The name of the server dns alias.
- 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.
- server
Name string - The name of the server that the alias is pointing to.
- dns
Alias stringName - The name of the server dns alias.
- 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.
- server_
name str - The name of the server that the alias is pointing to.
- dns_
alias_ strname - The name of the server dns alias.
- 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.
- server
Name String - The name of the server that the alias is pointing to.
- dns
Alias StringName - 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:
- Azure
Dns stringRecord - 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
Dns stringRecord - 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
Dns StringRecord - 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
Dns stringRecord - 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_
dns_ strrecord - 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.
- azure
Dns StringRecord - 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}
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Azure Native pulumi/pulumi-azure-native
- License
- Apache-2.0