1. Packages
  2. Volcengine
  3. API Docs
  4. dns
  5. Record
Volcengine v0.0.29 published on Tuesday, Apr 29, 2025 by Volcengine

volcengine.dns.Record

Explore with Pulumi AI

volcengine logo
Volcengine v0.0.29 published on Tuesday, Apr 29, 2025 by Volcengine

    Provides a resource to manage dns record

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as volcengine from "@volcengine/pulumi";
    
    const foo = new volcengine.dns.Record("foo", {
        host: "a.com",
        type: "A",
        value: "1.1.1.2",
        zid: 58846,
    });
    
    import pulumi
    import pulumi_volcengine as volcengine
    
    foo = volcengine.dns.Record("foo",
        host="a.com",
        type="A",
        value="1.1.1.2",
        zid=58846)
    
    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.NewRecord(ctx, "foo", &dns.RecordArgs{
    			Host:  pulumi.String("a.com"),
    			Type:  pulumi.String("A"),
    			Value: pulumi.String("1.1.1.2"),
    			Zid:   pulumi.Int(58846),
    		})
    		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.Record("foo", new()
        {
            Host = "a.com",
            Type = "A",
            Value = "1.1.1.2",
            Zid = 58846,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.volcengine.dns.Record;
    import com.pulumi.volcengine.dns.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 foo = new Record("foo", RecordArgs.builder()        
                .host("a.com")
                .type("A")
                .value("1.1.1.2")
                .zid(58846)
                .build());
    
        }
    }
    
    resources:
      foo:
        type: volcengine:dns:Record
        properties:
          host: a.com
          type: A
          value: 1.1.1.2
          zid: 58846
    

    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,
               line: Optional[str] = None,
               remark: Optional[str] = None,
               ttl: Optional[int] = None,
               weight: Optional[int] = 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: volcengine:dns: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 Volcengine.Dns.Record("recordResource", new()
    {
        Host = "string",
        Type = "string",
        Value = "string",
        Zid = 0,
        Line = "string",
        Remark = "string",
        Ttl = 0,
        Weight = 0,
    });
    
    example, err := dns.NewRecord(ctx, "recordResource", &dns.RecordArgs{
    	Host:   pulumi.String("string"),
    	Type:   pulumi.String("string"),
    	Value:  pulumi.String("string"),
    	Zid:    pulumi.Int(0),
    	Line:   pulumi.String("string"),
    	Remark: pulumi.String("string"),
    	Ttl:    pulumi.Int(0),
    	Weight: pulumi.Int(0),
    })
    
    var recordResource = new com.pulumi.volcengine.dns.Record("recordResource", com.pulumi.volcengine.dns.RecordArgs.builder()
        .host("string")
        .type("string")
        .value("string")
        .zid(0)
        .line("string")
        .remark("string")
        .ttl(0)
        .weight(0)
        .build());
    
    record_resource = volcengine.dns.Record("recordResource",
        host="string",
        type="string",
        value="string",
        zid=0,
        line="string",
        remark="string",
        ttl=0,
        weight=0)
    
    const recordResource = new volcengine.dns.Record("recordResource", {
        host: "string",
        type: "string",
        value: "string",
        zid: 0,
        line: "string",
        remark: "string",
        ttl: 0,
        weight: 0,
    });
    
    type: volcengine:dns:Record
    properties:
        host: string
        line: string
        remark: string
        ttl: 0
        type: string
        value: string
        weight: 0
        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
    The host record, which is the domain prefix of the subdomain.
    Type string
    The record type.
    Value string
    The value of the DNS record.
    Zid int
    The ID of the domain to which you want to add a DNS record.
    Line string
    The value of the DNS record.
    Remark string
    The remark for the DNS record.
    Ttl int
    The Time-To-Live (TTL) of the DNS record, in seconds.
    Weight int
    The weight of the DNS record.
    Host string
    The host record, which is the domain prefix of the subdomain.
    Type string
    The record type.
    Value string
    The value of the DNS record.
    Zid int
    The ID of the domain to which you want to add a DNS record.
    Line string
    The value of the DNS record.
    Remark string
    The remark for the DNS record.
    Ttl int
    The Time-To-Live (TTL) of the DNS record, in seconds.
    Weight int
    The weight of the DNS record.
    host String
    The host record, which is the domain prefix of the subdomain.
    type String
    The record type.
    value String
    The value of the DNS record.
    zid Integer
    The ID of the domain to which you want to add a DNS record.
    line String
    The value of the DNS record.
    remark String
    The remark for the DNS record.
    ttl Integer
    The Time-To-Live (TTL) of the DNS record, in seconds.
    weight Integer
    The weight of the DNS record.
    host string
    The host record, which is the domain prefix of the subdomain.
    type string
    The record type.
    value string
    The value of the DNS record.
    zid number
    The ID of the domain to which you want to add a DNS record.
    line string
    The value of the DNS record.
    remark string
    The remark for the DNS record.
    ttl number
    The Time-To-Live (TTL) of the DNS record, in seconds.
    weight number
    The weight of the DNS record.
    host str
    The host record, which is the domain prefix of the subdomain.
    type str
    The record type.
    value str
    The value of the DNS record.
    zid int
    The ID of the domain to which you want to add a DNS record.
    line str
    The value of the DNS record.
    remark str
    The remark for the DNS record.
    ttl int
    The Time-To-Live (TTL) of the DNS record, in seconds.
    weight int
    The weight of the DNS record.
    host String
    The host record, which is the domain prefix of the subdomain.
    type String
    The record type.
    value String
    The value of the DNS record.
    zid Number
    The ID of the domain to which you want to add a DNS record.
    line String
    The value of the DNS record.
    remark String
    The remark for the DNS record.
    ttl Number
    The Time-To-Live (TTL) of the DNS record, in seconds.
    weight Number
    The weight of the DNS record.

    Outputs

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

    CreatedAt string
    The creation time of the domain.
    Enable bool
    Whether the DNS record is enabled.
    Id string
    The provider-assigned unique ID for this managed resource.
    Operators List<string>
    The account ID that called this API.
    Pqdn string
    The account ID that called this API.
    RecordId string
    The ID of the DNS record.
    RecordSetId string
    The ID of the record set where the DNS record is located.
    Tags List<string>
    The tag information of the DNS record.
    UpdatedAt string
    The update time of the domain.
    CreatedAt string
    The creation time of the domain.
    Enable bool
    Whether the DNS record is enabled.
    Id string
    The provider-assigned unique ID for this managed resource.
    Operators []string
    The account ID that called this API.
    Pqdn string
    The account ID that called this API.
    RecordId string
    The ID of the DNS record.
    RecordSetId string
    The ID of the record set where the DNS record is located.
    Tags []string
    The tag information of the DNS record.
    UpdatedAt string
    The update time of the domain.
    createdAt String
    The creation time of the domain.
    enable Boolean
    Whether the DNS record is enabled.
    id String
    The provider-assigned unique ID for this managed resource.
    operators List<String>
    The account ID that called this API.
    pqdn String
    The account ID that called this API.
    recordId String
    The ID of the DNS record.
    recordSetId String
    The ID of the record set where the DNS record is located.
    tags List<String>
    The tag information of the DNS record.
    updatedAt String
    The update time of the domain.
    createdAt string
    The creation time of the domain.
    enable boolean
    Whether the DNS record is enabled.
    id string
    The provider-assigned unique ID for this managed resource.
    operators string[]
    The account ID that called this API.
    pqdn string
    The account ID that called this API.
    recordId string
    The ID of the DNS record.
    recordSetId string
    The ID of the record set where the DNS record is located.
    tags string[]
    The tag information of the DNS record.
    updatedAt string
    The update time of the domain.
    created_at str
    The creation time of the domain.
    enable bool
    Whether the DNS record is enabled.
    id str
    The provider-assigned unique ID for this managed resource.
    operators Sequence[str]
    The account ID that called this API.
    pqdn str
    The account ID that called this API.
    record_id str
    The ID of the DNS record.
    record_set_id str
    The ID of the record set where the DNS record is located.
    tags Sequence[str]
    The tag information of the DNS record.
    updated_at str
    The update time of the domain.
    createdAt String
    The creation time of the domain.
    enable Boolean
    Whether the DNS record is enabled.
    id String
    The provider-assigned unique ID for this managed resource.
    operators List<String>
    The account ID that called this API.
    pqdn String
    The account ID that called this API.
    recordId String
    The ID of the DNS record.
    recordSetId String
    The ID of the record set where the DNS record is located.
    tags List<String>
    The tag information of the DNS record.
    updatedAt String
    The update time of the domain.

    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,
            line: Optional[str] = None,
            operators: Optional[Sequence[str]] = None,
            pqdn: Optional[str] = None,
            record_id: Optional[str] = None,
            record_set_id: Optional[str] = None,
            remark: Optional[str] = None,
            tags: Optional[Sequence[str]] = None,
            ttl: Optional[int] = None,
            type: Optional[str] = None,
            updated_at: Optional[str] = None,
            value: Optional[str] = None,
            weight: Optional[int] = None,
            zid: Optional[int] = None) -> Record
    func 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: volcengine:dns: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.
    The following state arguments are supported:
    CreatedAt string
    The creation time of the domain.
    Enable bool
    Whether the DNS record is enabled.
    Host string
    The host record, which is the domain prefix of the subdomain.
    Line string
    The value of the DNS record.
    Operators List<string>
    The account ID that called this API.
    Pqdn string
    The account ID that called this API.
    RecordId string
    The ID of the DNS record.
    RecordSetId string
    The ID of the record set where the DNS record is located.
    Remark string
    The remark for the DNS record.
    Tags List<string>
    The tag information of the DNS record.
    Ttl int
    The Time-To-Live (TTL) of the DNS record, in seconds.
    Type string
    The record type.
    UpdatedAt string
    The update time of the domain.
    Value string
    The value of the DNS record.
    Weight int
    The weight of the DNS record.
    Zid int
    The ID of the domain to which you want to add a DNS record.
    CreatedAt string
    The creation time of the domain.
    Enable bool
    Whether the DNS record is enabled.
    Host string
    The host record, which is the domain prefix of the subdomain.
    Line string
    The value of the DNS record.
    Operators []string
    The account ID that called this API.
    Pqdn string
    The account ID that called this API.
    RecordId string
    The ID of the DNS record.
    RecordSetId string
    The ID of the record set where the DNS record is located.
    Remark string
    The remark for the DNS record.
    Tags []string
    The tag information of the DNS record.
    Ttl int
    The Time-To-Live (TTL) of the DNS record, in seconds.
    Type string
    The record type.
    UpdatedAt string
    The update time of the domain.
    Value string
    The value of the DNS record.
    Weight int
    The weight of the DNS record.
    Zid int
    The ID of the domain to which you want to add a DNS record.
    createdAt String
    The creation time of the domain.
    enable Boolean
    Whether the DNS record is enabled.
    host String
    The host record, which is the domain prefix of the subdomain.
    line String
    The value of the DNS record.
    operators List<String>
    The account ID that called this API.
    pqdn String
    The account ID that called this API.
    recordId String
    The ID of the DNS record.
    recordSetId String
    The ID of the record set where the DNS record is located.
    remark String
    The remark for the DNS record.
    tags List<String>
    The tag information of the DNS record.
    ttl Integer
    The Time-To-Live (TTL) of the DNS record, in seconds.
    type String
    The record type.
    updatedAt String
    The update time of the domain.
    value String
    The value of the DNS record.
    weight Integer
    The weight of the DNS record.
    zid Integer
    The ID of the domain to which you want to add a DNS record.
    createdAt string
    The creation time of the domain.
    enable boolean
    Whether the DNS record is enabled.
    host string
    The host record, which is the domain prefix of the subdomain.
    line string
    The value of the DNS record.
    operators string[]
    The account ID that called this API.
    pqdn string
    The account ID that called this API.
    recordId string
    The ID of the DNS record.
    recordSetId string
    The ID of the record set where the DNS record is located.
    remark string
    The remark for the DNS record.
    tags string[]
    The tag information of the DNS record.
    ttl number
    The Time-To-Live (TTL) of the DNS record, in seconds.
    type string
    The record type.
    updatedAt string
    The update time of the domain.
    value string
    The value of the DNS record.
    weight number
    The weight of the DNS record.
    zid number
    The ID of the domain to which you want to add a DNS record.
    created_at str
    The creation time of the domain.
    enable bool
    Whether the DNS record is enabled.
    host str
    The host record, which is the domain prefix of the subdomain.
    line str
    The value of the DNS record.
    operators Sequence[str]
    The account ID that called this API.
    pqdn str
    The account ID that called this API.
    record_id str
    The ID of the DNS record.
    record_set_id str
    The ID of the record set where the DNS record is located.
    remark str
    The remark for the DNS record.
    tags Sequence[str]
    The tag information of the DNS record.
    ttl int
    The Time-To-Live (TTL) of the DNS record, in seconds.
    type str
    The record type.
    updated_at str
    The update time of the domain.
    value str
    The value of the DNS record.
    weight int
    The weight of the DNS record.
    zid int
    The ID of the domain to which you want to add a DNS record.
    createdAt String
    The creation time of the domain.
    enable Boolean
    Whether the DNS record is enabled.
    host String
    The host record, which is the domain prefix of the subdomain.
    line String
    The value of the DNS record.
    operators List<String>
    The account ID that called this API.
    pqdn String
    The account ID that called this API.
    recordId String
    The ID of the DNS record.
    recordSetId String
    The ID of the record set where the DNS record is located.
    remark String
    The remark for the DNS record.
    tags List<String>
    The tag information of the DNS record.
    ttl Number
    The Time-To-Live (TTL) of the DNS record, in seconds.
    type String
    The record type.
    updatedAt String
    The update time of the domain.
    value String
    The value of the DNS record.
    weight Number
    The weight of the DNS record.
    zid Number
    The ID of the domain to which you want to add a DNS record.

    Import

    DnsRecord can be imported using the id, e.g.

    $ pulumi import volcengine:dns/record:Record default ZID:recordId
    

    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.
    volcengine logo
    Volcengine v0.0.29 published on Tuesday, Apr 29, 2025 by Volcengine