tencentcloud.DnspodRecord
Explore with Pulumi AI
Provide a resource to create a DnsPod record.
NOTE: Versions before v1.81.43 (including v1.81.43) do not support modifying remark or modifying remark has bug.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const demo = new tencentcloud.DnspodRecord("demo", {
domain: "mikatong.com",
recordLine: "默认",
recordType: "A",
subDomain: "demo",
value: "1.2.3.9",
});
import pulumi
import pulumi_tencentcloud as tencentcloud
demo = tencentcloud.DnspodRecord("demo",
domain="mikatong.com",
record_line="默认",
record_type="A",
sub_domain="demo",
value="1.2.3.9")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := tencentcloud.NewDnspodRecord(ctx, "demo", &tencentcloud.DnspodRecordArgs{
Domain: pulumi.String("mikatong.com"),
RecordLine: pulumi.String("默认"),
RecordType: pulumi.String("A"),
SubDomain: pulumi.String("demo"),
Value: pulumi.String("1.2.3.9"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Tencentcloud = Pulumi.Tencentcloud;
return await Deployment.RunAsync(() =>
{
var demo = new Tencentcloud.DnspodRecord("demo", new()
{
Domain = "mikatong.com",
RecordLine = "默认",
RecordType = "A",
SubDomain = "demo",
Value = "1.2.3.9",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.DnspodRecord;
import com.pulumi.tencentcloud.DnspodRecordArgs;
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 demo = new DnspodRecord("demo", DnspodRecordArgs.builder()
.domain("mikatong.com")
.recordLine("默认")
.recordType("A")
.subDomain("demo")
.value("1.2.3.9")
.build());
}
}
resources:
demo:
type: tencentcloud:DnspodRecord
properties:
domain: mikatong.com
recordLine: 默认
recordType: A
subDomain: demo
value: 1.2.3.9
Create DnspodRecord Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new DnspodRecord(name: string, args: DnspodRecordArgs, opts?: CustomResourceOptions);
@overload
def DnspodRecord(resource_name: str,
args: DnspodRecordArgs,
opts: Optional[ResourceOptions] = None)
@overload
def DnspodRecord(resource_name: str,
opts: Optional[ResourceOptions] = None,
domain: Optional[str] = None,
record_line: Optional[str] = None,
record_type: Optional[str] = None,
value: Optional[str] = None,
dnspod_record_id: Optional[str] = None,
mx: Optional[float] = None,
remark: Optional[str] = None,
status: Optional[str] = None,
sub_domain: Optional[str] = None,
ttl: Optional[float] = None,
weight: Optional[float] = None)
func NewDnspodRecord(ctx *Context, name string, args DnspodRecordArgs, opts ...ResourceOption) (*DnspodRecord, error)
public DnspodRecord(string name, DnspodRecordArgs args, CustomResourceOptions? opts = null)
public DnspodRecord(String name, DnspodRecordArgs args)
public DnspodRecord(String name, DnspodRecordArgs args, CustomResourceOptions options)
type: tencentcloud:DnspodRecord
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 DnspodRecordArgs
- 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 DnspodRecordArgs
- 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 DnspodRecordArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args DnspodRecordArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args DnspodRecordArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
DnspodRecord 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 DnspodRecord resource accepts the following input properties:
- Domain string
- The Domain.
- Record
Line string - The record line.
- Record
Type string - The record type.
- Value string
- The record value.
- Dnspod
Record stringId - ID of the resource.
- Mx double
- MX priority, valid when the record type is MX, range 1-20. Note: must set when record type equal MX.
- Remark string
- The Remark of record.
- Status string
- Records the initial state, with values ranging from ENABLE and DISABLE. The default is ENABLE, and if DISABLE is passed in, resolution will not take effect and the limits of load balancing will not be verified.
- Sub
Domain string - The host records, default value is
@
. - Ttl double
- TTL, the range is 1-604800, and the minimum value of different levels of domain names is different. Default is 600.
- Weight double
- Weight information. An integer from 0 to 100. Only enterprise VIP domain names are available, 0 means off, does not pass this parameter, means that the weight information is not set. Default is 0.
- Domain string
- The Domain.
- Record
Line string - The record line.
- Record
Type string - The record type.
- Value string
- The record value.
- Dnspod
Record stringId - ID of the resource.
- Mx float64
- MX priority, valid when the record type is MX, range 1-20. Note: must set when record type equal MX.
- Remark string
- The Remark of record.
- Status string
- Records the initial state, with values ranging from ENABLE and DISABLE. The default is ENABLE, and if DISABLE is passed in, resolution will not take effect and the limits of load balancing will not be verified.
- Sub
Domain string - The host records, default value is
@
. - Ttl float64
- TTL, the range is 1-604800, and the minimum value of different levels of domain names is different. Default is 600.
- Weight float64
- Weight information. An integer from 0 to 100. Only enterprise VIP domain names are available, 0 means off, does not pass this parameter, means that the weight information is not set. Default is 0.
- domain String
- The Domain.
- record
Line String - The record line.
- record
Type String - The record type.
- value String
- The record value.
- dnspod
Record StringId - ID of the resource.
- mx Double
- MX priority, valid when the record type is MX, range 1-20. Note: must set when record type equal MX.
- remark String
- The Remark of record.
- status String
- Records the initial state, with values ranging from ENABLE and DISABLE. The default is ENABLE, and if DISABLE is passed in, resolution will not take effect and the limits of load balancing will not be verified.
- sub
Domain String - The host records, default value is
@
. - ttl Double
- TTL, the range is 1-604800, and the minimum value of different levels of domain names is different. Default is 600.
- weight Double
- Weight information. An integer from 0 to 100. Only enterprise VIP domain names are available, 0 means off, does not pass this parameter, means that the weight information is not set. Default is 0.
- domain string
- The Domain.
- record
Line string - The record line.
- record
Type string - The record type.
- value string
- The record value.
- dnspod
Record stringId - ID of the resource.
- mx number
- MX priority, valid when the record type is MX, range 1-20. Note: must set when record type equal MX.
- remark string
- The Remark of record.
- status string
- Records the initial state, with values ranging from ENABLE and DISABLE. The default is ENABLE, and if DISABLE is passed in, resolution will not take effect and the limits of load balancing will not be verified.
- sub
Domain string - The host records, default value is
@
. - ttl number
- TTL, the range is 1-604800, and the minimum value of different levels of domain names is different. Default is 600.
- weight number
- Weight information. An integer from 0 to 100. Only enterprise VIP domain names are available, 0 means off, does not pass this parameter, means that the weight information is not set. Default is 0.
- domain str
- The Domain.
- record_
line str - The record line.
- record_
type str - The record type.
- value str
- The record value.
- dnspod_
record_ strid - ID of the resource.
- mx float
- MX priority, valid when the record type is MX, range 1-20. Note: must set when record type equal MX.
- remark str
- The Remark of record.
- status str
- Records the initial state, with values ranging from ENABLE and DISABLE. The default is ENABLE, and if DISABLE is passed in, resolution will not take effect and the limits of load balancing will not be verified.
- sub_
domain str - The host records, default value is
@
. - ttl float
- TTL, the range is 1-604800, and the minimum value of different levels of domain names is different. Default is 600.
- weight float
- Weight information. An integer from 0 to 100. Only enterprise VIP domain names are available, 0 means off, does not pass this parameter, means that the weight information is not set. Default is 0.
- domain String
- The Domain.
- record
Line String - The record line.
- record
Type String - The record type.
- value String
- The record value.
- dnspod
Record StringId - ID of the resource.
- mx Number
- MX priority, valid when the record type is MX, range 1-20. Note: must set when record type equal MX.
- remark String
- The Remark of record.
- status String
- Records the initial state, with values ranging from ENABLE and DISABLE. The default is ENABLE, and if DISABLE is passed in, resolution will not take effect and the limits of load balancing will not be verified.
- sub
Domain String - The host records, default value is
@
. - ttl Number
- TTL, the range is 1-604800, and the minimum value of different levels of domain names is different. Default is 600.
- weight Number
- Weight information. An integer from 0 to 100. Only enterprise VIP domain names are available, 0 means off, does not pass this parameter, means that the weight information is not set. Default is 0.
Outputs
All input properties are implicitly available as output properties. Additionally, the DnspodRecord resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Monitor
Status string - The monitoring status of the record.
- Id string
- The provider-assigned unique ID for this managed resource.
- Monitor
Status string - The monitoring status of the record.
- id String
- The provider-assigned unique ID for this managed resource.
- monitor
Status String - The monitoring status of the record.
- id string
- The provider-assigned unique ID for this managed resource.
- monitor
Status string - The monitoring status of the record.
- id str
- The provider-assigned unique ID for this managed resource.
- monitor_
status str - The monitoring status of the record.
- id String
- The provider-assigned unique ID for this managed resource.
- monitor
Status String - The monitoring status of the record.
Look up Existing DnspodRecord Resource
Get an existing DnspodRecord 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?: DnspodRecordState, opts?: CustomResourceOptions): DnspodRecord
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
dnspod_record_id: Optional[str] = None,
domain: Optional[str] = None,
monitor_status: Optional[str] = None,
mx: Optional[float] = None,
record_line: Optional[str] = None,
record_type: Optional[str] = None,
remark: Optional[str] = None,
status: Optional[str] = None,
sub_domain: Optional[str] = None,
ttl: Optional[float] = None,
value: Optional[str] = None,
weight: Optional[float] = None) -> DnspodRecord
func GetDnspodRecord(ctx *Context, name string, id IDInput, state *DnspodRecordState, opts ...ResourceOption) (*DnspodRecord, error)
public static DnspodRecord Get(string name, Input<string> id, DnspodRecordState? state, CustomResourceOptions? opts = null)
public static DnspodRecord get(String name, Output<String> id, DnspodRecordState state, CustomResourceOptions options)
resources: _: type: tencentcloud:DnspodRecord 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.
- Dnspod
Record stringId - ID of the resource.
- Domain string
- The Domain.
- Monitor
Status string - The monitoring status of the record.
- Mx double
- MX priority, valid when the record type is MX, range 1-20. Note: must set when record type equal MX.
- Record
Line string - The record line.
- Record
Type string - The record type.
- Remark string
- The Remark of record.
- Status string
- Records the initial state, with values ranging from ENABLE and DISABLE. The default is ENABLE, and if DISABLE is passed in, resolution will not take effect and the limits of load balancing will not be verified.
- Sub
Domain string - The host records, default value is
@
. - Ttl double
- TTL, the range is 1-604800, and the minimum value of different levels of domain names is different. Default is 600.
- Value string
- The record value.
- Weight double
- Weight information. An integer from 0 to 100. Only enterprise VIP domain names are available, 0 means off, does not pass this parameter, means that the weight information is not set. Default is 0.
- Dnspod
Record stringId - ID of the resource.
- Domain string
- The Domain.
- Monitor
Status string - The monitoring status of the record.
- Mx float64
- MX priority, valid when the record type is MX, range 1-20. Note: must set when record type equal MX.
- Record
Line string - The record line.
- Record
Type string - The record type.
- Remark string
- The Remark of record.
- Status string
- Records the initial state, with values ranging from ENABLE and DISABLE. The default is ENABLE, and if DISABLE is passed in, resolution will not take effect and the limits of load balancing will not be verified.
- Sub
Domain string - The host records, default value is
@
. - Ttl float64
- TTL, the range is 1-604800, and the minimum value of different levels of domain names is different. Default is 600.
- Value string
- The record value.
- Weight float64
- Weight information. An integer from 0 to 100. Only enterprise VIP domain names are available, 0 means off, does not pass this parameter, means that the weight information is not set. Default is 0.
- dnspod
Record StringId - ID of the resource.
- domain String
- The Domain.
- monitor
Status String - The monitoring status of the record.
- mx Double
- MX priority, valid when the record type is MX, range 1-20. Note: must set when record type equal MX.
- record
Line String - The record line.
- record
Type String - The record type.
- remark String
- The Remark of record.
- status String
- Records the initial state, with values ranging from ENABLE and DISABLE. The default is ENABLE, and if DISABLE is passed in, resolution will not take effect and the limits of load balancing will not be verified.
- sub
Domain String - The host records, default value is
@
. - ttl Double
- TTL, the range is 1-604800, and the minimum value of different levels of domain names is different. Default is 600.
- value String
- The record value.
- weight Double
- Weight information. An integer from 0 to 100. Only enterprise VIP domain names are available, 0 means off, does not pass this parameter, means that the weight information is not set. Default is 0.
- dnspod
Record stringId - ID of the resource.
- domain string
- The Domain.
- monitor
Status string - The monitoring status of the record.
- mx number
- MX priority, valid when the record type is MX, range 1-20. Note: must set when record type equal MX.
- record
Line string - The record line.
- record
Type string - The record type.
- remark string
- The Remark of record.
- status string
- Records the initial state, with values ranging from ENABLE and DISABLE. The default is ENABLE, and if DISABLE is passed in, resolution will not take effect and the limits of load balancing will not be verified.
- sub
Domain string - The host records, default value is
@
. - ttl number
- TTL, the range is 1-604800, and the minimum value of different levels of domain names is different. Default is 600.
- value string
- The record value.
- weight number
- Weight information. An integer from 0 to 100. Only enterprise VIP domain names are available, 0 means off, does not pass this parameter, means that the weight information is not set. Default is 0.
- dnspod_
record_ strid - ID of the resource.
- domain str
- The Domain.
- monitor_
status str - The monitoring status of the record.
- mx float
- MX priority, valid when the record type is MX, range 1-20. Note: must set when record type equal MX.
- record_
line str - The record line.
- record_
type str - The record type.
- remark str
- The Remark of record.
- status str
- Records the initial state, with values ranging from ENABLE and DISABLE. The default is ENABLE, and if DISABLE is passed in, resolution will not take effect and the limits of load balancing will not be verified.
- sub_
domain str - The host records, default value is
@
. - ttl float
- TTL, the range is 1-604800, and the minimum value of different levels of domain names is different. Default is 600.
- value str
- The record value.
- weight float
- Weight information. An integer from 0 to 100. Only enterprise VIP domain names are available, 0 means off, does not pass this parameter, means that the weight information is not set. Default is 0.
- dnspod
Record StringId - ID of the resource.
- domain String
- The Domain.
- monitor
Status String - The monitoring status of the record.
- mx Number
- MX priority, valid when the record type is MX, range 1-20. Note: must set when record type equal MX.
- record
Line String - The record line.
- record
Type String - The record type.
- remark String
- The Remark of record.
- status String
- Records the initial state, with values ranging from ENABLE and DISABLE. The default is ENABLE, and if DISABLE is passed in, resolution will not take effect and the limits of load balancing will not be verified.
- sub
Domain String - The host records, default value is
@
. - ttl Number
- TTL, the range is 1-604800, and the minimum value of different levels of domain names is different. Default is 600.
- value String
- The record value.
- weight Number
- Weight information. An integer from 0 to 100. Only enterprise VIP domain names are available, 0 means off, does not pass this parameter, means that the weight information is not set. Default is 0.
Import
DnsPod Domain record can be imported using the Domain#RecordId, e.g.
$ pulumi import tencentcloud:index/dnspodRecord:DnspodRecord demo arunma.com#1194109872
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- tencentcloud tencentcloudstack/terraform-provider-tencentcloud
- License
- Notes
- This Pulumi package is based on the
tencentcloud
Terraform Provider.