oci.Dns.getResolvers
Explore with Pulumi AI
This data source provides the list of Resolvers in Oracle Cloud Infrastructure DNS service.
Gets a list of all resolvers within a compartment. The collection can
be filtered by display name, id, or lifecycle state. It can be sorted
on creation time or displayName both in ASC or DESC order. Note that
when no lifecycleState query parameter is provided, the collection
does not include resolvers in the DELETED lifecycleState to be consistent
with other operations of the API. Requires a PRIVATE
scope query parameter.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testResolvers = oci.Dns.getResolvers({
compartmentId: compartmentId,
scope: "PRIVATE",
displayName: resolverDisplayName,
id: resolverId,
state: resolverState,
});
import pulumi
import pulumi_oci as oci
test_resolvers = oci.Dns.get_resolvers(compartment_id=compartment_id,
scope="PRIVATE",
display_name=resolver_display_name,
id=resolver_id,
state=resolver_state)
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.GetResolvers(ctx, &dns.GetResolversArgs{
CompartmentId: compartmentId,
Scope: "PRIVATE",
DisplayName: pulumi.StringRef(resolverDisplayName),
Id: pulumi.StringRef(resolverId),
State: pulumi.StringRef(resolverState),
}, 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 testResolvers = Oci.Dns.GetResolvers.Invoke(new()
{
CompartmentId = compartmentId,
Scope = "PRIVATE",
DisplayName = resolverDisplayName,
Id = resolverId,
State = resolverState,
});
});
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.GetResolversArgs;
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 testResolvers = DnsFunctions.getResolvers(GetResolversArgs.builder()
.compartmentId(compartmentId)
.scope("PRIVATE")
.displayName(resolverDisplayName)
.id(resolverId)
.state(resolverState)
.build());
}
}
variables:
testResolvers:
fn::invoke:
Function: oci:Dns:getResolvers
Arguments:
compartmentId: ${compartmentId}
scope: PRIVATE
displayName: ${resolverDisplayName}
id: ${resolverId}
state: ${resolverState}
Using getResolvers
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 getResolvers(args: GetResolversArgs, opts?: InvokeOptions): Promise<GetResolversResult>
function getResolversOutput(args: GetResolversOutputArgs, opts?: InvokeOptions): Output<GetResolversResult>
def get_resolvers(compartment_id: Optional[str] = None,
display_name: Optional[str] = None,
filters: Optional[Sequence[_dns.GetResolversFilter]] = None,
id: Optional[str] = None,
scope: Optional[str] = None,
state: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetResolversResult
def get_resolvers_output(compartment_id: Optional[pulumi.Input[str]] = None,
display_name: Optional[pulumi.Input[str]] = None,
filters: Optional[pulumi.Input[Sequence[pulumi.Input[_dns.GetResolversFilterArgs]]]] = None,
id: Optional[pulumi.Input[str]] = None,
scope: Optional[pulumi.Input[str]] = None,
state: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetResolversResult]
func GetResolvers(ctx *Context, args *GetResolversArgs, opts ...InvokeOption) (*GetResolversResult, error)
func GetResolversOutput(ctx *Context, args *GetResolversOutputArgs, opts ...InvokeOption) GetResolversResultOutput
> Note: This function is named GetResolvers
in the Go SDK.
public static class GetResolvers
{
public static Task<GetResolversResult> InvokeAsync(GetResolversArgs args, InvokeOptions? opts = null)
public static Output<GetResolversResult> Invoke(GetResolversInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetResolversResult> getResolvers(GetResolversArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: oci:Dns/getResolvers:getResolvers
arguments:
# arguments dictionary
The following arguments are supported:
- Compartment
Id string - The OCID of the compartment the resource belongs to.
- Scope string
- Value must be
PRIVATE
when listing private name resolvers. - Display
Name string - The displayName of a resource.
- Filters
List<Get
Resolvers Filter> - Id string
- The OCID of a resource.
- State string
- The state of a resource.
- Compartment
Id string - The OCID of the compartment the resource belongs to.
- Scope string
- Value must be
PRIVATE
when listing private name resolvers. - Display
Name string - The displayName of a resource.
- Filters
[]Get
Resolvers Filter - Id string
- The OCID of a resource.
- State string
- The state of a resource.
- compartment
Id String - The OCID of the compartment the resource belongs to.
- scope String
- Value must be
PRIVATE
when listing private name resolvers. - display
Name String - The displayName of a resource.
- filters
List<Get
Resolvers Filter> - id String
- The OCID of a resource.
- state String
- The state of a resource.
- compartment
Id string - The OCID of the compartment the resource belongs to.
- scope string
- Value must be
PRIVATE
when listing private name resolvers. - display
Name string - The displayName of a resource.
- filters
Get
Resolvers Filter[] - id string
- The OCID of a resource.
- state string
- The state of a resource.
- compartment_
id str - The OCID of the compartment the resource belongs to.
- scope str
- Value must be
PRIVATE
when listing private name resolvers. - display_
name str - The displayName of a resource.
- filters
Sequence[dns.
Get Resolvers Filter] - id str
- The OCID of a resource.
- state str
- The state of a resource.
- compartment
Id String - The OCID of the compartment the resource belongs to.
- scope String
- Value must be
PRIVATE
when listing private name resolvers. - display
Name String - The displayName of a resource.
- filters List<Property Map>
- id String
- The OCID of a resource.
- state String
- The state of a resource.
getResolvers Result
The following output properties are available:
- Compartment
Id string - The OCID of the owning compartment.
- Resolvers
List<Get
Resolvers Resolver> - The list of resolvers.
- Scope string
- Display
Name string - The display name of the resolver.
- Filters
List<Get
Resolvers Filter> - Id string
- The OCID of the resolver.
- State string
- The current state of the resource.
- Compartment
Id string - The OCID of the owning compartment.
- Resolvers
[]Get
Resolvers Resolver - The list of resolvers.
- Scope string
- Display
Name string - The display name of the resolver.
- Filters
[]Get
Resolvers Filter - Id string
- The OCID of the resolver.
- State string
- The current state of the resource.
- compartment
Id String - The OCID of the owning compartment.
- resolvers
List<Get
Resolvers Resolver> - The list of resolvers.
- scope String
- display
Name String - The display name of the resolver.
- filters
List<Get
Resolvers Filter> - id String
- The OCID of the resolver.
- state String
- The current state of the resource.
- compartment
Id string - The OCID of the owning compartment.
- resolvers
Get
Resolvers Resolver[] - The list of resolvers.
- scope string
- display
Name string - The display name of the resolver.
- filters
Get
Resolvers Filter[] - id string
- The OCID of the resolver.
- state string
- The current state of the resource.
- compartment_
id str - The OCID of the owning compartment.
- resolvers
Sequence[dns.
Get Resolvers Resolver] - The list of resolvers.
- scope str
- display_
name str - The display name of the resolver.
- filters
Sequence[dns.
Get Resolvers Filter] - id str
- The OCID of the resolver.
- state str
- The current state of the resource.
- compartment
Id String - The OCID of the owning compartment.
- resolvers List<Property Map>
- The list of resolvers.
- scope String
- display
Name String - The display name of the resolver.
- filters List<Property Map>
- id String
- The OCID of the resolver.
- state String
- The current state of the resource.
Supporting Types
GetResolversFilter
GetResolversResolver
- Attached
Vcn stringId - The OCID of the attached VCN.
- Attached
Views List<GetResolvers Resolver Attached View> - Compartment
Id string - The OCID of the compartment the resource belongs to.
- Default
View stringId - The OCID of the default view.
- Dictionary<string, object>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
- Display
Name string - The displayName of a resource.
- Endpoints
List<Get
Resolvers Resolver Endpoint> - Dictionary<string, object>
- Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags.
- Id string
- The OCID of a resource.
- Is
Protected bool - A Boolean flag indicating whether or not parts of the resource are unable to be explicitly managed.
- Resolver
Id string - Rules
List<Get
Resolvers Resolver Rule> - Scope string
- Value must be
PRIVATE
when listing private name resolvers. - Self string
- The canonical absolute URL of the resource.
- State string
- The state of a resource.
- Time
Created string - The date and time the resource was created in "YYYY-MM-ddThh:mm:ssZ" format with a Z offset, as defined by RFC 3339.
- Time
Updated string - The date and time the resource was last updated in "YYYY-MM-ddThh:mm:ssZ" format with a Z offset, as defined by RFC 3339.
- Attached
Vcn stringId - The OCID of the attached VCN.
- Attached
Views []GetResolvers Resolver Attached View - Compartment
Id string - The OCID of the compartment the resource belongs to.
- Default
View stringId - The OCID of the default view.
- map[string]interface{}
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
- Display
Name string - The displayName of a resource.
- Endpoints
[]Get
Resolvers Resolver Endpoint - map[string]interface{}
- Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags.
- Id string
- The OCID of a resource.
- Is
Protected bool - A Boolean flag indicating whether or not parts of the resource are unable to be explicitly managed.
- Resolver
Id string - Rules
[]Get
Resolvers Resolver Rule - Scope string
- Value must be
PRIVATE
when listing private name resolvers. - Self string
- The canonical absolute URL of the resource.
- State string
- The state of a resource.
- Time
Created string - The date and time the resource was created in "YYYY-MM-ddThh:mm:ssZ" format with a Z offset, as defined by RFC 3339.
- Time
Updated string - The date and time the resource was last updated in "YYYY-MM-ddThh:mm:ssZ" format with a Z offset, as defined by RFC 3339.
- attached
Vcn StringId - The OCID of the attached VCN.
- attached
Views List<GetResolvers Resolver Attached View> - compartment
Id String - The OCID of the compartment the resource belongs to.
- default
View StringId - The OCID of the default view.
- Map<String,Object>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
- display
Name String - The displayName of a resource.
- endpoints
List<Get
Resolvers Resolver Endpoint> - Map<String,Object>
- Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags.
- id String
- The OCID of a resource.
- is
Protected Boolean - A Boolean flag indicating whether or not parts of the resource are unable to be explicitly managed.
- resolver
Id String - rules
List<Get
Resolvers Resolver Rule> - scope String
- Value must be
PRIVATE
when listing private name resolvers. - self String
- The canonical absolute URL of the resource.
- state String
- The state of a resource.
- time
Created String - The date and time the resource was created in "YYYY-MM-ddThh:mm:ssZ" format with a Z offset, as defined by RFC 3339.
- time
Updated String - The date and time the resource was last updated in "YYYY-MM-ddThh:mm:ssZ" format with a Z offset, as defined by RFC 3339.
- attached
Vcn stringId - The OCID of the attached VCN.
- attached
Views GetResolvers Resolver Attached View[] - compartment
Id string - The OCID of the compartment the resource belongs to.
- default
View stringId - The OCID of the default view.
- {[key: string]: any}
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
- display
Name string - The displayName of a resource.
- endpoints
Get
Resolvers Resolver Endpoint[] - {[key: string]: any}
- Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags.
- id string
- The OCID of a resource.
- is
Protected boolean - A Boolean flag indicating whether or not parts of the resource are unable to be explicitly managed.
- resolver
Id string - rules
Get
Resolvers Resolver Rule[] - scope string
- Value must be
PRIVATE
when listing private name resolvers. - self string
- The canonical absolute URL of the resource.
- state string
- The state of a resource.
- time
Created string - The date and time the resource was created in "YYYY-MM-ddThh:mm:ssZ" format with a Z offset, as defined by RFC 3339.
- time
Updated string - The date and time the resource was last updated in "YYYY-MM-ddThh:mm:ssZ" format with a Z offset, as defined by RFC 3339.
- attached_
vcn_ strid - The OCID of the attached VCN.
- attached_
views Sequence[dns.Get Resolvers Resolver Attached View] - compartment_
id str - The OCID of the compartment the resource belongs to.
- default_
view_ strid - The OCID of the default view.
- Mapping[str, Any]
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
- display_
name str - The displayName of a resource.
- endpoints
Sequence[dns.
Get Resolvers Resolver Endpoint] - Mapping[str, Any]
- Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags.
- id str
- The OCID of a resource.
- is_
protected bool - A Boolean flag indicating whether or not parts of the resource are unable to be explicitly managed.
- resolver_
id str - rules
Sequence[dns.
Get Resolvers Resolver Rule] - scope str
- Value must be
PRIVATE
when listing private name resolvers. - self str
- The canonical absolute URL of the resource.
- state str
- The state of a resource.
- time_
created str - The date and time the resource was created in "YYYY-MM-ddThh:mm:ssZ" format with a Z offset, as defined by RFC 3339.
- time_
updated str - The date and time the resource was last updated in "YYYY-MM-ddThh:mm:ssZ" format with a Z offset, as defined by RFC 3339.
- attached
Vcn StringId - The OCID of the attached VCN.
- attached
Views List<Property Map> - compartment
Id String - The OCID of the compartment the resource belongs to.
- default
View StringId - The OCID of the default view.
- Map<Any>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
- display
Name String - The displayName of a resource.
- endpoints List<Property Map>
- Map<Any>
- Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags.
- id String
- The OCID of a resource.
- is
Protected Boolean - A Boolean flag indicating whether or not parts of the resource are unable to be explicitly managed.
- resolver
Id String - rules List<Property Map>
- scope String
- Value must be
PRIVATE
when listing private name resolvers. - self String
- The canonical absolute URL of the resource.
- state String
- The state of a resource.
- time
Created String - The date and time the resource was created in "YYYY-MM-ddThh:mm:ssZ" format with a Z offset, as defined by RFC 3339.
- time
Updated String - The date and time the resource was last updated in "YYYY-MM-ddThh:mm:ssZ" format with a Z offset, as defined by RFC 3339.
GetResolversResolverAttachedView
- View
Id string
- View
Id string
- view
Id String
- view
Id string
- view_
id str
- view
Id String
GetResolversResolverEndpoint
- Compartment
Id string - The OCID of the compartment the resource belongs to.
- Endpoint
Type string - Forwarding
Address string - Is
Forwarding bool - Is
Listening bool - Listening
Address string - Name string
- Self string
- The canonical absolute URL of the resource.
- State string
- The state of a resource.
- Subnet
Id string - Time
Created string - The date and time the resource was created in "YYYY-MM-ddThh:mm:ssZ" format with a Z offset, as defined by RFC 3339.
- Time
Updated string - The date and time the resource was last updated in "YYYY-MM-ddThh:mm:ssZ" format with a Z offset, as defined by RFC 3339.
- Compartment
Id string - The OCID of the compartment the resource belongs to.
- Endpoint
Type string - Forwarding
Address string - Is
Forwarding bool - Is
Listening bool - Listening
Address string - Name string
- Self string
- The canonical absolute URL of the resource.
- State string
- The state of a resource.
- Subnet
Id string - Time
Created string - The date and time the resource was created in "YYYY-MM-ddThh:mm:ssZ" format with a Z offset, as defined by RFC 3339.
- Time
Updated string - The date and time the resource was last updated in "YYYY-MM-ddThh:mm:ssZ" format with a Z offset, as defined by RFC 3339.
- compartment
Id String - The OCID of the compartment the resource belongs to.
- endpoint
Type String - forwarding
Address String - is
Forwarding Boolean - is
Listening Boolean - listening
Address String - name String
- self String
- The canonical absolute URL of the resource.
- state String
- The state of a resource.
- subnet
Id String - time
Created String - The date and time the resource was created in "YYYY-MM-ddThh:mm:ssZ" format with a Z offset, as defined by RFC 3339.
- time
Updated String - The date and time the resource was last updated in "YYYY-MM-ddThh:mm:ssZ" format with a Z offset, as defined by RFC 3339.
- compartment
Id string - The OCID of the compartment the resource belongs to.
- endpoint
Type string - forwarding
Address string - is
Forwarding boolean - is
Listening boolean - listening
Address string - name string
- self string
- The canonical absolute URL of the resource.
- state string
- The state of a resource.
- subnet
Id string - time
Created string - The date and time the resource was created in "YYYY-MM-ddThh:mm:ssZ" format with a Z offset, as defined by RFC 3339.
- time
Updated string - The date and time the resource was last updated in "YYYY-MM-ddThh:mm:ssZ" format with a Z offset, as defined by RFC 3339.
- compartment_
id str - The OCID of the compartment the resource belongs to.
- endpoint_
type str - forwarding_
address str - is_
forwarding bool - is_
listening bool - listening_
address str - name str
- self str
- The canonical absolute URL of the resource.
- state str
- The state of a resource.
- subnet_
id str - time_
created str - The date and time the resource was created in "YYYY-MM-ddThh:mm:ssZ" format with a Z offset, as defined by RFC 3339.
- time_
updated str - The date and time the resource was last updated in "YYYY-MM-ddThh:mm:ssZ" format with a Z offset, as defined by RFC 3339.
- compartment
Id String - The OCID of the compartment the resource belongs to.
- endpoint
Type String - forwarding
Address String - is
Forwarding Boolean - is
Listening Boolean - listening
Address String - name String
- self String
- The canonical absolute URL of the resource.
- state String
- The state of a resource.
- subnet
Id String - time
Created String - The date and time the resource was created in "YYYY-MM-ddThh:mm:ssZ" format with a Z offset, as defined by RFC 3339.
- time
Updated String - The date and time the resource was last updated in "YYYY-MM-ddThh:mm:ssZ" format with a Z offset, as defined by RFC 3339.
GetResolversResolverRule
- Action string
- Client
Address List<string>Conditions - Destination
Addresses List<string> - Qname
Cover List<string>Conditions - Source
Endpoint stringName
- Action string
- Client
Address []stringConditions - Destination
Addresses []string - Qname
Cover []stringConditions - Source
Endpoint stringName
- action String
- client
Address List<String>Conditions - destination
Addresses List<String> - qname
Cover List<String>Conditions - source
Endpoint StringName
- action string
- client
Address string[]Conditions - destination
Addresses string[] - qname
Cover string[]Conditions - source
Endpoint stringName
- action str
- client_
address_ Sequence[str]conditions - destination_
addresses Sequence[str] - qname_
cover_ Sequence[str]conditions - source_
endpoint_ strname
- action String
- client
Address List<String>Conditions - destination
Addresses List<String> - qname
Cover List<String>Conditions - source
Endpoint StringName
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
oci
Terraform Provider.