1. Packages
  2. Datadog Provider
  3. API Docs
  4. getHosts
Datadog v4.36.1 published on Friday, Nov 15, 2024 by Pulumi

datadog.getHosts

Explore with Pulumi AI

datadog logo
Datadog v4.36.1 published on Friday, Nov 15, 2024 by Pulumi

    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)
    // Output-based functions aren't available in Java yet
    
    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.
    IncludeMutedHostsData bool
    Include information on the muted status of hosts and when the mute expires.
    SortDir string
    Direction of sort.
    SortField 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.
    IncludeMutedHostsData bool
    Include information on the muted status of hosts and when the mute expires.
    SortDir string
    Direction of sort.
    SortField 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.
    includeMutedHostsData Boolean
    Include information on the muted status of hosts and when the mute expires.
    sortDir String
    Direction of sort.
    sortField 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.
    includeMutedHostsData boolean
    Include information on the muted status of hosts and when the mute expires.
    sortDir string
    Direction of sort.
    sortField 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_hosts_data bool
    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.
    includeMutedHostsData Boolean
    Include information on the muted status of hosts and when the mute expires.
    sortDir String
    Direction of sort.
    sortField String
    Sort hosts by this field.

    getHosts Result

    The following output properties are available:

    HostLists List<GetHostsHostList>
    List of hosts (1000 Max).
    Id string
    The ID of this resource.
    TotalMatching int
    Number of host matching the query.
    TotalReturned 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.
    IncludeMutedHostsData bool
    Include information on the muted status of hosts and when the mute expires.
    SortDir string
    Direction of sort.
    SortField string
    Sort hosts by this field.
    HostLists []GetHostsHostList
    List of hosts (1000 Max).
    Id string
    The ID of this resource.
    TotalMatching int
    Number of host matching the query.
    TotalReturned 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.
    IncludeMutedHostsData bool
    Include information on the muted status of hosts and when the mute expires.
    SortDir string
    Direction of sort.
    SortField string
    Sort hosts by this field.
    hostLists List<GetHostsHostList>
    List of hosts (1000 Max).
    id String
    The ID of this resource.
    totalMatching Integer
    Number of host matching the query.
    totalReturned 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.
    includeMutedHostsData Boolean
    Include information on the muted status of hosts and when the mute expires.
    sortDir String
    Direction of sort.
    sortField String
    Sort hosts by this field.
    hostLists GetHostsHostList[]
    List of hosts (1000 Max).
    id string
    The ID of this resource.
    totalMatching number
    Number of host matching the query.
    totalReturned 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.
    includeMutedHostsData boolean
    Include information on the muted status of hosts and when the mute expires.
    sortDir string
    Direction of sort.
    sortField string
    Sort hosts by this field.
    host_lists Sequence[GetHostsHostList]
    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_hosts_data bool
    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.
    hostLists List<Property Map>
    List of hosts (1000 Max).
    id String
    The ID of this resource.
    totalMatching Number
    Number of host matching the query.
    totalReturned 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.
    includeMutedHostsData Boolean
    Include information on the muted status of hosts and when the mute expires.
    sortDir String
    Direction of sort.
    sortField String
    Sort hosts by this field.

    Supporting Types

    GetHostsHostList

    Aliases List<string>
    Apps List<string>
    AwsName string
    HostName string
    Id int
    IsMuted bool
    LastReportedTime int
    Meta GetHostsHostListMeta
    Metrics GetHostsHostListMetrics
    MuteTimeout int
    Name string
    Sources List<string>
    TagsBySource Dictionary<string, ImmutableArray<string>>
    Up bool
    aliases List<String>
    apps List<String>
    awsName String
    hostName String
    id Integer
    isMuted Boolean
    lastReportedTime Integer
    meta GetHostsHostListMeta
    metrics GetHostsHostListMetrics
    muteTimeout Integer
    name String
    sources List<String>
    tagsBySource Map<String,List<String>>
    up Boolean
    aliases string[]
    apps string[]
    awsName string
    hostName string
    id number
    isMuted boolean
    lastReportedTime number
    meta GetHostsHostListMeta
    metrics GetHostsHostListMetrics
    muteTimeout number
    name string
    sources string[]
    tagsBySource {[key: string]: string[]}
    up boolean
    aliases Sequence[str]
    apps Sequence[str]
    aws_name str
    host_name str
    id int
    is_muted bool
    last_reported_time int
    meta GetHostsHostListMeta
    metrics GetHostsHostListMetrics
    mute_timeout int
    name str
    sources Sequence[str]
    tags_by_source Mapping[str, Sequence[str]]
    up bool
    aliases List<String>
    apps List<String>
    awsName String
    hostName String
    id Number
    isMuted Boolean
    lastReportedTime Number
    meta Property Map
    metrics Property Map
    muteTimeout Number
    name String
    sources List<String>
    tagsBySource Map<List<String>>
    up Boolean

    GetHostsHostListMeta

    AgentVersion string
    CpuCores int
    Gohai string
    Machine string
    Platform string
    Processor string
    PythonVersion string
    SocketFqdn string
    SocketHostname string
    AgentVersion string
    CpuCores int
    Gohai string
    Machine string
    Platform string
    Processor string
    PythonVersion string
    SocketFqdn string
    SocketHostname string
    agentVersion String
    cpuCores Integer
    gohai String
    machine String
    platform String
    processor String
    pythonVersion String
    socketFqdn String
    socketHostname String
    agentVersion string
    cpuCores number
    gohai string
    machine string
    platform string
    processor string
    pythonVersion string
    socketFqdn string
    socketHostname string
    agentVersion String
    cpuCores Number
    gohai String
    machine String
    platform String
    processor String
    pythonVersion String
    socketFqdn String
    socketHostname String

    GetHostsHostListMetrics

    Cpu double
    Iowait double
    Load double
    Cpu float64
    Iowait float64
    Load float64
    cpu Double
    iowait Double
    load Double
    cpu number
    iowait number
    load number
    cpu float
    iowait float
    load float
    cpu Number
    iowait Number
    load Number

    Package Details

    Repository
    Datadog pulumi/pulumi-datadog
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the datadog Terraform Provider.
    datadog logo
    Datadog v4.36.1 published on Friday, Nov 15, 2024 by Pulumi