1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. dns
  5. Domain
Alibaba Cloud v3.53.0 published on Wednesday, Apr 17, 2024 by Pulumi

alicloud.dns.Domain

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.53.0 published on Wednesday, Apr 17, 2024 by Pulumi
    Deprecated: This resource has been deprecated in favour of DnsDomain

    DEPRECATED: This resource has been renamed to alicloud.dns.AlidnsDomain from version 1.95.0.

    Provides a DNS resource.

    NOTE: The domain name which you want to add must be already registered and had not added by another account. Every domain name can only exist in a unique group.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    // Add a new Domain.
    const dns = new alicloud.dns.Domain("dns", {groupId: "85ab8713-4a30-4de4-9d20-155ff830f651"});
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    # Add a new Domain.
    dns = alicloud.dns.Domain("dns", group_id="85ab8713-4a30-4de4-9d20-155ff830f651")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/dns"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		// Add a new Domain.
    		_, err := dns.NewDomain(ctx, "dns", &dns.DomainArgs{
    			GroupId: pulumi.String("85ab8713-4a30-4de4-9d20-155ff830f651"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        // Add a new Domain.
        var dns = new AliCloud.Dns.Domain("dns", new()
        {
            GroupId = "85ab8713-4a30-4de4-9d20-155ff830f651",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.dns.Domain;
    import com.pulumi.alicloud.dns.DomainArgs;
    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) {
            // Add a new Domain.
            var dns = new Domain("dns", DomainArgs.builder()        
                .groupId("85ab8713-4a30-4de4-9d20-155ff830f651")
                .build());
    
        }
    }
    
    resources:
      # Add a new Domain.
      dns:
        type: alicloud:dns:Domain
        properties:
          groupId: 85ab8713-4a30-4de4-9d20-155ff830f651
    

    Create Domain Resource

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

    Constructor syntax

    new Domain(name: string, args?: DomainArgs, opts?: CustomResourceOptions);
    @overload
    def Domain(resource_name: str,
               args: Optional[DomainArgs] = None,
               opts: Optional[ResourceOptions] = None)
    
    @overload
    def Domain(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               group_id: Optional[str] = None,
               name: Optional[str] = None,
               resource_group_id: Optional[str] = None)
    func NewDomain(ctx *Context, name string, args *DomainArgs, opts ...ResourceOption) (*Domain, error)
    public Domain(string name, DomainArgs? args = null, CustomResourceOptions? opts = null)
    public Domain(String name, DomainArgs args)
    public Domain(String name, DomainArgs args, CustomResourceOptions options)
    
    type: alicloud:dns:Domain
    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 DomainArgs
    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 DomainArgs
    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 DomainArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args DomainArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args DomainArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

    The following reference example uses placeholder values for all input properties.

    Coming soon!
    
    Coming soon!
    
    Coming soon!
    
    Coming soon!
    
    Coming soon!
    
    Coming soon!
    

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

    GroupId string
    Id of the group in which the domain will add. If not supplied, then use default group.
    Name string
    Name of the domain. This name without suffix can have a string of 1 to 63 characters, must contain only alphanumeric characters or "-", and must not begin or end with "-", and "-" must not in the 3th and 4th character positions at the same time. Suffix .sh and .tel are not supported.
    ResourceGroupId string
    The Id of resource group which the dns belongs.
    GroupId string
    Id of the group in which the domain will add. If not supplied, then use default group.
    Name string
    Name of the domain. This name without suffix can have a string of 1 to 63 characters, must contain only alphanumeric characters or "-", and must not begin or end with "-", and "-" must not in the 3th and 4th character positions at the same time. Suffix .sh and .tel are not supported.
    ResourceGroupId string
    The Id of resource group which the dns belongs.
    groupId String
    Id of the group in which the domain will add. If not supplied, then use default group.
    name String
    Name of the domain. This name without suffix can have a string of 1 to 63 characters, must contain only alphanumeric characters or "-", and must not begin or end with "-", and "-" must not in the 3th and 4th character positions at the same time. Suffix .sh and .tel are not supported.
    resourceGroupId String
    The Id of resource group which the dns belongs.
    groupId string
    Id of the group in which the domain will add. If not supplied, then use default group.
    name string
    Name of the domain. This name without suffix can have a string of 1 to 63 characters, must contain only alphanumeric characters or "-", and must not begin or end with "-", and "-" must not in the 3th and 4th character positions at the same time. Suffix .sh and .tel are not supported.
    resourceGroupId string
    The Id of resource group which the dns belongs.
    group_id str
    Id of the group in which the domain will add. If not supplied, then use default group.
    name str
    Name of the domain. This name without suffix can have a string of 1 to 63 characters, must contain only alphanumeric characters or "-", and must not begin or end with "-", and "-" must not in the 3th and 4th character positions at the same time. Suffix .sh and .tel are not supported.
    resource_group_id str
    The Id of resource group which the dns belongs.
    groupId String
    Id of the group in which the domain will add. If not supplied, then use default group.
    name String
    Name of the domain. This name without suffix can have a string of 1 to 63 characters, must contain only alphanumeric characters or "-", and must not begin or end with "-", and "-" must not in the 3th and 4th character positions at the same time. Suffix .sh and .tel are not supported.
    resourceGroupId String
    The Id of resource group which the dns belongs.

    Outputs

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

    DnsServers List<string>
    A list of the dns server name.
    DomainId string
    The domain ID.
    Id string
    The provider-assigned unique ID for this managed resource.
    DnsServers []string
    A list of the dns server name.
    DomainId string
    The domain ID.
    Id string
    The provider-assigned unique ID for this managed resource.
    dnsServers List<String>
    A list of the dns server name.
    domainId String
    The domain ID.
    id String
    The provider-assigned unique ID for this managed resource.
    dnsServers string[]
    A list of the dns server name.
    domainId string
    The domain ID.
    id string
    The provider-assigned unique ID for this managed resource.
    dns_servers Sequence[str]
    A list of the dns server name.
    domain_id str
    The domain ID.
    id str
    The provider-assigned unique ID for this managed resource.
    dnsServers List<String>
    A list of the dns server name.
    domainId String
    The domain ID.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing Domain Resource

    Get an existing Domain resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: DomainState, opts?: CustomResourceOptions): Domain
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            dns_servers: Optional[Sequence[str]] = None,
            domain_id: Optional[str] = None,
            group_id: Optional[str] = None,
            name: Optional[str] = None,
            resource_group_id: Optional[str] = None) -> Domain
    func GetDomain(ctx *Context, name string, id IDInput, state *DomainState, opts ...ResourceOption) (*Domain, error)
    public static Domain Get(string name, Input<string> id, DomainState? state, CustomResourceOptions? opts = null)
    public static Domain get(String name, Output<String> id, DomainState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    DnsServers List<string>
    A list of the dns server name.
    DomainId string
    The domain ID.
    GroupId string
    Id of the group in which the domain will add. If not supplied, then use default group.
    Name string
    Name of the domain. This name without suffix can have a string of 1 to 63 characters, must contain only alphanumeric characters or "-", and must not begin or end with "-", and "-" must not in the 3th and 4th character positions at the same time. Suffix .sh and .tel are not supported.
    ResourceGroupId string
    The Id of resource group which the dns belongs.
    DnsServers []string
    A list of the dns server name.
    DomainId string
    The domain ID.
    GroupId string
    Id of the group in which the domain will add. If not supplied, then use default group.
    Name string
    Name of the domain. This name without suffix can have a string of 1 to 63 characters, must contain only alphanumeric characters or "-", and must not begin or end with "-", and "-" must not in the 3th and 4th character positions at the same time. Suffix .sh and .tel are not supported.
    ResourceGroupId string
    The Id of resource group which the dns belongs.
    dnsServers List<String>
    A list of the dns server name.
    domainId String
    The domain ID.
    groupId String
    Id of the group in which the domain will add. If not supplied, then use default group.
    name String
    Name of the domain. This name without suffix can have a string of 1 to 63 characters, must contain only alphanumeric characters or "-", and must not begin or end with "-", and "-" must not in the 3th and 4th character positions at the same time. Suffix .sh and .tel are not supported.
    resourceGroupId String
    The Id of resource group which the dns belongs.
    dnsServers string[]
    A list of the dns server name.
    domainId string
    The domain ID.
    groupId string
    Id of the group in which the domain will add. If not supplied, then use default group.
    name string
    Name of the domain. This name without suffix can have a string of 1 to 63 characters, must contain only alphanumeric characters or "-", and must not begin or end with "-", and "-" must not in the 3th and 4th character positions at the same time. Suffix .sh and .tel are not supported.
    resourceGroupId string
    The Id of resource group which the dns belongs.
    dns_servers Sequence[str]
    A list of the dns server name.
    domain_id str
    The domain ID.
    group_id str
    Id of the group in which the domain will add. If not supplied, then use default group.
    name str
    Name of the domain. This name without suffix can have a string of 1 to 63 characters, must contain only alphanumeric characters or "-", and must not begin or end with "-", and "-" must not in the 3th and 4th character positions at the same time. Suffix .sh and .tel are not supported.
    resource_group_id str
    The Id of resource group which the dns belongs.
    dnsServers List<String>
    A list of the dns server name.
    domainId String
    The domain ID.
    groupId String
    Id of the group in which the domain will add. If not supplied, then use default group.
    name String
    Name of the domain. This name without suffix can have a string of 1 to 63 characters, must contain only alphanumeric characters or "-", and must not begin or end with "-", and "-" must not in the 3th and 4th character positions at the same time. Suffix .sh and .tel are not supported.
    resourceGroupId String
    The Id of resource group which the dns belongs.

    Import

    DNS can be imported using the id or domain name, e.g.

    $ pulumi import alicloud:dns/domain:Domain example "aliyun.com"
    

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

    Package Details

    Repository
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the alicloud Terraform Provider.
    alicloud logo
    Alibaba Cloud v3.53.0 published on Wednesday, Apr 17, 2024 by Pulumi