Skip to content

Commit e35f52d

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit e23f534 of spec repo
1 parent 17f8f4d commit e35f52d

File tree

35 files changed

+3074
-70
lines changed

35 files changed

+3074
-70
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 236 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1761,6 +1761,82 @@ components:
17611761
required:
17621762
- role_name
17631763
type: object
1764+
AWSCcmConfig:
1765+
description: AWS Cloud Cost Management config.
1766+
properties:
1767+
data_export_configs:
1768+
description: List of data export configurations for Cost and Usage Reports.
1769+
items:
1770+
$ref: '#/components/schemas/DataExportConfig'
1771+
type: array
1772+
required:
1773+
- data_export_configs
1774+
type: object
1775+
AWSCcmConfigRequest:
1776+
description: AWS CCM Config Create/Update Request body.
1777+
properties:
1778+
data:
1779+
$ref: '#/components/schemas/AWSCcmConfigRequestData'
1780+
required:
1781+
- data
1782+
type: object
1783+
AWSCcmConfigRequestAttributes:
1784+
description: AWS CCM Config attributes for Create/Update requests.
1785+
properties:
1786+
ccm_config:
1787+
$ref: '#/components/schemas/AWSCcmConfig'
1788+
required:
1789+
- ccm_config
1790+
type: object
1791+
AWSCcmConfigRequestData:
1792+
description: AWS CCM Config Create/Update Request data.
1793+
properties:
1794+
attributes:
1795+
$ref: '#/components/schemas/AWSCcmConfigRequestAttributes'
1796+
type:
1797+
$ref: '#/components/schemas/AWSCcmConfigType'
1798+
required:
1799+
- attributes
1800+
- type
1801+
type: object
1802+
AWSCcmConfigResponse:
1803+
description: AWS CCM Config response body.
1804+
properties:
1805+
data:
1806+
$ref: '#/components/schemas/AWSCcmConfigResponseData'
1807+
required:
1808+
- data
1809+
type: object
1810+
AWSCcmConfigResponseAttributes:
1811+
description: AWS CCM Config response attributes.
1812+
properties:
1813+
data_export_configs:
1814+
description: List of data export configurations for Cost and Usage Reports.
1815+
items:
1816+
$ref: '#/components/schemas/DataExportConfig'
1817+
type: array
1818+
type: object
1819+
AWSCcmConfigResponseData:
1820+
description: AWS CCM Config response data.
1821+
properties:
1822+
attributes:
1823+
$ref: '#/components/schemas/AWSCcmConfigResponseAttributes'
1824+
id:
1825+
$ref: '#/components/schemas/AWSAccountConfigID'
1826+
type:
1827+
$ref: '#/components/schemas/AWSCcmConfigType'
1828+
required:
1829+
- type
1830+
type: object
1831+
AWSCcmConfigType:
1832+
default: ccm_config
1833+
description: AWS CCM Config resource type.
1834+
enum:
1835+
- ccm_config
1836+
example: ccm_config
1837+
type: string
1838+
x-enum-varnames:
1839+
- CCM_CONFIG
17641840
AWSCredentials:
17651841
description: The definition of `AWSCredentials` object.
17661842
oneOf:
@@ -16811,6 +16887,37 @@ components:
1681116887
example: canceled
1681216888
type: string
1681316889
type: object
16890+
DataExportConfig:
16891+
description: AWS Cost and Usage Report data export configuration.
16892+
properties:
16893+
bucket_name:
16894+
description: Name of the S3 bucket where the Cost and Usage Report is stored.
16895+
example: billing
16896+
type: string
16897+
bucket_region:
16898+
description: AWS region of the S3 bucket.
16899+
example: us-east-1
16900+
type: string
16901+
report_name:
16902+
description: Name of the Cost and Usage Report.
16903+
example: cost-and-usage-report
16904+
type: string
16905+
report_prefix:
16906+
description: S3 prefix where the Cost and Usage Report is stored.
16907+
example: reports
16908+
type: string
16909+
report_type:
16910+
description: Type of the Cost and Usage Report. Currently only `CUR2.0`
16911+
is supported.
16912+
example: CUR2.0
16913+
type: string
16914+
required:
16915+
- report_name
16916+
- report_prefix
16917+
- report_type
16918+
- bucket_name
16919+
- bucket_region
16920+
type: object
1681416921
DataRelationshipsTeams:
1681516922
description: Associates teams with this schedule in a data structure.
1681616923
properties:
@@ -72421,6 +72528,135 @@ paths:
7242172528
operator: OR
7242272529
permissions:
7242372530
- aws_configuration_edit
72531+
/api/v2/integration/aws/accounts/{aws_account_config_id}/ccm_config:
72532+
delete:
72533+
description: 'Delete the Cloud Cost Management config for an AWS Account Integration
72534+
Config using Cost and Usage Report
72535+
72536+
(CUR) 2.0 by config ID.'
72537+
operationId: DeleteAWSAccountCCMConfig
72538+
parameters:
72539+
- $ref: '#/components/parameters/AWSAccountConfigIDPathParameter'
72540+
responses:
72541+
'204':
72542+
description: No Content.
72543+
'403':
72544+
$ref: '#/components/responses/ForbiddenResponse'
72545+
'404':
72546+
$ref: '#/components/responses/NotFoundResponse'
72547+
'429':
72548+
$ref: '#/components/responses/TooManyRequestsResponse'
72549+
summary: Delete AWS CCM config
72550+
tags:
72551+
- AWS Integration
72552+
x-permission:
72553+
operator: OR
72554+
permissions:
72555+
- aws_configuration_edit
72556+
get:
72557+
description: 'Get the Cloud Cost Management config for an AWS Account Integration
72558+
Config using Cost and Usage Report
72559+
72560+
(CUR) 2.0 by config ID.'
72561+
operationId: GetAWSAccountCCMConfig
72562+
parameters:
72563+
- $ref: '#/components/parameters/AWSAccountConfigIDPathParameter'
72564+
responses:
72565+
'200':
72566+
content:
72567+
application/json:
72568+
schema:
72569+
$ref: '#/components/schemas/AWSCcmConfigResponse'
72570+
description: AWS CCM Config object.
72571+
'403':
72572+
$ref: '#/components/responses/ForbiddenResponse'
72573+
'404':
72574+
$ref: '#/components/responses/NotFoundResponse'
72575+
'429':
72576+
$ref: '#/components/responses/TooManyRequestsResponse'
72577+
summary: Get AWS CCM config
72578+
tags:
72579+
- AWS Integration
72580+
x-permission:
72581+
operator: OR
72582+
permissions:
72583+
- aws_configuration_read
72584+
patch:
72585+
description: 'Update the Cloud Cost Management config for an AWS Account Integration
72586+
Config using Cost and Usage Report
72587+
72588+
(CUR) 2.0 by config ID.'
72589+
operationId: UpdateAWSAccountCCMConfig
72590+
parameters:
72591+
- $ref: '#/components/parameters/AWSAccountConfigIDPathParameter'
72592+
requestBody:
72593+
content:
72594+
application/json:
72595+
schema:
72596+
$ref: '#/components/schemas/AWSCcmConfigRequest'
72597+
description: Update a Cloud Cost Management config for an AWS Account Integration
72598+
Config.
72599+
required: true
72600+
responses:
72601+
'200':
72602+
content:
72603+
application/json:
72604+
schema:
72605+
$ref: '#/components/schemas/AWSCcmConfigResponse'
72606+
description: AWS CCM Config object.
72607+
'403':
72608+
$ref: '#/components/responses/ForbiddenResponse'
72609+
'404':
72610+
$ref: '#/components/responses/NotFoundResponse'
72611+
'429':
72612+
$ref: '#/components/responses/TooManyRequestsResponse'
72613+
summary: Update AWS CCM config
72614+
tags:
72615+
- AWS Integration
72616+
x-codegen-request-body-name: body
72617+
x-permission:
72618+
operator: OR
72619+
permissions:
72620+
- aws_configuration_edit
72621+
post:
72622+
description: 'Create the Cloud Cost Management config for an AWS Account Integration
72623+
Config using Cost and Usage Report
72624+
72625+
(CUR) 2.0 by config ID.'
72626+
operationId: CreateAWSAccountCCMConfig
72627+
parameters:
72628+
- $ref: '#/components/parameters/AWSAccountConfigIDPathParameter'
72629+
requestBody:
72630+
content:
72631+
application/json:
72632+
schema:
72633+
$ref: '#/components/schemas/AWSCcmConfigRequest'
72634+
description: Create a Cloud Cost Management config for an AWS Account Integration
72635+
Config.
72636+
required: true
72637+
responses:
72638+
'200':
72639+
content:
72640+
application/json:
72641+
schema:
72642+
$ref: '#/components/schemas/AWSCcmConfigResponse'
72643+
description: AWS CCM Config object.
72644+
'403':
72645+
$ref: '#/components/responses/ForbiddenResponse'
72646+
'404':
72647+
$ref: '#/components/responses/NotFoundResponse'
72648+
'409':
72649+
$ref: '#/components/responses/ConflictResponse'
72650+
'429':
72651+
$ref: '#/components/responses/TooManyRequestsResponse'
72652+
summary: Create AWS CCM config
72653+
tags:
72654+
- AWS Integration
72655+
x-codegen-request-body-name: body
72656+
x-permission:
72657+
operator: OR
72658+
permissions:
72659+
- aws_configuration_edit
7242472660
/api/v2/integration/aws/available_namespaces:
7242572661
get:
7242672662
description: Get a list of available AWS CloudWatch namespaces that can send
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
// Create AWS CCM config returns "AWS CCM Config object." 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.AWSCcmConfig;
7+
import com.datadog.api.client.v2.model.AWSCcmConfigRequest;
8+
import com.datadog.api.client.v2.model.AWSCcmConfigRequestAttributes;
9+
import com.datadog.api.client.v2.model.AWSCcmConfigRequestData;
10+
import com.datadog.api.client.v2.model.AWSCcmConfigResponse;
11+
import com.datadog.api.client.v2.model.AWSCcmConfigType;
12+
import com.datadog.api.client.v2.model.DataExportConfig;
13+
import java.util.Collections;
14+
15+
public class Example {
16+
public static void main(String[] args) {
17+
ApiClient defaultClient = ApiClient.getDefaultApiClient();
18+
AwsIntegrationApi apiInstance = new AwsIntegrationApi(defaultClient);
19+
20+
AWSCcmConfigRequest body =
21+
new AWSCcmConfigRequest()
22+
.data(
23+
new AWSCcmConfigRequestData()
24+
.attributes(
25+
new AWSCcmConfigRequestAttributes()
26+
.ccmConfig(
27+
new AWSCcmConfig()
28+
.dataExportConfigs(
29+
Collections.singletonList(
30+
new DataExportConfig()
31+
.bucketName("billing")
32+
.bucketRegion("us-east-1")
33+
.reportName("cost-and-usage-report")
34+
.reportPrefix("reports")
35+
.reportType("CUR2.0")))))
36+
.type(AWSCcmConfigType.CCM_CONFIG));
37+
38+
try {
39+
AWSCcmConfigResponse result =
40+
apiInstance.createAWSAccountCCMConfig("aws_account_config_id", body);
41+
System.out.println(result);
42+
} catch (ApiException e) {
43+
System.err.println("Exception when calling AwsIntegrationApi#createAWSAccountCCMConfig");
44+
System.err.println("Status code: " + e.getCode());
45+
System.err.println("Reason: " + e.getResponseBody());
46+
System.err.println("Response headers: " + e.getResponseHeaders());
47+
e.printStackTrace();
48+
}
49+
}
50+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// Delete AWS CCM config returns "No Content." 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+
7+
public class Example {
8+
public static void main(String[] args) {
9+
ApiClient defaultClient = ApiClient.getDefaultApiClient();
10+
AwsIntegrationApi apiInstance = new AwsIntegrationApi(defaultClient);
11+
12+
try {
13+
apiInstance.deleteAWSAccountCCMConfig("aws_account_config_id");
14+
} catch (ApiException e) {
15+
System.err.println("Exception when calling AwsIntegrationApi#deleteAWSAccountCCMConfig");
16+
System.err.println("Status code: " + e.getCode());
17+
System.err.println("Reason: " + e.getResponseBody());
18+
System.err.println("Response headers: " + e.getResponseHeaders());
19+
e.printStackTrace();
20+
}
21+
}
22+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
// Get AWS CCM config returns "AWS CCM Config object." 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.AWSCcmConfigResponse;
7+
8+
public class Example {
9+
public static void main(String[] args) {
10+
ApiClient defaultClient = ApiClient.getDefaultApiClient();
11+
AwsIntegrationApi apiInstance = new AwsIntegrationApi(defaultClient);
12+
13+
try {
14+
AWSCcmConfigResponse result = apiInstance.getAWSAccountCCMConfig("aws_account_config_id");
15+
System.out.println(result);
16+
} catch (ApiException e) {
17+
System.err.println("Exception when calling AwsIntegrationApi#getAWSAccountCCMConfig");
18+
System.err.println("Status code: " + e.getCode());
19+
System.err.println("Reason: " + e.getResponseBody());
20+
System.err.println("Response headers: " + e.getResponseHeaders());
21+
e.printStackTrace();
22+
}
23+
}
24+
}

0 commit comments

Comments
 (0)