1. Packages
  2. Azure Native
  3. API Docs
  4. sql
  5. ServerDnsAlias
This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
Azure Native v2.63.0 published on Tuesday, Sep 24, 2024 by Pulumi

azure-native.sql.ServerDnsAlias

Explore with Pulumi AI

azure-native logo
This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
Azure Native v2.63.0 published on Tuesday, Sep 24, 2024 by Pulumi

    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, 2024-05-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:

    ResourceGroupName 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 string
    The name of the server that the alias is pointing to.
    DnsAliasName string
    The name of the server dns alias.
    ResourceGroupName 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 string
    The name of the server that the alias is pointing to.
    DnsAliasName string
    The name of the server dns alias.
    resourceGroupName 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 String
    The name of the server that the alias is pointing to.
    dnsAliasName String
    The name of the server dns alias.
    resourceGroupName 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 string
    The name of the server that the alias is pointing to.
    dnsAliasName string
    The name of the server dns alias.
    resource_group_name 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 str
    The name of the server that the alias is pointing to.
    dns_alias_name str
    The name of the server dns alias.
    resourceGroupName 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 String
    The name of the server that the alias is pointing to.
    dnsAliasName 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:

    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.
    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.
    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.
    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_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.
    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} 
    

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

    Package Details

    Repository
    Azure Native pulumi/pulumi-azure-native
    License
    Apache-2.0
    azure-native logo
    This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
    Azure Native v2.63.0 published on Tuesday, Sep 24, 2024 by Pulumi