1. Packages
  2. Azure Native v1
  3. API Docs
  4. sql
  5. ServerDnsAlias
These are the docs for Azure Native v1. We recommenend using the latest version, Azure Native v2.
Azure Native v1 v1.104.0 published on Thursday, Jul 6, 2023 by Pulumi

azure-native.sql.ServerDnsAlias

Explore with Pulumi AI

azure-native-v1 logo
These are the docs for Azure Native v1. We recommenend using the latest version, Azure Native v2.
Azure Native v1 v1.104.0 published on Thursday, Jul 6, 2023 by Pulumi

    A server DNS alias. API Version: 2020-11-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"
    	"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: "string",
    	ServerName:        "string",
    	DnsAliasName:      "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

    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 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/00000000-1111-2222-3333-444444444444/resourceGroups/Default/providers/Microsoft.Sql/servers/dns-alias-server/dnsAliases/dns-alias-name-1 
    

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

    Package Details

    Repository
    azure-native-v1 pulumi/pulumi-azure-native
    License
    Apache-2.0
    azure-native-v1 logo
    These are the docs for Azure Native v1. We recommenend using the latest version, Azure Native v2.
    Azure Native v1 v1.104.0 published on Thursday, Jul 6, 2023 by Pulumi