Oracle Cloud Infrastructure v2.33.0 published on Thursday, May 1, 2025 by Pulumi
oci.Dns.getView
Explore with Pulumi AI
This data source provides details about a specific View resource in Oracle Cloud Infrastructure DNS service.
Gets information about a specific view.
Note that attempting to get a
view in the DELETED lifecycleState will result in a 404 response to be
consistent with other operations of the API.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testView = oci.Dns.getView({
    viewId: testViewOciDnsView.id,
    scope: "PRIVATE",
});
import pulumi
import pulumi_oci as oci
test_view = oci.Dns.get_view(view_id=test_view_oci_dns_view["id"],
    scope="PRIVATE")
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.GetView(ctx, &dns.GetViewArgs{
			ViewId: pulumi.StringRef(testViewOciDnsView.Id),
			Scope:  pulumi.StringRef("PRIVATE"),
		}, 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 testView = Oci.Dns.GetView.Invoke(new()
    {
        ViewId = testViewOciDnsView.Id,
        Scope = "PRIVATE",
    });
});
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.GetViewArgs;
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 testView = DnsFunctions.getView(GetViewArgs.builder()
            .viewId(testViewOciDnsView.id())
            .scope("PRIVATE")
            .build());
    }
}
variables:
  testView:
    fn::invoke:
      function: oci:Dns:getView
      arguments:
        viewId: ${testViewOciDnsView.id}
        scope: PRIVATE
Using getView
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 getView(args: GetViewArgs, opts?: InvokeOptions): Promise<GetViewResult>
function getViewOutput(args: GetViewOutputArgs, opts?: InvokeOptions): Output<GetViewResult>def get_view(scope: Optional[str] = None,
             view_id: Optional[str] = None,
             opts: Optional[InvokeOptions] = None) -> GetViewResult
def get_view_output(scope: Optional[pulumi.Input[str]] = None,
             view_id: Optional[pulumi.Input[str]] = None,
             opts: Optional[InvokeOptions] = None) -> Output[GetViewResult]func LookupView(ctx *Context, args *LookupViewArgs, opts ...InvokeOption) (*LookupViewResult, error)
func LookupViewOutput(ctx *Context, args *LookupViewOutputArgs, opts ...InvokeOption) LookupViewResultOutput> Note: This function is named LookupView in the Go SDK.
public static class GetView 
{
    public static Task<GetViewResult> InvokeAsync(GetViewArgs args, InvokeOptions? opts = null)
    public static Output<GetViewResult> Invoke(GetViewInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetViewResult> getView(GetViewArgs args, InvokeOptions options)
public static Output<GetViewResult> getView(GetViewArgs args, InvokeOptions options)
fn::invoke:
  function: oci:Dns/getView:getView
  arguments:
    # arguments dictionaryThe following arguments are supported:
getView Result
The following output properties are available:
- CompartmentId string
- The OCID of the owning compartment.
- 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 display name of the view.
- 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 the view.
- IsProtected bool
- A Boolean flag indicating whether or not parts of the resource are unable to be explicitly managed.
- Self string
- The canonical absolute URL of the resource.
- State string
- The current state of the 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.
- Scope string
- ViewId string
- CompartmentId string
- The OCID of the owning compartment.
- 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 display name of the view.
- 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 the view.
- IsProtected bool
- A Boolean flag indicating whether or not parts of the resource are unable to be explicitly managed.
- Self string
- The canonical absolute URL of the resource.
- State string
- The current state of the 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.
- Scope string
- ViewId string
- compartmentId String
- The OCID of the owning compartment.
- 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 display name of the view.
- 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 the view.
- isProtected Boolean
- A Boolean flag indicating whether or not parts of the resource are unable to be explicitly managed.
- self String
- The canonical absolute URL of the resource.
- state String
- The current state of the 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.
- scope String
- viewId String
- compartmentId string
- The OCID of the owning compartment.
- {[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 display name of the view.
- {[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 the view.
- isProtected boolean
- A Boolean flag indicating whether or not parts of the resource are unable to be explicitly managed.
- self string
- The canonical absolute URL of the resource.
- state string
- The current state of the 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.
- scope string
- viewId string
- compartment_id str
- The OCID of the owning compartment.
- 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 display name of the view.
- 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 the view.
- is_protected bool
- A Boolean flag indicating whether or not parts of the resource are unable to be explicitly managed.
- self str
- The canonical absolute URL of the resource.
- state str
- The current state of the 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.
- scope str
- view_id str
- compartmentId String
- The OCID of the owning compartment.
- 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 display name of the view.
- 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 the view.
- isProtected Boolean
- A Boolean flag indicating whether or not parts of the resource are unable to be explicitly managed.
- self String
- The canonical absolute URL of the resource.
- state String
- The current state of the 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.
- scope String
- viewId String
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the ociTerraform Provider.