Skip to content

Commit a6e49cb

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit 60ad0ae of spec repo (#3867)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent 50e8510 commit a6e49cb

15 files changed

Lines changed: 1940 additions & 0 deletions

.generator/schemas/v2/openapi.yaml

Lines changed: 222 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2700,6 +2700,158 @@ components:
27002700
type: string
27012701
x-enum-varnames:
27022702
- CCM_CONFIG
2703+
AWSCcmConfigValidationIssue:
2704+
description: A single validation issue found while validating an AWS Cost and Usage Report (CUR) 2.0 configuration.
2705+
properties:
2706+
code:
2707+
$ref: "#/components/schemas/AWSCcmConfigValidationIssueCode"
2708+
description:
2709+
description: Human-readable description of the validation issue.
2710+
example: 'no CUR 2.0 export named "cost-and-usage-report" found'
2711+
type: string
2712+
required:
2713+
- code
2714+
- description
2715+
type: object
2716+
AWSCcmConfigValidationIssueCode:
2717+
description: Identifies the specific reason a Cost and Usage Report (CUR) 2.0 configuration failed validation.
2718+
enum:
2719+
- ISSUE_CODE_UNSPECIFIED
2720+
- CREDENTIAL_ERROR
2721+
- BUCKET_NAME_INVALID_GOVCLOUD
2722+
- S3_LIST_PERMISSION_MISSING
2723+
- S3_GET_PERMISSION_MISSING
2724+
- S3_BUCKET_REGION_MISMATCH
2725+
- S3_BUCKET_NOT_ACCESSIBLE
2726+
- EXPORT_LIST_PERMISSION_MISSING
2727+
- EXPORT_GET_PERMISSION_MISSING
2728+
- EXPORT_NOT_FOUND
2729+
- EXPORT_STATUS_UNHEALTHY
2730+
- TIME_GRANULARITY_INVALID
2731+
- FILE_FORMAT_INVALID
2732+
- INCLUDE_RESOURCES_DISABLED
2733+
- REFRESH_CADENCE_INVALID
2734+
- OVERWRITE_MODE_INVALID
2735+
- QUERY_STATEMENT_INVALID
2736+
example: "EXPORT_NOT_FOUND"
2737+
type: string
2738+
x-enum-varnames:
2739+
- ISSUE_CODE_UNSPECIFIED
2740+
- CREDENTIAL_ERROR
2741+
- BUCKET_NAME_INVALID_GOVCLOUD
2742+
- S3_LIST_PERMISSION_MISSING
2743+
- S3_GET_PERMISSION_MISSING
2744+
- S3_BUCKET_REGION_MISMATCH
2745+
- S3_BUCKET_NOT_ACCESSIBLE
2746+
- EXPORT_LIST_PERMISSION_MISSING
2747+
- EXPORT_GET_PERMISSION_MISSING
2748+
- EXPORT_NOT_FOUND
2749+
- EXPORT_STATUS_UNHEALTHY
2750+
- TIME_GRANULARITY_INVALID
2751+
- FILE_FORMAT_INVALID
2752+
- INCLUDE_RESOURCES_DISABLED
2753+
- REFRESH_CADENCE_INVALID
2754+
- OVERWRITE_MODE_INVALID
2755+
- QUERY_STATEMENT_INVALID
2756+
AWSCcmConfigValidationIssues:
2757+
description: List of validation issues found for the Cost and Usage Report (CUR) 2.0 configuration. Empty when the configuration is valid.
2758+
items:
2759+
$ref: "#/components/schemas/AWSCcmConfigValidationIssue"
2760+
type: array
2761+
AWSCcmConfigValidationRequest:
2762+
description: AWS CCM config validation request body.
2763+
properties:
2764+
data:
2765+
$ref: "#/components/schemas/AWSCcmConfigValidationRequestData"
2766+
required:
2767+
- data
2768+
type: object
2769+
AWSCcmConfigValidationRequestAttributes:
2770+
description: Attributes for an AWS CCM config validation request.
2771+
properties:
2772+
account_id:
2773+
description: Your AWS Account ID without dashes.
2774+
example: "123456789012"
2775+
type: string
2776+
bucket_name:
2777+
description: Name of the S3 bucket where the Cost and Usage Report is stored.
2778+
example: "billing"
2779+
type: string
2780+
bucket_region:
2781+
description: AWS region of the S3 bucket.
2782+
example: "us-east-1"
2783+
type: string
2784+
report_name:
2785+
description: Name of the Cost and Usage Report.
2786+
example: "cost-and-usage-report"
2787+
type: string
2788+
report_prefix:
2789+
description: S3 prefix where the Cost and Usage Report is stored.
2790+
example: "reports"
2791+
type: string
2792+
required:
2793+
- account_id
2794+
- bucket_name
2795+
- bucket_region
2796+
- report_name
2797+
type: object
2798+
AWSCcmConfigValidationRequestData:
2799+
description: AWS CCM config validation request data.
2800+
properties:
2801+
attributes:
2802+
$ref: "#/components/schemas/AWSCcmConfigValidationRequestAttributes"
2803+
type:
2804+
$ref: "#/components/schemas/AWSCcmConfigValidationType"
2805+
required:
2806+
- attributes
2807+
- type
2808+
type: object
2809+
AWSCcmConfigValidationResponse:
2810+
description: AWS CCM config validation response body.
2811+
properties:
2812+
data:
2813+
$ref: "#/components/schemas/AWSCcmConfigValidationResponseData"
2814+
required:
2815+
- data
2816+
type: object
2817+
AWSCcmConfigValidationResponseAttributes:
2818+
description: Attributes for an AWS CCM config validation response.
2819+
properties:
2820+
account_id:
2821+
description: Your AWS Account ID without dashes.
2822+
example: "123456789012"
2823+
type: string
2824+
issues:
2825+
$ref: "#/components/schemas/AWSCcmConfigValidationIssues"
2826+
required:
2827+
- account_id
2828+
- issues
2829+
type: object
2830+
AWSCcmConfigValidationResponseData:
2831+
description: AWS CCM config validation response data.
2832+
properties:
2833+
attributes:
2834+
$ref: "#/components/schemas/AWSCcmConfigValidationResponseAttributes"
2835+
id:
2836+
description: AWS CCM config validation resource identifier.
2837+
example: "ccm_config_validation"
2838+
type: string
2839+
type:
2840+
$ref: "#/components/schemas/AWSCcmConfigValidationType"
2841+
required:
2842+
- attributes
2843+
- id
2844+
- type
2845+
type: object
2846+
AWSCcmConfigValidationType:
2847+
default: "ccm_config_validation"
2848+
description: AWS CCM config validation resource type.
2849+
enum:
2850+
- ccm_config_validation
2851+
example: "ccm_config_validation"
2852+
type: string
2853+
x-enum-varnames:
2854+
- CCM_CONFIG_VALIDATION
27032855
AWSCloudAuthPersonaMappingAttributesResponse:
27042856
description: Attributes for AWS cloud authentication persona mapping response
27052857
properties:
@@ -128868,6 +129020,76 @@ paths:
128868129020
operator: OR
128869129021
permissions:
128870129022
- aws_configuration_read
129023+
/api/v2/integration/aws/validate_ccm_config:
129024+
post:
129025+
description: |-
129026+
Validate a Cloud Cost Management config for an AWS account using Cost and Usage Report
129027+
(CUR) 2.0 against Datadog's ingest requirements without persisting it.
129028+
operationId: ValidateAWSCCMConfig
129029+
requestBody:
129030+
content:
129031+
application/json:
129032+
examples:
129033+
default:
129034+
value:
129035+
data:
129036+
attributes:
129037+
account_id: "123456789012"
129038+
bucket_name: billing
129039+
bucket_region: us-east-1
129040+
report_name: cost-and-usage-report
129041+
report_prefix: reports
129042+
type: ccm_config_validation
129043+
schema:
129044+
$ref: "#/components/schemas/AWSCcmConfigValidationRequest"
129045+
description: Validate a Cloud Cost Management config for an AWS account integration config.
129046+
required: true
129047+
responses:
129048+
"200":
129049+
content:
129050+
application/json:
129051+
examples:
129052+
default:
129053+
value:
129054+
data:
129055+
attributes:
129056+
account_id: "123456789012"
129057+
issues:
129058+
- code: EXPORT_NOT_FOUND
129059+
description: 'no CUR 2.0 export named "cost-and-usage-report" found'
129060+
id: ccm_config_validation
129061+
type: ccm_config_validation
129062+
schema:
129063+
$ref: "#/components/schemas/AWSCcmConfigValidationResponse"
129064+
description: AWS CCM Config validation result
129065+
"400":
129066+
content:
129067+
application/json:
129068+
schema:
129069+
$ref: "#/components/schemas/JSONAPIErrorResponse"
129070+
description: Bad Request
129071+
"403":
129072+
$ref: "#/components/responses/ForbiddenResponse"
129073+
"429":
129074+
$ref: "#/components/responses/TooManyRequestsResponse"
129075+
"503":
129076+
content:
129077+
application/json:
129078+
schema:
129079+
$ref: "#/components/schemas/JSONAPIErrorResponse"
129080+
description: Service Unavailable
129081+
summary: Validate AWS CCM config
129082+
tags:
129083+
- AWS Integration
129084+
x-codegen-request-body-name: body
129085+
"x-permission":
129086+
operator: OR
129087+
permissions:
129088+
- cloud_cost_management_read
129089+
- cloud_cost_management_write
129090+
x-unstable: |-
129091+
**Note**: This endpoint is in Preview and may be subject to change.
129092+
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
128871129093
/api/v2/integration/gcp/accounts:
128872129094
get:
128873129095
description: List all GCP STS-enabled service accounts configured in your Datadog account.
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
// Validate AWS CCM config returns "AWS CCM Config validation result" response
2+
3+
import com.datadog.api.client.ApiClient;
4+
import com.datadog.api.client.ApiException;
5+
import com.datadog.api.client.v2.api.AwsIntegrationApi;
6+
import com.datadog.api.client.v2.model.AWSCcmConfigValidationRequest;
7+
import com.datadog.api.client.v2.model.AWSCcmConfigValidationRequestAttributes;
8+
import com.datadog.api.client.v2.model.AWSCcmConfigValidationRequestData;
9+
import com.datadog.api.client.v2.model.AWSCcmConfigValidationResponse;
10+
import com.datadog.api.client.v2.model.AWSCcmConfigValidationType;
11+
12+
public class Example {
13+
public static void main(String[] args) {
14+
ApiClient defaultClient = ApiClient.getDefaultApiClient();
15+
defaultClient.setUnstableOperationEnabled("v2.validateAWSCCMConfig", true);
16+
AwsIntegrationApi apiInstance = new AwsIntegrationApi(defaultClient);
17+
18+
AWSCcmConfigValidationRequest body =
19+
new AWSCcmConfigValidationRequest()
20+
.data(
21+
new AWSCcmConfigValidationRequestData()
22+
.attributes(
23+
new AWSCcmConfigValidationRequestAttributes()
24+
.accountId("123456789012")
25+
.bucketName("billing")
26+
.bucketRegion("us-east-1")
27+
.reportName("cost-and-usage-report")
28+
.reportPrefix("reports"))
29+
.type(AWSCcmConfigValidationType.CCM_CONFIG_VALIDATION));
30+
31+
try {
32+
AWSCcmConfigValidationResponse result = apiInstance.validateAWSCCMConfig(body);
33+
System.out.println(result);
34+
} catch (ApiException e) {
35+
System.err.println("Exception when calling AwsIntegrationApi#validateAWSCCMConfig");
36+
System.err.println("Status code: " + e.getCode());
37+
System.err.println("Reason: " + e.getResponseBody());
38+
System.err.println("Response headers: " + e.getResponseHeaders());
39+
e.printStackTrace();
40+
}
41+
}
42+
}

src/main/java/com/datadog/api/client/ApiClient.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1060,6 +1060,7 @@ public class ApiClient {
10601060
put("v2.deleteAWSAccountCCMConfig", false);
10611061
put("v2.getAWSAccountCCMConfig", false);
10621062
put("v2.updateAWSAccountCCMConfig", false);
1063+
put("v2.validateAWSCCMConfig", false);
10631064
put("v2.createJiraIssueTemplate", false);
10641065
put("v2.deleteJiraAccount", false);
10651066
put("v2.deleteJiraIssueTemplate", false);

0 commit comments

Comments
 (0)