Skip to content

Commit

Permalink
Regenerate client from commit abcc1ed of spec repo (#719)
Browse files Browse the repository at this point in the history
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
  • Loading branch information
api-clients-generation-pipeline[bot] and ci.datadog-api-spec authored Mar 26, 2021
1 parent 6e7b7e2 commit 7c91f67
Show file tree
Hide file tree
Showing 17 changed files with 891 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.4.1.dev6",
"regenerated": "2021-03-25 11:07:56.222968",
"spec_repo_commit": "20f68cb"
"regenerated": "2021-03-26 09:49:58.313925",
"spec_repo_commit": "abcc1ed"
},
"v2": {
"apigentools_version": "1.4.1.dev6",
"regenerated": "2021-03-25 11:08:42.432858",
"spec_repo_commit": "20f68cb"
"regenerated": "2021-03-26 09:50:40.992252",
"spec_repo_commit": "abcc1ed"
}
}
}
3 changes: 3 additions & 0 deletions api_docs/v1/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ Class | Method | HTTP request | Description
*UsageMeteringApi* | [**getUsageAnalyzedLogs**](UsageMeteringApi.md#getUsageAnalyzedLogs) | **GET** /api/v1/usage/analyzed_logs | Get hourly usage for analyzed logs
*UsageMeteringApi* | [**getUsageAttribution**](UsageMeteringApi.md#getUsageAttribution) | **GET** /api/v1/usage/attribution | Get Usage Attribution
*UsageMeteringApi* | [**getUsageBillableSummary**](UsageMeteringApi.md#getUsageBillableSummary) | **GET** /api/v1/usage/billable-summary | Get billable usage across your account
*UsageMeteringApi* | [**getUsageComplianceMonitoring**](UsageMeteringApi.md#getUsageComplianceMonitoring) | **GET** /api/v1/usage/compliance-monitoring | Get hourly usage for Compliance Monitoring
*UsageMeteringApi* | [**getUsageFargate**](UsageMeteringApi.md#getUsageFargate) | **GET** /api/v1/usage/fargate | Get hourly usage for Fargate
*UsageMeteringApi* | [**getUsageHosts**](UsageMeteringApi.md#getUsageHosts) | **GET** /api/v1/usage/hosts | Get hourly usage for hosts and containers
*UsageMeteringApi* | [**getUsageIndexedSpans**](UsageMeteringApi.md#getUsageIndexedSpans) | **GET** /api/v1/usage/indexed-spans | Get hourly usage for indexed spans
Expand Down Expand Up @@ -578,6 +579,8 @@ Class | Method | HTTP request | Description
- [UsageBillableSummaryHour](UsageBillableSummaryHour.md)
- [UsageBillableSummaryKeys](UsageBillableSummaryKeys.md)
- [UsageBillableSummaryResponse](UsageBillableSummaryResponse.md)
- [UsageComplianceHour](UsageComplianceHour.md)
- [UsageComplianceResponse](UsageComplianceResponse.md)
- [UsageCustomReportsAttributes](UsageCustomReportsAttributes.md)
- [UsageCustomReportsData](UsageCustomReportsData.md)
- [UsageCustomReportsMeta](UsageCustomReportsMeta.md)
Expand Down
16 changes: 16 additions & 0 deletions api_docs/v1/UsageComplianceHour.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@


# UsageComplianceHour

Compliance Monitoring usage for a given organization for a given hour.

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**complianceContainerCount** | **Long** | The total number of compliance container hours from the start of the given hour&#39;s month until the given hour. | [optional]
**complianceHostCount** | **Long** | The total number of compliance hosts hours from the start of the given hour&#39;s month until the given hour. | [optional]
**hour** | **OffsetDateTime** | The hour for the usage. | [optional]



14 changes: 14 additions & 0 deletions api_docs/v1/UsageComplianceResponse.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@


# UsageComplianceResponse

The response containing the Compliance Monitoring usage for each hour for a given organization.

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**usage** | [**List&lt;UsageComplianceHour&gt;**](UsageComplianceHour.md) | Get hourly usage for Compliance Monitoring. | [optional]



87 changes: 87 additions & 0 deletions api_docs/v1/UsageMeteringApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Method | HTTP request | Description
[**getUsageAnalyzedLogs**](UsageMeteringApi.md#getUsageAnalyzedLogs) | **GET** /api/v1/usage/analyzed_logs | Get hourly usage for analyzed logs
[**getUsageAttribution**](UsageMeteringApi.md#getUsageAttribution) | **GET** /api/v1/usage/attribution | Get Usage Attribution
[**getUsageBillableSummary**](UsageMeteringApi.md#getUsageBillableSummary) | **GET** /api/v1/usage/billable-summary | Get billable usage across your account
[**getUsageComplianceMonitoring**](UsageMeteringApi.md#getUsageComplianceMonitoring) | **GET** /api/v1/usage/compliance-monitoring | Get hourly usage for Compliance Monitoring
[**getUsageFargate**](UsageMeteringApi.md#getUsageFargate) | **GET** /api/v1/usage/fargate | Get hourly usage for Fargate
[**getUsageHosts**](UsageMeteringApi.md#getUsageHosts) | **GET** /api/v1/usage/hosts | Get hourly usage for hosts and containers
[**getUsageIndexedSpans**](UsageMeteringApi.md#getUsageIndexedSpans) | **GET** /api/v1/usage/indexed-spans | Get hourly usage for indexed spans
Expand Down Expand Up @@ -902,6 +903,92 @@ Name | Type | Description | Notes
| **403** | Forbidden - User is not authorized | - |


## getUsageComplianceMonitoring

> UsageComplianceResponse getUsageComplianceMonitoring().startHr(startHr).endHr(endHr).execute();
Get hourly usage for Compliance Monitoring

Get hourly usage for Compliance Monitoring.

### Example

```java
import java.time.OffsetDateTime;
// Import classes:
import java.util.*;
import com.datadog.api.v1.client.ApiClient;
import com.datadog.api.v1.client.ApiException;
import com.datadog.api.v1.client.Configuration;
import com.datadog.api.v1.client.auth.*;
import com.datadog.api.v1.client.model.*;
import com.datadog.api.v1.client.api.UsageMeteringApi;

public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure the Datadog site to send API calls to
HashMap<String, String> serverVariables = new HashMap<String, String>();
String site = System.getenv("DD_SITE");
if (site != null) {
serverVariables.put("site", site);
defaultClient.setServerVariables(serverVariables);
}
// Configure API key authorization:
HashMap<String, String> secrets = new HashMap<String, String>();
secrets.put("apiKeyAuth", System.getenv("DD_CLIENT_API_KEY"));
secrets.put("appKeyAuth", System.getenv("DD_CLIENT_APP_KEY"));
defaultClient.configureApiKeys(secrets);

UsageMeteringApi apiInstance = new UsageMeteringApi(defaultClient);
OffsetDateTime startHr = OffsetDateTime.now(); // OffsetDateTime | Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage beginning at this hour.
OffsetDateTime endHr = OffsetDateTime.now(); // OffsetDateTime | Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending **before** this hour.
try {
UsageComplianceResponse result = apiInstance.getUsageComplianceMonitoring()
.startHr(startHr)
.endHr(endHr)
.execute();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling UsageMeteringApi#getUsageComplianceMonitoring");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
```

### Parameters


Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**startHr** | **OffsetDateTime**| Datetime in ISO-8601 format, UTC, precise to hour: &#x60;[YYYY-MM-DDThh]&#x60; for usage beginning at this hour. |
**endHr** | **OffsetDateTime**| Datetime in ISO-8601 format, UTC, precise to hour: &#x60;[YYYY-MM-DDThh]&#x60; for usage ending **before** this hour. | [optional]

### Return type

[**UsageComplianceResponse**](UsageComplianceResponse.md)

### Authorization

[apiKeyAuth](README.md#apiKeyAuth), [appKeyAuth](README.md#appKeyAuth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json;datetime-format=rfc3339

### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | OK | - |
| **400** | Bad Request | - |
| **403** | Forbidden - User is not authorized | - |


## getUsageFargate

> UsageFargateResponse getUsageFargate().startHr(startHr).endHr(endHr).execute();
Expand Down
2 changes: 2 additions & 0 deletions api_docs/v1/UsageSummaryDate.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ Name | Type | Description | Notes
**awsLambdaInvocationsSum** | **Long** | Shows the sum of all AWS Lambda invocations over all hours in the current date for all organizations. | [optional]
**azureAppServiceTop99p** | **Long** | Shows the 99th percentile of all Azure app services over all hours in the current date for all organizations. | [optional]
**billableIngestedBytesSum** | **Long** | Shows the sum of all log bytes ingested over all hours in the current date for all organizations. | [optional]
**complianceContainerCountSum** | **Object** | Shows the sum of compliance containers over all hours in the current date for all organizations. | [optional]
**complianceHostCountSum** | **Long** | Shows the sum of compliance hosts over all hours in the current date for all organizations. | [optional]
**containerAvg** | **Long** | Shows the average of all distinct containers over all hours in the current date for all organizations. | [optional]
**containerHwm** | **Long** | Shows the high-water mark of all distinct containers over all hours in the current date for all organizations. | [optional]
**customTsAvg** | **Long** | Shows the average number of distinct custom metrics over all hours in the current date for all organizations. | [optional]
Expand Down
2 changes: 2 additions & 0 deletions api_docs/v1/UsageSummaryDateOrg.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ Name | Type | Description | Notes
**awsLambdaInvocationsSum** | **Long** | Shows the sum of all AWS Lambda invocations over all hours in the current date for the given org. | [optional]
**azureAppServiceTop99p** | **Long** | Shows the 99th percentile of all Azure app services over all hours in the current date for the given org. | [optional]
**billableIngestedBytesSum** | **Long** | Shows the sum of all log bytes ingested over all hours in the current date for the given org. | [optional]
**complianceContainerAggSum** | **Object** | Shows the sum of all compliance containers over all hours in the current date for the given org. | [optional]
**complianceHostAggSum** | **Long** | Shows the sum of all compliance hosts over all hours in the current date for the given org. | [optional]
**containerAvg** | **Long** | Shows the average of all distinct containers over all hours in the current date for the given org. | [optional]
**containerHwm** | **Long** | Shows the high-water mark of all distinct containers over all hours in the current date for the given org. | [optional]
**customTsAvg** | **Long** | Shows the average number of distinct custom metrics over all hours in the current date for the given org. | [optional]
Expand Down
2 changes: 2 additions & 0 deletions api_docs/v1/UsageSummaryResponse.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ Name | Type | Description | Notes
**azureAppServiceTop99pSum** | **Long** | Shows the 99th percentile of all Azure app services over all hours in the current months for all organizations. | [optional]
**azureHostTop99pSum** | **Long** | Shows the 99th percentile of all Azure hosts over all hours in the current months for all organizations. | [optional]
**billableIngestedBytesAggSum** | **Long** | Shows the sum of all log bytes ingested over all hours in the current months for all organizations. | [optional]
**complianceContainerAggSum** | **Object** | Shows the sum of all compliance containers over all hours in the current months for all organizations. | [optional]
**complianceHostAggSum** | **Long** | Shows the sum of all compliance hosts over all hours in the current months for all organizations. | [optional]
**containerAvgSum** | **Long** | Shows the average of all distinct containers over all hours in the current months for all organizations. | [optional]
**containerHwmSum** | **Long** | Shows the sum of the high-water marks of all distinct containers over all hours in the current months for all organizations. | [optional]
**customTsSum** | **Long** | Shows the average number of distinct custom metrics over all hours in the current months for all organizations. | [optional]
Expand Down
130 changes: 130 additions & 0 deletions src/main/java/com/datadog/api/v1/client/api/UsageMeteringApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import com.datadog.api.v1.client.model.UsageAttributionResponse;
import com.datadog.api.v1.client.model.UsageAttributionSort;
import com.datadog.api.v1.client.model.UsageBillableSummaryResponse;
import com.datadog.api.v1.client.model.UsageComplianceResponse;
import com.datadog.api.v1.client.model.UsageCustomReportsResponse;
import com.datadog.api.v1.client.model.UsageFargateResponse;
import com.datadog.api.v1.client.model.UsageHostsResponse;
Expand Down Expand Up @@ -1424,6 +1425,135 @@ public APIgetUsageBillableSummaryRequest getUsageBillableSummary() throws ApiExc
return new APIgetUsageBillableSummaryRequest();
}

private ApiResponse<UsageComplianceResponse> getUsageComplianceMonitoringWithHttpInfo(
OffsetDateTime startHr, OffsetDateTime endHr) throws ApiException {
Object localVarPostBody = null;

// verify the required parameter 'startHr' is set
if (startHr == null) {
throw new ApiException(
400,
"Missing the required parameter 'startHr' when calling getUsageComplianceMonitoring");
}

// create path and map variables
String localVarPath = "/api/v1/usage/compliance-monitoring";

// query params
List<Pair> localVarQueryParams = new ArrayList<Pair>();
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
Map<String, String> localVarCookieParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>();

localVarQueryParams.addAll(apiClient.parameterToPairs("", "start_hr", startHr));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "end_hr", endHr));

// Set Operation-ID header for telemetry
localVarHeaderParams.put("DD-OPERATION-ID", "getUsageComplianceMonitoring");

final String[] localVarAccepts = {"application/json;datetime-format=rfc3339"};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);

final String[] localVarContentTypes = {};

final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);

String[] localVarAuthNames = new String[] {"apiKeyAuth", "appKeyAuth"};

GenericType<UsageComplianceResponse> localVarReturnType =
new GenericType<UsageComplianceResponse>() {};

return apiClient.invokeAPI(
"UsageMeteringApi.getUsageComplianceMonitoring",
localVarPath,
"GET",
localVarQueryParams,
localVarPostBody,
localVarHeaderParams,
localVarCookieParams,
localVarFormParams,
localVarAccept,
localVarContentType,
localVarAuthNames,
localVarReturnType,
false);
}

public class APIgetUsageComplianceMonitoringRequest {
private OffsetDateTime startHr;
private OffsetDateTime endHr;

private APIgetUsageComplianceMonitoringRequest() {}

/**
* Set startHr
*
* @param startHr Datetime in ISO-8601 format, UTC, precise to hour: &#x60;[YYYY-MM-DDThh]&#x60;
* for usage beginning at this hour. (required)
* @return APIgetUsageComplianceMonitoringRequest
*/
public APIgetUsageComplianceMonitoringRequest startHr(OffsetDateTime startHr) {
this.startHr = startHr;
return this;
}

/**
* Set endHr
*
* @param endHr Datetime in ISO-8601 format, UTC, precise to hour: &#x60;[YYYY-MM-DDThh]&#x60;
* for usage ending **before** this hour. (optional)
* @return APIgetUsageComplianceMonitoringRequest
*/
public APIgetUsageComplianceMonitoringRequest endHr(OffsetDateTime endHr) {
this.endHr = endHr;
return this;
}

/**
* Execute getUsageComplianceMonitoring request
*
* @return UsageComplianceResponse
* @throws ApiException if fails to make API call
* @http.response.details
* <table summary="Response Details" border="1">
* <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
* <tr><td> 200 </td><td> OK </td><td> - </td></tr>
* <tr><td> 400 </td><td> Bad Request </td><td> - </td></tr>
* <tr><td> 403 </td><td> Forbidden - User is not authorized </td><td> - </td></tr>
* </table>
*/
public UsageComplianceResponse execute() throws ApiException {
return this.executeWithHttpInfo().getData();
}

/**
* Execute getUsageComplianceMonitoring request with HTTP info returned
*
* @return ApiResponse&lt;UsageComplianceResponse&gt;
* @throws ApiException if fails to make API call
* @http.response.details
* <table summary="Response Details" border="1">
* <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
* <tr><td> 200 </td><td> OK </td><td> - </td></tr>
* <tr><td> 400 </td><td> Bad Request </td><td> - </td></tr>
* <tr><td> 403 </td><td> Forbidden - User is not authorized </td><td> - </td></tr>
* </table>
*/
public ApiResponse<UsageComplianceResponse> executeWithHttpInfo() throws ApiException {
return getUsageComplianceMonitoringWithHttpInfo(startHr, endHr);
}
}

/**
* Get hourly usage for Compliance Monitoring Get hourly usage for Compliance Monitoring.
*
* @return getUsageComplianceMonitoringRequest
* @throws ApiException if fails to make API call
*/
public APIgetUsageComplianceMonitoringRequest getUsageComplianceMonitoring() throws ApiException {
return new APIgetUsageComplianceMonitoringRequest();
}

private ApiResponse<UsageFargateResponse> getUsageFargateWithHttpInfo(
OffsetDateTime startHr, OffsetDateTime endHr) throws ApiException {
Object localVarPostBody = null;
Expand Down
Loading

0 comments on commit 7c91f67

Please sign in to comment.