1. Packages
  2. Dynatrace
  3. API Docs
  4. getDocuments
Dynatrace v0.27.0 published on Friday, Mar 21, 2025 by Pulumiverse

dynatrace.getDocuments

Explore with Pulumi AI

Dynatrace v0.27.0 published on Friday, Mar 21, 2025 by Pulumiverse

Dynatrace SaaS only

To utilize this resource, please define the environment variables DT_CLIENT_ID, DT_CLIENT_SECRET, DT_ACCOUNT_ID with an OAuth client including the following permission: View documents (document:documents:read).

  • type (String) The type of documents to query for. Leave empty if you want to query for all kinds of documents.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as dynatrace from "@pulumi/dynatrace";

const all_dashboard_and_notebooks = dynatrace.getDocuments({});
const all_dashboards = dynatrace.getDocuments({
    type: "dashboard",
});
const all_notebooks = dynatrace.getDocuments({
    type: "notebook",
});
Copy
import pulumi
import pulumi_dynatrace as dynatrace

all_dashboard_and_notebooks = dynatrace.get_documents()
all_dashboards = dynatrace.get_documents(type="dashboard")
all_notebooks = dynatrace.get_documents(type="notebook")
Copy
package main

import (
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/pulumiverse/pulumi-dynatrace/sdk/go/dynatrace"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := dynatrace.GetDocuments(ctx, &dynatrace.GetDocumentsArgs{}, nil)
		if err != nil {
			return err
		}
		_, err = dynatrace.GetDocuments(ctx, &dynatrace.GetDocumentsArgs{
			Type: pulumi.StringRef("dashboard"),
		}, nil)
		if err != nil {
			return err
		}
		_, err = dynatrace.GetDocuments(ctx, &dynatrace.GetDocumentsArgs{
			Type: pulumi.StringRef("notebook"),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Dynatrace = Pulumi.Dynatrace;

return await Deployment.RunAsync(() => 
{
    var all_dashboard_and_notebooks = Dynatrace.GetDocuments.Invoke();

    var all_dashboards = Dynatrace.GetDocuments.Invoke(new()
    {
        Type = "dashboard",
    });

    var all_notebooks = Dynatrace.GetDocuments.Invoke(new()
    {
        Type = "notebook",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.dynatrace.DynatraceFunctions;
import com.pulumi.dynatrace.inputs.GetDocumentsArgs;
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 all-dashboard-and-notebooks = DynatraceFunctions.getDocuments();

        final var all-dashboards = DynatraceFunctions.getDocuments(GetDocumentsArgs.builder()
            .type("dashboard")
            .build());

        final var all-notebooks = DynatraceFunctions.getDocuments(GetDocumentsArgs.builder()
            .type("notebook")
            .build());

    }
}
Copy
variables:
  all-dashboard-and-notebooks:
    fn::invoke:
      function: dynatrace:getDocuments
      arguments: {}
  all-dashboards:
    fn::invoke:
      function: dynatrace:getDocuments
      arguments:
        type: dashboard
  all-notebooks:
    fn::invoke:
      function: dynatrace:getDocuments
      arguments:
        type: notebook
Copy

Using getDocuments

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 getDocuments(args: GetDocumentsArgs, opts?: InvokeOptions): Promise<GetDocumentsResult>
function getDocumentsOutput(args: GetDocumentsOutputArgs, opts?: InvokeOptions): Output<GetDocumentsResult>
Copy
def get_documents(type: Optional[str] = None,
                  opts: Optional[InvokeOptions] = None) -> GetDocumentsResult
def get_documents_output(type: Optional[pulumi.Input[str]] = None,
                  opts: Optional[InvokeOptions] = None) -> Output[GetDocumentsResult]
Copy
func GetDocuments(ctx *Context, args *GetDocumentsArgs, opts ...InvokeOption) (*GetDocumentsResult, error)
func GetDocumentsOutput(ctx *Context, args *GetDocumentsOutputArgs, opts ...InvokeOption) GetDocumentsResultOutput
Copy

> Note: This function is named GetDocuments in the Go SDK.

public static class GetDocuments 
{
    public static Task<GetDocumentsResult> InvokeAsync(GetDocumentsArgs args, InvokeOptions? opts = null)
    public static Output<GetDocumentsResult> Invoke(GetDocumentsInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetDocumentsResult> getDocuments(GetDocumentsArgs args, InvokeOptions options)
public static Output<GetDocumentsResult> getDocuments(GetDocumentsArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: dynatrace:index/getDocuments:getDocuments
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Type string
The type of documents to query for. Leave empty if you want to query for all kinds of documents. Possible values are dashboard or notebook
Type string
The type of documents to query for. Leave empty if you want to query for all kinds of documents. Possible values are dashboard or notebook
type String
The type of documents to query for. Leave empty if you want to query for all kinds of documents. Possible values are dashboard or notebook
type string
The type of documents to query for. Leave empty if you want to query for all kinds of documents. Possible values are dashboard or notebook
type str
The type of documents to query for. Leave empty if you want to query for all kinds of documents. Possible values are dashboard or notebook
type String
The type of documents to query for. Leave empty if you want to query for all kinds of documents. Possible values are dashboard or notebook

getDocuments Result

The following output properties are available:

Id string
The provider-assigned unique ID for this managed resource.
Values List<Pulumiverse.Dynatrace.Outputs.GetDocumentsValue>
Type string
The type of documents to query for. Leave empty if you want to query for all kinds of documents. Possible values are dashboard or notebook
Id string
The provider-assigned unique ID for this managed resource.
Values []GetDocumentsValue
Type string
The type of documents to query for. Leave empty if you want to query for all kinds of documents. Possible values are dashboard or notebook
id String
The provider-assigned unique ID for this managed resource.
values List<GetDocumentsValue>
type String
The type of documents to query for. Leave empty if you want to query for all kinds of documents. Possible values are dashboard or notebook
id string
The provider-assigned unique ID for this managed resource.
values GetDocumentsValue[]
type string
The type of documents to query for. Leave empty if you want to query for all kinds of documents. Possible values are dashboard or notebook
id str
The provider-assigned unique ID for this managed resource.
values Sequence[GetDocumentsValue]
type str
The type of documents to query for. Leave empty if you want to query for all kinds of documents. Possible values are dashboard or notebook
id String
The provider-assigned unique ID for this managed resource.
values List<Property Map>
type String
The type of documents to query for. Leave empty if you want to query for all kinds of documents. Possible values are dashboard or notebook

Supporting Types

GetDocumentsValue

Id This property is required. string
The unique identifier of the document.
Name This property is required. string
The name of the document.
Owner This property is required. string
The owner of the document. This could be a user or a group that has ownership rights over the document.
Type This property is required. string
The type of the document. This could be a specific format or category the document belongs to.
Id This property is required. string
The unique identifier of the document.
Name This property is required. string
The name of the document.
Owner This property is required. string
The owner of the document. This could be a user or a group that has ownership rights over the document.
Type This property is required. string
The type of the document. This could be a specific format or category the document belongs to.
id This property is required. String
The unique identifier of the document.
name This property is required. String
The name of the document.
owner This property is required. String
The owner of the document. This could be a user or a group that has ownership rights over the document.
type This property is required. String
The type of the document. This could be a specific format or category the document belongs to.
id This property is required. string
The unique identifier of the document.
name This property is required. string
The name of the document.
owner This property is required. string
The owner of the document. This could be a user or a group that has ownership rights over the document.
type This property is required. string
The type of the document. This could be a specific format or category the document belongs to.
id This property is required. str
The unique identifier of the document.
name This property is required. str
The name of the document.
owner This property is required. str
The owner of the document. This could be a user or a group that has ownership rights over the document.
type This property is required. str
The type of the document. This could be a specific format or category the document belongs to.
id This property is required. String
The unique identifier of the document.
name This property is required. String
The name of the document.
owner This property is required. String
The owner of the document. This could be a user or a group that has ownership rights over the document.
type This property is required. String
The type of the document. This could be a specific format or category the document belongs to.

Package Details

Repository
dynatrace pulumiverse/pulumi-dynatrace
License
Apache-2.0
Notes
This Pulumi package is based on the dynatrace Terraform Provider.
Dynatrace v0.27.0 published on Friday, Mar 21, 2025 by Pulumiverse