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.
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/v2/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[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[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)
public static Output<GetResolversResult> getResolvers(GetResolversArgs args, InvokeOptions options)
fn::invoke:
  function: oci:Dns/getResolvers:getResolvers
  arguments:
    # arguments dictionaryThe following arguments are supported:
- CompartmentId string
- The OCID of the compartment the resource belongs to.
- Scope string
- Value must be PRIVATEwhen listing private name resolvers.
- DisplayName string
- The displayName of a resource.
- Filters
List<GetResolvers Filter> 
- Id string
- The OCID of a resource.
- State string
- The state of a resource.
- CompartmentId string
- The OCID of the compartment the resource belongs to.
- Scope string
- Value must be PRIVATEwhen listing private name resolvers.
- DisplayName string
- The displayName of a resource.
- Filters
[]GetResolvers Filter 
- Id string
- The OCID of a resource.
- State string
- The state of a resource.
- compartmentId String
- The OCID of the compartment the resource belongs to.
- scope String
- Value must be PRIVATEwhen listing private name resolvers.
- displayName String
- The displayName of a resource.
- filters
List<GetResolvers Filter> 
- id String
- The OCID of a resource.
- state String
- The state of a resource.
- compartmentId string
- The OCID of the compartment the resource belongs to.
- scope string
- Value must be PRIVATEwhen listing private name resolvers.
- displayName string
- The displayName of a resource.
- filters
GetResolvers 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 PRIVATEwhen listing private name resolvers.
- display_name str
- The displayName of a resource.
- filters
Sequence[GetResolvers Filter] 
- id str
- The OCID of a resource.
- state str
- The state of a resource.
- compartmentId String
- The OCID of the compartment the resource belongs to.
- scope String
- Value must be PRIVATEwhen listing private name resolvers.
- displayName 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:
- CompartmentId string
- The OCID of the owning compartment.
- Resolvers
List<GetResolvers Resolver> 
- The list of resolvers.
- Scope string
- DisplayName string
- The display name of the resolver.
- Filters
List<GetResolvers Filter> 
- Id string
- The OCID of the resolver.
- State string
- The current state of the resource.
- CompartmentId string
- The OCID of the owning compartment.
- Resolvers
[]GetResolvers Resolver 
- The list of resolvers.
- Scope string
- DisplayName string
- The display name of the resolver.
- Filters
[]GetResolvers Filter 
- Id string
- The OCID of the resolver.
- State string
- The current state of the resource.
- compartmentId String
- The OCID of the owning compartment.
- resolvers
List<GetResolvers Resolver> 
- The list of resolvers.
- scope String
- displayName String
- The display name of the resolver.
- filters
List<GetResolvers Filter> 
- id String
- The OCID of the resolver.
- state String
- The current state of the resource.
- compartmentId string
- The OCID of the owning compartment.
- resolvers
GetResolvers Resolver[] 
- The list of resolvers.
- scope string
- displayName string
- The display name of the resolver.
- filters
GetResolvers 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[GetResolvers Resolver] 
- The list of resolvers.
- scope str
- display_name str
- The display name of the resolver.
- filters
Sequence[GetResolvers Filter] 
- id str
- The OCID of the resolver.
- state str
- The current state of the resource.
- compartmentId String
- The OCID of the owning compartment.
- resolvers List<Property Map>
- The list of resolvers.
- scope String
- displayName 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  
- AttachedVcn stringId 
- The OCID of the attached VCN.
- AttachedViews List<GetResolvers Resolver Attached View> 
- CompartmentId string
- The OCID of the compartment the resource belongs to.
- DefaultView stringId 
- The OCID of the default view.
- Dictionary<string, string>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
- DisplayName string
- The displayName of a resource.
- Endpoints
List<GetResolvers Resolver Endpoint> 
- Dictionary<string, string>
- 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.
- IsProtected bool
- A Boolean flag indicating whether or not parts of the resource are unable to be explicitly managed.
- ResolverId string
- Rules
List<GetResolvers Resolver Rule> 
- Scope string
- Value must be PRIVATEwhen listing private name resolvers.
- Self string
- The canonical absolute URL of the resource.
- State string
- The state of a resource.
- TimeCreated 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.
- TimeUpdated 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.
- AttachedVcn stringId 
- The OCID of the attached VCN.
- AttachedViews []GetResolvers Resolver Attached View 
- CompartmentId string
- The OCID of the compartment the resource belongs to.
- DefaultView stringId 
- The OCID of the default view.
- map[string]string
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
- DisplayName string
- The displayName of a resource.
- Endpoints
[]GetResolvers Resolver Endpoint 
- map[string]string
- 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.
- IsProtected bool
- A Boolean flag indicating whether or not parts of the resource are unable to be explicitly managed.
- ResolverId string
- Rules
[]GetResolvers Resolver Rule 
- Scope string
- Value must be PRIVATEwhen listing private name resolvers.
- Self string
- The canonical absolute URL of the resource.
- State string
- The state of a resource.
- TimeCreated 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.
- TimeUpdated 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.
- attachedVcn StringId 
- The OCID of the attached VCN.
- attachedViews List<GetResolvers Resolver Attached View> 
- compartmentId String
- The OCID of the compartment the resource belongs to.
- defaultView StringId 
- The OCID of the default view.
- Map<String,String>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
- displayName String
- The displayName of a resource.
- endpoints
List<GetResolvers Resolver Endpoint> 
- Map<String,String>
- 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.
- isProtected Boolean
- A Boolean flag indicating whether or not parts of the resource are unable to be explicitly managed.
- resolverId String
- rules
List<GetResolvers Resolver Rule> 
- scope String
- Value must be PRIVATEwhen listing private name resolvers.
- self String
- The canonical absolute URL of the resource.
- state String
- The state of a resource.
- timeCreated 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.
- timeUpdated 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.
- attachedVcn stringId 
- The OCID of the attached VCN.
- attachedViews GetResolvers Resolver Attached View[] 
- compartmentId string
- The OCID of the compartment the resource belongs to.
- defaultView stringId 
- The OCID of the default view.
- {[key: string]: string}
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
- displayName string
- The displayName of a resource.
- endpoints
GetResolvers Resolver Endpoint[] 
- {[key: string]: string}
- 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.
- isProtected boolean
- A Boolean flag indicating whether or not parts of the resource are unable to be explicitly managed.
- resolverId string
- rules
GetResolvers Resolver Rule[] 
- scope string
- Value must be PRIVATEwhen listing private name resolvers.
- self string
- The canonical absolute URL of the resource.
- state string
- The state of a resource.
- timeCreated 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.
- timeUpdated 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[GetResolvers 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, str]
- 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[GetResolvers Resolver Endpoint] 
- Mapping[str, str]
- 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[GetResolvers Resolver Rule] 
- scope str
- Value must be PRIVATEwhen 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.
- attachedVcn StringId 
- The OCID of the attached VCN.
- attachedViews List<Property Map>
- compartmentId String
- The OCID of the compartment the resource belongs to.
- defaultView StringId 
- The OCID of the default view.
- Map<String>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
- displayName String
- The displayName of a resource.
- endpoints List<Property Map>
- Map<String>
- 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.
- isProtected Boolean
- A Boolean flag indicating whether or not parts of the resource are unable to be explicitly managed.
- resolverId String
- rules List<Property Map>
- scope String
- Value must be PRIVATEwhen listing private name resolvers.
- self String
- The canonical absolute URL of the resource.
- state String
- The state of a resource.
- timeCreated 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.
- timeUpdated 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    
- ViewId string
- ViewId string
- viewId String
- viewId string
- view_id str
- viewId String
GetResolversResolverEndpoint   
- CompartmentId string
- The OCID of the compartment the resource belongs to.
- EndpointType string
- ForwardingAddress string
- IsForwarding bool
- IsListening bool
- ListeningAddress string
- Name string
- Self string
- The canonical absolute URL of the resource.
- State string
- The state of a resource.
- SubnetId string
- TimeCreated 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.
- TimeUpdated 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.
- CompartmentId string
- The OCID of the compartment the resource belongs to.
- EndpointType string
- ForwardingAddress string
- IsForwarding bool
- IsListening bool
- ListeningAddress string
- Name string
- Self string
- The canonical absolute URL of the resource.
- State string
- The state of a resource.
- SubnetId string
- TimeCreated 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.
- TimeUpdated 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.
- compartmentId String
- The OCID of the compartment the resource belongs to.
- endpointType String
- forwardingAddress String
- isForwarding Boolean
- isListening Boolean
- listeningAddress String
- name String
- self String
- The canonical absolute URL of the resource.
- state String
- The state of a resource.
- subnetId String
- timeCreated 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.
- timeUpdated 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.
- compartmentId string
- The OCID of the compartment the resource belongs to.
- endpointType string
- forwardingAddress string
- isForwarding boolean
- isListening boolean
- listeningAddress string
- name string
- self string
- The canonical absolute URL of the resource.
- state string
- The state of a resource.
- subnetId string
- timeCreated 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.
- timeUpdated 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.
- compartmentId String
- The OCID of the compartment the resource belongs to.
- endpointType String
- forwardingAddress String
- isForwarding Boolean
- isListening Boolean
- listeningAddress String
- name String
- self String
- The canonical absolute URL of the resource.
- state String
- The state of a resource.
- subnetId String
- timeCreated 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.
- timeUpdated 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
- ClientAddress List<string>Conditions 
- DestinationAddresses List<string>
- QnameCover List<string>Conditions 
- SourceEndpoint stringName 
- Action string
- ClientAddress []stringConditions 
- DestinationAddresses []string
- QnameCover []stringConditions 
- SourceEndpoint stringName 
- action String
- clientAddress List<String>Conditions 
- destinationAddresses List<String>
- qnameCover List<String>Conditions 
- sourceEndpoint StringName 
- action string
- clientAddress string[]Conditions 
- destinationAddresses string[]
- qnameCover string[]Conditions 
- sourceEndpoint stringName 
- action str
- client_address_ Sequence[str]conditions 
- destination_addresses Sequence[str]
- qname_cover_ Sequence[str]conditions 
- source_endpoint_ strname 
- action String
- clientAddress List<String>Conditions 
- destinationAddresses List<String>
- qnameCover List<String>Conditions 
- sourceEndpoint StringName 
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the ociTerraform Provider.