Skip to content

Commit f801b41

Browse files
authored
Merge branch 'master' into datadog-api-spec/generated/3594
2 parents 2ac67f0 + ba56fea commit f801b41

9 files changed

+136
-7
lines changed

.generator/schemas/v2/openapi.yaml

+35-3
Original file line numberDiff line numberDiff line change
@@ -1715,6 +1715,33 @@ components:
17151715
xray_services:
17161716
$ref: '#/components/schemas/XRayServicesList'
17171717
type: object
1718+
AccountFilteringConfig:
1719+
description: The account filtering configuration.
1720+
properties:
1721+
excluded_accounts:
1722+
description: The AWS account IDs to be excluded from your billing dataset.
1723+
This field is used when `include_new_accounts` is `true`.
1724+
example:
1725+
- '123456789123'
1726+
- '123456789143'
1727+
items:
1728+
type: string
1729+
type: array
1730+
include_new_accounts:
1731+
description: Whether or not to automatically include new member accounts
1732+
by default in your billing dataset.
1733+
example: true
1734+
type: boolean
1735+
included_accounts:
1736+
description: The AWS account IDs to be included in your billing dataset.
1737+
This field is used when `include_new_accounts` is `false`.
1738+
example:
1739+
- '123456789123'
1740+
- '123456789143'
1741+
items:
1742+
type: string
1743+
type: array
1744+
type: object
17181745
ActionConnectionAttributes:
17191746
description: The definition of `ActionConnectionAttributes` object.
17201747
properties:
@@ -2870,6 +2897,8 @@ components:
28702897
AwsCURConfigAttributes:
28712898
description: Attributes for An AWS CUR config.
28722899
properties:
2900+
account_filters:
2901+
$ref: '#/components/schemas/AccountFilteringConfig'
28732902
account_id:
28742903
description: The AWS account ID.
28752904
example: '123456789123'
@@ -2947,12 +2976,12 @@ components:
29472976
AwsCURConfigPatchRequestAttributes:
29482977
description: Attributes for AWS CUR config Patch Request.
29492978
properties:
2979+
account_filters:
2980+
$ref: '#/components/schemas/AccountFilteringConfig'
29502981
is_enabled:
29512982
description: Whether or not the Cloud Cost Management account is enabled.
29522983
example: true
29532984
type: boolean
2954-
required:
2955-
- is_enabled
29562985
type: object
29572986
AwsCURConfigPatchRequestType:
29582987
default: aws_cur_config_patch_request
@@ -2985,6 +3014,8 @@ components:
29853014
AwsCURConfigPostRequestAttributes:
29863015
description: Attributes for AWS CUR config Post Request.
29873016
properties:
3017+
account_filters:
3018+
$ref: '#/components/schemas/AccountFilteringConfig'
29883019
account_id:
29893020
description: The AWS account ID.
29903021
example: '123456789123'
@@ -35642,7 +35673,8 @@ paths:
3564235673
permissions:
3564335674
- cloud_cost_management_write
3564435675
patch:
35645-
description: Update the status of an AWS CUR config (active/archived).
35676+
description: Update the status (active/archived) and/or account filtering configuration
35677+
of an AWS CUR config.
3564635678
operationId: UpdateCostAWSCURConfig
3564735679
parameters:
3564835680
- $ref: '#/components/parameters/CloudAccountID'

features/v2/cloud_cost_management.feature

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Feature: Cloud Cost Management
1616
@generated @skip @team:Datadog/cloud-cost-management
1717
Scenario: Create Cloud Cost Management AWS CUR config returns "Bad Request" response
1818
Given new "CreateCostAWSCURConfig" request
19-
And body with value {"data": {"attributes": {"account_id": "123456789123", "bucket_name": "dd-cost-bucket", "bucket_region": "us-east-1", "report_name": "dd-report-name", "report_prefix": "dd-report-prefix"}, "type": "aws_cur_config_post_request"}}
19+
And body with value {"data": {"attributes": {"account_filters": {"excluded_accounts": ["123456789123", "123456789143"], "include_new_accounts": true, "included_accounts": ["123456789123", "123456789143"]}, "account_id": "123456789123", "bucket_name": "dd-cost-bucket", "bucket_region": "us-east-1", "report_name": "dd-report-name", "report_prefix": "dd-report-prefix"}, "type": "aws_cur_config_post_request"}}
2020
When the request is sent
2121
Then the response status is 400 Bad Request
2222

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -1458,7 +1458,7 @@ export class CloudCostManagementApi {
14581458
}
14591459

14601460
/**
1461-
* Update the status of an AWS CUR config (active/archived).
1461+
* Update the status (active/archived) and/or account filtering configuration of an AWS CUR config.
14621462
* @param param The request object
14631463
*/
14641464
public updateCostAWSCURConfig(

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

+1
Original file line numberDiff line numberDiff line change
@@ -639,6 +639,7 @@ export {
639639
WorkflowAutomationApi,
640640
} from "./apis/WorkflowAutomationApi";
641641

642+
export { AccountFilteringConfig } from "./models/AccountFilteringConfig";
642643
export { ActionConnectionAttributes } from "./models/ActionConnectionAttributes";
643644
export { ActionConnectionAttributesUpdate } from "./models/ActionConnectionAttributesUpdate";
644645
export { ActionConnectionData } from "./models/ActionConnectionData";
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
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+
7+
import { AttributeTypeMap } from "../../datadog-api-client-common/util";
8+
9+
/**
10+
* The account filtering configuration.
11+
*/
12+
export class AccountFilteringConfig {
13+
/**
14+
* The AWS account IDs to be excluded from your billing dataset. This field is used when `include_new_accounts` is `true`.
15+
*/
16+
"excludedAccounts"?: Array<string>;
17+
/**
18+
* Whether or not to automatically include new member accounts by default in your billing dataset.
19+
*/
20+
"includeNewAccounts"?: boolean;
21+
/**
22+
* The AWS account IDs to be included in your billing dataset. This field is used when `include_new_accounts` is `false`.
23+
*/
24+
"includedAccounts"?: Array<string>;
25+
26+
/**
27+
* A container for additional, undeclared properties.
28+
* This is a holder for any undeclared properties as specified with
29+
* the 'additionalProperties' keyword in the OAS document.
30+
*/
31+
"additionalProperties"?: { [key: string]: any };
32+
33+
/**
34+
* @ignore
35+
*/
36+
"_unparsed"?: boolean;
37+
38+
/**
39+
* @ignore
40+
*/
41+
static readonly attributeTypeMap: AttributeTypeMap = {
42+
excludedAccounts: {
43+
baseName: "excluded_accounts",
44+
type: "Array<string>",
45+
},
46+
includeNewAccounts: {
47+
baseName: "include_new_accounts",
48+
type: "boolean",
49+
},
50+
includedAccounts: {
51+
baseName: "included_accounts",
52+
type: "Array<string>",
53+
},
54+
additionalProperties: {
55+
baseName: "additionalProperties",
56+
type: "any",
57+
},
58+
};
59+
60+
/**
61+
* @ignore
62+
*/
63+
static getAttributeTypeMap(): AttributeTypeMap {
64+
return AccountFilteringConfig.attributeTypeMap;
65+
}
66+
67+
public constructor() {}
68+
}

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

+9
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,18 @@
33
* This product includes software developed at Datadog (https://www.datadoghq.com/).
44
* Copyright 2020-Present Datadog, Inc.
55
*/
6+
import { AccountFilteringConfig } from "./AccountFilteringConfig";
67

78
import { AttributeTypeMap } from "../../datadog-api-client-common/util";
89

910
/**
1011
* Attributes for An AWS CUR config.
1112
*/
1213
export class AwsCURConfigAttributes {
14+
/**
15+
* The account filtering configuration.
16+
*/
17+
"accountFilters"?: AccountFilteringConfig;
1318
/**
1419
* The AWS account ID.
1520
*/
@@ -71,6 +76,10 @@ export class AwsCURConfigAttributes {
7176
* @ignore
7277
*/
7378
static readonly attributeTypeMap: AttributeTypeMap = {
79+
accountFilters: {
80+
baseName: "account_filters",
81+
type: "AccountFilteringConfig",
82+
},
7483
accountId: {
7584
baseName: "account_id",
7685
type: "string",

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

+10-2
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,22 @@
33
* This product includes software developed at Datadog (https://www.datadoghq.com/).
44
* Copyright 2020-Present Datadog, Inc.
55
*/
6+
import { AccountFilteringConfig } from "./AccountFilteringConfig";
67

78
import { AttributeTypeMap } from "../../datadog-api-client-common/util";
89

910
/**
1011
* Attributes for AWS CUR config Patch Request.
1112
*/
1213
export class AwsCURConfigPatchRequestAttributes {
14+
/**
15+
* The account filtering configuration.
16+
*/
17+
"accountFilters"?: AccountFilteringConfig;
1318
/**
1419
* Whether or not the Cloud Cost Management account is enabled.
1520
*/
16-
"isEnabled": boolean;
21+
"isEnabled"?: boolean;
1722

1823
/**
1924
* A container for additional, undeclared properties.
@@ -31,10 +36,13 @@ export class AwsCURConfigPatchRequestAttributes {
3136
* @ignore
3237
*/
3338
static readonly attributeTypeMap: AttributeTypeMap = {
39+
accountFilters: {
40+
baseName: "account_filters",
41+
type: "AccountFilteringConfig",
42+
},
3443
isEnabled: {
3544
baseName: "is_enabled",
3645
type: "boolean",
37-
required: true,
3846
},
3947
additionalProperties: {
4048
baseName: "additionalProperties",

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

+9
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,18 @@
33
* This product includes software developed at Datadog (https://www.datadoghq.com/).
44
* Copyright 2020-Present Datadog, Inc.
55
*/
6+
import { AccountFilteringConfig } from "./AccountFilteringConfig";
67

78
import { AttributeTypeMap } from "../../datadog-api-client-common/util";
89

910
/**
1011
* Attributes for AWS CUR config Post Request.
1112
*/
1213
export class AwsCURConfigPostRequestAttributes {
14+
/**
15+
* The account filtering configuration.
16+
*/
17+
"accountFilters"?: AccountFilteringConfig;
1318
/**
1419
* The AWS account ID.
1520
*/
@@ -55,6 +60,10 @@ export class AwsCURConfigPostRequestAttributes {
5560
* @ignore
5661
*/
5762
static readonly attributeTypeMap: AttributeTypeMap = {
63+
accountFilters: {
64+
baseName: "account_filters",
65+
type: "AccountFilteringConfig",
66+
},
5867
accountId: {
5968
baseName: "account_id",
6069
type: "string",

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

+2
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ import { AWSRegionsIncludeAll } from "./AWSRegionsIncludeAll";
4747
import { AWSRegionsIncludeOnly } from "./AWSRegionsIncludeOnly";
4848
import { AWSResourcesConfig } from "./AWSResourcesConfig";
4949
import { AWSTracesConfig } from "./AWSTracesConfig";
50+
import { AccountFilteringConfig } from "./AccountFilteringConfig";
5051
import { ActionConnectionAttributes } from "./ActionConnectionAttributes";
5152
import { ActionConnectionAttributesUpdate } from "./ActionConnectionAttributesUpdate";
5253
import { ActionConnectionData } from "./ActionConnectionData";
@@ -2522,6 +2523,7 @@ const typeMap: { [index: string]: any } = {
25222523
AWSRegionsIncludeOnly: AWSRegionsIncludeOnly,
25232524
AWSResourcesConfig: AWSResourcesConfig,
25242525
AWSTracesConfig: AWSTracesConfig,
2526+
AccountFilteringConfig: AccountFilteringConfig,
25252527
ActionConnectionAttributes: ActionConnectionAttributes,
25262528
ActionConnectionAttributesUpdate: ActionConnectionAttributesUpdate,
25272529
ActionConnectionData: ActionConnectionData,

0 commit comments

Comments
 (0)