1. Packages
  2. Packages
  3. Dynatrace
  4. API Docs
  5. getHost
Viewing docs for Dynatrace v0.36.0
published on Tuesday, Jun 9, 2026 by Pulumiverse
dynatrace logo
Viewing docs for Dynatrace v0.36.0
published on Tuesday, Jun 9, 2026 by Pulumiverse

    The data source API endpoint has been deprecated, please use dynatrace.getEntity with entity type HOST instead.

    The host data source allows the host ID to be retrieved by its name and optionally tags / tag-value pairs.

    • name queries for all hosts with the specified name
    • tags (optional) refers to the tags that need to be present for the host (inclusive)

    If multiple hosts match the given criteria, the first result will be retrieved.

    Using getHost

    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 getHost(args: GetHostArgs, opts?: InvokeOptions): Promise<GetHostResult>
    function getHostOutput(args: GetHostOutputArgs, opts?: InvokeOptions): Output<GetHostResult>
    def get_host(name: Optional[str] = None,
                 tags: Optional[Sequence[str]] = None,
                 opts: Optional[InvokeOptions] = None) -> GetHostResult
    def get_host_output(name: pulumi.Input[Optional[str]] = None,
                 tags: pulumi.Input[Optional[Sequence[pulumi.Input[str]]]] = None,
                 opts: Optional[InvokeOptions] = None) -> Output[GetHostResult]
    func GetHost(ctx *Context, args *GetHostArgs, opts ...InvokeOption) (*GetHostResult, error)
    func GetHostOutput(ctx *Context, args *GetHostOutputArgs, opts ...InvokeOption) GetHostResultOutput

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

    public static class GetHost 
    {
        public static Task<GetHostResult> InvokeAsync(GetHostArgs args, InvokeOptions? opts = null)
        public static Output<GetHostResult> Invoke(GetHostInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetHostResult> getHost(GetHostArgs args, InvokeOptions options)
    public static Output<GetHostResult> getHost(GetHostArgs args, InvokeOptions options)
    
    fn::invoke:
      function: dynatrace:index/getHost:getHost
      arguments:
        # arguments dictionary
    data "dynatrace_gethost" "name" {
        # arguments
    }

    The following arguments are supported:

    Name string
    Tags List<string>
    Required tags of the host to find
    Name string
    Tags []string
    Required tags of the host to find
    name string
    tags list(string)
    Required tags of the host to find
    name String
    tags List<String>
    Required tags of the host to find
    name string
    tags string[]
    Required tags of the host to find
    name str
    tags Sequence[str]
    Required tags of the host to find
    name String
    tags List<String>
    Required tags of the host to find

    getHost Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    Tags List<string>
    Required tags of the host to find
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    Tags []string
    Required tags of the host to find
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    tags list(string)
    Required tags of the host to find
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    tags List<String>
    Required tags of the host to find
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    tags string[]
    Required tags of the host to find
    id str
    The provider-assigned unique ID for this managed resource.
    name str
    tags Sequence[str]
    Required tags of the host to find
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    tags List<String>
    Required tags of the host to find

    Package Details

    Repository
    dynatrace pulumiverse/pulumi-dynatrace
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the dynatrace Terraform Provider.
    dynatrace logo
    Viewing docs for Dynatrace v0.36.0
    published on Tuesday, Jun 9, 2026 by Pulumiverse

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial