volcengine.dns.Zone
Explore with Pulumi AI
Provides a resource to manage dns zone
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as volcengine from "@volcengine/pulumi";
const foo = new volcengine.dns.Zone("foo", {
projectName: "xxx",
remark: "xxx",
tags: [{
key: "xx",
value: "xx",
}],
zoneName: "xxxx.com",
});
import pulumi
import pulumi_volcengine as volcengine
foo = volcengine.dns.Zone("foo",
project_name="xxx",
remark="xxx",
tags=[volcengine.dns.ZoneTagArgs(
key="xx",
value="xx",
)],
zone_name="xxxx.com")
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/dns"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := dns.NewZone(ctx, "foo", &dns.ZoneArgs{
ProjectName: pulumi.String("xxx"),
Remark: pulumi.String("xxx"),
Tags: dns.ZoneTagArray{
&dns.ZoneTagArgs{
Key: pulumi.String("xx"),
Value: pulumi.String("xx"),
},
},
ZoneName: pulumi.String("xxxx.com"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Volcengine = Pulumi.Volcengine;
return await Deployment.RunAsync(() =>
{
var foo = new Volcengine.Dns.Zone("foo", new()
{
ProjectName = "xxx",
Remark = "xxx",
Tags = new[]
{
new Volcengine.Dns.Inputs.ZoneTagArgs
{
Key = "xx",
Value = "xx",
},
},
ZoneName = "xxxx.com",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.volcengine.dns.Zone;
import com.pulumi.volcengine.dns.ZoneArgs;
import com.pulumi.volcengine.dns.inputs.ZoneTagArgs;
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 foo = new Zone("foo", ZoneArgs.builder()
.projectName("xxx")
.remark("xxx")
.tags(ZoneTagArgs.builder()
.key("xx")
.value("xx")
.build())
.zoneName("xxxx.com")
.build());
}
}
resources:
foo:
type: volcengine:dns:Zone
properties:
projectName: xxx
remark: xxx
tags:
- key: xx
value: xx
zoneName: xxxx.com
Create Zone Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Zone(name: string, args: ZoneArgs, opts?: CustomResourceOptions);
@overload
def Zone(resource_name: str,
args: ZoneArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Zone(resource_name: str,
opts: Optional[ResourceOptions] = None,
zone_name: Optional[str] = None,
project_name: Optional[str] = None,
remark: Optional[str] = None,
tags: Optional[Sequence[ZoneTagArgs]] = None)
func NewZone(ctx *Context, name string, args ZoneArgs, opts ...ResourceOption) (*Zone, error)
public Zone(string name, ZoneArgs args, CustomResourceOptions? opts = null)
type: volcengine:dns:Zone
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 ZoneArgs
- 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 ZoneArgs
- 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 ZoneArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ZoneArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ZoneArgs
- 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 zoneResource = new Volcengine.Dns.Zone("zoneResource", new()
{
ZoneName = "string",
ProjectName = "string",
Remark = "string",
Tags = new[]
{
new Volcengine.Dns.Inputs.ZoneTagArgs
{
Key = "string",
Value = "string",
},
},
});
example, err := dns.NewZone(ctx, "zoneResource", &dns.ZoneArgs{
ZoneName: pulumi.String("string"),
ProjectName: pulumi.String("string"),
Remark: pulumi.String("string"),
Tags: dns.ZoneTagArray{
&dns.ZoneTagArgs{
Key: pulumi.String("string"),
Value: pulumi.String("string"),
},
},
})
var zoneResource = new Zone("zoneResource", ZoneArgs.builder()
.zoneName("string")
.projectName("string")
.remark("string")
.tags(ZoneTagArgs.builder()
.key("string")
.value("string")
.build())
.build());
zone_resource = volcengine.dns.Zone("zoneResource",
zone_name="string",
project_name="string",
remark="string",
tags=[{
"key": "string",
"value": "string",
}])
const zoneResource = new volcengine.dns.Zone("zoneResource", {
zoneName: "string",
projectName: "string",
remark: "string",
tags: [{
key: "string",
value: "string",
}],
});
type: volcengine:dns:Zone
properties:
projectName: string
remark: string
tags:
- key: string
value: string
zoneName: string
Zone 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 Zone resource accepts the following input properties:
- Zone
Name string - The domain to be created. The domain must be a second-level domain and cannot be a wildcard domain.
- Project
Name string - The project to which the domain name belongs. The default value is default.
- Remark string
- The remark for the domain.
- List<Zone
Tag> - Tags.
- Zone
Name string - The domain to be created. The domain must be a second-level domain and cannot be a wildcard domain.
- Project
Name string - The project to which the domain name belongs. The default value is default.
- Remark string
- The remark for the domain.
- []Zone
Tag Args - Tags.
- zone
Name String - The domain to be created. The domain must be a second-level domain and cannot be a wildcard domain.
- project
Name String - The project to which the domain name belongs. The default value is default.
- remark String
- The remark for the domain.
- List<Zone
Tag> - Tags.
- zone
Name string - The domain to be created. The domain must be a second-level domain and cannot be a wildcard domain.
- project
Name string - The project to which the domain name belongs. The default value is default.
- remark string
- The remark for the domain.
- Zone
Tag[] - Tags.
- zone_
name str - The domain to be created. The domain must be a second-level domain and cannot be a wildcard domain.
- project_
name str - The project to which the domain name belongs. The default value is default.
- remark str
- The remark for the domain.
- Sequence[Zone
Tag Args] - Tags.
- zone
Name String - The domain to be created. The domain must be a second-level domain and cannot be a wildcard domain.
- project
Name String - The project to which the domain name belongs. The default value is default.
- remark String
- The remark for the domain.
- List<Property Map>
- Tags.
Outputs
All input properties are implicitly available as output properties. Additionally, the Zone resource produces the following output properties:
- Allocate
Dns List<string>Server Lists - The list of DNS servers allocated to the domain by BytePlus DNS.
- Auto
Renew bool - Whether automatic domain renewal is enabled.
- Dns
Security string - The version of DNS DDoS protection service.
- Expired
Time int - The expiration time of the domain.
- Id string
- The provider-assigned unique ID for this managed resource.
- Instance
No string - The ID of the instance. For free edition, the value of this field is null.
- Is
Ns boolCorrect - Indicates whether the configuration of NS servers is correct. If the configuration is correct, the status of the domain in BytePlus DNS is Active.
- Is
Sub boolDomain - Whether the domain is a subdomain.
- Real
Dns List<string>Server Lists - The list of DNS servers actually used by the domain.
- Record
Count int - The total number of DNS records under the domain.
- Stage int
- The status of the domain.
- Sub
Domain stringHost - The domain prefix of the subdomain. If the domain is not a subdomain, this parameter is null.
- Trade
Code string - The edition of the domain.
- Updated
At string - The update time of the domain.
- Zid int
- The ID of the domain.
- Allocate
Dns []stringServer Lists - The list of DNS servers allocated to the domain by BytePlus DNS.
- Auto
Renew bool - Whether automatic domain renewal is enabled.
- Dns
Security string - The version of DNS DDoS protection service.
- Expired
Time int - The expiration time of the domain.
- Id string
- The provider-assigned unique ID for this managed resource.
- Instance
No string - The ID of the instance. For free edition, the value of this field is null.
- Is
Ns boolCorrect - Indicates whether the configuration of NS servers is correct. If the configuration is correct, the status of the domain in BytePlus DNS is Active.
- Is
Sub boolDomain - Whether the domain is a subdomain.
- Real
Dns []stringServer Lists - The list of DNS servers actually used by the domain.
- Record
Count int - The total number of DNS records under the domain.
- Stage int
- The status of the domain.
- Sub
Domain stringHost - The domain prefix of the subdomain. If the domain is not a subdomain, this parameter is null.
- Trade
Code string - The edition of the domain.
- Updated
At string - The update time of the domain.
- Zid int
- The ID of the domain.
- allocate
Dns List<String>Server Lists - The list of DNS servers allocated to the domain by BytePlus DNS.
- auto
Renew Boolean - Whether automatic domain renewal is enabled.
- dns
Security String - The version of DNS DDoS protection service.
- expired
Time Integer - The expiration time of the domain.
- id String
- The provider-assigned unique ID for this managed resource.
- instance
No String - The ID of the instance. For free edition, the value of this field is null.
- is
Ns BooleanCorrect - Indicates whether the configuration of NS servers is correct. If the configuration is correct, the status of the domain in BytePlus DNS is Active.
- is
Sub BooleanDomain - Whether the domain is a subdomain.
- real
Dns List<String>Server Lists - The list of DNS servers actually used by the domain.
- record
Count Integer - The total number of DNS records under the domain.
- stage Integer
- The status of the domain.
- sub
Domain StringHost - The domain prefix of the subdomain. If the domain is not a subdomain, this parameter is null.
- trade
Code String - The edition of the domain.
- updated
At String - The update time of the domain.
- zid Integer
- The ID of the domain.
- allocate
Dns string[]Server Lists - The list of DNS servers allocated to the domain by BytePlus DNS.
- auto
Renew boolean - Whether automatic domain renewal is enabled.
- dns
Security string - The version of DNS DDoS protection service.
- expired
Time number - The expiration time of the domain.
- id string
- The provider-assigned unique ID for this managed resource.
- instance
No string - The ID of the instance. For free edition, the value of this field is null.
- is
Ns booleanCorrect - Indicates whether the configuration of NS servers is correct. If the configuration is correct, the status of the domain in BytePlus DNS is Active.
- is
Sub booleanDomain - Whether the domain is a subdomain.
- real
Dns string[]Server Lists - The list of DNS servers actually used by the domain.
- record
Count number - The total number of DNS records under the domain.
- stage number
- The status of the domain.
- sub
Domain stringHost - The domain prefix of the subdomain. If the domain is not a subdomain, this parameter is null.
- trade
Code string - The edition of the domain.
- updated
At string - The update time of the domain.
- zid number
- The ID of the domain.
- allocate_
dns_ Sequence[str]server_ lists - The list of DNS servers allocated to the domain by BytePlus DNS.
- auto_
renew bool - Whether automatic domain renewal is enabled.
- dns_
security str - The version of DNS DDoS protection service.
- expired_
time int - The expiration time of the domain.
- id str
- The provider-assigned unique ID for this managed resource.
- instance_
no str - The ID of the instance. For free edition, the value of this field is null.
- is_
ns_ boolcorrect - Indicates whether the configuration of NS servers is correct. If the configuration is correct, the status of the domain in BytePlus DNS is Active.
- is_
sub_ booldomain - Whether the domain is a subdomain.
- real_
dns_ Sequence[str]server_ lists - The list of DNS servers actually used by the domain.
- record_
count int - The total number of DNS records under the domain.
- stage int
- The status of the domain.
- sub_
domain_ strhost - The domain prefix of the subdomain. If the domain is not a subdomain, this parameter is null.
- trade_
code str - The edition of the domain.
- updated_
at str - The update time of the domain.
- zid int
- The ID of the domain.
- allocate
Dns List<String>Server Lists - The list of DNS servers allocated to the domain by BytePlus DNS.
- auto
Renew Boolean - Whether automatic domain renewal is enabled.
- dns
Security String - The version of DNS DDoS protection service.
- expired
Time Number - The expiration time of the domain.
- id String
- The provider-assigned unique ID for this managed resource.
- instance
No String - The ID of the instance. For free edition, the value of this field is null.
- is
Ns BooleanCorrect - Indicates whether the configuration of NS servers is correct. If the configuration is correct, the status of the domain in BytePlus DNS is Active.
- is
Sub BooleanDomain - Whether the domain is a subdomain.
- real
Dns List<String>Server Lists - The list of DNS servers actually used by the domain.
- record
Count Number - The total number of DNS records under the domain.
- stage Number
- The status of the domain.
- sub
Domain StringHost - The domain prefix of the subdomain. If the domain is not a subdomain, this parameter is null.
- trade
Code String - The edition of the domain.
- updated
At String - The update time of the domain.
- zid Number
- The ID of the domain.
Look up Existing Zone Resource
Get an existing Zone 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?: ZoneState, opts?: CustomResourceOptions): Zone
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
allocate_dns_server_lists: Optional[Sequence[str]] = None,
auto_renew: Optional[bool] = None,
dns_security: Optional[str] = None,
expired_time: Optional[int] = None,
instance_no: Optional[str] = None,
is_ns_correct: Optional[bool] = None,
is_sub_domain: Optional[bool] = None,
project_name: Optional[str] = None,
real_dns_server_lists: Optional[Sequence[str]] = None,
record_count: Optional[int] = None,
remark: Optional[str] = None,
stage: Optional[int] = None,
sub_domain_host: Optional[str] = None,
tags: Optional[Sequence[ZoneTagArgs]] = None,
trade_code: Optional[str] = None,
updated_at: Optional[str] = None,
zid: Optional[int] = None,
zone_name: Optional[str] = None) -> Zone
func GetZone(ctx *Context, name string, id IDInput, state *ZoneState, opts ...ResourceOption) (*Zone, error)
public static Zone Get(string name, Input<string> id, ZoneState? state, CustomResourceOptions? opts = null)
public static Zone get(String name, Output<String> id, ZoneState state, CustomResourceOptions options)
resources: _: type: volcengine:dns:Zone get: id: ${id}
- 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.
- Allocate
Dns List<string>Server Lists - The list of DNS servers allocated to the domain by BytePlus DNS.
- Auto
Renew bool - Whether automatic domain renewal is enabled.
- Dns
Security string - The version of DNS DDoS protection service.
- Expired
Time int - The expiration time of the domain.
- Instance
No string - The ID of the instance. For free edition, the value of this field is null.
- Is
Ns boolCorrect - Indicates whether the configuration of NS servers is correct. If the configuration is correct, the status of the domain in BytePlus DNS is Active.
- Is
Sub boolDomain - Whether the domain is a subdomain.
- Project
Name string - The project to which the domain name belongs. The default value is default.
- Real
Dns List<string>Server Lists - The list of DNS servers actually used by the domain.
- Record
Count int - The total number of DNS records under the domain.
- Remark string
- The remark for the domain.
- Stage int
- The status of the domain.
- Sub
Domain stringHost - The domain prefix of the subdomain. If the domain is not a subdomain, this parameter is null.
- List<Zone
Tag> - Tags.
- Trade
Code string - The edition of the domain.
- Updated
At string - The update time of the domain.
- Zid int
- The ID of the domain.
- Zone
Name string - The domain to be created. The domain must be a second-level domain and cannot be a wildcard domain.
- Allocate
Dns []stringServer Lists - The list of DNS servers allocated to the domain by BytePlus DNS.
- Auto
Renew bool - Whether automatic domain renewal is enabled.
- Dns
Security string - The version of DNS DDoS protection service.
- Expired
Time int - The expiration time of the domain.
- Instance
No string - The ID of the instance. For free edition, the value of this field is null.
- Is
Ns boolCorrect - Indicates whether the configuration of NS servers is correct. If the configuration is correct, the status of the domain in BytePlus DNS is Active.
- Is
Sub boolDomain - Whether the domain is a subdomain.
- Project
Name string - The project to which the domain name belongs. The default value is default.
- Real
Dns []stringServer Lists - The list of DNS servers actually used by the domain.
- Record
Count int - The total number of DNS records under the domain.
- Remark string
- The remark for the domain.
- Stage int
- The status of the domain.
- Sub
Domain stringHost - The domain prefix of the subdomain. If the domain is not a subdomain, this parameter is null.
- []Zone
Tag Args - Tags.
- Trade
Code string - The edition of the domain.
- Updated
At string - The update time of the domain.
- Zid int
- The ID of the domain.
- Zone
Name string - The domain to be created. The domain must be a second-level domain and cannot be a wildcard domain.
- allocate
Dns List<String>Server Lists - The list of DNS servers allocated to the domain by BytePlus DNS.
- auto
Renew Boolean - Whether automatic domain renewal is enabled.
- dns
Security String - The version of DNS DDoS protection service.
- expired
Time Integer - The expiration time of the domain.
- instance
No String - The ID of the instance. For free edition, the value of this field is null.
- is
Ns BooleanCorrect - Indicates whether the configuration of NS servers is correct. If the configuration is correct, the status of the domain in BytePlus DNS is Active.
- is
Sub BooleanDomain - Whether the domain is a subdomain.
- project
Name String - The project to which the domain name belongs. The default value is default.
- real
Dns List<String>Server Lists - The list of DNS servers actually used by the domain.
- record
Count Integer - The total number of DNS records under the domain.
- remark String
- The remark for the domain.
- stage Integer
- The status of the domain.
- sub
Domain StringHost - The domain prefix of the subdomain. If the domain is not a subdomain, this parameter is null.
- List<Zone
Tag> - Tags.
- trade
Code String - The edition of the domain.
- updated
At String - The update time of the domain.
- zid Integer
- The ID of the domain.
- zone
Name String - The domain to be created. The domain must be a second-level domain and cannot be a wildcard domain.
- allocate
Dns string[]Server Lists - The list of DNS servers allocated to the domain by BytePlus DNS.
- auto
Renew boolean - Whether automatic domain renewal is enabled.
- dns
Security string - The version of DNS DDoS protection service.
- expired
Time number - The expiration time of the domain.
- instance
No string - The ID of the instance. For free edition, the value of this field is null.
- is
Ns booleanCorrect - Indicates whether the configuration of NS servers is correct. If the configuration is correct, the status of the domain in BytePlus DNS is Active.
- is
Sub booleanDomain - Whether the domain is a subdomain.
- project
Name string - The project to which the domain name belongs. The default value is default.
- real
Dns string[]Server Lists - The list of DNS servers actually used by the domain.
- record
Count number - The total number of DNS records under the domain.
- remark string
- The remark for the domain.
- stage number
- The status of the domain.
- sub
Domain stringHost - The domain prefix of the subdomain. If the domain is not a subdomain, this parameter is null.
- Zone
Tag[] - Tags.
- trade
Code string - The edition of the domain.
- updated
At string - The update time of the domain.
- zid number
- The ID of the domain.
- zone
Name string - The domain to be created. The domain must be a second-level domain and cannot be a wildcard domain.
- allocate_
dns_ Sequence[str]server_ lists - The list of DNS servers allocated to the domain by BytePlus DNS.
- auto_
renew bool - Whether automatic domain renewal is enabled.
- dns_
security str - The version of DNS DDoS protection service.
- expired_
time int - The expiration time of the domain.
- instance_
no str - The ID of the instance. For free edition, the value of this field is null.
- is_
ns_ boolcorrect - Indicates whether the configuration of NS servers is correct. If the configuration is correct, the status of the domain in BytePlus DNS is Active.
- is_
sub_ booldomain - Whether the domain is a subdomain.
- project_
name str - The project to which the domain name belongs. The default value is default.
- real_
dns_ Sequence[str]server_ lists - The list of DNS servers actually used by the domain.
- record_
count int - The total number of DNS records under the domain.
- remark str
- The remark for the domain.
- stage int
- The status of the domain.
- sub_
domain_ strhost - The domain prefix of the subdomain. If the domain is not a subdomain, this parameter is null.
- Sequence[Zone
Tag Args] - Tags.
- trade_
code str - The edition of the domain.
- updated_
at str - The update time of the domain.
- zid int
- The ID of the domain.
- zone_
name str - The domain to be created. The domain must be a second-level domain and cannot be a wildcard domain.
- allocate
Dns List<String>Server Lists - The list of DNS servers allocated to the domain by BytePlus DNS.
- auto
Renew Boolean - Whether automatic domain renewal is enabled.
- dns
Security String - The version of DNS DDoS protection service.
- expired
Time Number - The expiration time of the domain.
- instance
No String - The ID of the instance. For free edition, the value of this field is null.
- is
Ns BooleanCorrect - Indicates whether the configuration of NS servers is correct. If the configuration is correct, the status of the domain in BytePlus DNS is Active.
- is
Sub BooleanDomain - Whether the domain is a subdomain.
- project
Name String - The project to which the domain name belongs. The default value is default.
- real
Dns List<String>Server Lists - The list of DNS servers actually used by the domain.
- record
Count Number - The total number of DNS records under the domain.
- remark String
- The remark for the domain.
- stage Number
- The status of the domain.
- sub
Domain StringHost - The domain prefix of the subdomain. If the domain is not a subdomain, this parameter is null.
- List<Property Map>
- Tags.
- trade
Code String - The edition of the domain.
- updated
At String - The update time of the domain.
- zid Number
- The ID of the domain.
- zone
Name String - The domain to be created. The domain must be a second-level domain and cannot be a wildcard domain.
Supporting Types
ZoneTag, ZoneTagArgs
Import
Zone can be imported using the id, e.g.
$ pulumi import volcengine:dns/zone:Zone default resource_id
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- volcengine volcengine/pulumi-volcengine
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
volcengine
Terraform Provider.