Skip to content

Commit 82bfec6

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
add changes for datadog partner program to estimated cost and billable usage APIs (#1670)
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 3de80fd commit 82bfec6

File tree

8 files changed

+100
-4
lines changed

8 files changed

+100
-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-11 16:35:13.616074",
8-
"spec_repo_commit": "d83fe206"
7+
"regenerated": "2024-07-16 10:52:44.851668",
8+
"spec_repo_commit": "06d5775d"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2024-07-11 16:35:13.635786",
13-
"spec_repo_commit": "d83fe206"
12+
"regenerated": "2024-07-16 10:52:44.869580",
13+
"spec_repo_commit": "06d5775d"
1414
}
1515
}
1616
}

.generator/schemas/v1/openapi.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17269,6 +17269,12 @@ components:
1726917269
UsageBillableSummaryHour:
1727017270
description: Response with monthly summary of data billed by Datadog.
1727117271
properties:
17272+
account_name:
17273+
description: The account name.
17274+
type: string
17275+
account_public_id:
17276+
description: The account public ID.
17277+
type: string
1727217278
billing_plan:
1727317279
description: The billing plan.
1727417280
type: string
@@ -31646,6 +31652,15 @@ paths:
3164631652
schema:
3164731653
format: date-time
3164831654
type: string
31655+
- description: 'Boolean to specify whether to include accounts connected to
31656+
the current account as partner customers in the Datadog partner network
31657+
program. Defaults to `false`. '
31658+
in: query
31659+
name: include_connected_accounts
31660+
required: false
31661+
schema:
31662+
default: false
31663+
type: boolean
3164931664
responses:
3165031665
'200':
3165131666
content:

.generator/schemas/v2/openapi.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5390,6 +5390,12 @@ components:
53905390
CostByOrgAttributes:
53915391
description: Cost attributes data.
53925392
properties:
5393+
account_name:
5394+
description: The account name.
5395+
type: string
5396+
account_public_id:
5397+
description: The account public ID.
5398+
type: string
53935399
charges:
53945400
description: List of charges data reported for the requested month.
53955401
items:
@@ -36185,6 +36191,15 @@ paths:
3618536191
schema:
3618636192
format: date-time
3618736193
type: string
36194+
- description: 'Boolean to specify whether to include accounts connected to
36195+
the current account as partner customers in the Datadog partner network
36196+
program. Defaults to `false`. '
36197+
in: query
36198+
name: include_connected_accounts
36199+
required: false
36200+
schema:
36201+
default: false
36202+
type: boolean
3618836203
responses:
3618936204
'200':
3619036205
content:

features/support/scenarios_model_mapping.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,10 @@ export const ScenariosModelMappings: {[key: string]: {[key: string]: any}} = {
169169
"type": "Date",
170170
"format": "date-time",
171171
},
172+
"includeConnectedAccounts": {
173+
"type": "boolean",
174+
"format": "",
175+
},
172176
"operationResponseType": "UsageBillableSummaryResponse",
173177
},
174178
"v1.GetUsageCIApp": {
@@ -3090,6 +3094,10 @@ export const ScenariosModelMappings: {[key: string]: {[key: string]: any}} = {
30903094
"type": "Date",
30913095
"format": "date-time",
30923096
},
3097+
"includeConnectedAccounts": {
3098+
"type": "boolean",
3099+
"format": "",
3100+
},
30933101
"operationResponseType": "CostByOrgResponse",
30943102
},
30953103
"v2.GetHistoricalCostByOrg": {

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

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -632,6 +632,7 @@ export class UsageMeteringApiRequestFactory extends BaseAPIRequestFactory {
632632

633633
public async getUsageBillableSummary(
634634
month?: Date,
635+
includeConnectedAccounts?: boolean,
635636
_options?: Configuration
636637
): Promise<RequestContext> {
637638
const _config = _options || this.configuration;
@@ -656,6 +657,12 @@ export class UsageMeteringApiRequestFactory extends BaseAPIRequestFactory {
656657
ObjectSerializer.serialize(month, "Date", "date-time")
657658
);
658659
}
660+
if (includeConnectedAccounts !== undefined) {
661+
requestContext.setQueryParam(
662+
"include_connected_accounts",
663+
ObjectSerializer.serialize(includeConnectedAccounts, "boolean", "")
664+
);
665+
}
659666

660667
// Apply auth methods
661668
applySecurityAuthentication(_config, requestContext, [
@@ -4479,6 +4486,11 @@ export interface UsageMeteringApiGetUsageBillableSummaryRequest {
44794486
* @type Date
44804487
*/
44814488
month?: Date;
4489+
/**
4490+
* Boolean to specify whether to include accounts connected to the current account as partner customers in the Datadog partner network program. Defaults to `false`.
4491+
* @type boolean
4492+
*/
4493+
includeConnectedAccounts?: boolean;
44824494
}
44834495

44844496
export interface UsageMeteringApiGetUsageCIAppRequest {
@@ -5175,6 +5187,7 @@ export class UsageMeteringApi {
51755187
): Promise<UsageBillableSummaryResponse> {
51765188
const requestContextPromise = this.requestFactory.getUsageBillableSummary(
51775189
param.month,
5190+
param.includeConnectedAccounts,
51785191
options
51795192
);
51805193
return requestContextPromise.then((requestContext) => {

packages/datadog-api-client-v1/models/UsageBillableSummaryHour.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
* Response with monthly summary of data billed by Datadog.
1212
*/
1313
export class UsageBillableSummaryHour {
14+
/**
15+
* The account name.
16+
*/
17+
"accountName"?: string;
18+
/**
19+
* The account public ID.
20+
*/
21+
"accountPublicId"?: string;
1422
/**
1523
* The billing plan.
1624
*/
@@ -64,6 +72,14 @@ export class UsageBillableSummaryHour {
6472
* @ignore
6573
*/
6674
static readonly attributeTypeMap: AttributeTypeMap = {
75+
accountName: {
76+
baseName: "account_name",
77+
type: "string",
78+
},
79+
accountPublicId: {
80+
baseName: "account_public_id",
81+
type: "string",
82+
},
6783
billingPlan: {
6884
baseName: "billing_plan",
6985
type: "string",

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

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ export class UsageMeteringApiRequestFactory extends BaseAPIRequestFactory {
118118
endMonth?: Date,
119119
startDate?: Date,
120120
endDate?: Date,
121+
includeConnectedAccounts?: boolean,
121122
_options?: Configuration
122123
): Promise<RequestContext> {
123124
const _config = _options || this.configuration;
@@ -166,6 +167,12 @@ export class UsageMeteringApiRequestFactory extends BaseAPIRequestFactory {
166167
ObjectSerializer.serialize(endDate, "Date", "date-time")
167168
);
168169
}
170+
if (includeConnectedAccounts !== undefined) {
171+
requestContext.setQueryParam(
172+
"include_connected_accounts",
173+
ObjectSerializer.serialize(includeConnectedAccounts, "boolean", "")
174+
);
175+
}
169176

170177
// Apply auth methods
171178
applySecurityAuthentication(_config, requestContext, [
@@ -1294,6 +1301,11 @@ export interface UsageMeteringApiGetEstimatedCostByOrgRequest {
12941301
* @type Date
12951302
*/
12961303
endDate?: Date;
1304+
/**
1305+
* Boolean to specify whether to include accounts connected to the current account as partner customers in the Datadog partner network program. Defaults to `false`.
1306+
* @type boolean
1307+
*/
1308+
includeConnectedAccounts?: boolean;
12971309
}
12981310

12991311
export interface UsageMeteringApiGetHistoricalCostByOrgRequest {
@@ -1548,6 +1560,7 @@ export class UsageMeteringApi {
15481560
param.endMonth,
15491561
param.startDate,
15501562
param.endDate,
1563+
param.includeConnectedAccounts,
15511564
options
15521565
);
15531566
return requestContextPromise.then((requestContext) => {

packages/datadog-api-client-v2/models/CostByOrgAttributes.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
* Cost attributes data.
1212
*/
1313
export class CostByOrgAttributes {
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 CostByOrgAttributes {
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)