flexibleengine.DnsPtrrecordV2
Explore with Pulumi AI
Manages a DNS PTR record in the FlexibleEngine DNS Service.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as flexibleengine from "@pulumi/flexibleengine";
const eip1 = new flexibleengine.VpcEip("eip1", {
publicip: {
type: "5_bgp",
},
bandwidth: {
name: "test",
size: 5,
shareType: "PER",
chargeMode: "traffic",
},
});
const ptr1 = new flexibleengine.DnsPtrrecordV2("ptr1", {
description: "An example PTR record",
floatingipId: eip1.vpcEipId,
ttl: 3000,
tags: {
foo: "bar",
},
});
import pulumi
import pulumi_flexibleengine as flexibleengine
eip1 = flexibleengine.VpcEip("eip1",
publicip={
"type": "5_bgp",
},
bandwidth={
"name": "test",
"size": 5,
"share_type": "PER",
"charge_mode": "traffic",
})
ptr1 = flexibleengine.DnsPtrrecordV2("ptr1",
description="An example PTR record",
floatingip_id=eip1.vpc_eip_id,
ttl=3000,
tags={
"foo": "bar",
})
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/flexibleengine/flexibleengine"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
eip1, err := flexibleengine.NewVpcEip(ctx, "eip1", &flexibleengine.VpcEipArgs{
Publicip: &flexibleengine.VpcEipPublicipArgs{
Type: pulumi.String("5_bgp"),
},
Bandwidth: &flexibleengine.VpcEipBandwidthArgs{
Name: pulumi.String("test"),
Size: pulumi.Float64(5),
ShareType: pulumi.String("PER"),
ChargeMode: pulumi.String("traffic"),
},
})
if err != nil {
return err
}
_, err = flexibleengine.NewDnsPtrrecordV2(ctx, "ptr1", &flexibleengine.DnsPtrrecordV2Args{
Description: pulumi.String("An example PTR record"),
FloatingipId: eip1.VpcEipId,
Ttl: pulumi.Float64(3000),
Tags: pulumi.StringMap{
"foo": pulumi.String("bar"),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Flexibleengine = Pulumi.Flexibleengine;
return await Deployment.RunAsync(() =>
{
var eip1 = new Flexibleengine.VpcEip("eip1", new()
{
Publicip = new Flexibleengine.Inputs.VpcEipPublicipArgs
{
Type = "5_bgp",
},
Bandwidth = new Flexibleengine.Inputs.VpcEipBandwidthArgs
{
Name = "test",
Size = 5,
ShareType = "PER",
ChargeMode = "traffic",
},
});
var ptr1 = new Flexibleengine.DnsPtrrecordV2("ptr1", new()
{
Description = "An example PTR record",
FloatingipId = eip1.VpcEipId,
Ttl = 3000,
Tags =
{
{ "foo", "bar" },
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.flexibleengine.VpcEip;
import com.pulumi.flexibleengine.VpcEipArgs;
import com.pulumi.flexibleengine.inputs.VpcEipPublicipArgs;
import com.pulumi.flexibleengine.inputs.VpcEipBandwidthArgs;
import com.pulumi.flexibleengine.DnsPtrrecordV2;
import com.pulumi.flexibleengine.DnsPtrrecordV2Args;
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 eip1 = new VpcEip("eip1", VpcEipArgs.builder()
.publicip(VpcEipPublicipArgs.builder()
.type("5_bgp")
.build())
.bandwidth(VpcEipBandwidthArgs.builder()
.name("test")
.size(5)
.shareType("PER")
.chargeMode("traffic")
.build())
.build());
var ptr1 = new DnsPtrrecordV2("ptr1", DnsPtrrecordV2Args.builder()
.description("An example PTR record")
.floatingipId(eip1.vpcEipId())
.ttl(3000)
.tags(Map.of("foo", "bar"))
.build());
}
}
resources:
eip1:
type: flexibleengine:VpcEip
properties:
publicip:
type: 5_bgp
bandwidth:
name: test
size: 5
shareType: PER
chargeMode: traffic
ptr1:
type: flexibleengine:DnsPtrrecordV2
properties:
description: An example PTR record
floatingipId: ${eip1.vpcEipId}
ttl: 3000
tags:
foo: bar
Create DnsPtrrecordV2 Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new DnsPtrrecordV2(name: string, args: DnsPtrrecordV2Args, opts?: CustomResourceOptions);
@overload
def DnsPtrrecordV2(resource_name: str,
args: DnsPtrrecordV2Args,
opts: Optional[ResourceOptions] = None)
@overload
def DnsPtrrecordV2(resource_name: str,
opts: Optional[ResourceOptions] = None,
floatingip_id: Optional[str] = None,
description: Optional[str] = None,
dns_ptrrecord_v2_id: Optional[str] = None,
name: Optional[str] = None,
region: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
timeouts: Optional[DnsPtrrecordV2TimeoutsArgs] = None,
ttl: Optional[float] = None)
func NewDnsPtrrecordV2(ctx *Context, name string, args DnsPtrrecordV2Args, opts ...ResourceOption) (*DnsPtrrecordV2, error)
public DnsPtrrecordV2(string name, DnsPtrrecordV2Args args, CustomResourceOptions? opts = null)
public DnsPtrrecordV2(String name, DnsPtrrecordV2Args args)
public DnsPtrrecordV2(String name, DnsPtrrecordV2Args args, CustomResourceOptions options)
type: flexibleengine:DnsPtrrecordV2
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 DnsPtrrecordV2Args
- 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 DnsPtrrecordV2Args
- 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 DnsPtrrecordV2Args
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args DnsPtrrecordV2Args
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args DnsPtrrecordV2Args
- 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 dnsPtrrecordV2Resource = new Flexibleengine.DnsPtrrecordV2("dnsPtrrecordV2Resource", new()
{
FloatingipId = "string",
Description = "string",
DnsPtrrecordV2Id = "string",
Name = "string",
Region = "string",
Tags =
{
{ "string", "string" },
},
Timeouts = new Flexibleengine.Inputs.DnsPtrrecordV2TimeoutsArgs
{
Create = "string",
Delete = "string",
Update = "string",
},
Ttl = 0,
});
example, err := flexibleengine.NewDnsPtrrecordV2(ctx, "dnsPtrrecordV2Resource", &flexibleengine.DnsPtrrecordV2Args{
FloatingipId: pulumi.String("string"),
Description: pulumi.String("string"),
DnsPtrrecordV2Id: pulumi.String("string"),
Name: pulumi.String("string"),
Region: pulumi.String("string"),
Tags: pulumi.StringMap{
"string": pulumi.String("string"),
},
Timeouts: &flexibleengine.DnsPtrrecordV2TimeoutsArgs{
Create: pulumi.String("string"),
Delete: pulumi.String("string"),
Update: pulumi.String("string"),
},
Ttl: pulumi.Float64(0),
})
var dnsPtrrecordV2Resource = new DnsPtrrecordV2("dnsPtrrecordV2Resource", DnsPtrrecordV2Args.builder()
.floatingipId("string")
.description("string")
.dnsPtrrecordV2Id("string")
.name("string")
.region("string")
.tags(Map.of("string", "string"))
.timeouts(DnsPtrrecordV2TimeoutsArgs.builder()
.create("string")
.delete("string")
.update("string")
.build())
.ttl(0)
.build());
dns_ptrrecord_v2_resource = flexibleengine.DnsPtrrecordV2("dnsPtrrecordV2Resource",
floatingip_id="string",
description="string",
dns_ptrrecord_v2_id="string",
name="string",
region="string",
tags={
"string": "string",
},
timeouts={
"create": "string",
"delete": "string",
"update": "string",
},
ttl=0)
const dnsPtrrecordV2Resource = new flexibleengine.DnsPtrrecordV2("dnsPtrrecordV2Resource", {
floatingipId: "string",
description: "string",
dnsPtrrecordV2Id: "string",
name: "string",
region: "string",
tags: {
string: "string",
},
timeouts: {
create: "string",
"delete": "string",
update: "string",
},
ttl: 0,
});
type: flexibleengine:DnsPtrrecordV2
properties:
description: string
dnsPtrrecordV2Id: string
floatingipId: string
name: string
region: string
tags:
string: string
timeouts:
create: string
delete: string
update: string
ttl: 0
DnsPtrrecordV2 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 DnsPtrrecordV2 resource accepts the following input properties:
- Floatingip
Id string - The ID of the FloatingIP/EIP. Changing this creates a new PTR record.
- Description string
- Description of the PTR record.
- Dns
Ptrrecord stringV2Id - The PTR record ID, which is in {region}:{floatingip_id} format.
- Name string
- Domain name of the PTR record. A domain name is case insensitive. Uppercase letters will also be converted into lowercase letters.
- Region string
- The region in which to create the PTR record.
If omitted, the
region
argument of the provider is used. Changing this creates a new PTR record. - Dictionary<string, string>
- Tags key/value pairs to associate with the PTR record.
- Timeouts
Dns
Ptrrecord V2Timeouts - Ttl double
- The time to live (TTL) of the record set (in seconds). The value range is 300–2147483647. The default value is 300.
- Floatingip
Id string - The ID of the FloatingIP/EIP. Changing this creates a new PTR record.
- Description string
- Description of the PTR record.
- Dns
Ptrrecord stringV2Id - The PTR record ID, which is in {region}:{floatingip_id} format.
- Name string
- Domain name of the PTR record. A domain name is case insensitive. Uppercase letters will also be converted into lowercase letters.
- Region string
- The region in which to create the PTR record.
If omitted, the
region
argument of the provider is used. Changing this creates a new PTR record. - map[string]string
- Tags key/value pairs to associate with the PTR record.
- Timeouts
Dns
Ptrrecord V2Timeouts Args - Ttl float64
- The time to live (TTL) of the record set (in seconds). The value range is 300–2147483647. The default value is 300.
- floatingip
Id String - The ID of the FloatingIP/EIP. Changing this creates a new PTR record.
- description String
- Description of the PTR record.
- dns
Ptrrecord StringV2Id - The PTR record ID, which is in {region}:{floatingip_id} format.
- name String
- Domain name of the PTR record. A domain name is case insensitive. Uppercase letters will also be converted into lowercase letters.
- region String
- The region in which to create the PTR record.
If omitted, the
region
argument of the provider is used. Changing this creates a new PTR record. - Map<String,String>
- Tags key/value pairs to associate with the PTR record.
- timeouts
Dns
Ptrrecord V2Timeouts - ttl Double
- The time to live (TTL) of the record set (in seconds). The value range is 300–2147483647. The default value is 300.
- floatingip
Id string - The ID of the FloatingIP/EIP. Changing this creates a new PTR record.
- description string
- Description of the PTR record.
- dns
Ptrrecord stringV2Id - The PTR record ID, which is in {region}:{floatingip_id} format.
- name string
- Domain name of the PTR record. A domain name is case insensitive. Uppercase letters will also be converted into lowercase letters.
- region string
- The region in which to create the PTR record.
If omitted, the
region
argument of the provider is used. Changing this creates a new PTR record. - {[key: string]: string}
- Tags key/value pairs to associate with the PTR record.
- timeouts
Dns
Ptrrecord V2Timeouts - ttl number
- The time to live (TTL) of the record set (in seconds). The value range is 300–2147483647. The default value is 300.
- floatingip_
id str - The ID of the FloatingIP/EIP. Changing this creates a new PTR record.
- description str
- Description of the PTR record.
- dns_
ptrrecord_ strv2_ id - The PTR record ID, which is in {region}:{floatingip_id} format.
- name str
- Domain name of the PTR record. A domain name is case insensitive. Uppercase letters will also be converted into lowercase letters.
- region str
- The region in which to create the PTR record.
If omitted, the
region
argument of the provider is used. Changing this creates a new PTR record. - Mapping[str, str]
- Tags key/value pairs to associate with the PTR record.
- timeouts
Dns
Ptrrecord V2Timeouts Args - ttl float
- The time to live (TTL) of the record set (in seconds). The value range is 300–2147483647. The default value is 300.
- floatingip
Id String - The ID of the FloatingIP/EIP. Changing this creates a new PTR record.
- description String
- Description of the PTR record.
- dns
Ptrrecord StringV2Id - The PTR record ID, which is in {region}:{floatingip_id} format.
- name String
- Domain name of the PTR record. A domain name is case insensitive. Uppercase letters will also be converted into lowercase letters.
- region String
- The region in which to create the PTR record.
If omitted, the
region
argument of the provider is used. Changing this creates a new PTR record. - Map<String>
- Tags key/value pairs to associate with the PTR record.
- timeouts Property Map
- ttl Number
- The time to live (TTL) of the record set (in seconds). The value range is 300–2147483647. The default value is 300.
Outputs
All input properties are implicitly available as output properties. Additionally, the DnsPtrrecordV2 resource produces the following output properties:
Look up Existing DnsPtrrecordV2 Resource
Get an existing DnsPtrrecordV2 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?: DnsPtrrecordV2State, opts?: CustomResourceOptions): DnsPtrrecordV2
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
address: Optional[str] = None,
description: Optional[str] = None,
dns_ptrrecord_v2_id: Optional[str] = None,
floatingip_id: Optional[str] = None,
name: Optional[str] = None,
region: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
timeouts: Optional[DnsPtrrecordV2TimeoutsArgs] = None,
ttl: Optional[float] = None) -> DnsPtrrecordV2
func GetDnsPtrrecordV2(ctx *Context, name string, id IDInput, state *DnsPtrrecordV2State, opts ...ResourceOption) (*DnsPtrrecordV2, error)
public static DnsPtrrecordV2 Get(string name, Input<string> id, DnsPtrrecordV2State? state, CustomResourceOptions? opts = null)
public static DnsPtrrecordV2 get(String name, Output<String> id, DnsPtrrecordV2State state, CustomResourceOptions options)
resources: _: type: flexibleengine:DnsPtrrecordV2 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.
- Address string
- The address of the FloatingIP/EIP.
- Description string
- Description of the PTR record.
- Dns
Ptrrecord stringV2Id - The PTR record ID, which is in {region}:{floatingip_id} format.
- Floatingip
Id string - The ID of the FloatingIP/EIP. Changing this creates a new PTR record.
- Name string
- Domain name of the PTR record. A domain name is case insensitive. Uppercase letters will also be converted into lowercase letters.
- Region string
- The region in which to create the PTR record.
If omitted, the
region
argument of the provider is used. Changing this creates a new PTR record. - Dictionary<string, string>
- Tags key/value pairs to associate with the PTR record.
- Timeouts
Dns
Ptrrecord V2Timeouts - Ttl double
- The time to live (TTL) of the record set (in seconds). The value range is 300–2147483647. The default value is 300.
- Address string
- The address of the FloatingIP/EIP.
- Description string
- Description of the PTR record.
- Dns
Ptrrecord stringV2Id - The PTR record ID, which is in {region}:{floatingip_id} format.
- Floatingip
Id string - The ID of the FloatingIP/EIP. Changing this creates a new PTR record.
- Name string
- Domain name of the PTR record. A domain name is case insensitive. Uppercase letters will also be converted into lowercase letters.
- Region string
- The region in which to create the PTR record.
If omitted, the
region
argument of the provider is used. Changing this creates a new PTR record. - map[string]string
- Tags key/value pairs to associate with the PTR record.
- Timeouts
Dns
Ptrrecord V2Timeouts Args - Ttl float64
- The time to live (TTL) of the record set (in seconds). The value range is 300–2147483647. The default value is 300.
- address String
- The address of the FloatingIP/EIP.
- description String
- Description of the PTR record.
- dns
Ptrrecord StringV2Id - The PTR record ID, which is in {region}:{floatingip_id} format.
- floatingip
Id String - The ID of the FloatingIP/EIP. Changing this creates a new PTR record.
- name String
- Domain name of the PTR record. A domain name is case insensitive. Uppercase letters will also be converted into lowercase letters.
- region String
- The region in which to create the PTR record.
If omitted, the
region
argument of the provider is used. Changing this creates a new PTR record. - Map<String,String>
- Tags key/value pairs to associate with the PTR record.
- timeouts
Dns
Ptrrecord V2Timeouts - ttl Double
- The time to live (TTL) of the record set (in seconds). The value range is 300–2147483647. The default value is 300.
- address string
- The address of the FloatingIP/EIP.
- description string
- Description of the PTR record.
- dns
Ptrrecord stringV2Id - The PTR record ID, which is in {region}:{floatingip_id} format.
- floatingip
Id string - The ID of the FloatingIP/EIP. Changing this creates a new PTR record.
- name string
- Domain name of the PTR record. A domain name is case insensitive. Uppercase letters will also be converted into lowercase letters.
- region string
- The region in which to create the PTR record.
If omitted, the
region
argument of the provider is used. Changing this creates a new PTR record. - {[key: string]: string}
- Tags key/value pairs to associate with the PTR record.
- timeouts
Dns
Ptrrecord V2Timeouts - ttl number
- The time to live (TTL) of the record set (in seconds). The value range is 300–2147483647. The default value is 300.
- address str
- The address of the FloatingIP/EIP.
- description str
- Description of the PTR record.
- dns_
ptrrecord_ strv2_ id - The PTR record ID, which is in {region}:{floatingip_id} format.
- floatingip_
id str - The ID of the FloatingIP/EIP. Changing this creates a new PTR record.
- name str
- Domain name of the PTR record. A domain name is case insensitive. Uppercase letters will also be converted into lowercase letters.
- region str
- The region in which to create the PTR record.
If omitted, the
region
argument of the provider is used. Changing this creates a new PTR record. - Mapping[str, str]
- Tags key/value pairs to associate with the PTR record.
- timeouts
Dns
Ptrrecord V2Timeouts Args - ttl float
- The time to live (TTL) of the record set (in seconds). The value range is 300–2147483647. The default value is 300.
- address String
- The address of the FloatingIP/EIP.
- description String
- Description of the PTR record.
- dns
Ptrrecord StringV2Id - The PTR record ID, which is in {region}:{floatingip_id} format.
- floatingip
Id String - The ID of the FloatingIP/EIP. Changing this creates a new PTR record.
- name String
- Domain name of the PTR record. A domain name is case insensitive. Uppercase letters will also be converted into lowercase letters.
- region String
- The region in which to create the PTR record.
If omitted, the
region
argument of the provider is used. Changing this creates a new PTR record. - Map<String>
- Tags key/value pairs to associate with the PTR record.
- timeouts Property Map
- ttl Number
- The time to live (TTL) of the record set (in seconds). The value range is 300–2147483647. The default value is 300.
Supporting Types
DnsPtrrecordV2Timeouts, DnsPtrrecordV2TimeoutsArgs
Import
PTR records can be imported using region and floatingip/eip ID, separated by a colon(:), e.g.
$ pulumi import flexibleengine:index/dnsPtrrecordV2:DnsPtrrecordV2 ptr_1 eu-west-0:d90ce693-5ccf-4136-a0ed-152ce412b6b9
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- flexibleengine flexibleenginecloud/terraform-provider-flexibleengine
- License
- Notes
- This Pulumi package is based on the
flexibleengine
Terraform Provider.