@Generated(value="https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class HostsApi extends Object
Modifier and Type | Class and Description |
---|---|
static class |
HostsApi.GetHostTotalsOptionalParameters
Manage optional parameters to getHostTotals.
|
static class |
HostsApi.ListHostsOptionalParameters
Manage optional parameters to listHosts.
|
Constructor and Description |
---|
HostsApi() |
HostsApi(ApiClient apiClient) |
public HostsApi()
public HostsApi(ApiClient apiClient)
public ApiClient getApiClient()
public void setApiClient(ApiClient apiClient)
apiClient
- an instance of API clientpublic HostTotals getHostTotals() throws ApiException
See getHostTotalsWithHttpInfo(com.datadog.api.v1.client.api.HostsApi.GetHostTotalsOptionalParameters)
.
ApiException
- if fails to make API callpublic CompletableFuture<HostTotals> getHostTotalsAsync()
public HostTotals getHostTotals(HostsApi.GetHostTotalsOptionalParameters parameters) throws ApiException
See getHostTotalsWithHttpInfo(com.datadog.api.v1.client.api.HostsApi.GetHostTotalsOptionalParameters)
.
parameters
- Optional parameters for the request.ApiException
- if fails to make API callpublic CompletableFuture<HostTotals> getHostTotalsAsync(HostsApi.GetHostTotalsOptionalParameters parameters)
parameters
- Optional parameters for the request.public ApiResponse<HostTotals> getHostTotalsWithHttpInfo(HostsApi.GetHostTotalsOptionalParameters parameters) throws ApiException
This endpoint returns the total number of active and up hosts in your Datadog account. Active means the host has reported in the past hour, and up means it has reported in the past two hours.
parameters
- Optional parameters for the request.ApiException
- if fails to make API callStatus Code | Description | Response Headers |
200 | OK | - |
400 | Invalid Parameter Error | - |
403 | Forbidden | - |
429 | Too many requests | - |
public CompletableFuture<ApiResponse<HostTotals>> getHostTotalsWithHttpInfoAsync(HostsApi.GetHostTotalsOptionalParameters parameters)
See getHostTotalsWithHttpInfo(com.datadog.api.v1.client.api.HostsApi.GetHostTotalsOptionalParameters)
.
parameters
- Optional parameters for the request.public HostListResponse listHosts() throws ApiException
See listHostsWithHttpInfo(com.datadog.api.v1.client.api.HostsApi.ListHostsOptionalParameters)
.
ApiException
- if fails to make API callpublic CompletableFuture<HostListResponse> listHostsAsync()
See listHostsWithHttpInfoAsync(com.datadog.api.v1.client.api.HostsApi.ListHostsOptionalParameters)
.
public HostListResponse listHosts(HostsApi.ListHostsOptionalParameters parameters) throws ApiException
See listHostsWithHttpInfo(com.datadog.api.v1.client.api.HostsApi.ListHostsOptionalParameters)
.
parameters
- Optional parameters for the request.ApiException
- if fails to make API callpublic CompletableFuture<HostListResponse> listHostsAsync(HostsApi.ListHostsOptionalParameters parameters)
See listHostsWithHttpInfoAsync(com.datadog.api.v1.client.api.HostsApi.ListHostsOptionalParameters)
.
parameters
- Optional parameters for the request.public ApiResponse<HostListResponse> listHostsWithHttpInfo(HostsApi.ListHostsOptionalParameters parameters) throws ApiException
This endpoint allows searching for hosts by name, alias, or tag. Hosts live within the past 3 hours are included by default. Retention is 7 days. Results are paginated with a max of 1000 results at a time.
parameters
- Optional parameters for the request.ApiException
- if fails to make API callStatus Code | Description | Response Headers |
200 | OK | - |
400 | Invalid Parameter Error | - |
403 | Forbidden | - |
429 | Too many requests | - |
public CompletableFuture<ApiResponse<HostListResponse>> listHostsWithHttpInfoAsync(HostsApi.ListHostsOptionalParameters parameters)
See listHostsWithHttpInfo(com.datadog.api.v1.client.api.HostsApi.ListHostsOptionalParameters)
.
parameters
- Optional parameters for the request.public HostMuteResponse muteHost(String hostName, HostMuteSettings body) throws ApiException
See muteHostWithHttpInfo(java.lang.String, com.datadog.api.v1.client.model.HostMuteSettings)
.
hostName
- Name of the host to mute. (required)body
- Mute a host request body. (required)ApiException
- if fails to make API callpublic CompletableFuture<HostMuteResponse> muteHostAsync(String hostName, HostMuteSettings body)
See muteHostWithHttpInfoAsync(java.lang.String, com.datadog.api.v1.client.model.HostMuteSettings)
.
hostName
- Name of the host to mute. (required)body
- Mute a host request body. (required)public ApiResponse<HostMuteResponse> muteHostWithHttpInfo(String hostName, HostMuteSettings body) throws ApiException
Mute a host.
hostName
- Name of the host to mute. (required)body
- Mute a host request body. (required)ApiException
- if fails to make API callStatus Code | Description | Response Headers |
200 | OK | - |
400 | Invalid Parameter Error | - |
403 | Forbidden | - |
429 | Too many requests | - |
public CompletableFuture<ApiResponse<HostMuteResponse>> muteHostWithHttpInfoAsync(String hostName, HostMuteSettings body)
See muteHostWithHttpInfo(java.lang.String, com.datadog.api.v1.client.model.HostMuteSettings)
.
hostName
- Name of the host to mute. (required)body
- Mute a host request body. (required)public HostMuteResponse unmuteHost(String hostName) throws ApiException
hostName
- Name of the host to unmute. (required)ApiException
- if fails to make API callpublic CompletableFuture<HostMuteResponse> unmuteHostAsync(String hostName)
hostName
- Name of the host to unmute. (required)public ApiResponse<HostMuteResponse> unmuteHostWithHttpInfo(String hostName) throws ApiException
Unmutes a host. This endpoint takes no JSON arguments.
hostName
- Name of the host to unmute. (required)ApiException
- if fails to make API callStatus Code | Description | Response Headers |
200 | OK | - |
400 | Invalid Parameter Error | - |
403 | Forbidden | - |
429 | Too many requests | - |
public CompletableFuture<ApiResponse<HostMuteResponse>> unmuteHostWithHttpInfoAsync(String hostName)
hostName
- Name of the host to unmute. (required)Copyright © 2022. All rights reserved.