1. Packages
  2. Dynatrace
  3. API Docs
  4. getEntities
Dynatrace v0.10.0 published on Friday, Jun 7, 2024 by Pulumiverse

dynatrace.getEntities

Explore with Pulumi AI

dynatrace logo
Dynatrace v0.10.0 published on Friday, Jun 7, 2024 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);
    
    import pulumi
    import pulumi_dynatrace as dynatrace
    
    test = dynatrace.get_entities(type="SERVICE")
    pulumi.export("serviceList", test.entities)
    
    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
    	})
    }
    
    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),
        };
    });
    
    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()));
        }
    }
    
    variables:
      test:
        fn::invoke:
          Function: dynatrace:getEntities
          Arguments:
            type: SERVICE
    outputs:
      serviceList: ${test.entities}
    

    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>
    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]
    func GetEntities(ctx *Context, args *GetEntitiesArgs, opts ...InvokeOption) (*GetEntitiesResult, error)
    func GetEntitiesOutput(ctx *Context, args *GetEntitiesOutputArgs, opts ...InvokeOption) GetEntitiesResultOutput

    > 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)
    }
    public static CompletableFuture<GetEntitiesResult> getEntities(GetEntitiesArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: dynatrace:index/getEntities:getEntities
      arguments:
        # arguments dictionary

    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 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 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 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 {[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 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 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 string
    The origin of the tag, such as AWS or Cloud Foundry. Custom tags use the CONTEXTLESS value
    Key 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 string
    The origin of the tag, such as AWS or Cloud Foundry. Custom tags use the CONTEXTLESS value
    Key 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 String
    The origin of the tag, such as AWS or Cloud Foundry. Custom tags use the CONTEXTLESS value
    key 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 string
    The origin of the tag, such as AWS or Cloud Foundry. Custom tags use the CONTEXTLESS value
    key 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 str
    The origin of the tag, such as AWS or Cloud Foundry. Custom tags use the CONTEXTLESS value
    key 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 String
    The origin of the tag, such as AWS or Cloud Foundry. Custom tags use the CONTEXTLESS value
    key 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 logo
    Dynatrace v0.10.0 published on Friday, Jun 7, 2024 by Pulumiverse