Datadog v4.47.0 published on Thursday, Mar 20, 2025 by Pulumi
datadog.getHosts
Explore with Pulumi AI
Use this data source to retrieve information about your live hosts in Datadog.
Example Usage
Coming soon!
Coming soon!
Coming soon!
Coming soon!
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.datadog.DatadogFunctions;
import com.pulumi.datadog.inputs.GetHostsArgs;
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 foo = DatadogFunctions.getHosts(GetHostsArgs.builder()
.includeMutedHostsData(true)
.includeHostsMetadata(true)
.build());
}
}
variables:
foo:
fn::invoke:
function: datadog:getHosts
arguments:
includeMutedHostsData: true
includeHostsMetadata: true
Using getHosts
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 getHosts(args: GetHostsArgs, opts?: InvokeOptions): Promise<GetHostsResult>
function getHostsOutput(args: GetHostsOutputArgs, opts?: InvokeOptions): Output<GetHostsResult>
def get_hosts(filter: Optional[str] = None,
from_: Optional[int] = None,
include_muted_hosts_data: Optional[bool] = None,
sort_dir: Optional[str] = None,
sort_field: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetHostsResult
def get_hosts_output(filter: Optional[pulumi.Input[str]] = None,
from_: Optional[pulumi.Input[int]] = None,
include_muted_hosts_data: Optional[pulumi.Input[bool]] = None,
sort_dir: Optional[pulumi.Input[str]] = None,
sort_field: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetHostsResult]
func GetHosts(ctx *Context, args *GetHostsArgs, opts ...InvokeOption) (*GetHostsResult, error)
func GetHostsOutput(ctx *Context, args *GetHostsOutputArgs, opts ...InvokeOption) GetHostsResultOutput
> Note: This function is named GetHosts
in the Go SDK.
public static class GetHosts
{
public static Task<GetHostsResult> InvokeAsync(GetHostsArgs args, InvokeOptions? opts = null)
public static Output<GetHostsResult> Invoke(GetHostsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetHostsResult> getHosts(GetHostsArgs args, InvokeOptions options)
public static Output<GetHostsResult> getHosts(GetHostsArgs args, InvokeOptions options)
fn::invoke:
function: datadog:index/getHosts:getHosts
arguments:
# arguments dictionary
The following arguments are supported:
- Filter string
- String to filter search results.
- From int
- Number of seconds since UNIX epoch from which you want to search your hosts.
- Include
Muted boolHosts Data - Include information on the muted status of hosts and when the mute expires.
- Sort
Dir string - Direction of sort.
- Sort
Field string - Sort hosts by this field.
- Filter string
- String to filter search results.
- From int
- Number of seconds since UNIX epoch from which you want to search your hosts.
- Include
Muted boolHosts Data - Include information on the muted status of hosts and when the mute expires.
- Sort
Dir string - Direction of sort.
- Sort
Field string - Sort hosts by this field.
- filter String
- String to filter search results.
- from Integer
- Number of seconds since UNIX epoch from which you want to search your hosts.
- include
Muted BooleanHosts Data - Include information on the muted status of hosts and when the mute expires.
- sort
Dir String - Direction of sort.
- sort
Field String - Sort hosts by this field.
- filter string
- String to filter search results.
- from number
- Number of seconds since UNIX epoch from which you want to search your hosts.
- include
Muted booleanHosts Data - Include information on the muted status of hosts and when the mute expires.
- sort
Dir string - Direction of sort.
- sort
Field string - Sort hosts by this field.
- filter str
- String to filter search results.
- from_ int
- Number of seconds since UNIX epoch from which you want to search your hosts.
- include_
muted_ boolhosts_ data - Include information on the muted status of hosts and when the mute expires.
- sort_
dir str - Direction of sort.
- sort_
field str - Sort hosts by this field.
- filter String
- String to filter search results.
- from Number
- Number of seconds since UNIX epoch from which you want to search your hosts.
- include
Muted BooleanHosts Data - Include information on the muted status of hosts and when the mute expires.
- sort
Dir String - Direction of sort.
- sort
Field String - Sort hosts by this field.
getHosts Result
The following output properties are available:
- Host
Lists List<GetHosts Host List> - List of hosts (1000 Max).
- Id string
- The ID of this resource.
- Total
Matching int - Number of host matching the query.
- Total
Returned int - Number of host returned.
- Filter string
- String to filter search results.
- From int
- Number of seconds since UNIX epoch from which you want to search your hosts.
- Include
Muted boolHosts Data - Include information on the muted status of hosts and when the mute expires.
- Sort
Dir string - Direction of sort.
- Sort
Field string - Sort hosts by this field.
- Host
Lists []GetHosts Host List - List of hosts (1000 Max).
- Id string
- The ID of this resource.
- Total
Matching int - Number of host matching the query.
- Total
Returned int - Number of host returned.
- Filter string
- String to filter search results.
- From int
- Number of seconds since UNIX epoch from which you want to search your hosts.
- Include
Muted boolHosts Data - Include information on the muted status of hosts and when the mute expires.
- Sort
Dir string - Direction of sort.
- Sort
Field string - Sort hosts by this field.
- host
Lists List<GetHosts Host List> - List of hosts (1000 Max).
- id String
- The ID of this resource.
- total
Matching Integer - Number of host matching the query.
- total
Returned Integer - Number of host returned.
- filter String
- String to filter search results.
- from Integer
- Number of seconds since UNIX epoch from which you want to search your hosts.
- include
Muted BooleanHosts Data - Include information on the muted status of hosts and when the mute expires.
- sort
Dir String - Direction of sort.
- sort
Field String - Sort hosts by this field.
- host
Lists GetHosts Host List[] - List of hosts (1000 Max).
- id string
- The ID of this resource.
- total
Matching number - Number of host matching the query.
- total
Returned number - Number of host returned.
- filter string
- String to filter search results.
- from number
- Number of seconds since UNIX epoch from which you want to search your hosts.
- include
Muted booleanHosts Data - Include information on the muted status of hosts and when the mute expires.
- sort
Dir string - Direction of sort.
- sort
Field string - Sort hosts by this field.
- host_
lists Sequence[GetHosts Host List] - List of hosts (1000 Max).
- id str
- The ID of this resource.
- total_
matching int - Number of host matching the query.
- total_
returned int - Number of host returned.
- filter str
- String to filter search results.
- from_ int
- Number of seconds since UNIX epoch from which you want to search your hosts.
- include_
muted_ boolhosts_ data - Include information on the muted status of hosts and when the mute expires.
- sort_
dir str - Direction of sort.
- sort_
field str - Sort hosts by this field.
- host
Lists List<Property Map> - List of hosts (1000 Max).
- id String
- The ID of this resource.
- total
Matching Number - Number of host matching the query.
- total
Returned Number - Number of host returned.
- filter String
- String to filter search results.
- from Number
- Number of seconds since UNIX epoch from which you want to search your hosts.
- include
Muted BooleanHosts Data - Include information on the muted status of hosts and when the mute expires.
- sort
Dir String - Direction of sort.
- sort
Field String - Sort hosts by this field.
Supporting Types
GetHostsHostList
- Aliases
This property is required. List<string> - Apps
This property is required. List<string> - Aws
Name This property is required. string - Host
Name This property is required. string - Id
This property is required. int - Is
Muted This property is required. bool - Last
Reported Time This property is required. int - Meta
This property is required. GetHosts Host List Meta - Metrics
This property is required. GetHosts Host List Metrics - Mute
Timeout This property is required. int - Name
This property is required. string - Sources
This property is required. List<string> This property is required. Dictionary<string, ImmutableArray<string>> - Up
This property is required. bool
- Aliases
This property is required. []string - Apps
This property is required. []string - Aws
Name This property is required. string - Host
Name This property is required. string - Id
This property is required. int - Is
Muted This property is required. bool - Last
Reported Time This property is required. int - Meta
This property is required. GetHosts Host List Meta - Metrics
This property is required. GetHosts Host List Metrics - Mute
Timeout This property is required. int - Name
This property is required. string - Sources
This property is required. []string This property is required. map[string][]string- Up
This property is required. bool
- aliases
This property is required. List<String> - apps
This property is required. List<String> - aws
Name This property is required. String - host
Name This property is required. String - id
This property is required. Integer - is
Muted This property is required. Boolean - last
Reported Time This property is required. Integer - meta
This property is required. GetHosts Host List Meta - metrics
This property is required. GetHosts Host List Metrics - mute
Timeout This property is required. Integer - name
This property is required. String - sources
This property is required. List<String> This property is required. Map<String,List<String>>- up
This property is required. Boolean
- aliases
This property is required. string[] - apps
This property is required. string[] - aws
Name This property is required. string - host
Name This property is required. string - id
This property is required. number - is
Muted This property is required. boolean - last
Reported Time This property is required. number - meta
This property is required. GetHosts Host List Meta - metrics
This property is required. GetHosts Host List Metrics - mute
Timeout This property is required. number - name
This property is required. string - sources
This property is required. string[] This property is required. {[key: string]: string[]}- up
This property is required. boolean
- aliases
This property is required. Sequence[str] - apps
This property is required. Sequence[str] - aws_
name This property is required. str - host_
name This property is required. str - id
This property is required. int - is_
muted This property is required. bool - last_
reported_ time This property is required. int - meta
This property is required. GetHosts Host List Meta - metrics
This property is required. GetHosts Host List Metrics - mute_
timeout This property is required. int - name
This property is required. str - sources
This property is required. Sequence[str] This property is required. Mapping[str, Sequence[str]]- up
This property is required. bool
- aliases
This property is required. List<String> - apps
This property is required. List<String> - aws
Name This property is required. String - host
Name This property is required. String - id
This property is required. Number - is
Muted This property is required. Boolean - last
Reported Time This property is required. Number - meta
This property is required. Property Map - metrics
This property is required. Property Map - mute
Timeout This property is required. Number - name
This property is required. String - sources
This property is required. List<String> This property is required. Map<List<String>>- up
This property is required. Boolean
GetHostsHostListMeta
- Agent
Version This property is required. string - Cpu
Cores This property is required. int - Gohai
This property is required. string - Machine
This property is required. string - Platform
This property is required. string - Processor
This property is required. string - Python
Version This property is required. string - Socket
Fqdn This property is required. string - Socket
Hostname This property is required. string
- Agent
Version This property is required. string - Cpu
Cores This property is required. int - Gohai
This property is required. string - Machine
This property is required. string - Platform
This property is required. string - Processor
This property is required. string - Python
Version This property is required. string - Socket
Fqdn This property is required. string - Socket
Hostname This property is required. string
- agent
Version This property is required. String - cpu
Cores This property is required. Integer - gohai
This property is required. String - machine
This property is required. String - platform
This property is required. String - processor
This property is required. String - python
Version This property is required. String - socket
Fqdn This property is required. String - socket
Hostname This property is required. String
- agent
Version This property is required. string - cpu
Cores This property is required. number - gohai
This property is required. string - machine
This property is required. string - platform
This property is required. string - processor
This property is required. string - python
Version This property is required. string - socket
Fqdn This property is required. string - socket
Hostname This property is required. string
- agent_
version This property is required. str - cpu_
cores This property is required. int - gohai
This property is required. str - machine
This property is required. str - platform
This property is required. str - processor
This property is required. str - python_
version This property is required. str - socket_
fqdn This property is required. str - socket_
hostname This property is required. str
- agent
Version This property is required. String - cpu
Cores This property is required. Number - gohai
This property is required. String - machine
This property is required. String - platform
This property is required. String - processor
This property is required. String - python
Version This property is required. String - socket
Fqdn This property is required. String - socket
Hostname This property is required. String
GetHostsHostListMetrics
Package Details
- Repository
- Datadog pulumi/pulumi-datadog
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
datadog
Terraform Provider.