alicloud.pvtz.ZoneRecord
Explore with Pulumi AI
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const zone = new alicloud.pvtz.Zone("zone", {zoneName: "foo.test.com"});
const foo = new alicloud.pvtz.ZoneRecord("foo", {
zoneId: zone.id,
rr: "www",
type: "CNAME",
value: "bbb.test.com",
ttl: 60,
});
import pulumi
import pulumi_alicloud as alicloud
zone = alicloud.pvtz.Zone("zone", zone_name="foo.test.com")
foo = alicloud.pvtz.ZoneRecord("foo",
zone_id=zone.id,
rr="www",
type="CNAME",
value="bbb.test.com",
ttl=60)
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/pvtz"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
zone, err := pvtz.NewZone(ctx, "zone", &pvtz.ZoneArgs{
ZoneName: pulumi.String("foo.test.com"),
})
if err != nil {
return err
}
_, err = pvtz.NewZoneRecord(ctx, "foo", &pvtz.ZoneRecordArgs{
ZoneId: zone.ID(),
Rr: pulumi.String("www"),
Type: pulumi.String("CNAME"),
Value: pulumi.String("bbb.test.com"),
Ttl: pulumi.Int(60),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var zone = new AliCloud.Pvtz.Zone("zone", new()
{
ZoneName = "foo.test.com",
});
var foo = new AliCloud.Pvtz.ZoneRecord("foo", new()
{
ZoneId = zone.Id,
Rr = "www",
Type = "CNAME",
Value = "bbb.test.com",
Ttl = 60,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.pvtz.Zone;
import com.pulumi.alicloud.pvtz.ZoneArgs;
import com.pulumi.alicloud.pvtz.ZoneRecord;
import com.pulumi.alicloud.pvtz.ZoneRecordArgs;
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 zone = new Zone("zone", ZoneArgs.builder()
.zoneName("foo.test.com")
.build());
var foo = new ZoneRecord("foo", ZoneRecordArgs.builder()
.zoneId(zone.id())
.rr("www")
.type("CNAME")
.value("bbb.test.com")
.ttl(60)
.build());
}
}
resources:
zone:
type: alicloud:pvtz:Zone
properties:
zoneName: foo.test.com
foo:
type: alicloud:pvtz:ZoneRecord
properties:
zoneId: ${zone.id}
rr: www
type: CNAME
value: bbb.test.com
ttl: 60
Create ZoneRecord Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ZoneRecord(name: string, args: ZoneRecordArgs, opts?: CustomResourceOptions);
@overload
def ZoneRecord(resource_name: str,
args: ZoneRecordArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ZoneRecord(resource_name: str,
opts: Optional[ResourceOptions] = None,
type: Optional[str] = None,
value: Optional[str] = None,
zone_id: Optional[str] = None,
lang: Optional[str] = None,
priority: Optional[int] = None,
remark: Optional[str] = None,
resource_record: Optional[str] = None,
rr: Optional[str] = None,
status: Optional[str] = None,
ttl: Optional[int] = None,
user_client_ip: Optional[str] = None)
func NewZoneRecord(ctx *Context, name string, args ZoneRecordArgs, opts ...ResourceOption) (*ZoneRecord, error)
public ZoneRecord(string name, ZoneRecordArgs args, CustomResourceOptions? opts = null)
public ZoneRecord(String name, ZoneRecordArgs args)
public ZoneRecord(String name, ZoneRecordArgs args, CustomResourceOptions options)
type: alicloud:pvtz:ZoneRecord
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 ZoneRecordArgs
- 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 ZoneRecordArgs
- 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 ZoneRecordArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ZoneRecordArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ZoneRecordArgs
- 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 zoneRecordResource = new AliCloud.Pvtz.ZoneRecord("zoneRecordResource", new()
{
Type = "string",
Value = "string",
ZoneId = "string",
Lang = "string",
Priority = 0,
Remark = "string",
Rr = "string",
Status = "string",
Ttl = 0,
UserClientIp = "string",
});
example, err := pvtz.NewZoneRecord(ctx, "zoneRecordResource", &pvtz.ZoneRecordArgs{
Type: pulumi.String("string"),
Value: pulumi.String("string"),
ZoneId: pulumi.String("string"),
Lang: pulumi.String("string"),
Priority: pulumi.Int(0),
Remark: pulumi.String("string"),
Rr: pulumi.String("string"),
Status: pulumi.String("string"),
Ttl: pulumi.Int(0),
UserClientIp: pulumi.String("string"),
})
var zoneRecordResource = new ZoneRecord("zoneRecordResource", ZoneRecordArgs.builder()
.type("string")
.value("string")
.zoneId("string")
.lang("string")
.priority(0)
.remark("string")
.rr("string")
.status("string")
.ttl(0)
.userClientIp("string")
.build());
zone_record_resource = alicloud.pvtz.ZoneRecord("zoneRecordResource",
type="string",
value="string",
zone_id="string",
lang="string",
priority=0,
remark="string",
rr="string",
status="string",
ttl=0,
user_client_ip="string")
const zoneRecordResource = new alicloud.pvtz.ZoneRecord("zoneRecordResource", {
type: "string",
value: "string",
zoneId: "string",
lang: "string",
priority: 0,
remark: "string",
rr: "string",
status: "string",
ttl: 0,
userClientIp: "string",
});
type: alicloud:pvtz:ZoneRecord
properties:
lang: string
priority: 0
remark: string
rr: string
status: string
ttl: 0
type: string
userClientIp: string
value: string
zoneId: string
ZoneRecord 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 ZoneRecord resource accepts the following input properties:
- Type string
- The type of the Private Zone Record. Valid values: A, CNAME, TXT, MX, PTR, SRV.
- Value string
- The value of the Private Zone Record.
- Zone
Id string - The name of the Private Zone Record.
- Lang string
- User language.
- Priority int
- The priority of the Private Zone Record. At present, only can "MX" record support it. Valid values: [1-99]. Default to 1.
- Remark string
- The remark of the Private Zone Record.
- Resource
Record string - The resource record of the Private Zone Record.
- Rr string
- The rr of the Private Zone Record.
- Status string
- Resolve record status. Value:
- ENABLE: enable resolution.
- DISABLE: pause parsing.
- Ttl int
- The ttl of the Private Zone Record. Default to
60
. - User
Client stringIp
- Type string
- The type of the Private Zone Record. Valid values: A, CNAME, TXT, MX, PTR, SRV.
- Value string
- The value of the Private Zone Record.
- Zone
Id string - The name of the Private Zone Record.
- Lang string
- User language.
- Priority int
- The priority of the Private Zone Record. At present, only can "MX" record support it. Valid values: [1-99]. Default to 1.
- Remark string
- The remark of the Private Zone Record.
- Resource
Record string - The resource record of the Private Zone Record.
- Rr string
- The rr of the Private Zone Record.
- Status string
- Resolve record status. Value:
- ENABLE: enable resolution.
- DISABLE: pause parsing.
- Ttl int
- The ttl of the Private Zone Record. Default to
60
. - User
Client stringIp
- type String
- The type of the Private Zone Record. Valid values: A, CNAME, TXT, MX, PTR, SRV.
- value String
- The value of the Private Zone Record.
- zone
Id String - The name of the Private Zone Record.
- lang String
- User language.
- priority Integer
- The priority of the Private Zone Record. At present, only can "MX" record support it. Valid values: [1-99]. Default to 1.
- remark String
- The remark of the Private Zone Record.
- resource
Record String - The resource record of the Private Zone Record.
- rr String
- The rr of the Private Zone Record.
- status String
- Resolve record status. Value:
- ENABLE: enable resolution.
- DISABLE: pause parsing.
- ttl Integer
- The ttl of the Private Zone Record. Default to
60
. - user
Client StringIp
- type string
- The type of the Private Zone Record. Valid values: A, CNAME, TXT, MX, PTR, SRV.
- value string
- The value of the Private Zone Record.
- zone
Id string - The name of the Private Zone Record.
- lang string
- User language.
- priority number
- The priority of the Private Zone Record. At present, only can "MX" record support it. Valid values: [1-99]. Default to 1.
- remark string
- The remark of the Private Zone Record.
- resource
Record string - The resource record of the Private Zone Record.
- rr string
- The rr of the Private Zone Record.
- status string
- Resolve record status. Value:
- ENABLE: enable resolution.
- DISABLE: pause parsing.
- ttl number
- The ttl of the Private Zone Record. Default to
60
. - user
Client stringIp
- type str
- The type of the Private Zone Record. Valid values: A, CNAME, TXT, MX, PTR, SRV.
- value str
- The value of the Private Zone Record.
- zone_
id str - The name of the Private Zone Record.
- lang str
- User language.
- priority int
- The priority of the Private Zone Record. At present, only can "MX" record support it. Valid values: [1-99]. Default to 1.
- remark str
- The remark of the Private Zone Record.
- resource_
record str - The resource record of the Private Zone Record.
- rr str
- The rr of the Private Zone Record.
- status str
- Resolve record status. Value:
- ENABLE: enable resolution.
- DISABLE: pause parsing.
- ttl int
- The ttl of the Private Zone Record. Default to
60
. - user_
client_ strip
- type String
- The type of the Private Zone Record. Valid values: A, CNAME, TXT, MX, PTR, SRV.
- value String
- The value of the Private Zone Record.
- zone
Id String - The name of the Private Zone Record.
- lang String
- User language.
- priority Number
- The priority of the Private Zone Record. At present, only can "MX" record support it. Valid values: [1-99]. Default to 1.
- remark String
- The remark of the Private Zone Record.
- resource
Record String - The resource record of the Private Zone Record.
- rr String
- The rr of the Private Zone Record.
- status String
- Resolve record status. Value:
- ENABLE: enable resolution.
- DISABLE: pause parsing.
- ttl Number
- The ttl of the Private Zone Record. Default to
60
. - user
Client StringIp
Outputs
All input properties are implicitly available as output properties. Additionally, the ZoneRecord resource produces the following output properties:
Look up Existing ZoneRecord Resource
Get an existing ZoneRecord 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?: ZoneRecordState, opts?: CustomResourceOptions): ZoneRecord
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
lang: Optional[str] = None,
priority: Optional[int] = None,
record_id: Optional[str] = None,
remark: Optional[str] = None,
resource_record: Optional[str] = None,
rr: Optional[str] = None,
status: Optional[str] = None,
ttl: Optional[int] = None,
type: Optional[str] = None,
user_client_ip: Optional[str] = None,
value: Optional[str] = None,
zone_id: Optional[str] = None) -> ZoneRecord
func GetZoneRecord(ctx *Context, name string, id IDInput, state *ZoneRecordState, opts ...ResourceOption) (*ZoneRecord, error)
public static ZoneRecord Get(string name, Input<string> id, ZoneRecordState? state, CustomResourceOptions? opts = null)
public static ZoneRecord get(String name, Output<String> id, ZoneRecordState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- 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.
- Lang string
- User language.
- Priority int
- The priority of the Private Zone Record. At present, only can "MX" record support it. Valid values: [1-99]. Default to 1.
- Record
Id string - The Private Zone Record ID.
- Remark string
- The remark of the Private Zone Record.
- Resource
Record string - The resource record of the Private Zone Record.
- Rr string
- The rr of the Private Zone Record.
- Status string
- Resolve record status. Value:
- ENABLE: enable resolution.
- DISABLE: pause parsing.
- Ttl int
- The ttl of the Private Zone Record. Default to
60
. - Type string
- The type of the Private Zone Record. Valid values: A, CNAME, TXT, MX, PTR, SRV.
- User
Client stringIp - Value string
- The value of the Private Zone Record.
- Zone
Id string - The name of the Private Zone Record.
- Lang string
- User language.
- Priority int
- The priority of the Private Zone Record. At present, only can "MX" record support it. Valid values: [1-99]. Default to 1.
- Record
Id string - The Private Zone Record ID.
- Remark string
- The remark of the Private Zone Record.
- Resource
Record string - The resource record of the Private Zone Record.
- Rr string
- The rr of the Private Zone Record.
- Status string
- Resolve record status. Value:
- ENABLE: enable resolution.
- DISABLE: pause parsing.
- Ttl int
- The ttl of the Private Zone Record. Default to
60
. - Type string
- The type of the Private Zone Record. Valid values: A, CNAME, TXT, MX, PTR, SRV.
- User
Client stringIp - Value string
- The value of the Private Zone Record.
- Zone
Id string - The name of the Private Zone Record.
- lang String
- User language.
- priority Integer
- The priority of the Private Zone Record. At present, only can "MX" record support it. Valid values: [1-99]. Default to 1.
- record
Id String - The Private Zone Record ID.
- remark String
- The remark of the Private Zone Record.
- resource
Record String - The resource record of the Private Zone Record.
- rr String
- The rr of the Private Zone Record.
- status String
- Resolve record status. Value:
- ENABLE: enable resolution.
- DISABLE: pause parsing.
- ttl Integer
- The ttl of the Private Zone Record. Default to
60
. - type String
- The type of the Private Zone Record. Valid values: A, CNAME, TXT, MX, PTR, SRV.
- user
Client StringIp - value String
- The value of the Private Zone Record.
- zone
Id String - The name of the Private Zone Record.
- lang string
- User language.
- priority number
- The priority of the Private Zone Record. At present, only can "MX" record support it. Valid values: [1-99]. Default to 1.
- record
Id string - The Private Zone Record ID.
- remark string
- The remark of the Private Zone Record.
- resource
Record string - The resource record of the Private Zone Record.
- rr string
- The rr of the Private Zone Record.
- status string
- Resolve record status. Value:
- ENABLE: enable resolution.
- DISABLE: pause parsing.
- ttl number
- The ttl of the Private Zone Record. Default to
60
. - type string
- The type of the Private Zone Record. Valid values: A, CNAME, TXT, MX, PTR, SRV.
- user
Client stringIp - value string
- The value of the Private Zone Record.
- zone
Id string - The name of the Private Zone Record.
- lang str
- User language.
- priority int
- The priority of the Private Zone Record. At present, only can "MX" record support it. Valid values: [1-99]. Default to 1.
- record_
id str - The Private Zone Record ID.
- remark str
- The remark of the Private Zone Record.
- resource_
record str - The resource record of the Private Zone Record.
- rr str
- The rr of the Private Zone Record.
- status str
- Resolve record status. Value:
- ENABLE: enable resolution.
- DISABLE: pause parsing.
- ttl int
- The ttl of the Private Zone Record. Default to
60
. - type str
- The type of the Private Zone Record. Valid values: A, CNAME, TXT, MX, PTR, SRV.
- user_
client_ strip - value str
- The value of the Private Zone Record.
- zone_
id str - The name of the Private Zone Record.
- lang String
- User language.
- priority Number
- The priority of the Private Zone Record. At present, only can "MX" record support it. Valid values: [1-99]. Default to 1.
- record
Id String - The Private Zone Record ID.
- remark String
- The remark of the Private Zone Record.
- resource
Record String - The resource record of the Private Zone Record.
- rr String
- The rr of the Private Zone Record.
- status String
- Resolve record status. Value:
- ENABLE: enable resolution.
- DISABLE: pause parsing.
- ttl Number
- The ttl of the Private Zone Record. Default to
60
. - type String
- The type of the Private Zone Record. Valid values: A, CNAME, TXT, MX, PTR, SRV.
- user
Client StringIp - value String
- The value of the Private Zone Record.
- zone
Id String - The name of the Private Zone Record.
Import
Private Zone Record can be imported using the id, e.g.
$ pulumi import alicloud:pvtz/zoneRecord:ZoneRecord example abc123456
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.