Skip to content

Commit 305db54

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit de2517ad of spec repo (#2451)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent 100e6f2 commit 305db54

13 files changed

+411
-4
lines changed

.apigentools-info

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"spec_versions": {
55
"v1": {
66
"apigentools_version": "1.6.6",
7-
"regenerated": "2025-07-02 12:38:45.919876",
8-
"spec_repo_commit": "4fd1c189"
7+
"regenerated": "2025-07-02 16:34:51.190107",
8+
"spec_repo_commit": "de2517ad"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2025-07-02 12:38:45.936124",
13-
"spec_repo_commit": "4fd1c189"
12+
"regenerated": "2025-07-02 16:34:51.206563",
13+
"spec_repo_commit": "de2517ad"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1536,6 +1536,54 @@ components:
15361536
- type
15371537
- credentials
15381538
type: object
1539+
AWSIntegrationIamPermissionsResponse:
1540+
description: AWS Integration IAM Permissions response body.
1541+
properties:
1542+
data:
1543+
$ref: '#/components/schemas/AWSIntegrationIamPermissionsResponseData'
1544+
required:
1545+
- data
1546+
type: object
1547+
AWSIntegrationIamPermissionsResponseAttributes:
1548+
description: AWS Integration IAM Permissions response attributes.
1549+
properties:
1550+
permissions:
1551+
description: List of AWS IAM permissions required for the integration.
1552+
example:
1553+
- account:GetContactInformation
1554+
- amplify:ListApps
1555+
- amplify:ListArtifacts
1556+
- amplify:ListBackendEnvironments
1557+
- amplify:ListBranches
1558+
items:
1559+
example: account:GetContactInformation
1560+
type: string
1561+
type: array
1562+
required:
1563+
- permissions
1564+
type: object
1565+
AWSIntegrationIamPermissionsResponseData:
1566+
description: AWS Integration IAM Permissions response data.
1567+
properties:
1568+
attributes:
1569+
$ref: '#/components/schemas/AWSIntegrationIamPermissionsResponseAttributes'
1570+
id:
1571+
default: permissions
1572+
description: The `AWSIntegrationIamPermissionsResponseData` `id`.
1573+
example: permissions
1574+
type: string
1575+
type:
1576+
$ref: '#/components/schemas/AWSIntegrationIamPermissionsResponseDataType'
1577+
type: object
1578+
AWSIntegrationIamPermissionsResponseDataType:
1579+
default: permissions
1580+
description: The `AWSIntegrationIamPermissionsResponseData` `type`.
1581+
enum:
1582+
- permissions
1583+
example: permissions
1584+
type: string
1585+
x-enum-varnames:
1586+
- PERMISSIONS
15391587
AWSIntegrationType:
15401588
description: The definition of `AWSIntegrationType` object.
15411589
enum:
@@ -49519,6 +49567,22 @@ paths:
4951949567
x-unstable: '**Note: This endpoint is in Preview. If you have any feedback,
4952049568

4952149569
contact [Datadog support](https://docs.datadoghq.com/help/).**'
49570+
/api/v2/integration/aws/iam_permissions:
49571+
get:
49572+
description: Get all AWS IAM permissions required for the AWS integration.
49573+
operationId: GetAWSIntegrationIAMPermissions
49574+
responses:
49575+
'200':
49576+
content:
49577+
application/json:
49578+
schema:
49579+
$ref: '#/components/schemas/AWSIntegrationIamPermissionsResponse'
49580+
description: AWS IAM Permissions object
49581+
'429':
49582+
$ref: '#/components/responses/TooManyRequestsResponse'
49583+
summary: Get AWS integration IAM permissions
49584+
tags:
49585+
- AWS Integration
4952249586
/api/v2/integration/aws/logs/services:
4952349587
get:
4952449588
description: Get a list of AWS services that can send logs to Datadog.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/**
2+
* Get AWS integration IAM permissions returns "AWS IAM Permissions object" response
3+
*/
4+
5+
import { client, v2 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
const apiInstance = new v2.AWSIntegrationApi(configuration);
9+
10+
apiInstance
11+
.getAWSIntegrationIAMPermissions()
12+
.then((data: v2.AWSIntegrationIamPermissionsResponse) => {
13+
console.log(
14+
"API called successfully. Returned data: " + JSON.stringify(data)
15+
);
16+
})
17+
.catch((error: any) => console.error(error));

features/support/scenarios_model_mapping.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5025,6 +5025,9 @@ export const ScenariosModelMappings: {[key: string]: {[key: string]: any}} = {
50255025
"v2.CreateNewAWSExternalID": {
50265026
"operationResponseType": "AWSNewExternalIDResponse",
50275027
},
5028+
"v2.GetAWSIntegrationIAMPermissions": {
5029+
"operationResponseType": "AWSIntegrationIamPermissionsResponse",
5030+
},
50285031
"v2.ListAWSLogsServices": {
50295032
"operationResponseType": "AWSLogsServicesResponse",
50305033
},

features/v2/aws_integration.feature

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,12 @@ Feature: AWS Integration
8282
When the request is sent
8383
Then the response status is 200 AWS External ID object
8484

85+
@generated @skip @team:DataDog/aws-integrations
86+
Scenario: Get AWS integration IAM permissions returns "AWS IAM Permissions object" response
87+
Given new "GetAWSIntegrationIAMPermissions" request
88+
When the request is sent
89+
Then the response status is 200 AWS IAM Permissions object
90+
8591
@team:DataDog/aws-integrations
8692
Scenario: Get an AWS integration by config ID returns "AWS Account object" response
8793
Given operation "GetAWSAccount" enabled

features/v2/undo.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1214,6 +1214,12 @@
12141214
"type": "safe"
12151215
}
12161216
},
1217+
"GetAWSIntegrationIAMPermissions": {
1218+
"tag": "AWS Integration",
1219+
"undo": {
1220+
"type": "safe"
1221+
}
1222+
},
12171223
"ListAWSLogsServices": {
12181224
"tag": "AWS Logs Integration",
12191225
"undo": {

packages/datadog-api-client-v2/apis/AWSIntegrationApi.ts

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import { AWSAccountCreateRequest } from "../models/AWSAccountCreateRequest";
2121
import { AWSAccountResponse } from "../models/AWSAccountResponse";
2222
import { AWSAccountsResponse } from "../models/AWSAccountsResponse";
2323
import { AWSAccountUpdateRequest } from "../models/AWSAccountUpdateRequest";
24+
import { AWSIntegrationIamPermissionsResponse } from "../models/AWSIntegrationIamPermissionsResponse";
2425
import { AWSNamespacesResponse } from "../models/AWSNamespacesResponse";
2526
import { AWSNewExternalIDResponse } from "../models/AWSNewExternalIDResponse";
2627

@@ -180,6 +181,30 @@ export class AWSIntegrationApiRequestFactory extends BaseAPIRequestFactory {
180181
return requestContext;
181182
}
182183

184+
public async getAWSIntegrationIAMPermissions(
185+
_options?: Configuration
186+
): Promise<RequestContext> {
187+
const _config = _options || this.configuration;
188+
189+
// Path Params
190+
const localVarPath = "/api/v2/integration/aws/iam_permissions";
191+
192+
// Make Request Context
193+
const requestContext = _config
194+
.getServer("v2.AWSIntegrationApi.getAWSIntegrationIAMPermissions")
195+
.makeRequestContext(localVarPath, HttpMethod.GET);
196+
requestContext.setHeaderParam("Accept", "application/json");
197+
requestContext.setHttpConfig(_config.httpConfig);
198+
199+
// Apply auth methods
200+
applySecurityAuthentication(_config, requestContext, [
201+
"apiKeyAuth",
202+
"appKeyAuth",
203+
]);
204+
205+
return requestContext;
206+
}
207+
183208
public async listAWSAccounts(
184209
awsAccountId?: string,
185210
_options?: Configuration
@@ -547,6 +572,66 @@ export class AWSIntegrationApiResponseProcessor {
547572
);
548573
}
549574

575+
/**
576+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
577+
* to the expected objects
578+
*
579+
* @params response Response returned by the server for a request to getAWSIntegrationIAMPermissions
580+
* @throws ApiException if the response code was not in [200, 299]
581+
*/
582+
public async getAWSIntegrationIAMPermissions(
583+
response: ResponseContext
584+
): Promise<AWSIntegrationIamPermissionsResponse> {
585+
const contentType = ObjectSerializer.normalizeMediaType(
586+
response.headers["content-type"]
587+
);
588+
if (response.httpStatusCode === 200) {
589+
const body: AWSIntegrationIamPermissionsResponse =
590+
ObjectSerializer.deserialize(
591+
ObjectSerializer.parse(await response.body.text(), contentType),
592+
"AWSIntegrationIamPermissionsResponse"
593+
) as AWSIntegrationIamPermissionsResponse;
594+
return body;
595+
}
596+
if (response.httpStatusCode === 429) {
597+
const bodyText = ObjectSerializer.parse(
598+
await response.body.text(),
599+
contentType
600+
);
601+
let body: APIErrorResponse;
602+
try {
603+
body = ObjectSerializer.deserialize(
604+
bodyText,
605+
"APIErrorResponse"
606+
) as APIErrorResponse;
607+
} catch (error) {
608+
logger.debug(`Got error deserializing error: ${error}`);
609+
throw new ApiException<APIErrorResponse>(
610+
response.httpStatusCode,
611+
bodyText
612+
);
613+
}
614+
throw new ApiException<APIErrorResponse>(response.httpStatusCode, body);
615+
}
616+
617+
// Work around for missing responses in specification, e.g. for petstore.yaml
618+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
619+
const body: AWSIntegrationIamPermissionsResponse =
620+
ObjectSerializer.deserialize(
621+
ObjectSerializer.parse(await response.body.text(), contentType),
622+
"AWSIntegrationIamPermissionsResponse",
623+
""
624+
) as AWSIntegrationIamPermissionsResponse;
625+
return body;
626+
}
627+
628+
const body = (await response.body.text()) || "";
629+
throw new ApiException<string>(
630+
response.httpStatusCode,
631+
'Unknown API Status Code!\nBody: "' + body + '"'
632+
);
633+
}
634+
550635
/**
551636
* Unwraps the actual response sent by the server from the response context and deserializes the response content
552637
* to the expected objects
@@ -871,6 +956,26 @@ export class AWSIntegrationApi {
871956
});
872957
}
873958

959+
/**
960+
* Get all AWS IAM permissions required for the AWS integration.
961+
* @param param The request object
962+
*/
963+
public getAWSIntegrationIAMPermissions(
964+
options?: Configuration
965+
): Promise<AWSIntegrationIamPermissionsResponse> {
966+
const requestContextPromise =
967+
this.requestFactory.getAWSIntegrationIAMPermissions(options);
968+
return requestContextPromise.then((requestContext) => {
969+
return this.configuration.httpApi
970+
.send(requestContext)
971+
.then((responseContext) => {
972+
return this.responseProcessor.getAWSIntegrationIAMPermissions(
973+
responseContext
974+
);
975+
});
976+
});
977+
}
978+
874979
/**
875980
* Get a list of AWS Account Integration Configs.
876981
* @param param The request object

packages/datadog-api-client-v2/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -948,6 +948,10 @@ export { AwsCURConfigResponse } from "./models/AwsCURConfigResponse";
948948
export { AwsCURConfigsResponse } from "./models/AwsCURConfigsResponse";
949949
export { AwsCURConfigType } from "./models/AwsCURConfigType";
950950
export { AWSIntegration } from "./models/AWSIntegration";
951+
export { AWSIntegrationIamPermissionsResponse } from "./models/AWSIntegrationIamPermissionsResponse";
952+
export { AWSIntegrationIamPermissionsResponseAttributes } from "./models/AWSIntegrationIamPermissionsResponseAttributes";
953+
export { AWSIntegrationIamPermissionsResponseData } from "./models/AWSIntegrationIamPermissionsResponseData";
954+
export { AWSIntegrationIamPermissionsResponseDataType } from "./models/AWSIntegrationIamPermissionsResponseDataType";
951955
export { AWSIntegrationType } from "./models/AWSIntegrationType";
952956
export { AWSIntegrationUpdate } from "./models/AWSIntegrationUpdate";
953957
export { AWSLambdaForwarderConfig } from "./models/AWSLambdaForwarderConfig";
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
/**
2+
* Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
3+
* This product includes software developed at Datadog (https://www.datadoghq.com/).
4+
* Copyright 2020-Present Datadog, Inc.
5+
*/
6+
import { AWSIntegrationIamPermissionsResponseData } from "./AWSIntegrationIamPermissionsResponseData";
7+
8+
import { AttributeTypeMap } from "../../datadog-api-client-common/util";
9+
10+
/**
11+
* AWS Integration IAM Permissions response body.
12+
*/
13+
export class AWSIntegrationIamPermissionsResponse {
14+
/**
15+
* AWS Integration IAM Permissions response data.
16+
*/
17+
"data": AWSIntegrationIamPermissionsResponseData;
18+
19+
/**
20+
* A container for additional, undeclared properties.
21+
* This is a holder for any undeclared properties as specified with
22+
* the 'additionalProperties' keyword in the OAS document.
23+
*/
24+
"additionalProperties"?: { [key: string]: any };
25+
26+
/**
27+
* @ignore
28+
*/
29+
"_unparsed"?: boolean;
30+
31+
/**
32+
* @ignore
33+
*/
34+
static readonly attributeTypeMap: AttributeTypeMap = {
35+
data: {
36+
baseName: "data",
37+
type: "AWSIntegrationIamPermissionsResponseData",
38+
required: true,
39+
},
40+
additionalProperties: {
41+
baseName: "additionalProperties",
42+
type: "any",
43+
},
44+
};
45+
46+
/**
47+
* @ignore
48+
*/
49+
static getAttributeTypeMap(): AttributeTypeMap {
50+
return AWSIntegrationIamPermissionsResponse.attributeTypeMap;
51+
}
52+
53+
public constructor() {}
54+
}

0 commit comments

Comments
 (0)