1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. Dns
  5. Rrset
Oracle Cloud Infrastructure v1.24.0 published on Thursday, Feb 22, 2024 by Pulumi

oci.Dns.Rrset

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v1.24.0 published on Thursday, Feb 22, 2024 by Pulumi

    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 System.Linq;
    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)
    public Rrset(String name, RrsetArgs args)
    public Rrset(String name, RrsetArgs args, CustomResourceOptions options)
    
    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.
    ZoneNameOrId string

    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

    CompartmentId string
    (Updatable) The OCID of the compartment the resource belongs to.
    Items List<RrsetItem>
    (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.
    ViewId 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.
    ZoneNameOrId string

    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

    CompartmentId string
    (Updatable) The OCID of the compartment the resource belongs to.
    Items []RrsetItemArgs
    (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.
    ViewId 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.
    zoneNameOrId String

    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

    compartmentId String
    (Updatable) The OCID of the compartment the resource belongs to.
    items List<RrsetItem>
    (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.
    viewId 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.
    zoneNameOrId string

    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

    compartmentId string
    (Updatable) The OCID of the compartment the resource belongs to.
    items RrsetItem[]
    (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.
    viewId 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_or_id str

    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.
    items RrsetItemArgs]
    (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.
    zoneNameOrId String

    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

    compartmentId 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.
    viewId 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.
    The following state arguments are supported:
    CompartmentId 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<RrsetItem>
    (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.
    ViewId string
    The OCID of the view the resource is associated with.
    ZoneNameOrId string

    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

    CompartmentId 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 []RrsetItemArgs
    (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.
    ViewId string
    The OCID of the view the resource is associated with.
    ZoneNameOrId string

    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

    compartmentId 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<RrsetItem>
    (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.
    viewId String
    The OCID of the view the resource is associated with.
    zoneNameOrId String

    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

    compartmentId 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 RrsetItem[]
    (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.
    viewId string
    The OCID of the view the resource is associated with.
    zoneNameOrId string

    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.
    domain str
    The fully qualified domain name where the record can be located.
    items RrsetItemArgs]
    (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_or_id str

    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

    compartmentId 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.
    viewId String
    The OCID of the view the resource is associated with.
    zoneNameOrId String

    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

    Supporting Types

    RrsetItem, RrsetItemArgs

    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.
    IsProtected bool
    A Boolean flag indicating whether or not parts of the record are unable to be explicitly managed.
    RecordHash string
    A unique identifier for the record within its zone.
    RrsetVersion 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.
    IsProtected bool
    A Boolean flag indicating whether or not parts of the record are unable to be explicitly managed.
    RecordHash string
    A unique identifier for the record within its zone.
    RrsetVersion 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.
    isProtected Boolean
    A Boolean flag indicating whether or not parts of the record are unable to be explicitly managed.
    recordHash String
    A unique identifier for the record within its zone.
    rrsetVersion 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.
    isProtected boolean
    A Boolean flag indicating whether or not parts of the record are unable to be explicitly managed.
    recordHash string
    A unique identifier for the record within its zone.
    rrsetVersion 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.
    isProtected Boolean
    A Boolean flag indicating whether or not parts of the record are unable to be explicitly managed.
    recordHash String
    A unique identifier for the record within its zone.
    rrsetVersion 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.
    oci logo
    Oracle Cloud Infrastructure v1.24.0 published on Thursday, Feb 22, 2024 by Pulumi