oci.Dns.Record
Explore with Pulumi AI
Deprecated. Use oci.Dns.Rrset instead.
This resource provides the Record resource in Oracle Cloud Infrastructure DNS service.
Replaces records in the specified zone with the records specified in the request body. If a specified record does not exist, it will be created. If the record exists, then it will be updated to represent the record in the body of the request. If a record in the zone does not exist in the request body, the record will be removed from the zone.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testRecord = new oci.dns.Record("test_record", {
zoneNameOrId: testZoneNameOr.id,
domain: recordItemsDomain,
rtype: recordItemsRtype,
compartmentId: compartmentId,
rdata: recordItemsRdata,
ttl: recordItemsTtl,
});
import pulumi
import pulumi_oci as oci
test_record = oci.dns.Record("test_record",
zone_name_or_id=test_zone_name_or["id"],
domain=record_items_domain,
rtype=record_items_rtype,
compartment_id=compartment_id,
rdata=record_items_rdata,
ttl=record_items_ttl)
package main
import (
"github.com/pulumi/pulumi-oci/sdk/go/oci/Dns"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := Dns.NewRecord(ctx, "test_record", &Dns.RecordArgs{
ZoneNameOrId: pulumi.Any(testZoneNameOr.Id),
Domain: pulumi.Any(recordItemsDomain),
Rtype: pulumi.Any(recordItemsRtype),
CompartmentId: pulumi.Any(compartmentId),
Rdata: pulumi.Any(recordItemsRdata),
Ttl: pulumi.Any(recordItemsTtl),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Oci = Pulumi.Oci;
return await Deployment.RunAsync(() =>
{
var testRecord = new Oci.Dns.Record("test_record", new()
{
ZoneNameOrId = testZoneNameOr.Id,
Domain = recordItemsDomain,
Rtype = recordItemsRtype,
CompartmentId = compartmentId,
Rdata = recordItemsRdata,
Ttl = recordItemsTtl,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.Dns.Record;
import com.pulumi.oci.Dns.RecordArgs;
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 testRecord = new Record("testRecord", RecordArgs.builder()
.zoneNameOrId(testZoneNameOr.id())
.domain(recordItemsDomain)
.rtype(recordItemsRtype)
.compartmentId(compartmentId)
.rdata(recordItemsRdata)
.ttl(recordItemsTtl)
.build());
}
}
resources:
testRecord:
type: oci:Dns:Record
name: test_record
properties:
zoneNameOrId: ${testZoneNameOr.id}
domain: ${recordItemsDomain}
rtype: ${recordItemsRtype}
compartmentId: ${compartmentId}
rdata: ${recordItemsRdata}
ttl: ${recordItemsTtl}
Create Record Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Record(name: string, args: RecordArgs, opts?: CustomResourceOptions);
@overload
def Record(resource_name: str,
args: RecordArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Record(resource_name: str,
opts: Optional[ResourceOptions] = None,
domain: Optional[str] = None,
rtype: Optional[str] = None,
zone_name_or_id: Optional[str] = None,
compartment_id: Optional[str] = None,
rdata: Optional[str] = None,
ttl: Optional[int] = None)
func NewRecord(ctx *Context, name string, args RecordArgs, opts ...ResourceOption) (*Record, error)
public Record(string name, RecordArgs args, CustomResourceOptions? opts = null)
public Record(String name, RecordArgs args)
public Record(String name, RecordArgs args, CustomResourceOptions options)
type: oci:Dns:Record
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 RecordArgs
- 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 RecordArgs
- 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 RecordArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args RecordArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args RecordArgs
- 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 recordResource = new Oci.Dns.Record("recordResource", new()
{
CompartmentId = "string",
Rdata = "string",
Ttl = 0,
});
example, err := Dns.NewRecord(ctx, "recordResource", &Dns.RecordArgs{
CompartmentId: pulumi.String("string"),
Rdata: pulumi.String("string"),
Ttl: pulumi.Int(0),
})
var recordResource = new Record("recordResource", RecordArgs.builder()
.compartmentId("string")
.rdata("string")
.ttl(0)
.build());
record_resource = oci.dns.Record("recordResource",
compartment_id="string",
rdata="string",
ttl=0)
const recordResource = new oci.dns.Record("recordResource", {
compartmentId: "string",
rdata: "string",
ttl: 0,
});
type: oci:Dns:Record
properties:
compartmentId: string
rdata: string
ttl: 0
Record Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The Record resource accepts the following input properties:
- Domain string
- The fully qualified domain name where the record can be located. Domain value is case insensitive.
- Rtype string
- The canonical name for the record's type, such as A or CNAME. For more information, see Resource Record (RR) TYPEs.
- Zone
Name stringOr Id The name or OCID of the target zone.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- Compartment
Id string - (Updatable) The OCID of the compartment the resource belongs to. If supplied, it must match the Zone's compartment ocid.
- Rdata string
- (Updatable) The record's data, as whitespace-delimited tokens in type-specific presentation format. All RDATA is normalized and the returned presentation of your RDATA may differ from its initial input. For more information about RDATA, see Supported DNS Resource Record Types
- Ttl int
- (Updatable) The Time To Live for the record, in seconds.
- Domain string
- The fully qualified domain name where the record can be located. Domain value is case insensitive.
- Rtype string
- The canonical name for the record's type, such as A or CNAME. For more information, see Resource Record (RR) TYPEs.
- Zone
Name stringOr Id The name or OCID of the target zone.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- Compartment
Id string - (Updatable) The OCID of the compartment the resource belongs to. If supplied, it must match the Zone's compartment ocid.
- Rdata string
- (Updatable) The record's data, as whitespace-delimited tokens in type-specific presentation format. All RDATA is normalized and the returned presentation of your RDATA may differ from its initial input. For more information about RDATA, see Supported DNS Resource Record Types
- Ttl int
- (Updatable) The Time To Live for the record, in seconds.
- domain String
- The fully qualified domain name where the record can be located. Domain value is case insensitive.
- rtype String
- The canonical name for the record's type, such as A or CNAME. For more information, see Resource Record (RR) TYPEs.
- zone
Name StringOr Id The name or OCID of the target zone.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- compartment
Id String - (Updatable) The OCID of the compartment the resource belongs to. If supplied, it must match the Zone's compartment ocid.
- rdata String
- (Updatable) The record's data, as whitespace-delimited tokens in type-specific presentation format. All RDATA is normalized and the returned presentation of your RDATA may differ from its initial input. For more information about RDATA, see Supported DNS Resource Record Types
- ttl Integer
- (Updatable) The Time To Live for the record, in seconds.
- domain string
- The fully qualified domain name where the record can be located. Domain value is case insensitive.
- rtype string
- The canonical name for the record's type, such as A or CNAME. For more information, see Resource Record (RR) TYPEs.
- zone
Name stringOr Id The name or OCID of the target zone.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- compartment
Id string - (Updatable) The OCID of the compartment the resource belongs to. If supplied, it must match the Zone's compartment ocid.
- rdata string
- (Updatable) The record's data, as whitespace-delimited tokens in type-specific presentation format. All RDATA is normalized and the returned presentation of your RDATA may differ from its initial input. For more information about RDATA, see Supported DNS Resource Record Types
- ttl number
- (Updatable) The Time To Live for the record, in seconds.
- domain str
- The fully qualified domain name where the record can be located. Domain value is case insensitive.
- rtype str
- The canonical name for the record's type, such as A or CNAME. For more information, see Resource Record (RR) TYPEs.
- zone_
name_ stror_ id The name or OCID of the target zone.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- compartment_
id str - (Updatable) The OCID of the compartment the resource belongs to. If supplied, it must match the Zone's compartment ocid.
- rdata str
- (Updatable) The record's data, as whitespace-delimited tokens in type-specific presentation format. All RDATA is normalized and the returned presentation of your RDATA may differ from its initial input. For more information about RDATA, see Supported DNS Resource Record Types
- ttl int
- (Updatable) The Time To Live for the record, in seconds.
- domain String
- The fully qualified domain name where the record can be located. Domain value is case insensitive.
- rtype String
- The canonical name for the record's type, such as A or CNAME. For more information, see Resource Record (RR) TYPEs.
- zone
Name StringOr Id The name or OCID of the target zone.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- compartment
Id String - (Updatable) The OCID of the compartment the resource belongs to. If supplied, it must match the Zone's compartment ocid.
- rdata String
- (Updatable) The record's data, as whitespace-delimited tokens in type-specific presentation format. All RDATA is normalized and the returned presentation of your RDATA may differ from its initial input. For more information about RDATA, see Supported DNS Resource Record Types
- ttl Number
- (Updatable) The Time To Live for the record, in seconds.
Outputs
All input properties are implicitly available as output properties. Additionally, the Record resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Is
Protected bool - A Boolean flag indicating whether or not parts of the record are unable to be explicitly managed.
- Record
Hash string - A unique identifier for the record within its zone.
- Rrset
Version string - The latest version of the record's zone in which its RRSet differs from the preceding version.
- Id string
- The provider-assigned unique ID for this managed resource.
- Is
Protected bool - A Boolean flag indicating whether or not parts of the record are unable to be explicitly managed.
- Record
Hash string - A unique identifier for the record within its zone.
- Rrset
Version string - The latest version of the record's zone in which its RRSet differs from the preceding version.
- id String
- The provider-assigned unique ID for this managed resource.
- is
Protected Boolean - A Boolean flag indicating whether or not parts of the record are unable to be explicitly managed.
- record
Hash String - A unique identifier for the record within its zone.
- rrset
Version String - The latest version of the record's zone in which its RRSet differs from the preceding version.
- id string
- The provider-assigned unique ID for this managed resource.
- is
Protected boolean - A Boolean flag indicating whether or not parts of the record are unable to be explicitly managed.
- record
Hash string - A unique identifier for the record within its zone.
- rrset
Version string - The latest version of the record's zone in which its RRSet differs from the preceding version.
- id str
- The provider-assigned unique ID for this managed resource.
- is_
protected bool - A Boolean flag indicating whether or not parts of the record are unable to be explicitly managed.
- record_
hash str - A unique identifier for the record within its zone.
- rrset_
version str - The latest version of the record's zone in which its RRSet differs from the preceding version.
- id String
- The provider-assigned unique ID for this managed resource.
- is
Protected Boolean - A Boolean flag indicating whether or not parts of the record are unable to be explicitly managed.
- record
Hash String - A unique identifier for the record within its zone.
- rrset
Version String - The latest version of the record's zone in which its RRSet differs from the preceding version.
Look up Existing Record Resource
Get an existing Record 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?: RecordState, opts?: CustomResourceOptions): Record
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
compartment_id: Optional[str] = None,
domain: Optional[str] = None,
is_protected: Optional[bool] = None,
rdata: Optional[str] = None,
record_hash: Optional[str] = None,
rrset_version: Optional[str] = None,
rtype: Optional[str] = None,
ttl: Optional[int] = None,
zone_name_or_id: Optional[str] = None) -> Record
func GetRecord(ctx *Context, name string, id IDInput, state *RecordState, opts ...ResourceOption) (*Record, error)
public static Record Get(string name, Input<string> id, RecordState? state, CustomResourceOptions? opts = null)
public static Record get(String name, Output<String> id, RecordState 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.
- Compartment
Id string - (Updatable) The OCID of the compartment the resource belongs to. If supplied, it must match the Zone's compartment ocid.
- Domain string
- The fully qualified domain name where the record can be located. Domain value is case insensitive.
- Is
Protected bool - A Boolean flag indicating whether or not parts of the record are unable to be explicitly managed.
- Rdata string
- (Updatable) The record's data, as whitespace-delimited tokens in type-specific presentation format. All RDATA is normalized and the returned presentation of your RDATA may differ from its initial input. For more information about RDATA, see Supported DNS Resource Record Types
- Record
Hash string - A unique identifier for the record within its zone.
- Rrset
Version string - The latest version of the record's zone in which its RRSet differs from the preceding version.
- Rtype string
- The canonical name for the record's type, such as A or CNAME. For more information, see Resource Record (RR) TYPEs.
- Ttl int
- (Updatable) The Time To Live for the record, in seconds.
- Zone
Name stringOr Id The name or OCID of the target zone.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- Compartment
Id string - (Updatable) The OCID of the compartment the resource belongs to. If supplied, it must match the Zone's compartment ocid.
- Domain string
- The fully qualified domain name where the record can be located. Domain value is case insensitive.
- Is
Protected bool - A Boolean flag indicating whether or not parts of the record are unable to be explicitly managed.
- Rdata string
- (Updatable) The record's data, as whitespace-delimited tokens in type-specific presentation format. All RDATA is normalized and the returned presentation of your RDATA may differ from its initial input. For more information about RDATA, see Supported DNS Resource Record Types
- Record
Hash string - A unique identifier for the record within its zone.
- Rrset
Version string - The latest version of the record's zone in which its RRSet differs from the preceding version.
- Rtype string
- The canonical name for the record's type, such as A or CNAME. For more information, see Resource Record (RR) TYPEs.
- Ttl int
- (Updatable) The Time To Live for the record, in seconds.
- Zone
Name stringOr Id The name or OCID of the target zone.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- compartment
Id String - (Updatable) The OCID of the compartment the resource belongs to. If supplied, it must match the Zone's compartment ocid.
- domain String
- The fully qualified domain name where the record can be located. Domain value is case insensitive.
- is
Protected Boolean - A Boolean flag indicating whether or not parts of the record are unable to be explicitly managed.
- rdata String
- (Updatable) The record's data, as whitespace-delimited tokens in type-specific presentation format. All RDATA is normalized and the returned presentation of your RDATA may differ from its initial input. For more information about RDATA, see Supported DNS Resource Record Types
- record
Hash String - A unique identifier for the record within its zone.
- rrset
Version String - The latest version of the record's zone in which its RRSet differs from the preceding version.
- rtype String
- The canonical name for the record's type, such as A or CNAME. For more information, see Resource Record (RR) TYPEs.
- ttl Integer
- (Updatable) The Time To Live for the record, in seconds.
- zone
Name StringOr Id The name or OCID of the target zone.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- compartment
Id string - (Updatable) The OCID of the compartment the resource belongs to. If supplied, it must match the Zone's compartment ocid.
- domain string
- The fully qualified domain name where the record can be located. Domain value is case insensitive.
- is
Protected boolean - A Boolean flag indicating whether or not parts of the record are unable to be explicitly managed.
- rdata string
- (Updatable) The record's data, as whitespace-delimited tokens in type-specific presentation format. All RDATA is normalized and the returned presentation of your RDATA may differ from its initial input. For more information about RDATA, see Supported DNS Resource Record Types
- record
Hash string - A unique identifier for the record within its zone.
- rrset
Version string - The latest version of the record's zone in which its RRSet differs from the preceding version.
- rtype string
- The canonical name for the record's type, such as A or CNAME. For more information, see Resource Record (RR) TYPEs.
- ttl number
- (Updatable) The Time To Live for the record, in seconds.
- zone
Name stringOr Id The name or OCID of the target zone.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- compartment_
id str - (Updatable) The OCID of the compartment the resource belongs to. If supplied, it must match the Zone's compartment ocid.
- domain str
- The fully qualified domain name where the record can be located. Domain value is case insensitive.
- is_
protected bool - A Boolean flag indicating whether or not parts of the record are unable to be explicitly managed.
- rdata str
- (Updatable) The record's data, as whitespace-delimited tokens in type-specific presentation format. All RDATA is normalized and the returned presentation of your RDATA may differ from its initial input. For more information about RDATA, see Supported DNS Resource Record Types
- record_
hash str - A unique identifier for the record within its zone.
- rrset_
version str - The latest version of the record's zone in which its RRSet differs from the preceding version.
- rtype str
- The canonical name for the record's type, such as A or CNAME. For more information, see Resource Record (RR) TYPEs.
- ttl int
- (Updatable) The Time To Live for the record, in seconds.
- zone_
name_ stror_ id The name or OCID of the target zone.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- compartment
Id String - (Updatable) The OCID of the compartment the resource belongs to. If supplied, it must match the Zone's compartment ocid.
- domain String
- The fully qualified domain name where the record can be located. Domain value is case insensitive.
- is
Protected Boolean - A Boolean flag indicating whether or not parts of the record are unable to be explicitly managed.
- rdata String
- (Updatable) The record's data, as whitespace-delimited tokens in type-specific presentation format. All RDATA is normalized and the returned presentation of your RDATA may differ from its initial input. For more information about RDATA, see Supported DNS Resource Record Types
- record
Hash String - A unique identifier for the record within its zone.
- rrset
Version String - The latest version of the record's zone in which its RRSet differs from the preceding version.
- rtype String
- The canonical name for the record's type, such as A or CNAME. For more information, see Resource Record (RR) TYPEs.
- ttl Number
- (Updatable) The Time To Live for the record, in seconds.
- zone
Name StringOr Id The name or OCID of the target zone.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
Import
Import is not supported for this resource.
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
oci
Terraform Provider.