Class HostsApi
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classManage optional parameters to getHostTotals.static classManage optional parameters to listHosts. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the API client.Get the total number of active hosts.Get the total number of active hosts.Get the total number of active hosts.Get the total number of active hosts.This endpoint returns the total number of active and up hosts in your Datadog account.Get the total number of active hosts.Get all hosts for your organization.listHosts(HostsApi.ListHostsOptionalParameters parameters) Get all hosts for your organization.Get all hosts for your organization.listHostsAsync(HostsApi.ListHostsOptionalParameters parameters) Get all hosts for your organization.This endpoint allows searching for hosts by name, alias, or tag.Get all hosts for your organization.muteHost(String hostName, HostMuteSettings body) Mute a host.muteHostAsync(String hostName, HostMuteSettings body) Mute a host.muteHostWithHttpInfo(String hostName, HostMuteSettings body) Mute a host.muteHostWithHttpInfoAsync(String hostName, HostMuteSettings body) Mute a host.voidsetApiClient(ApiClient apiClient) Set the API client.unmuteHost(String hostName) Unmute a host.unmuteHostAsync(String hostName) Unmute a host.unmuteHostWithHttpInfo(String hostName) Unmutes a host.unmuteHostWithHttpInfoAsync(String hostName) Unmute a host.
-
Constructor Details
-
HostsApi
public HostsApi() -
HostsApi
-
-
Method Details
-
getApiClient
Get the API client.- Returns:
- API client
-
setApiClient
Set the API client.- Parameters:
apiClient- an instance of API client
-
getHostTotals
Get the total number of active hosts.See
getHostTotalsWithHttpInfo(com.datadog.api.client.v1.api.HostsApi.GetHostTotalsOptionalParameters).- Returns:
- HostTotals
- Throws:
ApiException- if fails to make API call
-
getHostTotalsAsync
Get the total number of active hosts.- Returns:
- CompletableFuture<HostTotals>
-
getHostTotals
public HostTotals getHostTotals(HostsApi.GetHostTotalsOptionalParameters parameters) throws ApiException Get the total number of active hosts.See
getHostTotalsWithHttpInfo(com.datadog.api.client.v1.api.HostsApi.GetHostTotalsOptionalParameters).- Parameters:
parameters- Optional parameters for the request.- Returns:
- HostTotals
- Throws:
ApiException- if fails to make API call
-
getHostTotalsAsync
public CompletableFuture<HostTotals> getHostTotalsAsync(HostsApi.GetHostTotalsOptionalParameters parameters) Get the total number of active hosts.- Parameters:
parameters- Optional parameters for the request.- Returns:
- CompletableFuture<HostTotals>
-
getHostTotalsWithHttpInfo
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:
parameters- Optional parameters for the request.- Returns:
- ApiResponse<HostTotals>
- Throws:
ApiException- if fails to make API call- Http Response Details:
Response details Status Code Description Response Headers 200 OK - 400 Invalid Parameter Error - 403 Forbidden - 429 Too many requests -
-
getHostTotalsWithHttpInfoAsync
public CompletableFuture<ApiResponse<HostTotals>> getHostTotalsWithHttpInfoAsync(HostsApi.GetHostTotalsOptionalParameters parameters) Get the total number of active hosts.See
getHostTotalsWithHttpInfo(com.datadog.api.client.v1.api.HostsApi.GetHostTotalsOptionalParameters).- Parameters:
parameters- Optional parameters for the request.- Returns:
- CompletableFuture<ApiResponse<HostTotals>>
-
listHosts
Get all hosts for your organization.See
listHostsWithHttpInfo(com.datadog.api.client.v1.api.HostsApi.ListHostsOptionalParameters).- Returns:
- HostListResponse
- Throws:
ApiException- if fails to make API call
-
listHostsAsync
Get all hosts for your organization.See
listHostsWithHttpInfoAsync(com.datadog.api.client.v1.api.HostsApi.ListHostsOptionalParameters).- Returns:
- CompletableFuture<HostListResponse>
-
listHosts
public HostListResponse listHosts(HostsApi.ListHostsOptionalParameters parameters) throws ApiException Get all hosts for your organization.See
listHostsWithHttpInfo(com.datadog.api.client.v1.api.HostsApi.ListHostsOptionalParameters).- Parameters:
parameters- Optional parameters for the request.- Returns:
- HostListResponse
- Throws:
ApiException- if fails to make API call
-
listHostsAsync
public CompletableFuture<HostListResponse> listHostsAsync(HostsApi.ListHostsOptionalParameters parameters) Get all hosts for your organization.See
listHostsWithHttpInfoAsync(com.datadog.api.client.v1.api.HostsApi.ListHostsOptionalParameters).- Parameters:
parameters- Optional parameters for the request.- Returns:
- CompletableFuture<HostListResponse>
-
listHostsWithHttpInfo
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. Note: If the host is an Amazon EC2 instance,idis replaced withaws_idin the response. Note: To enrich the data returned by this endpoint with security scans, see the new api/v2/security/scanned-assets-metadata endpoint.- Parameters:
parameters- Optional parameters for the request.- Returns:
- ApiResponse<HostListResponse>
- Throws:
ApiException- if fails to make API call- Http Response Details:
Response details Status Code Description Response Headers 200 OK - 400 Invalid Parameter Error - 403 Forbidden - 429 Too many requests -
-
listHostsWithHttpInfoAsync
public CompletableFuture<ApiResponse<HostListResponse>> listHostsWithHttpInfoAsync(HostsApi.ListHostsOptionalParameters parameters) Get all hosts for your organization.See
listHostsWithHttpInfo(com.datadog.api.client.v1.api.HostsApi.ListHostsOptionalParameters).- Parameters:
parameters- Optional parameters for the request.- Returns:
- CompletableFuture<ApiResponse<HostListResponse>>
-
muteHost
Mute a host.See
muteHostWithHttpInfo(java.lang.String, com.datadog.api.client.v1.model.HostMuteSettings).- Parameters:
hostName- Name of the host to mute. (required)body- Mute a host request body. (required)- Returns:
- HostMuteResponse
- Throws:
ApiException- if fails to make API call
-
muteHostAsync
Mute a host.See
muteHostWithHttpInfoAsync(java.lang.String, com.datadog.api.client.v1.model.HostMuteSettings).- Parameters:
hostName- Name of the host to mute. (required)body- Mute a host request body. (required)- Returns:
- CompletableFuture<HostMuteResponse>
-
muteHostWithHttpInfo
public ApiResponse<HostMuteResponse> muteHostWithHttpInfo(String hostName, HostMuteSettings body) throws ApiException Mute a host. Note: This creates a Downtime V2 for the host.- Parameters:
hostName- Name of the host to mute. (required)body- Mute a host request body. (required)- Returns:
- ApiResponse<HostMuteResponse>
- Throws:
ApiException- if fails to make API call- Http Response Details:
Response details Status Code Description Response Headers 200 OK - 400 Invalid Parameter Error - 403 Forbidden - 429 Too many requests -
-
muteHostWithHttpInfoAsync
public CompletableFuture<ApiResponse<HostMuteResponse>> muteHostWithHttpInfoAsync(String hostName, HostMuteSettings body) Mute a host.See
muteHostWithHttpInfo(java.lang.String, com.datadog.api.client.v1.model.HostMuteSettings).- Parameters:
hostName- Name of the host to mute. (required)body- Mute a host request body. (required)- Returns:
- CompletableFuture<ApiResponse<HostMuteResponse>>
-
unmuteHost
Unmute a host.- Parameters:
hostName- Name of the host to unmute. (required)- Returns:
- HostMuteResponse
- Throws:
ApiException- if fails to make API call
-
unmuteHostAsync
Unmute a host.- Parameters:
hostName- Name of the host to unmute. (required)- Returns:
- CompletableFuture<HostMuteResponse>
-
unmuteHostWithHttpInfo
Unmutes a host. This endpoint takes no JSON arguments.- Parameters:
hostName- Name of the host to unmute. (required)- Returns:
- ApiResponse<HostMuteResponse>
- Throws:
ApiException- if fails to make API call- Http Response Details:
Response details Status Code Description Response Headers 200 OK - 400 Invalid Parameter Error - 403 Forbidden - 429 Too many requests -
-
unmuteHostWithHttpInfoAsync
public CompletableFuture<ApiResponse<HostMuteResponse>> unmuteHostWithHttpInfoAsync(String hostName) Unmute a host.- Parameters:
hostName- Name of the host to unmute. (required)- Returns:
- CompletableFuture<ApiResponse<HostMuteResponse>>
-