Skip to content

Commit 3f2d351

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
update historical_cost and projected_cost for partner program (#1708)
Co-authored-by: ci.datadog-api-spec <[email protected]> Co-authored-by: api-clients-generation-pipeline[bot] <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com>
1 parent 2ef5617 commit 3f2d351

File tree

5 files changed

+78
-4
lines changed

5 files changed

+78
-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": "2024-07-23 17:39:34.694923",
8-
"spec_repo_commit": "ad82c0e5"
7+
"regenerated": "2024-07-23 18:14:06.803860",
8+
"spec_repo_commit": "9e027051"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2024-07-23 17:39:34.712937",
13-
"spec_repo_commit": "ad82c0e5"
12+
"regenerated": "2024-07-23 18:14:06.822753",
13+
"spec_repo_commit": "9e027051"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15172,6 +15172,12 @@ components:
1517215172
ProjectedCostAttributes:
1517315173
description: Projected Cost attributes data.
1517415174
properties:
15175+
account_name:
15176+
description: The account name.
15177+
type: string
15178+
account_public_id:
15179+
description: The account public ID.
15180+
type: string
1517515181
charges:
1517615182
description: List of charges data reported for the requested month.
1517715183
items:
@@ -36703,6 +36709,15 @@ paths:
3670336709
schema:
3670436710
format: date-time
3670536711
type: string
36712+
- description: 'Boolean to specify whether to include accounts connected to
36713+
the current account as partner customers in the Datadog partner network
36714+
program. Defaults to `false`. '
36715+
in: query
36716+
name: include_connected_accounts
36717+
required: false
36718+
schema:
36719+
default: false
36720+
type: boolean
3670636721
responses:
3670736722
'200':
3670836723
content:
@@ -37009,6 +37024,15 @@ paths:
3700937024
required: false
3701037025
schema:
3701137026
type: string
37027+
- description: 'Boolean to specify whether to include accounts connected to
37028+
the current account as partner customers in the Datadog partner network
37029+
program. Defaults to `false`. '
37030+
in: query
37031+
name: include_connected_accounts
37032+
required: false
37033+
schema:
37034+
default: false
37035+
type: boolean
3701237036
responses:
3701337037
'200':
3701437038
content:

features/support/scenarios_model_mapping.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3121,6 +3121,10 @@ export const ScenariosModelMappings: {[key: string]: {[key: string]: any}} = {
31213121
"type": "Date",
31223122
"format": "date-time",
31233123
},
3124+
"includeConnectedAccounts": {
3125+
"type": "boolean",
3126+
"format": "",
3127+
},
31243128
"operationResponseType": "CostByOrgResponse",
31253129
},
31263130
"v2.GetHourlyUsage": {
@@ -3189,6 +3193,10 @@ export const ScenariosModelMappings: {[key: string]: {[key: string]: any}} = {
31893193
"type": "string",
31903194
"format": "",
31913195
},
3196+
"includeConnectedAccounts": {
3197+
"type": "boolean",
3198+
"format": "",
3199+
},
31923200
"operationResponseType": "ProjectedCostResponse",
31933201
},
31943202
"v2.DeleteDashboardListItems": {

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

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,7 @@ export class UsageMeteringApiRequestFactory extends BaseAPIRequestFactory {
188188
startMonth: Date,
189189
view?: string,
190190
endMonth?: Date,
191+
includeConnectedAccounts?: boolean,
191192
_options?: Configuration
192193
): Promise<RequestContext> {
193194
const _config = _options || this.configuration;
@@ -229,6 +230,12 @@ export class UsageMeteringApiRequestFactory extends BaseAPIRequestFactory {
229230
ObjectSerializer.serialize(endMonth, "Date", "date-time")
230231
);
231232
}
233+
if (includeConnectedAccounts !== undefined) {
234+
requestContext.setQueryParam(
235+
"include_connected_accounts",
236+
ObjectSerializer.serialize(includeConnectedAccounts, "boolean", "")
237+
);
238+
}
232239

233240
// Apply auth methods
234241
applySecurityAuthentication(_config, requestContext, [
@@ -457,6 +464,7 @@ export class UsageMeteringApiRequestFactory extends BaseAPIRequestFactory {
457464

458465
public async getProjectedCost(
459466
view?: string,
467+
includeConnectedAccounts?: boolean,
460468
_options?: Configuration
461469
): Promise<RequestContext> {
462470
const _config = _options || this.configuration;
@@ -481,6 +489,12 @@ export class UsageMeteringApiRequestFactory extends BaseAPIRequestFactory {
481489
ObjectSerializer.serialize(view, "string", "")
482490
);
483491
}
492+
if (includeConnectedAccounts !== undefined) {
493+
requestContext.setQueryParam(
494+
"include_connected_accounts",
495+
ObjectSerializer.serialize(includeConnectedAccounts, "boolean", "")
496+
);
497+
}
484498

485499
// Apply auth methods
486500
applySecurityAuthentication(_config, requestContext, [
@@ -1335,6 +1349,11 @@ export interface UsageMeteringApiGetHistoricalCostByOrgRequest {
13351349
* @type Date
13361350
*/
13371351
endMonth?: Date;
1352+
/**
1353+
* Boolean to specify whether to include accounts connected to the current account as partner customers in the Datadog partner network program. Defaults to `false`.
1354+
* @type boolean
1355+
*/
1356+
includeConnectedAccounts?: boolean;
13381357
}
13391358

13401359
export interface UsageMeteringApiGetHourlyUsageRequest {
@@ -1448,6 +1467,11 @@ export interface UsageMeteringApiGetProjectedCostRequest {
14481467
* @type string
14491468
*/
14501469
view?: string;
1470+
/**
1471+
* Boolean to specify whether to include accounts connected to the current account as partner customers in the Datadog partner network program. Defaults to `false`.
1472+
* @type boolean
1473+
*/
1474+
includeConnectedAccounts?: boolean;
14511475
}
14521476

14531477
export interface UsageMeteringApiGetUsageApplicationSecurityMonitoringRequest {
@@ -1603,6 +1627,7 @@ export class UsageMeteringApi {
16031627
param.startMonth,
16041628
param.view,
16051629
param.endMonth,
1630+
param.includeConnectedAccounts,
16061631
options
16071632
);
16081633
return requestContextPromise.then((requestContext) => {
@@ -1701,6 +1726,7 @@ export class UsageMeteringApi {
17011726
): Promise<ProjectedCostResponse> {
17021727
const requestContextPromise = this.requestFactory.getProjectedCost(
17031728
param.view,
1729+
param.includeConnectedAccounts,
17041730
options
17051731
);
17061732
return requestContextPromise.then((requestContext) => {

packages/datadog-api-client-v2/models/ProjectedCostAttributes.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,14 @@ import { AttributeTypeMap } from "../../datadog-api-client-common/util";
1111
* Projected Cost attributes data.
1212
*/
1313
export class ProjectedCostAttributes {
14+
/**
15+
* The account name.
16+
*/
17+
"accountName"?: string;
18+
/**
19+
* The account public ID.
20+
*/
21+
"accountPublicId"?: string;
1422
/**
1523
* List of charges data reported for the requested month.
1624
*/
@@ -52,6 +60,14 @@ export class ProjectedCostAttributes {
5260
* @ignore
5361
*/
5462
static readonly attributeTypeMap: AttributeTypeMap = {
63+
accountName: {
64+
baseName: "account_name",
65+
type: "string",
66+
},
67+
accountPublicId: {
68+
baseName: "account_public_id",
69+
type: "string",
70+
},
5571
charges: {
5672
baseName: "charges",
5773
type: "Array<ChargebackBreakdown>",

0 commit comments

Comments
 (0)