Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
16 changes: 16 additions & 0 deletions features/support/scenarios_model_mapping.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
67 changes: 65 additions & 2 deletions packages/datadog-api-client-v2/apis/OrgConnectionsApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,10 @@ export class OrgConnectionsApiRequestFactory extends BaseAPIRequestFactory {
}

public async listOrgConnections(
sinkOrgId?: string,
sourceOrgId?: string,
limit?: number,
offset?: number,
_options?: Configuration
): Promise<RequestContext> {
const _config = _options || this.configuration;
Expand All @@ -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",
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -513,10 +570,16 @@ export class OrgConnectionsApi {
* @param param The request object
*/
public listOrgConnections(
param: OrgConnectionsApiListOrgConnectionsRequest = {},
options?: Configuration
): Promise<OrgConnectionListResponse> {
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)
Expand Down
1 change: 1 addition & 0 deletions packages/datadog-api-client-v2/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -530,6 +530,7 @@ export {
export {
OrgConnectionsApiCreateOrgConnectionsRequest,
OrgConnectionsApiDeleteOrgConnectionsRequest,
OrgConnectionsApiListOrgConnectionsRequest,
OrgConnectionsApiUpdateOrgConnectionsRequest,
OrgConnectionsApi,
} from "./apis/OrgConnectionsApi";
Expand Down