oci.Dns.Rrset
This resource provides the Rrset resource in Oracle Cloud Infrastructure DNS service.
Replaces records in the specified RRSet. When the zone name is provided as a path parameter
and the zone has a scope of PRIVATE
then the viewId query parameter is required.
Example Usage
using System.Collections.Generic;
using Pulumi;
using Oci = Pulumi.Oci;
return await Deployment.RunAsync(() =>
{
var testRrset = new Oci.Dns.Rrset("testRrset", new()
{
Domain = @var.Rrset_domain,
Rtype = @var.Rrset_rtype,
ZoneNameOrId = oci_dns_zone.Test_zone.Id,
CompartmentId = @var.Compartment_id,
Items = new[]
{
new Oci.Dns.Inputs.RrsetItemArgs
{
Domain = @var.Rrset_items_domain,
Rdata = @var.Rrset_items_rdata,
Rtype = @var.Rrset_items_rtype,
Ttl = @var.Rrset_items_ttl,
},
},
Scope = @var.Rrset_scope,
ViewId = oci_dns_view.Test_view.Id,
});
});
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.NewRrset(ctx, "testRrset", &Dns.RrsetArgs{
Domain: pulumi.Any(_var.Rrset_domain),
Rtype: pulumi.Any(_var.Rrset_rtype),
ZoneNameOrId: pulumi.Any(oci_dns_zone.Test_zone.Id),
CompartmentId: pulumi.Any(_var.Compartment_id),
Items: dns.RrsetItemArray{
&dns.RrsetItemArgs{
Domain: pulumi.Any(_var.Rrset_items_domain),
Rdata: pulumi.Any(_var.Rrset_items_rdata),
Rtype: pulumi.Any(_var.Rrset_items_rtype),
Ttl: pulumi.Any(_var.Rrset_items_ttl),
},
},
Scope: pulumi.Any(_var.Rrset_scope),
ViewId: pulumi.Any(oci_dns_view.Test_view.Id),
})
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.oci.Dns.Rrset;
import com.pulumi.oci.Dns.RrsetArgs;
import com.pulumi.oci.Dns.inputs.RrsetItemArgs;
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 testRrset = new Rrset("testRrset", RrsetArgs.builder()
.domain(var_.rrset_domain())
.rtype(var_.rrset_rtype())
.zoneNameOrId(oci_dns_zone.test_zone().id())
.compartmentId(var_.compartment_id())
.items(RrsetItemArgs.builder()
.domain(var_.rrset_items_domain())
.rdata(var_.rrset_items_rdata())
.rtype(var_.rrset_items_rtype())
.ttl(var_.rrset_items_ttl())
.build())
.scope(var_.rrset_scope())
.viewId(oci_dns_view.test_view().id())
.build());
}
}
import pulumi
import pulumi_oci as oci
test_rrset = oci.dns.Rrset("testRrset",
domain=var["rrset_domain"],
rtype=var["rrset_rtype"],
zone_name_or_id=oci_dns_zone["test_zone"]["id"],
compartment_id=var["compartment_id"],
items=[oci.dns.RrsetItemArgs(
domain=var["rrset_items_domain"],
rdata=var["rrset_items_rdata"],
rtype=var["rrset_items_rtype"],
ttl=var["rrset_items_ttl"],
)],
scope=var["rrset_scope"],
view_id=oci_dns_view["test_view"]["id"])
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testRrset = new oci.dns.Rrset("testRrset", {
domain: _var.rrset_domain,
rtype: _var.rrset_rtype,
zoneNameOrId: oci_dns_zone.test_zone.id,
compartmentId: _var.compartment_id,
items: [{
domain: _var.rrset_items_domain,
rdata: _var.rrset_items_rdata,
rtype: _var.rrset_items_rtype,
ttl: _var.rrset_items_ttl,
}],
scope: _var.rrset_scope,
viewId: oci_dns_view.test_view.id,
});
resources:
testRrset:
type: oci:Dns:Rrset
properties:
#Required
domain: ${var.rrset_domain}
rtype: ${var.rrset_rtype}
zoneNameOrId: ${oci_dns_zone.test_zone.id}
#Optional
compartmentId: ${var.compartment_id}
items:
- domain: ${var.rrset_items_domain}
rdata: ${var.rrset_items_rdata}
rtype: ${var.rrset_items_rtype}
ttl: ${var.rrset_items_ttl}
scope: ${var.rrset_scope}
viewId: ${oci_dns_view.test_view.id}
Create Rrset Resource
new Rrset(name: string, args: RrsetArgs, opts?: CustomResourceOptions);
@overload
def Rrset(resource_name: str,
opts: Optional[ResourceOptions] = None,
compartment_id: Optional[str] = None,
domain: Optional[str] = None,
items: Optional[Sequence[_dns.RrsetItemArgs]] = None,
rtype: Optional[str] = None,
scope: Optional[str] = None,
view_id: Optional[str] = None,
zone_name_or_id: Optional[str] = None)
@overload
def Rrset(resource_name: str,
args: RrsetArgs,
opts: Optional[ResourceOptions] = None)
func NewRrset(ctx *Context, name string, args RrsetArgs, opts ...ResourceOption) (*Rrset, error)
public Rrset(string name, RrsetArgs args, CustomResourceOptions? opts = null)
type: oci:Dns:Rrset
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args RrsetArgs
- 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 RrsetArgs
- 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 RrsetArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args RrsetArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args RrsetArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Rrset 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 Rrset resource accepts the following input properties:
- Domain string
The fully qualified domain name where the record can be located.
- Rtype string
The type of the target RRSet within the target zone.
- Zone
Name stringOr Id The name or OCID of the target zone.
- Compartment
Id string (Updatable) The OCID of the compartment the resource belongs to.
- Items
List<Rrset
Item Args> (Updatable) NOTE Omitting
items
at time of create, will delete any existing records in the RRSet- Scope string
Specifies to operate only on resources that have a matching DNS scope. This value will be null for zones in the global DNS and
PRIVATE
when creating private Rrsets.- View
Id string The OCID of the view the resource is associated with.
- Domain string
The fully qualified domain name where the record can be located.
- Rtype string
The type of the target RRSet within the target zone.
- Zone
Name stringOr Id The name or OCID of the target zone.
- Compartment
Id string (Updatable) The OCID of the compartment the resource belongs to.
- Items
[]Rrset
Item Args (Updatable) NOTE Omitting
items
at time of create, will delete any existing records in the RRSet- Scope string
Specifies to operate only on resources that have a matching DNS scope. This value will be null for zones in the global DNS and
PRIVATE
when creating private Rrsets.- View
Id string The OCID of the view the resource is associated with.
- domain String
The fully qualified domain name where the record can be located.
- rtype String
The type of the target RRSet within the target zone.
- zone
Name StringOr Id The name or OCID of the target zone.
- compartment
Id String (Updatable) The OCID of the compartment the resource belongs to.
- items
List<Rrset
Item Args> (Updatable) NOTE Omitting
items
at time of create, will delete any existing records in the RRSet- scope String
Specifies to operate only on resources that have a matching DNS scope. This value will be null for zones in the global DNS and
PRIVATE
when creating private Rrsets.- view
Id String The OCID of the view the resource is associated with.
- domain string
The fully qualified domain name where the record can be located.
- rtype string
The type of the target RRSet within the target zone.
- zone
Name stringOr Id The name or OCID of the target zone.
- compartment
Id string (Updatable) The OCID of the compartment the resource belongs to.
- items
Rrset
Item Args[] (Updatable) NOTE Omitting
items
at time of create, will delete any existing records in the RRSet- scope string
Specifies to operate only on resources that have a matching DNS scope. This value will be null for zones in the global DNS and
PRIVATE
when creating private Rrsets.- view
Id string The OCID of the view the resource is associated with.
- domain str
The fully qualified domain name where the record can be located.
- rtype str
The type of the target RRSet within the target zone.
- zone_
name_ stror_ id The name or OCID of the target zone.
- compartment_
id str (Updatable) The OCID of the compartment the resource belongs to.
- items
Rrset
Item Args] (Updatable) NOTE Omitting
items
at time of create, will delete any existing records in the RRSet- scope str
Specifies to operate only on resources that have a matching DNS scope. This value will be null for zones in the global DNS and
PRIVATE
when creating private Rrsets.- view_
id str The OCID of the view the resource is associated with.
- domain String
The fully qualified domain name where the record can be located.
- rtype String
The type of the target RRSet within the target zone.
- zone
Name StringOr Id The name or OCID of the target zone.
- compartment
Id String (Updatable) The OCID of the compartment the resource belongs to.
- items List<Property Map>
(Updatable) NOTE Omitting
items
at time of create, will delete any existing records in the RRSet- scope String
Specifies to operate only on resources that have a matching DNS scope. This value will be null for zones in the global DNS and
PRIVATE
when creating private Rrsets.- view
Id String The OCID of the view the resource is associated with.
Outputs
All input properties are implicitly available as output properties. Additionally, the Rrset resource produces the following output properties:
- Id string
The provider-assigned unique ID for this managed resource.
- Id string
The provider-assigned unique ID for this managed resource.
- id String
The provider-assigned unique ID for this managed resource.
- id string
The provider-assigned unique ID for this managed resource.
- id str
The provider-assigned unique ID for this managed resource.
- id String
The provider-assigned unique ID for this managed resource.
Look up Existing Rrset Resource
Get an existing Rrset 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?: RrsetState, opts?: CustomResourceOptions): Rrset
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
compartment_id: Optional[str] = None,
domain: Optional[str] = None,
items: Optional[Sequence[_dns.RrsetItemArgs]] = None,
rtype: Optional[str] = None,
scope: Optional[str] = None,
view_id: Optional[str] = None,
zone_name_or_id: Optional[str] = None) -> Rrset
func GetRrset(ctx *Context, name string, id IDInput, state *RrsetState, opts ...ResourceOption) (*Rrset, error)
public static Rrset Get(string name, Input<string> id, RrsetState? state, CustomResourceOptions? opts = null)
public static Rrset get(String name, Output<String> id, RrsetState 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.
- Domain string
The fully qualified domain name where the record can be located.
- Items
List<Rrset
Item Args> (Updatable) NOTE Omitting
items
at time of create, will delete any existing records in the RRSet- Rtype string
The type of the target RRSet within the target zone.
- Scope string
Specifies to operate only on resources that have a matching DNS scope. This value will be null for zones in the global DNS and
PRIVATE
when creating private Rrsets.- View
Id string The OCID of the view the resource is associated with.
- Zone
Name stringOr Id The name or OCID of the target zone.
- Compartment
Id string (Updatable) The OCID of the compartment the resource belongs to.
- Domain string
The fully qualified domain name where the record can be located.
- Items
[]Rrset
Item Args (Updatable) NOTE Omitting
items
at time of create, will delete any existing records in the RRSet- Rtype string
The type of the target RRSet within the target zone.
- Scope string
Specifies to operate only on resources that have a matching DNS scope. This value will be null for zones in the global DNS and
PRIVATE
when creating private Rrsets.- View
Id string The OCID of the view the resource is associated with.
- Zone
Name stringOr Id The name or OCID of the target zone.
- compartment
Id String (Updatable) The OCID of the compartment the resource belongs to.
- domain String
The fully qualified domain name where the record can be located.
- items
List<Rrset
Item Args> (Updatable) NOTE Omitting
items
at time of create, will delete any existing records in the RRSet- rtype String
The type of the target RRSet within the target zone.
- scope String
Specifies to operate only on resources that have a matching DNS scope. This value will be null for zones in the global DNS and
PRIVATE
when creating private Rrsets.- view
Id String The OCID of the view the resource is associated with.
- zone
Name StringOr Id The name or OCID of the target zone.
- compartment
Id string (Updatable) The OCID of the compartment the resource belongs to.
- domain string
The fully qualified domain name where the record can be located.
- items
Rrset
Item Args[] (Updatable) NOTE Omitting
items
at time of create, will delete any existing records in the RRSet- rtype string
The type of the target RRSet within the target zone.
- scope string
Specifies to operate only on resources that have a matching DNS scope. This value will be null for zones in the global DNS and
PRIVATE
when creating private Rrsets.- view
Id string The OCID of the view the resource is associated with.
- zone
Name stringOr Id The name or OCID of the target zone.
- compartment_
id str (Updatable) The OCID of the compartment the resource belongs to.
- domain str
The fully qualified domain name where the record can be located.
- items
Rrset
Item Args] (Updatable) NOTE Omitting
items
at time of create, will delete any existing records in the RRSet- rtype str
The type of the target RRSet within the target zone.
- scope str
Specifies to operate only on resources that have a matching DNS scope. This value will be null for zones in the global DNS and
PRIVATE
when creating private Rrsets.- view_
id str The OCID of the view the resource is associated with.
- zone_
name_ stror_ id The name or OCID of the target zone.
- compartment
Id String (Updatable) The OCID of the compartment the resource belongs to.
- domain String
The fully qualified domain name where the record can be located.
- items List<Property Map>
(Updatable) NOTE Omitting
items
at time of create, will delete any existing records in the RRSet- rtype String
The type of the target RRSet within the target zone.
- scope String
Specifies to operate only on resources that have a matching DNS scope. This value will be null for zones in the global DNS and
PRIVATE
when creating private Rrsets.- view
Id String The OCID of the view the resource is associated with.
- zone
Name StringOr Id The name or OCID of the target zone.
Supporting Types
RrsetItem
- Domain string
The fully qualified domain name where the record can be located.
- 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
- Rtype string
The type of the target RRSet within the target zone.
- Ttl int
(Updatable) The Time To Live for the record, in seconds.
- 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.
- Domain string
The fully qualified domain name where the record can be located.
- 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
- Rtype string
The type of the target RRSet within the target zone.
- Ttl int
(Updatable) The Time To Live for the record, in seconds.
- 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.
- domain String
The fully qualified domain name where the record can be located.
- 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
- rtype String
The type of the target RRSet within the target zone.
- ttl Integer
(Updatable) The Time To Live for the record, in seconds.
- 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.
- domain string
The fully qualified domain name where the record can be located.
- 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
- rtype string
The type of the target RRSet within the target zone.
- ttl number
(Updatable) The Time To Live for the record, in seconds.
- 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.
- domain str
The fully qualified domain name where the record can be located.
- 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
- rtype str
The type of the target RRSet within the target zone.
- ttl int
(Updatable) The Time To Live for the record, in seconds.
- 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.
- domain String
The fully qualified domain name where the record can be located.
- 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
- rtype String
The type of the target RRSet within the target zone.
- ttl Number
(Updatable) The Time To Live for the record, in seconds.
- 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.
Import
For legacy Rrsets that were created without using scope
, these Rrsets can be imported using the id
, e.g.
$ pulumi import oci:Dns/rrset:Rrset test_rrset "zoneNameOrId/{zoneNameOrId}/domain/{domain}/rtype/{rtype}"
For Rrsets created using scope
and view_id
, these Rrsets can be imported using the id
, e.g.
$ pulumi import oci:Dns/rrset:Rrset test_rrset "zoneNameOrId/{zoneNameOrId}/domain/{domain}/rtype/{rtype}/scope/{scope}/viewId/{viewId}"
skip adding {view_id}
at the end if Rrset was created without view_id
.
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
oci
Terraform Provider.