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

dynatrace.getEntities

Explore with Pulumi AI

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

The entities data source allows all entities to be retrieved by its type.

  • type (String) Type of the entity, e.g. SERVICE. All available entity types can be retrieved with /api/v2/entityTypes.

Example Usage

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

const test = dynatrace.getEntities({
    type: "SERVICE",
});
export const serviceList = test.then(test => test.entities);
Copy
import pulumi
import pulumi_dynatrace as dynatrace

test = dynatrace.get_entities(type="SERVICE")
pulumi.export("serviceList", test.entities)
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 {
		test, err := dynatrace.GetEntities(ctx, &dynatrace.GetEntitiesArgs{
			Type: pulumi.StringRef("SERVICE"),
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("serviceList", test.Entities)
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Dynatrace = Pulumi.Dynatrace;

return await Deployment.RunAsync(() => 
{
    var test = Dynatrace.GetEntities.Invoke(new()
    {
        Type = "SERVICE",
    });

    return new Dictionary<string, object?>
    {
        ["serviceList"] = test.Apply(getEntitiesResult => getEntitiesResult.Entities),
    };
});
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.GetEntitiesArgs;
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 test = DynatraceFunctions.getEntities(GetEntitiesArgs.builder()
            .type("SERVICE")
            .build());

        ctx.export("serviceList", test.applyValue(getEntitiesResult -> getEntitiesResult.entities()));
    }
}
Copy
variables:
  test:
    fn::invoke:
      function: dynatrace:getEntities
      arguments:
        type: SERVICE
outputs:
  serviceList: ${test.entities}
Copy

Using getEntities

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 getEntities(args: GetEntitiesArgs, opts?: InvokeOptions): Promise<GetEntitiesResult>
function getEntitiesOutput(args: GetEntitiesOutputArgs, opts?: InvokeOptions): Output<GetEntitiesResult>
Copy
def get_entities(entity_selector: Optional[str] = None,
                 from_: Optional[str] = None,
                 to: Optional[str] = None,
                 type: Optional[str] = None,
                 opts: Optional[InvokeOptions] = None) -> GetEntitiesResult
def get_entities_output(entity_selector: Optional[pulumi.Input[str]] = None,
                 from_: Optional[pulumi.Input[str]] = None,
                 to: Optional[pulumi.Input[str]] = None,
                 type: Optional[pulumi.Input[str]] = None,
                 opts: Optional[InvokeOptions] = None) -> Output[GetEntitiesResult]
Copy
func GetEntities(ctx *Context, args *GetEntitiesArgs, opts ...InvokeOption) (*GetEntitiesResult, error)
func GetEntitiesOutput(ctx *Context, args *GetEntitiesOutputArgs, opts ...InvokeOption) GetEntitiesResultOutput
Copy

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

public static class GetEntities 
{
    public static Task<GetEntitiesResult> InvokeAsync(GetEntitiesArgs args, InvokeOptions? opts = null)
    public static Output<GetEntitiesResult> Invoke(GetEntitiesInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetEntitiesResult> getEntities(GetEntitiesArgs args, InvokeOptions options)
public static Output<GetEntitiesResult> getEntities(GetEntitiesArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: dynatrace:index/getEntities:getEntities
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

EntitySelector string
From string
To string
Type string
EntitySelector string
From string
To string
Type string
entitySelector String
from String
to String
type String
entitySelector string
from string
to string
type string
entitySelector String
from String
to String
type String

getEntities Result

The following output properties are available:

Entities List<Pulumiverse.Dynatrace.Outputs.GetEntitiesEntity>
Id string
The provider-assigned unique ID for this managed resource.
EntitySelector string
From string
To string
Type string
Entities []GetEntitiesEntity
Id string
The provider-assigned unique ID for this managed resource.
EntitySelector string
From string
To string
Type string
entities List<GetEntitiesEntity>
id String
The provider-assigned unique ID for this managed resource.
entitySelector String
from String
to String
type String
entities GetEntitiesEntity[]
id string
The provider-assigned unique ID for this managed resource.
entitySelector string
from string
to string
type string
entities Sequence[GetEntitiesEntity]
id str
The provider-assigned unique ID for this managed resource.
entity_selector str
from_ str
to str
type str
entities List<Property Map>
id String
The provider-assigned unique ID for this managed resource.
entitySelector String
from String
to String
type String

Supporting Types

GetEntitiesEntity

Properties This property is required. Dictionary<string, string>
Properties defining the entity.
DisplayName string
The name of the entity, displayed in the UI.
EntityId string
The ID of the entity.
LastSeenTms int
The timestamp at which the entity was last seen, in UTC milliseconds.
Tags List<Pulumiverse.Dynatrace.Inputs.GetEntitiesEntityTag>
A set of tags assigned to the entity.
Type string
The type of the entity.
Properties This property is required. map[string]string
Properties defining the entity.
DisplayName string
The name of the entity, displayed in the UI.
EntityId string
The ID of the entity.
LastSeenTms int
The timestamp at which the entity was last seen, in UTC milliseconds.
Tags []GetEntitiesEntityTag
A set of tags assigned to the entity.
Type string
The type of the entity.
properties This property is required. Map<String,String>
Properties defining the entity.
displayName String
The name of the entity, displayed in the UI.
entityId String
The ID of the entity.
lastSeenTms Integer
The timestamp at which the entity was last seen, in UTC milliseconds.
tags List<GetEntitiesEntityTag>
A set of tags assigned to the entity.
type String
The type of the entity.
properties This property is required. {[key: string]: string}
Properties defining the entity.
displayName string
The name of the entity, displayed in the UI.
entityId string
The ID of the entity.
lastSeenTms number
The timestamp at which the entity was last seen, in UTC milliseconds.
tags GetEntitiesEntityTag[]
A set of tags assigned to the entity.
type string
The type of the entity.
properties This property is required. Mapping[str, str]
Properties defining the entity.
display_name str
The name of the entity, displayed in the UI.
entity_id str
The ID of the entity.
last_seen_tms int
The timestamp at which the entity was last seen, in UTC milliseconds.
tags Sequence[GetEntitiesEntityTag]
A set of tags assigned to the entity.
type str
The type of the entity.
properties This property is required. Map<String>
Properties defining the entity.
displayName String
The name of the entity, displayed in the UI.
entityId String
The ID of the entity.
lastSeenTms Number
The timestamp at which the entity was last seen, in UTC milliseconds.
tags List<Property Map>
A set of tags assigned to the entity.
type String
The type of the entity.

GetEntitiesEntityTag

Tags []GetEntitiesEntityTagTag
A tag assigned to the entity
tags List<GetEntitiesEntityTagTag>
A tag assigned to the entity
tags GetEntitiesEntityTagTag[]
A tag assigned to the entity
tags Sequence[GetEntitiesEntityTagTag]
A tag assigned to the entity
tags List<Property Map>
A tag assigned to the entity

GetEntitiesEntityTagTag

Context This property is required. string
The origin of the tag, such as AWS or Cloud Foundry. Custom tags use the CONTEXTLESS value
Key This property is required. string
The key of the tag. Custom tags have the tag value here
StringRepresentation string
The string representation of the tag
Value string
The value of the tag. Not applicable to custom tags
Context This property is required. string
The origin of the tag, such as AWS or Cloud Foundry. Custom tags use the CONTEXTLESS value
Key This property is required. string
The key of the tag. Custom tags have the tag value here
StringRepresentation string
The string representation of the tag
Value string
The value of the tag. Not applicable to custom tags
context This property is required. String
The origin of the tag, such as AWS or Cloud Foundry. Custom tags use the CONTEXTLESS value
key This property is required. String
The key of the tag. Custom tags have the tag value here
stringRepresentation String
The string representation of the tag
value String
The value of the tag. Not applicable to custom tags
context This property is required. string
The origin of the tag, such as AWS or Cloud Foundry. Custom tags use the CONTEXTLESS value
key This property is required. string
The key of the tag. Custom tags have the tag value here
stringRepresentation string
The string representation of the tag
value string
The value of the tag. Not applicable to custom tags
context This property is required. str
The origin of the tag, such as AWS or Cloud Foundry. Custom tags use the CONTEXTLESS value
key This property is required. str
The key of the tag. Custom tags have the tag value here
string_representation str
The string representation of the tag
value str
The value of the tag. Not applicable to custom tags
context This property is required. String
The origin of the tag, such as AWS or Cloud Foundry. Custom tags use the CONTEXTLESS value
key This property is required. String
The key of the tag. Custom tags have the tag value here
stringRepresentation String
The string representation of the tag
value String
The value of the tag. Not applicable to custom tags

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