published on Thursday, Apr 2, 2026 by Byteplus
published on Thursday, Apr 2, 2026 by Byteplus
A DNS record maps a domain name to resource information within a VPC.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as bytepluscc from "@byteplus/pulumi-bytepluscc";
const privateZoneRecordDemo = new bytepluscc.privatezone.Record("PrivateZoneRecordDemo", {
host: "ccapi-test-1",
line: "default",
remark: "test",
ttl: 600,
type: "AAAA",
value: "ff03:0:0:0:0:0:0:c1",
weight: 1,
zid: 403215,
enable: true,
});
import pulumi
import pulumi_bytepluscc as bytepluscc
private_zone_record_demo = bytepluscc.privatezone.Record("PrivateZoneRecordDemo",
host="ccapi-test-1",
line="default",
remark="test",
ttl=600,
type="AAAA",
value="ff03:0:0:0:0:0:0:c1",
weight=1,
zid=403215,
enable=True)
package main
import (
"github.com/byteplus-sdk/pulumi-bytepluscc/sdk/go/bytepluscc/privatezone"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := privatezone.NewRecord(ctx, "PrivateZoneRecordDemo", &privatezone.RecordArgs{
Host: pulumi.String("ccapi-test-1"),
Line: pulumi.String("default"),
Remark: pulumi.String("test"),
Ttl: pulumi.Int(600),
Type: pulumi.String("AAAA"),
Value: pulumi.String("ff03:0:0:0:0:0:0:c1"),
Weight: pulumi.Int(1),
Zid: pulumi.Int(403215),
Enable: pulumi.Bool(true),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Bytepluscc = Byteplus.Pulumi.Bytepluscc;
return await Deployment.RunAsync(() =>
{
var privateZoneRecordDemo = new Bytepluscc.Privatezone.Record("PrivateZoneRecordDemo", new()
{
Host = "ccapi-test-1",
Line = "default",
Remark = "test",
Ttl = 600,
Type = "AAAA",
Value = "ff03:0:0:0:0:0:0:c1",
Weight = 1,
Zid = 403215,
Enable = true,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.byteplus.bytepluscc.privatezone.Record;
import com.byteplus.bytepluscc.privatezone.RecordArgs;
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 privateZoneRecordDemo = new Record("privateZoneRecordDemo", RecordArgs.builder()
.host("ccapi-test-1")
.line("default")
.remark("test")
.ttl(600)
.type("AAAA")
.value("ff03:0:0:0:0:0:0:c1")
.weight(1)
.zid(403215)
.enable(true)
.build());
}
}
resources:
privateZoneRecordDemo:
type: bytepluscc:privatezone:Record
name: PrivateZoneRecordDemo
properties:
host: ccapi-test-1
line: default
remark: test
ttl: 600
type: AAAA
value: ff03:0:0:0:0:0:0:c1
weight: 1
zid: 403215
enable: true
Create Record Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Record(name: string, args: RecordArgs, opts?: CustomResourceOptions);@overload
def Record(resource_name: str,
args: RecordArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Record(resource_name: str,
opts: Optional[ResourceOptions] = None,
host: Optional[str] = None,
type: Optional[str] = None,
value: Optional[str] = None,
zid: Optional[int] = None,
enable: Optional[bool] = None,
line: Optional[str] = None,
remark: Optional[str] = None,
ttl: Optional[int] = None,
weight: Optional[int] = None,
weight_enabled: Optional[bool] = None)func NewRecord(ctx *Context, name string, args RecordArgs, opts ...ResourceOption) (*Record, error)public Record(string name, RecordArgs args, CustomResourceOptions? opts = null)
public Record(String name, RecordArgs args)
public Record(String name, RecordArgs args, CustomResourceOptions options)
type: bytepluscc:privatezone:Record
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 RecordArgs
- 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 RecordArgs
- 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 RecordArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args RecordArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args RecordArgs
- 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 recordResource = new Bytepluscc.Privatezone.Record("recordResource", new()
{
Host = "string",
Type = "string",
Value = "string",
Zid = 0,
Enable = false,
Line = "string",
Remark = "string",
Ttl = 0,
Weight = 0,
WeightEnabled = false,
});
example, err := privatezone.NewRecord(ctx, "recordResource", &privatezone.RecordArgs{
Host: pulumi.String("string"),
Type: pulumi.String("string"),
Value: pulumi.String("string"),
Zid: pulumi.Int(0),
Enable: pulumi.Bool(false),
Line: pulumi.String("string"),
Remark: pulumi.String("string"),
Ttl: pulumi.Int(0),
Weight: pulumi.Int(0),
WeightEnabled: pulumi.Bool(false),
})
var recordResource = new Record("recordResource", RecordArgs.builder()
.host("string")
.type("string")
.value("string")
.zid(0)
.enable(false)
.line("string")
.remark("string")
.ttl(0)
.weight(0)
.weightEnabled(false)
.build());
record_resource = bytepluscc.privatezone.Record("recordResource",
host="string",
type="string",
value="string",
zid=0,
enable=False,
line="string",
remark="string",
ttl=0,
weight=0,
weight_enabled=False)
const recordResource = new bytepluscc.privatezone.Record("recordResource", {
host: "string",
type: "string",
value: "string",
zid: 0,
enable: false,
line: "string",
remark: "string",
ttl: 0,
weight: 0,
weightEnabled: false,
});
type: bytepluscc:privatezone:Record
properties:
enable: false
host: string
line: string
remark: string
ttl: 0
type: string
value: string
weight: 0
weightEnabled: false
zid: 0
Record 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 Record resource accepts the following input properties:
- Host string
- Domain prefix for the subdomain.
- Type string
- DNS record type. Valid values are: A: A record. AAAA: AAAA record. CNAME: CNAME record. TXT: TXT record. MX: MX record. PTR: PTR record. A: A record. AAAA: AAAA record. CNAME: CNAME record. TXT: TXT record. MX: MX record. PTR: PTR record.
- Value string
- Record value.
- Zid int
- Domain name ID.
- Enable bool
- Indicates whether the DNS record is enabled.
- Line string
- DNS record route, only the default route 'default' is supported.
- Remark string
- Remarks. Supports UTF-8 characters. Maximum 16 characters. Default is an empty string.
- Ttl int
- DNS record TTL (time to live), in seconds. Default is 600.
- Weight int
- Record weight. The weight takes effect only when load balancing is enabled for the domain name.
- Weight
Enabled bool - Indicates whether load balancing is enabled for this record set.
- Host string
- Domain prefix for the subdomain.
- Type string
- DNS record type. Valid values are: A: A record. AAAA: AAAA record. CNAME: CNAME record. TXT: TXT record. MX: MX record. PTR: PTR record. A: A record. AAAA: AAAA record. CNAME: CNAME record. TXT: TXT record. MX: MX record. PTR: PTR record.
- Value string
- Record value.
- Zid int
- Domain name ID.
- Enable bool
- Indicates whether the DNS record is enabled.
- Line string
- DNS record route, only the default route 'default' is supported.
- Remark string
- Remarks. Supports UTF-8 characters. Maximum 16 characters. Default is an empty string.
- Ttl int
- DNS record TTL (time to live), in seconds. Default is 600.
- Weight int
- Record weight. The weight takes effect only when load balancing is enabled for the domain name.
- Weight
Enabled bool - Indicates whether load balancing is enabled for this record set.
- host String
- Domain prefix for the subdomain.
- type String
- DNS record type. Valid values are: A: A record. AAAA: AAAA record. CNAME: CNAME record. TXT: TXT record. MX: MX record. PTR: PTR record. A: A record. AAAA: AAAA record. CNAME: CNAME record. TXT: TXT record. MX: MX record. PTR: PTR record.
- value String
- Record value.
- zid Integer
- Domain name ID.
- enable Boolean
- Indicates whether the DNS record is enabled.
- line String
- DNS record route, only the default route 'default' is supported.
- remark String
- Remarks. Supports UTF-8 characters. Maximum 16 characters. Default is an empty string.
- ttl Integer
- DNS record TTL (time to live), in seconds. Default is 600.
- weight Integer
- Record weight. The weight takes effect only when load balancing is enabled for the domain name.
- weight
Enabled Boolean - Indicates whether load balancing is enabled for this record set.
- host string
- Domain prefix for the subdomain.
- type string
- DNS record type. Valid values are: A: A record. AAAA: AAAA record. CNAME: CNAME record. TXT: TXT record. MX: MX record. PTR: PTR record. A: A record. AAAA: AAAA record. CNAME: CNAME record. TXT: TXT record. MX: MX record. PTR: PTR record.
- value string
- Record value.
- zid number
- Domain name ID.
- enable boolean
- Indicates whether the DNS record is enabled.
- line string
- DNS record route, only the default route 'default' is supported.
- remark string
- Remarks. Supports UTF-8 characters. Maximum 16 characters. Default is an empty string.
- ttl number
- DNS record TTL (time to live), in seconds. Default is 600.
- weight number
- Record weight. The weight takes effect only when load balancing is enabled for the domain name.
- weight
Enabled boolean - Indicates whether load balancing is enabled for this record set.
- host str
- Domain prefix for the subdomain.
- type str
- DNS record type. Valid values are: A: A record. AAAA: AAAA record. CNAME: CNAME record. TXT: TXT record. MX: MX record. PTR: PTR record. A: A record. AAAA: AAAA record. CNAME: CNAME record. TXT: TXT record. MX: MX record. PTR: PTR record.
- value str
- Record value.
- zid int
- Domain name ID.
- enable bool
- Indicates whether the DNS record is enabled.
- line str
- DNS record route, only the default route 'default' is supported.
- remark str
- Remarks. Supports UTF-8 characters. Maximum 16 characters. Default is an empty string.
- ttl int
- DNS record TTL (time to live), in seconds. Default is 600.
- weight int
- Record weight. The weight takes effect only when load balancing is enabled for the domain name.
- weight_
enabled bool - Indicates whether load balancing is enabled for this record set.
- host String
- Domain prefix for the subdomain.
- type String
- DNS record type. Valid values are: A: A record. AAAA: AAAA record. CNAME: CNAME record. TXT: TXT record. MX: MX record. PTR: PTR record. A: A record. AAAA: AAAA record. CNAME: CNAME record. TXT: TXT record. MX: MX record. PTR: PTR record.
- value String
- Record value.
- zid Number
- Domain name ID.
- enable Boolean
- Indicates whether the DNS record is enabled.
- line String
- DNS record route, only the default route 'default' is supported.
- remark String
- Remarks. Supports UTF-8 characters. Maximum 16 characters. Default is an empty string.
- ttl Number
- DNS record TTL (time to live), in seconds. Default is 600.
- weight Number
- Record weight. The weight takes effect only when load balancing is enabled for the domain name.
- weight
Enabled Boolean - Indicates whether load balancing is enabled for this record set.
Outputs
All input properties are implicitly available as output properties. Additionally, the Record resource produces the following output properties:
- Created
At string - Creation time of the DNS record.
- Id string
- The provider-assigned unique ID for this managed resource.
- Last
Operator string - Account ID of the most recent update to the DNS record.
- Record
Id string - DNS record ID.
- Updated
At string - Last update time of the DNS record.
- Created
At string - Creation time of the DNS record.
- Id string
- The provider-assigned unique ID for this managed resource.
- Last
Operator string - Account ID of the most recent update to the DNS record.
- Record
Id string - DNS record ID.
- Updated
At string - Last update time of the DNS record.
- created
At String - Creation time of the DNS record.
- id String
- The provider-assigned unique ID for this managed resource.
- last
Operator String - Account ID of the most recent update to the DNS record.
- record
Id String - DNS record ID.
- updated
At String - Last update time of the DNS record.
- created
At string - Creation time of the DNS record.
- id string
- The provider-assigned unique ID for this managed resource.
- last
Operator string - Account ID of the most recent update to the DNS record.
- record
Id string - DNS record ID.
- updated
At string - Last update time of the DNS record.
- created_
at str - Creation time of the DNS record.
- id str
- The provider-assigned unique ID for this managed resource.
- last_
operator str - Account ID of the most recent update to the DNS record.
- record_
id str - DNS record ID.
- updated_
at str - Last update time of the DNS record.
- created
At String - Creation time of the DNS record.
- id String
- The provider-assigned unique ID for this managed resource.
- last
Operator String - Account ID of the most recent update to the DNS record.
- record
Id String - DNS record ID.
- updated
At String - Last update time of the DNS record.
Look up Existing Record Resource
Get an existing Record 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?: RecordState, opts?: CustomResourceOptions): Record@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
created_at: Optional[str] = None,
enable: Optional[bool] = None,
host: Optional[str] = None,
last_operator: Optional[str] = None,
line: Optional[str] = None,
record_id: Optional[str] = None,
remark: Optional[str] = None,
ttl: Optional[int] = None,
type: Optional[str] = None,
updated_at: Optional[str] = None,
value: Optional[str] = None,
weight: Optional[int] = None,
weight_enabled: Optional[bool] = None,
zid: Optional[int] = None) -> Recordfunc GetRecord(ctx *Context, name string, id IDInput, state *RecordState, opts ...ResourceOption) (*Record, error)public static Record Get(string name, Input<string> id, RecordState? state, CustomResourceOptions? opts = null)public static Record get(String name, Output<String> id, RecordState state, CustomResourceOptions options)resources: _: type: bytepluscc:privatezone:Record 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.
- Created
At string - Creation time of the DNS record.
- Enable bool
- Indicates whether the DNS record is enabled.
- Host string
- Domain prefix for the subdomain.
- Last
Operator string - Account ID of the most recent update to the DNS record.
- Line string
- DNS record route, only the default route 'default' is supported.
- Record
Id string - DNS record ID.
- Remark string
- Remarks. Supports UTF-8 characters. Maximum 16 characters. Default is an empty string.
- Ttl int
- DNS record TTL (time to live), in seconds. Default is 600.
- Type string
- DNS record type. Valid values are: A: A record. AAAA: AAAA record. CNAME: CNAME record. TXT: TXT record. MX: MX record. PTR: PTR record. A: A record. AAAA: AAAA record. CNAME: CNAME record. TXT: TXT record. MX: MX record. PTR: PTR record.
- Updated
At string - Last update time of the DNS record.
- Value string
- Record value.
- Weight int
- Record weight. The weight takes effect only when load balancing is enabled for the domain name.
- Weight
Enabled bool - Indicates whether load balancing is enabled for this record set.
- Zid int
- Domain name ID.
- Created
At string - Creation time of the DNS record.
- Enable bool
- Indicates whether the DNS record is enabled.
- Host string
- Domain prefix for the subdomain.
- Last
Operator string - Account ID of the most recent update to the DNS record.
- Line string
- DNS record route, only the default route 'default' is supported.
- Record
Id string - DNS record ID.
- Remark string
- Remarks. Supports UTF-8 characters. Maximum 16 characters. Default is an empty string.
- Ttl int
- DNS record TTL (time to live), in seconds. Default is 600.
- Type string
- DNS record type. Valid values are: A: A record. AAAA: AAAA record. CNAME: CNAME record. TXT: TXT record. MX: MX record. PTR: PTR record. A: A record. AAAA: AAAA record. CNAME: CNAME record. TXT: TXT record. MX: MX record. PTR: PTR record.
- Updated
At string - Last update time of the DNS record.
- Value string
- Record value.
- Weight int
- Record weight. The weight takes effect only when load balancing is enabled for the domain name.
- Weight
Enabled bool - Indicates whether load balancing is enabled for this record set.
- Zid int
- Domain name ID.
- created
At String - Creation time of the DNS record.
- enable Boolean
- Indicates whether the DNS record is enabled.
- host String
- Domain prefix for the subdomain.
- last
Operator String - Account ID of the most recent update to the DNS record.
- line String
- DNS record route, only the default route 'default' is supported.
- record
Id String - DNS record ID.
- remark String
- Remarks. Supports UTF-8 characters. Maximum 16 characters. Default is an empty string.
- ttl Integer
- DNS record TTL (time to live), in seconds. Default is 600.
- type String
- DNS record type. Valid values are: A: A record. AAAA: AAAA record. CNAME: CNAME record. TXT: TXT record. MX: MX record. PTR: PTR record. A: A record. AAAA: AAAA record. CNAME: CNAME record. TXT: TXT record. MX: MX record. PTR: PTR record.
- updated
At String - Last update time of the DNS record.
- value String
- Record value.
- weight Integer
- Record weight. The weight takes effect only when load balancing is enabled for the domain name.
- weight
Enabled Boolean - Indicates whether load balancing is enabled for this record set.
- zid Integer
- Domain name ID.
- created
At string - Creation time of the DNS record.
- enable boolean
- Indicates whether the DNS record is enabled.
- host string
- Domain prefix for the subdomain.
- last
Operator string - Account ID of the most recent update to the DNS record.
- line string
- DNS record route, only the default route 'default' is supported.
- record
Id string - DNS record ID.
- remark string
- Remarks. Supports UTF-8 characters. Maximum 16 characters. Default is an empty string.
- ttl number
- DNS record TTL (time to live), in seconds. Default is 600.
- type string
- DNS record type. Valid values are: A: A record. AAAA: AAAA record. CNAME: CNAME record. TXT: TXT record. MX: MX record. PTR: PTR record. A: A record. AAAA: AAAA record. CNAME: CNAME record. TXT: TXT record. MX: MX record. PTR: PTR record.
- updated
At string - Last update time of the DNS record.
- value string
- Record value.
- weight number
- Record weight. The weight takes effect only when load balancing is enabled for the domain name.
- weight
Enabled boolean - Indicates whether load balancing is enabled for this record set.
- zid number
- Domain name ID.
- created_
at str - Creation time of the DNS record.
- enable bool
- Indicates whether the DNS record is enabled.
- host str
- Domain prefix for the subdomain.
- last_
operator str - Account ID of the most recent update to the DNS record.
- line str
- DNS record route, only the default route 'default' is supported.
- record_
id str - DNS record ID.
- remark str
- Remarks. Supports UTF-8 characters. Maximum 16 characters. Default is an empty string.
- ttl int
- DNS record TTL (time to live), in seconds. Default is 600.
- type str
- DNS record type. Valid values are: A: A record. AAAA: AAAA record. CNAME: CNAME record. TXT: TXT record. MX: MX record. PTR: PTR record. A: A record. AAAA: AAAA record. CNAME: CNAME record. TXT: TXT record. MX: MX record. PTR: PTR record.
- updated_
at str - Last update time of the DNS record.
- value str
- Record value.
- weight int
- Record weight. The weight takes effect only when load balancing is enabled for the domain name.
- weight_
enabled bool - Indicates whether load balancing is enabled for this record set.
- zid int
- Domain name ID.
- created
At String - Creation time of the DNS record.
- enable Boolean
- Indicates whether the DNS record is enabled.
- host String
- Domain prefix for the subdomain.
- last
Operator String - Account ID of the most recent update to the DNS record.
- line String
- DNS record route, only the default route 'default' is supported.
- record
Id String - DNS record ID.
- remark String
- Remarks. Supports UTF-8 characters. Maximum 16 characters. Default is an empty string.
- ttl Number
- DNS record TTL (time to live), in seconds. Default is 600.
- type String
- DNS record type. Valid values are: A: A record. AAAA: AAAA record. CNAME: CNAME record. TXT: TXT record. MX: MX record. PTR: PTR record. A: A record. AAAA: AAAA record. CNAME: CNAME record. TXT: TXT record. MX: MX record. PTR: PTR record.
- updated
At String - Last update time of the DNS record.
- value String
- Record value.
- weight Number
- Record weight. The weight takes effect only when load balancing is enabled for the domain name.
- weight
Enabled Boolean - Indicates whether load balancing is enabled for this record set.
- zid Number
- Domain name ID.
Import
$ pulumi import bytepluscc:privatezone/record:Record example "record_id"
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- bytepluscc byteplus-sdk/pulumi-bytepluscc
- License
- MPL-2.0
- Notes
- This Pulumi package is based on the
byteplusccTerraform Provider.
published on Thursday, Apr 2, 2026 by Byteplus
