diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 5c56fcb1aa7c..42b12a3fb056 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -62417,6 +62417,39 @@ paths: get: description: Returns a list of org connections. operationId: ListOrgConnections + parameters: + - description: The Org ID of the sink org. + example: 0879ce27-29a1-481f-a12e-bc2a48ec9ae1 + in: query + name: sink_org_id + required: false + schema: + type: string + - description: The Org ID of the source org. + example: 0879ce27-29a1-481f-a12e-bc2a48ec9ae1 + in: query + name: source_org_id + required: false + schema: + type: string + - description: The limit of number of entries you want to return. Default is + 1000. + example: 1000 + in: query + name: limit + required: false + schema: + format: int64 + type: integer + - description: The pagination offset which you want to query from. Default is + 0. + example: 0 + in: query + name: offset + required: false + schema: + format: int64 + type: integer responses: '200': content: diff --git a/features/support/scenarios_model_mapping.ts b/features/support/scenarios_model_mapping.ts index 790c8df2641a..a8ee71ebbe41 100644 --- a/features/support/scenarios_model_mapping.ts +++ b/features/support/scenarios_model_mapping.ts @@ -6771,6 +6771,22 @@ export const ScenariosModelMappings: {[key: string]: {[key: string]: any}} = { "operationResponseType": "{}", }, "v2.ListOrgConnections": { + "sinkOrgId": { + "type": "string", + "format": "", + }, + "sourceOrgId": { + "type": "string", + "format": "", + }, + "limit": { + "type": "number", + "format": "int64", + }, + "offset": { + "type": "number", + "format": "int64", + }, "operationResponseType": "OrgConnectionListResponse", }, "v2.CreateOrgConnections": { diff --git a/packages/datadog-api-client-v2/apis/OrgConnectionsApi.ts b/packages/datadog-api-client-v2/apis/OrgConnectionsApi.ts index 3c2d87bf836f..195bf91c0dcd 100644 --- a/packages/datadog-api-client-v2/apis/OrgConnectionsApi.ts +++ b/packages/datadog-api-client-v2/apis/OrgConnectionsApi.ts @@ -100,6 +100,10 @@ export class OrgConnectionsApiRequestFactory extends BaseAPIRequestFactory { } public async listOrgConnections( + sinkOrgId?: string, + sourceOrgId?: string, + limit?: number, + offset?: number, _options?: Configuration ): Promise { const _config = _options || this.configuration; @@ -114,6 +118,36 @@ export class OrgConnectionsApiRequestFactory extends BaseAPIRequestFactory { requestContext.setHeaderParam("Accept", "application/json"); requestContext.setHttpConfig(_config.httpConfig); + // Query Params + if (sinkOrgId !== undefined) { + requestContext.setQueryParam( + "sink_org_id", + ObjectSerializer.serialize(sinkOrgId, "string", ""), + "" + ); + } + if (sourceOrgId !== undefined) { + requestContext.setQueryParam( + "source_org_id", + ObjectSerializer.serialize(sourceOrgId, "string", ""), + "" + ); + } + if (limit !== undefined) { + requestContext.setQueryParam( + "limit", + ObjectSerializer.serialize(limit, "number", "int64"), + "" + ); + } + if (offset !== undefined) { + requestContext.setQueryParam( + "offset", + ObjectSerializer.serialize(offset, "number", "int64"), + "" + ); + } + // Apply auth methods applySecurityAuthentication(_config, requestContext, [ "apiKeyAuth", @@ -437,6 +471,29 @@ export interface OrgConnectionsApiDeleteOrgConnectionsRequest { connectionId: string; } +export interface OrgConnectionsApiListOrgConnectionsRequest { + /** + * The Org ID of the sink org. + * @type string + */ + sinkOrgId?: string; + /** + * The Org ID of the source org. + * @type string + */ + sourceOrgId?: string; + /** + * The limit of number of entries you want to return. Default is 1000. + * @type number + */ + limit?: number; + /** + * The pagination offset which you want to query from. Default is 0. + * @type number + */ + offset?: number; +} + export interface OrgConnectionsApiUpdateOrgConnectionsRequest { /** * The unique identifier of the org connection. @@ -513,10 +570,16 @@ export class OrgConnectionsApi { * @param param The request object */ public listOrgConnections( + param: OrgConnectionsApiListOrgConnectionsRequest = {}, options?: Configuration ): Promise { - const requestContextPromise = - this.requestFactory.listOrgConnections(options); + const requestContextPromise = this.requestFactory.listOrgConnections( + param.sinkOrgId, + param.sourceOrgId, + param.limit, + param.offset, + options + ); return requestContextPromise.then((requestContext) => { return this.configuration.httpApi .send(requestContext) diff --git a/packages/datadog-api-client-v2/index.ts b/packages/datadog-api-client-v2/index.ts index f921306db2ae..830cb3b6230b 100644 --- a/packages/datadog-api-client-v2/index.ts +++ b/packages/datadog-api-client-v2/index.ts @@ -530,6 +530,7 @@ export { export { OrgConnectionsApiCreateOrgConnectionsRequest, OrgConnectionsApiDeleteOrgConnectionsRequest, + OrgConnectionsApiListOrgConnectionsRequest, OrgConnectionsApiUpdateOrgConnectionsRequest, OrgConnectionsApi, } from "./apis/OrgConnectionsApi";