oci.Dns.getRecords
Explore with Pulumi AI
Deprecated. Use oci.Dns.getRrsets instead.
This data source provides the list of Records in Oracle Cloud Infrastructure DNS service.
Gets all records in the specified zone.
The results are sorted by domain
in alphabetical order by default. For more information about records,
see Resource Record (RR) TYPEs.
When the zone name is provided as a path parameter and PRIVATE
is used for the scope query parameter
then the viewId query parameter is required.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testRecords = oci.Dns.getRecords({
zoneNameOrId: testZoneNameOr.id,
domain: recordDomain,
domainContains: recordDomainContains,
rtype: recordRtype,
zoneVersion: recordZoneVersion,
});
import pulumi
import pulumi_oci as oci
test_records = oci.Dns.get_records(zone_name_or_id=test_zone_name_or["id"],
domain=record_domain,
domain_contains=record_domain_contains,
rtype=record_rtype,
zone_version=record_zone_version)
package main
import (
"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/Dns"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := Dns.GetRecords(ctx, &dns.GetRecordsArgs{
ZoneNameOrId: testZoneNameOr.Id,
Domain: pulumi.StringRef(recordDomain),
DomainContains: pulumi.StringRef(recordDomainContains),
Rtype: pulumi.StringRef(recordRtype),
ZoneVersion: pulumi.StringRef(recordZoneVersion),
}, nil)
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 testRecords = Oci.Dns.GetRecords.Invoke(new()
{
ZoneNameOrId = testZoneNameOr.Id,
Domain = recordDomain,
DomainContains = recordDomainContains,
Rtype = recordRtype,
ZoneVersion = recordZoneVersion,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.Dns.DnsFunctions;
import com.pulumi.oci.Dns.inputs.GetRecordsArgs;
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) {
final var testRecords = DnsFunctions.getRecords(GetRecordsArgs.builder()
.zoneNameOrId(testZoneNameOr.id())
.domain(recordDomain)
.domainContains(recordDomainContains)
.rtype(recordRtype)
.zoneVersion(recordZoneVersion)
.build());
}
}
variables:
testRecords:
fn::invoke:
Function: oci:Dns:getRecords
Arguments:
zoneNameOrId: ${testZoneNameOr.id}
domain: ${recordDomain}
domainContains: ${recordDomainContains}
rtype: ${recordRtype}
zoneVersion: ${recordZoneVersion}
Using getRecords
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getRecords(args: GetRecordsArgs, opts?: InvokeOptions): Promise<GetRecordsResult>
function getRecordsOutput(args: GetRecordsOutputArgs, opts?: InvokeOptions): Output<GetRecordsResult>
def get_records(compartment_id: Optional[str] = None,
domain: Optional[str] = None,
domain_contains: Optional[str] = None,
filters: Optional[Sequence[_dns.GetRecordsFilter]] = None,
rtype: Optional[str] = None,
sort_by: Optional[str] = None,
sort_order: Optional[str] = None,
zone_name_or_id: Optional[str] = None,
zone_version: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetRecordsResult
def get_records_output(compartment_id: Optional[pulumi.Input[str]] = None,
domain: Optional[pulumi.Input[str]] = None,
domain_contains: Optional[pulumi.Input[str]] = None,
filters: Optional[pulumi.Input[Sequence[pulumi.Input[_dns.GetRecordsFilterArgs]]]] = None,
rtype: Optional[pulumi.Input[str]] = None,
sort_by: Optional[pulumi.Input[str]] = None,
sort_order: Optional[pulumi.Input[str]] = None,
zone_name_or_id: Optional[pulumi.Input[str]] = None,
zone_version: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetRecordsResult]
func GetRecords(ctx *Context, args *GetRecordsArgs, opts ...InvokeOption) (*GetRecordsResult, error)
func GetRecordsOutput(ctx *Context, args *GetRecordsOutputArgs, opts ...InvokeOption) GetRecordsResultOutput
> Note: This function is named GetRecords
in the Go SDK.
public static class GetRecords
{
public static Task<GetRecordsResult> InvokeAsync(GetRecordsArgs args, InvokeOptions? opts = null)
public static Output<GetRecordsResult> Invoke(GetRecordsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetRecordsResult> getRecords(GetRecordsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: oci:Dns/getRecords:getRecords
arguments:
# arguments dictionary
The following arguments are supported:
- Zone
Name stringOr Id - The name or OCID of the target zone.
- Compartment
Id string The OCID of the compartment the zone belongs to.
This parameter is deprecated and should be omitted.
- Domain string
- Search by domain. Will match any record whose domain (case-insensitive) equals the provided value.
- Domain
Contains string - Search by domain. Will match any record whose domain (case-insensitive) contains the provided value.
- Filters
List<Get
Records Filter> - Rtype string
- Search by record type. Will match any record whose type (case-insensitive) equals the provided value.
- Sort
By string - The field by which to sort records. Allowed values are: domain|rtype|ttl
- Sort
Order string - The order to sort the resources. Allowed values are: ASC|DESC
- Zone
Version string - The version of the zone for which data is requested.
- Zone
Name stringOr Id - The name or OCID of the target zone.
- Compartment
Id string The OCID of the compartment the zone belongs to.
This parameter is deprecated and should be omitted.
- Domain string
- Search by domain. Will match any record whose domain (case-insensitive) equals the provided value.
- Domain
Contains string - Search by domain. Will match any record whose domain (case-insensitive) contains the provided value.
- Filters
[]Get
Records Filter - Rtype string
- Search by record type. Will match any record whose type (case-insensitive) equals the provided value.
- Sort
By string - The field by which to sort records. Allowed values are: domain|rtype|ttl
- Sort
Order string - The order to sort the resources. Allowed values are: ASC|DESC
- Zone
Version string - The version of the zone for which data is requested.
- zone
Name StringOr Id - The name or OCID of the target zone.
- compartment
Id String The OCID of the compartment the zone belongs to.
This parameter is deprecated and should be omitted.
- domain String
- Search by domain. Will match any record whose domain (case-insensitive) equals the provided value.
- domain
Contains String - Search by domain. Will match any record whose domain (case-insensitive) contains the provided value.
- filters
List<Get
Records Filter> - rtype String
- Search by record type. Will match any record whose type (case-insensitive) equals the provided value.
- sort
By String - The field by which to sort records. Allowed values are: domain|rtype|ttl
- sort
Order String - The order to sort the resources. Allowed values are: ASC|DESC
- zone
Version String - The version of the zone for which data is requested.
- zone
Name stringOr Id - The name or OCID of the target zone.
- compartment
Id string The OCID of the compartment the zone belongs to.
This parameter is deprecated and should be omitted.
- domain string
- Search by domain. Will match any record whose domain (case-insensitive) equals the provided value.
- domain
Contains string - Search by domain. Will match any record whose domain (case-insensitive) contains the provided value.
- filters
Get
Records Filter[] - rtype string
- Search by record type. Will match any record whose type (case-insensitive) equals the provided value.
- sort
By string - The field by which to sort records. Allowed values are: domain|rtype|ttl
- sort
Order string - The order to sort the resources. Allowed values are: ASC|DESC
- zone
Version string - The version of the zone for which data is requested.
- zone_
name_ stror_ id - The name or OCID of the target zone.
- compartment_
id str The OCID of the compartment the zone belongs to.
This parameter is deprecated and should be omitted.
- domain str
- Search by domain. Will match any record whose domain (case-insensitive) equals the provided value.
- domain_
contains str - Search by domain. Will match any record whose domain (case-insensitive) contains the provided value.
- filters
Sequence[dns.
Get Records Filter] - rtype str
- Search by record type. Will match any record whose type (case-insensitive) equals the provided value.
- sort_
by str - The field by which to sort records. Allowed values are: domain|rtype|ttl
- sort_
order str - The order to sort the resources. Allowed values are: ASC|DESC
- zone_
version str - The version of the zone for which data is requested.
- zone
Name StringOr Id - The name or OCID of the target zone.
- compartment
Id String The OCID of the compartment the zone belongs to.
This parameter is deprecated and should be omitted.
- domain String
- Search by domain. Will match any record whose domain (case-insensitive) equals the provided value.
- domain
Contains String - Search by domain. Will match any record whose domain (case-insensitive) contains the provided value.
- filters List<Property Map>
- rtype String
- Search by record type. Will match any record whose type (case-insensitive) equals the provided value.
- sort
By String - The field by which to sort records. Allowed values are: domain|rtype|ttl
- sort
Order String - The order to sort the resources. Allowed values are: ASC|DESC
- zone
Version String - The version of the zone for which data is requested.
getRecords Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Records
List<Get
Records Record> - The list of records.
- Zone
Name stringOr Id - The name or OCID of the target zone.
- Compartment
Id string - Domain string
- The fully qualified domain name where the record can be located.
- Domain
Contains string - Filters
List<Get
Records Filter> - Rtype string
- The type of DNS record, such as A or CNAME. For more information, see Resource Record (RR) TYPEs.
- Sort
By string - Sort
Order string - Zone
Version string
- Id string
- The provider-assigned unique ID for this managed resource.
- Records
[]Get
Records Record - The list of records.
- Zone
Name stringOr Id - The name or OCID of the target zone.
- Compartment
Id string - Domain string
- The fully qualified domain name where the record can be located.
- Domain
Contains string - Filters
[]Get
Records Filter - Rtype string
- The type of DNS record, such as A or CNAME. For more information, see Resource Record (RR) TYPEs.
- Sort
By string - Sort
Order string - Zone
Version string
- id String
- The provider-assigned unique ID for this managed resource.
- records
List<Get
Records Record> - The list of records.
- zone
Name StringOr Id - The name or OCID of the target zone.
- compartment
Id String - domain String
- The fully qualified domain name where the record can be located.
- domain
Contains String - filters
List<Get
Records Filter> - rtype String
- The type of DNS record, such as A or CNAME. For more information, see Resource Record (RR) TYPEs.
- sort
By String - sort
Order String - zone
Version String
- id string
- The provider-assigned unique ID for this managed resource.
- records
Get
Records Record[] - The list of records.
- zone
Name stringOr Id - The name or OCID of the target zone.
- compartment
Id string - domain string
- The fully qualified domain name where the record can be located.
- domain
Contains string - filters
Get
Records Filter[] - rtype string
- The type of DNS record, such as A or CNAME. For more information, see Resource Record (RR) TYPEs.
- sort
By string - sort
Order string - zone
Version string
- id str
- The provider-assigned unique ID for this managed resource.
- records
Sequence[dns.
Get Records Record] - The list of records.
- zone_
name_ stror_ id - The name or OCID of the target zone.
- compartment_
id str - domain str
- The fully qualified domain name where the record can be located.
- domain_
contains str - filters
Sequence[dns.
Get Records Filter] - rtype str
- The type of DNS record, such as A or CNAME. For more information, see Resource Record (RR) TYPEs.
- sort_
by str - sort_
order str - zone_
version str
- id String
- The provider-assigned unique ID for this managed resource.
- records List<Property Map>
- The list of records.
- zone
Name StringOr Id - The name or OCID of the target zone.
- compartment
Id String - domain String
- The fully qualified domain name where the record can be located.
- domain
Contains String - filters List<Property Map>
- rtype String
- The type of DNS record, such as A or CNAME. For more information, see Resource Record (RR) TYPEs.
- sort
By String - sort
Order String - zone
Version String
Supporting Types
GetRecordsFilter
GetRecordsRecord
- Domain string
- Search by domain. Will match any record whose domain (case-insensitive) equals the provided value.
- 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.
- Rtype string
- Search by record type. Will match any record whose type (case-insensitive) equals the provided value.
- Zone
Name stringOr Id - The name or OCID of the target zone.
- Compartment
Id string The OCID of the compartment the zone belongs to.
This parameter is deprecated and should be omitted.
- Rdata string
- 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
- The Time To Live for the record, in seconds. Using a TTL lower than 30 seconds is not recommended.
- Domain string
- Search by domain. Will match any record whose domain (case-insensitive) equals the provided value.
- 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.
- Rtype string
- Search by record type. Will match any record whose type (case-insensitive) equals the provided value.
- Zone
Name stringOr Id - The name or OCID of the target zone.
- Compartment
Id string The OCID of the compartment the zone belongs to.
This parameter is deprecated and should be omitted.
- Rdata string
- 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
- The Time To Live for the record, in seconds. Using a TTL lower than 30 seconds is not recommended.
- domain String
- Search by domain. Will match any record whose domain (case-insensitive) equals the provided value.
- 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.
- rtype String
- Search by record type. Will match any record whose type (case-insensitive) equals the provided value.
- zone
Name StringOr Id - The name or OCID of the target zone.
- compartment
Id String The OCID of the compartment the zone belongs to.
This parameter is deprecated and should be omitted.
- rdata String
- 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
- The Time To Live for the record, in seconds. Using a TTL lower than 30 seconds is not recommended.
- domain string
- Search by domain. Will match any record whose domain (case-insensitive) equals the provided value.
- 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.
- rtype string
- Search by record type. Will match any record whose type (case-insensitive) equals the provided value.
- zone
Name stringOr Id - The name or OCID of the target zone.
- compartment
Id string The OCID of the compartment the zone belongs to.
This parameter is deprecated and should be omitted.
- rdata string
- 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
- The Time To Live for the record, in seconds. Using a TTL lower than 30 seconds is not recommended.
- domain str
- Search by domain. Will match any record whose domain (case-insensitive) equals the provided value.
- 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.
- rtype str
- Search by record type. Will match any record whose type (case-insensitive) equals the provided value.
- zone_
name_ stror_ id - The name or OCID of the target zone.
- compartment_
id str The OCID of the compartment the zone belongs to.
This parameter is deprecated and should be omitted.
- rdata str
- 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
- The Time To Live for the record, in seconds. Using a TTL lower than 30 seconds is not recommended.
- domain String
- Search by domain. Will match any record whose domain (case-insensitive) equals the provided value.
- 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.
- rtype String
- Search by record type. Will match any record whose type (case-insensitive) equals the provided value.
- zone
Name StringOr Id - The name or OCID of the target zone.
- compartment
Id String The OCID of the compartment the zone belongs to.
This parameter is deprecated and should be omitted.
- rdata String
- 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
- The Time To Live for the record, in seconds. Using a TTL lower than 30 seconds is not recommended.
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
oci
Terraform Provider.