Record

class Record : KotlinCustomResource

Provides a ESA Record resource. For information about ESA Record and how to use it, see What is Record.

NOTE: Available since v1.240.0.

Example Usage

Basic Usage

import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const config = new pulumi.Config();
const name = config.get("name") || "terraform-example";
const _default = new alicloud.esa.RatePlanInstance("default", {
type: "NS",
autoRenew: false,
period: 1,
paymentType: "Subscription",
coverage: "overseas",
autoPay: true,
planName: "high",
});
const defaultSite = new alicloud.esa.Site("default", {
siteName: "idlexamplerecord.com",
instanceId: _default.id,
coverage: "overseas",
accessType: "NS",
});
const defaultRecord = new alicloud.esa.Record("default", {
data: {
value: "www.eerrraaa.com",
weight: 1,
priority: 1,
port: 80,
},
ttl: 100,
recordName: "_udp._sip.idlexamplerecord.com",
comment: "This is a remark",
siteId: defaultSite.id,
recordType: "SRV",
});
import pulumi
import pulumi_alicloud as alicloud
config = pulumi.Config()
name = config.get("name")
if name is None:
name = "terraform-example"
default = alicloud.esa.RatePlanInstance("default",
type="NS",
auto_renew=False,
period=1,
payment_type="Subscription",
coverage="overseas",
auto_pay=True,
plan_name="high")
default_site = alicloud.esa.Site("default",
site_name="idlexamplerecord.com",
instance_id=default.id,
coverage="overseas",
access_type="NS")
default_record = alicloud.esa.Record("default",
data={
"value": "www.eerrraaa.com",
"weight": 1,
"priority": 1,
"port": 80,
},
ttl=100,
record_name="_udp._sip.idlexamplerecord.com",
comment="This is a remark",
site_id=default_site.id,
record_type="SRV")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var name = config.Get("name") ?? "terraform-example";
var @default = new AliCloud.Esa.RatePlanInstance("default", new()
{
Type = "NS",
AutoRenew = false,
Period = 1,
PaymentType = "Subscription",
Coverage = "overseas",
AutoPay = true,
PlanName = "high",
});
var defaultSite = new AliCloud.Esa.Site("default", new()
{
SiteName = "idlexamplerecord.com",
InstanceId = @default.Id,
Coverage = "overseas",
AccessType = "NS",
});
var defaultRecord = new AliCloud.Esa.Record("default", new()
{
Data = new AliCloud.Esa.Inputs.RecordDataArgs
{
Value = "www.eerrraaa.com",
Weight = 1,
Priority = 1,
Port = 80,
},
Ttl = 100,
RecordName = "_udp._sip.idlexamplerecord.com",
Comment = "This is a remark",
SiteId = defaultSite.Id,
RecordType = "SRV",
});
});
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/esa"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
name := "terraform-example"
if param := cfg.Get("name"); param != "" {
name = param
}
_default, err := esa.NewRatePlanInstance(ctx, "default", &esa.RatePlanInstanceArgs{
Type: pulumi.String("NS"),
AutoRenew: pulumi.Bool(false),
Period: pulumi.Int(1),
PaymentType: pulumi.String("Subscription"),
Coverage: pulumi.String("overseas"),
AutoPay: pulumi.Bool(true),
PlanName: pulumi.String("high"),
})
if err != nil {
return err
}
defaultSite, err := esa.NewSite(ctx, "default", &esa.SiteArgs{
SiteName: pulumi.String("idlexamplerecord.com"),
InstanceId: _default.ID(),
Coverage: pulumi.String("overseas"),
AccessType: pulumi.String("NS"),
})
if err != nil {
return err
}
_, err = esa.NewRecord(ctx, "default", &esa.RecordArgs{
Data: &esa.RecordDataArgs{
Value: pulumi.String("www.eerrraaa.com"),
Weight: pulumi.Int(1),
Priority: pulumi.Int(1),
Port: pulumi.Int(80),
},
Ttl: pulumi.Int(100),
RecordName: pulumi.String("_udp._sip.idlexamplerecord.com"),
Comment: pulumi.String("This is a remark"),
SiteId: defaultSite.ID(),
RecordType: pulumi.String("SRV"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.esa.RatePlanInstance;
import com.pulumi.alicloud.esa.RatePlanInstanceArgs;
import com.pulumi.alicloud.esa.Site;
import com.pulumi.alicloud.esa.SiteArgs;
import com.pulumi.alicloud.esa.Record;
import com.pulumi.alicloud.esa.RecordArgs;
import com.pulumi.alicloud.esa.inputs.RecordDataArgs;
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) {
final var config = ctx.config();
final var name = config.get("name").orElse("terraform-example");
var default_ = new RatePlanInstance("default", RatePlanInstanceArgs.builder()
.type("NS")
.autoRenew("false")
.period("1")
.paymentType("Subscription")
.coverage("overseas")
.autoPay("true")
.planName("high")
.build());
var defaultSite = new Site("defaultSite", SiteArgs.builder()
.siteName("idlexamplerecord.com")
.instanceId(default_.id())
.coverage("overseas")
.accessType("NS")
.build());
var defaultRecord = new Record("defaultRecord", RecordArgs.builder()
.data(RecordDataArgs.builder()
.value("www.eerrraaa.com")
.weight("1")
.priority("1")
.port("80")
.build())
.ttl("100")
.recordName("_udp._sip.idlexamplerecord.com")
.comment("This is a remark")
.siteId(defaultSite.id())
.recordType("SRV")
.build());
}
}
configuration:
name:
type: string
default: terraform-example
resources:
default:
type: alicloud:esa:RatePlanInstance
properties:
type: NS
autoRenew: 'false'
period: '1'
paymentType: Subscription
coverage: overseas
autoPay: 'true'
planName: high
defaultSite:
type: alicloud:esa:Site
name: default
properties:
siteName: idlexamplerecord.com
instanceId: ${default.id}
coverage: overseas
accessType: NS
defaultRecord:
type: alicloud:esa:Record
name: default
properties:
data:
value: www.eerrraaa.com
weight: '1'
priority: '1'
port: '80'
ttl: '100'
recordName: _udp._sip.idlexamplerecord.com
comment: This is a remark
siteId: ${defaultSite.id}
recordType: SRV

Import

ESA Record can be imported using the id, e.g.

$ pulumi import alicloud:esa/record:Record example <id>

Properties

Link copied to clipboard
val authConf: Output<RecordAuthConf>?

The origin authentication information of the CNAME record. See auth_conf below.

Link copied to clipboard
val bizName: Output<String>?

The business scenario of the record for acceleration. Valid values:

Link copied to clipboard
val comment: Output<String>?

The comments of the record.

Link copied to clipboard
val createTime: Output<String>

The creation time of the record. The date format follows ISO8601 notation and uses UTC time. The format is yyyy-MM-ddTHH:mm:ssZ.

Link copied to clipboard
val data: Output<RecordData>

The DNS record information. The format of this field varies based on the record type. For more information, see Add DNS records. See data below.

Link copied to clipboard
val hostPolicy: Output<String>?

The origin host policy. This policy takes effect when the record type is CNAME. You can set the policy in two modes:

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val proxied: Output<Boolean>?

Filters by whether the record is proxied. Valid values:

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val recordName: Output<String>

The record name. This parameter specifies a filter condition for the query.

Link copied to clipboard
val recordType: Output<String>

The DNS record type.

Link copied to clipboard
val siteId: Output<Int>

The website ID, which can be obtained by calling the ListSites operation.

Link copied to clipboard
val sourceType: Output<String>?

The origin type of the record. Only CNAME records can be filtered by using this field. Valid values:

Link copied to clipboard
val ttl: Output<Int>?

The TTL of the record. Unit: seconds. The range is 30 to 86,400, or 1. If the value is 1, the TTL of the record is determined by the system.

Link copied to clipboard
val urn: Output<String>