Class DomainRecord
Provides a Linode Domain Record resource. This can be used to create, modify, and delete Linodes Domain Records. For more information, see DNS Manager and the Linode APIv4 docs.
Example Usage
using Pulumi;
using Linode = Pulumi.Linode;
class MyStack : Stack
{
public MyStack()
{
var foobarDomain = new Linode.Domain("foobarDomain", new Linode.DomainArgs
{
Domain = "foobar.example",
SoaEmail = "example@foobar.example",
Type = "master",
});
var foobarDomainRecord = new Linode.DomainRecord("foobarDomainRecord", new Linode.DomainRecordArgs
{
DomainId = foobarDomain.Id,
Name = "www",
RecordType = "CNAME",
Target = "foobar.example",
});
}
}
Attributes
This resource exports no additional attributes.
Inherited Members
Namespace: Pulumi.Linode
Assembly: Pulumi.Linode.dll
Syntax
public class DomainRecord : CustomResource
Constructors
View SourceDomainRecord(String, DomainRecordArgs, CustomResourceOptions)
Create a DomainRecord resource with the given unique name, arguments, and options.
Declaration
public DomainRecord(string name, DomainRecordArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| DomainRecordArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceDomainId
The ID of the Domain to access. Changing domain_id forces the creation of a new Linode Domain Record..
Declaration
public Output<int> DomainId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Int32> |
Name
The name of this Record. Setting this is invalid for SRV records as it is generated by the API. This field's actual usage depends on the type of record this represents. For A and AAAA records, this is the subdomain being associated with an IP address.
Declaration
public Output<string> Name { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Port
The port this Record points to.
Declaration
public Output<int?> Port { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Int32>> |
Priority
The priority of the target host. Lower values are preferred.
Declaration
public Output<int?> Priority { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Int32>> |
Protocol
The protocol this Record's service communicates with. Only valid for SRV records.
Declaration
public Output<string> Protocol { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
RecordType
The type of Record this is in the DNS system. For example, A records associate a domain name with an IPv4 address, and AAAA records associate a domain name with an IPv6 address. Changing record_type forces the creation of a new Linode Domain Record..
Declaration
public Output<string> RecordType { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Service
The service this Record identified. Only valid for SRV records.
Declaration
public Output<string> Service { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Tag
The tag portion of a CAA record. It is invalid to set this on other record types.
Declaration
public Output<string> Tag { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Target
The target for this Record. This field's actual usage depends on the type of record this represents. For A and AAAA records, this is the address the named Domain should resolve to.
Declaration
public Output<string> Target { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
TtlSec
'Time to Live' - the amount of time in seconds that this Domain's records may be cached by resolvers or other domain servers. Valid values are 300, 3600, 7200, 14400, 28800, 57600, 86400, 172800, 345600, 604800, 1209600, and 2419200 - any other value will be rounded to the nearest valid value.
Declaration
public Output<int?> TtlSec { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Int32>> |
Weight
The relative weight of this Record. Higher values are preferred.
Declaration
public Output<int?> Weight { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Int32>> |
Methods
View SourceGet(String, Input<String>, DomainRecordState, CustomResourceOptions)
Get an existing DomainRecord resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static DomainRecord Get(string name, Input<string> id, DomainRecordState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| DomainRecordState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| DomainRecord |