alicloud.dns.Domain
Explore with Pulumi AI
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", {
name: "starmove.com",
groupId: "85ab8713-4a30-4de4-9d20-155ff830f651",
});
import pulumi
import pulumi_alicloud as alicloud
# Add a new Domain.
dns = alicloud.dns.Domain("dns",
name="starmove.com",
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{
Name: pulumi.String("starmove.com"),
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()
{
Name = "starmove.com",
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()
.name("starmove.com")
.groupId("85ab8713-4a30-4de4-9d20-155ff830f651")
.build());
}
}
resources:
# Add a new Domain.
dns:
type: alicloud:dns:Domain
properties:
name: starmove.com
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.
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:
- Group
Id 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. - Resource
Group stringId - The Id of resource group which the dns belongs.
- Group
Id 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. - Resource
Group stringId - The Id of resource group which the dns belongs.
- group
Id 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. - resource
Group StringId - The Id of resource group which the dns belongs.
- group
Id 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. - resource
Group stringId - 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_ strid - The Id of resource group which the dns belongs.
- group
Id 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. - resource
Group StringId - 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:
- Dns
Servers List<string> - A list of the dns server name.
- Domain
Id string - The domain ID.
- Id string
- The provider-assigned unique ID for this managed resource.
- Dns
Servers []string - A list of the dns server name.
- Domain
Id string - The domain ID.
- Id string
- The provider-assigned unique ID for this managed resource.
- dns
Servers List<String> - A list of the dns server name.
- domain
Id String - The domain ID.
- id String
- The provider-assigned unique ID for this managed resource.
- dns
Servers string[] - A list of the dns server name.
- domain
Id 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.
- dns
Servers List<String> - A list of the dns server name.
- domain
Id 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.
- Dns
Servers List<string> - A list of the dns server name.
- Domain
Id string - The domain ID.
- Group
Id 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. - Resource
Group stringId - The Id of resource group which the dns belongs.
- Dns
Servers []string - A list of the dns server name.
- Domain
Id string - The domain ID.
- Group
Id 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. - Resource
Group stringId - The Id of resource group which the dns belongs.
- dns
Servers List<String> - A list of the dns server name.
- domain
Id String - The domain ID.
- group
Id 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. - resource
Group StringId - The Id of resource group which the dns belongs.
- dns
Servers string[] - A list of the dns server name.
- domain
Id string - The domain ID.
- group
Id 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. - resource
Group stringId - 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_ strid - The Id of resource group which the dns belongs.
- dns
Servers List<String> - A list of the dns server name.
- domain
Id String - The domain ID.
- group
Id 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. - resource
Group StringId - 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.