Skip to content

Commit 57b0f32

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Update documentation with account filtering info for aws_cur_config endpoints (#2719)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent 70b1dfe commit 57b0f32

File tree

8 files changed

+346
-21
lines changed

8 files changed

+346
-21
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": "2025-02-20 13:35:02.908356",
8-
"spec_repo_commit": "c64543d0"
7+
"regenerated": "2025-02-20 18:33:34.000024",
8+
"spec_repo_commit": "d3fcdb89"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2025-02-20 13:35:02.923482",
13-
"spec_repo_commit": "c64543d0"
12+
"regenerated": "2025-02-20 18:33:34.015327",
13+
"spec_repo_commit": "d3fcdb89"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 35 additions & 3 deletions
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'
@@ -35630,7 +35661,8 @@ paths:
3563035661
permissions:
3563135662
- cloud_cost_management_write
3563235663
patch:
35633-
description: Update the status of an AWS CUR config (active/archived).
35664+
description: Update the status (active/archived) and/or account filtering configuration
35665+
of an AWS CUR config.
3563435666
operationId: UpdateCostAWSCURConfig
3563535667
parameters:
3563635668
- $ref: '#/components/parameters/CloudAccountID'

src/main/java/com/datadog/api/client/v2/api/CloudCostManagementApi.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1237,7 +1237,8 @@ public CompletableFuture<AwsCURConfigsResponse> updateCostAWSCURConfigAsync(
12371237
}
12381238

12391239
/**
1240-
* Update the status of an AWS CUR config (active/archived).
1240+
* Update the status (active/archived) and/or account filtering configuration of an AWS CUR
1241+
* config.
12411242
*
12421243
* @param cloudAccountId Cloud Account id. (required)
12431244
* @param body (required)
Lines changed: 212 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,212 @@
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 2019-Present Datadog, Inc.
5+
*/
6+
7+
package com.datadog.api.client.v2.model;
8+
9+
import com.fasterxml.jackson.annotation.JsonAnyGetter;
10+
import com.fasterxml.jackson.annotation.JsonAnySetter;
11+
import com.fasterxml.jackson.annotation.JsonIgnore;
12+
import com.fasterxml.jackson.annotation.JsonInclude;
13+
import com.fasterxml.jackson.annotation.JsonProperty;
14+
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
15+
import java.util.ArrayList;
16+
import java.util.HashMap;
17+
import java.util.List;
18+
import java.util.Map;
19+
import java.util.Objects;
20+
21+
/** The account filtering configuration. */
22+
@JsonPropertyOrder({
23+
AccountFilteringConfig.JSON_PROPERTY_EXCLUDED_ACCOUNTS,
24+
AccountFilteringConfig.JSON_PROPERTY_INCLUDE_NEW_ACCOUNTS,
25+
AccountFilteringConfig.JSON_PROPERTY_INCLUDED_ACCOUNTS
26+
})
27+
@jakarta.annotation.Generated(
28+
value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
29+
public class AccountFilteringConfig {
30+
@JsonIgnore public boolean unparsed = false;
31+
public static final String JSON_PROPERTY_EXCLUDED_ACCOUNTS = "excluded_accounts";
32+
private List<String> excludedAccounts = null;
33+
34+
public static final String JSON_PROPERTY_INCLUDE_NEW_ACCOUNTS = "include_new_accounts";
35+
private Boolean includeNewAccounts;
36+
37+
public static final String JSON_PROPERTY_INCLUDED_ACCOUNTS = "included_accounts";
38+
private List<String> includedAccounts = null;
39+
40+
public AccountFilteringConfig excludedAccounts(List<String> excludedAccounts) {
41+
this.excludedAccounts = excludedAccounts;
42+
return this;
43+
}
44+
45+
public AccountFilteringConfig addExcludedAccountsItem(String excludedAccountsItem) {
46+
if (this.excludedAccounts == null) {
47+
this.excludedAccounts = new ArrayList<>();
48+
}
49+
this.excludedAccounts.add(excludedAccountsItem);
50+
return this;
51+
}
52+
53+
/**
54+
* The AWS account IDs to be excluded from your billing dataset. This field is used when <code>
55+
* include_new_accounts</code> is <code>true</code>.
56+
*
57+
* @return excludedAccounts
58+
*/
59+
@jakarta.annotation.Nullable
60+
@JsonProperty(JSON_PROPERTY_EXCLUDED_ACCOUNTS)
61+
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
62+
public List<String> getExcludedAccounts() {
63+
return excludedAccounts;
64+
}
65+
66+
public void setExcludedAccounts(List<String> excludedAccounts) {
67+
this.excludedAccounts = excludedAccounts;
68+
}
69+
70+
public AccountFilteringConfig includeNewAccounts(Boolean includeNewAccounts) {
71+
this.includeNewAccounts = includeNewAccounts;
72+
return this;
73+
}
74+
75+
/**
76+
* Whether or not to automatically include new member accounts by default in your billing dataset.
77+
*
78+
* @return includeNewAccounts
79+
*/
80+
@jakarta.annotation.Nullable
81+
@JsonProperty(JSON_PROPERTY_INCLUDE_NEW_ACCOUNTS)
82+
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
83+
public Boolean getIncludeNewAccounts() {
84+
return includeNewAccounts;
85+
}
86+
87+
public void setIncludeNewAccounts(Boolean includeNewAccounts) {
88+
this.includeNewAccounts = includeNewAccounts;
89+
}
90+
91+
public AccountFilteringConfig includedAccounts(List<String> includedAccounts) {
92+
this.includedAccounts = includedAccounts;
93+
return this;
94+
}
95+
96+
public AccountFilteringConfig addIncludedAccountsItem(String includedAccountsItem) {
97+
if (this.includedAccounts == null) {
98+
this.includedAccounts = new ArrayList<>();
99+
}
100+
this.includedAccounts.add(includedAccountsItem);
101+
return this;
102+
}
103+
104+
/**
105+
* The AWS account IDs to be included in your billing dataset. This field is used when <code>
106+
* include_new_accounts</code> is <code>false</code>.
107+
*
108+
* @return includedAccounts
109+
*/
110+
@jakarta.annotation.Nullable
111+
@JsonProperty(JSON_PROPERTY_INCLUDED_ACCOUNTS)
112+
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
113+
public List<String> getIncludedAccounts() {
114+
return includedAccounts;
115+
}
116+
117+
public void setIncludedAccounts(List<String> includedAccounts) {
118+
this.includedAccounts = includedAccounts;
119+
}
120+
121+
/**
122+
* A container for additional, undeclared properties. This is a holder for any undeclared
123+
* properties as specified with the 'additionalProperties' keyword in the OAS document.
124+
*/
125+
private Map<String, Object> additionalProperties;
126+
127+
/**
128+
* Set the additional (undeclared) property with the specified name and value. If the property
129+
* does not already exist, create it otherwise replace it.
130+
*
131+
* @param key The arbitrary key to set
132+
* @param value The associated value
133+
* @return AccountFilteringConfig
134+
*/
135+
@JsonAnySetter
136+
public AccountFilteringConfig putAdditionalProperty(String key, Object value) {
137+
if (this.additionalProperties == null) {
138+
this.additionalProperties = new HashMap<String, Object>();
139+
}
140+
this.additionalProperties.put(key, value);
141+
return this;
142+
}
143+
144+
/**
145+
* Return the additional (undeclared) property.
146+
*
147+
* @return The additional properties
148+
*/
149+
@JsonAnyGetter
150+
public Map<String, Object> getAdditionalProperties() {
151+
return additionalProperties;
152+
}
153+
154+
/**
155+
* Return the additional (undeclared) property with the specified name.
156+
*
157+
* @param key The arbitrary key to get
158+
* @return The specific additional property for the given key
159+
*/
160+
public Object getAdditionalProperty(String key) {
161+
if (this.additionalProperties == null) {
162+
return null;
163+
}
164+
return this.additionalProperties.get(key);
165+
}
166+
167+
/** Return true if this AccountFilteringConfig object is equal to o. */
168+
@Override
169+
public boolean equals(Object o) {
170+
if (this == o) {
171+
return true;
172+
}
173+
if (o == null || getClass() != o.getClass()) {
174+
return false;
175+
}
176+
AccountFilteringConfig accountFilteringConfig = (AccountFilteringConfig) o;
177+
return Objects.equals(this.excludedAccounts, accountFilteringConfig.excludedAccounts)
178+
&& Objects.equals(this.includeNewAccounts, accountFilteringConfig.includeNewAccounts)
179+
&& Objects.equals(this.includedAccounts, accountFilteringConfig.includedAccounts)
180+
&& Objects.equals(this.additionalProperties, accountFilteringConfig.additionalProperties);
181+
}
182+
183+
@Override
184+
public int hashCode() {
185+
return Objects.hash(
186+
excludedAccounts, includeNewAccounts, includedAccounts, additionalProperties);
187+
}
188+
189+
@Override
190+
public String toString() {
191+
StringBuilder sb = new StringBuilder();
192+
sb.append("class AccountFilteringConfig {\n");
193+
sb.append(" excludedAccounts: ").append(toIndentedString(excludedAccounts)).append("\n");
194+
sb.append(" includeNewAccounts: ").append(toIndentedString(includeNewAccounts)).append("\n");
195+
sb.append(" includedAccounts: ").append(toIndentedString(includedAccounts)).append("\n");
196+
sb.append(" additionalProperties: ")
197+
.append(toIndentedString(additionalProperties))
198+
.append("\n");
199+
sb.append('}');
200+
return sb.toString();
201+
}
202+
203+
/**
204+
* Convert the given object to string with each line indented by 4 spaces (except the first line).
205+
*/
206+
private String toIndentedString(Object o) {
207+
if (o == null) {
208+
return "null";
209+
}
210+
return o.toString().replace("\n", "\n ");
211+
}
212+
}

src/main/java/com/datadog/api/client/v2/model/AwsCURConfigAttributes.java

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121

2222
/** Attributes for An AWS CUR config. */
2323
@JsonPropertyOrder({
24+
AwsCURConfigAttributes.JSON_PROPERTY_ACCOUNT_FILTERS,
2425
AwsCURConfigAttributes.JSON_PROPERTY_ACCOUNT_ID,
2526
AwsCURConfigAttributes.JSON_PROPERTY_BUCKET_NAME,
2627
AwsCURConfigAttributes.JSON_PROPERTY_BUCKET_REGION,
@@ -37,6 +38,9 @@
3738
value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
3839
public class AwsCURConfigAttributes {
3940
@JsonIgnore public boolean unparsed = false;
41+
public static final String JSON_PROPERTY_ACCOUNT_FILTERS = "account_filters";
42+
private AccountFilteringConfig accountFilters;
43+
4044
public static final String JSON_PROPERTY_ACCOUNT_ID = "account_id";
4145
private String accountId;
4246

@@ -88,6 +92,28 @@ public AwsCURConfigAttributes(
8892
this.status = status;
8993
}
9094

95+
public AwsCURConfigAttributes accountFilters(AccountFilteringConfig accountFilters) {
96+
this.accountFilters = accountFilters;
97+
this.unparsed |= accountFilters.unparsed;
98+
return this;
99+
}
100+
101+
/**
102+
* The account filtering configuration.
103+
*
104+
* @return accountFilters
105+
*/
106+
@jakarta.annotation.Nullable
107+
@JsonProperty(JSON_PROPERTY_ACCOUNT_FILTERS)
108+
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
109+
public AccountFilteringConfig getAccountFilters() {
110+
return accountFilters;
111+
}
112+
113+
public void setAccountFilters(AccountFilteringConfig accountFilters) {
114+
this.accountFilters = accountFilters;
115+
}
116+
91117
public AwsCURConfigAttributes accountId(String accountId) {
92118
this.accountId = accountId;
93119
return this;
@@ -380,7 +406,8 @@ public boolean equals(Object o) {
380406
return false;
381407
}
382408
AwsCURConfigAttributes awsCurConfigAttributes = (AwsCURConfigAttributes) o;
383-
return Objects.equals(this.accountId, awsCurConfigAttributes.accountId)
409+
return Objects.equals(this.accountFilters, awsCurConfigAttributes.accountFilters)
410+
&& Objects.equals(this.accountId, awsCurConfigAttributes.accountId)
384411
&& Objects.equals(this.bucketName, awsCurConfigAttributes.bucketName)
385412
&& Objects.equals(this.bucketRegion, awsCurConfigAttributes.bucketRegion)
386413
&& Objects.equals(this.createdAt, awsCurConfigAttributes.createdAt)
@@ -397,6 +424,7 @@ public boolean equals(Object o) {
397424
@Override
398425
public int hashCode() {
399426
return Objects.hash(
427+
accountFilters,
400428
accountId,
401429
bucketName,
402430
bucketRegion,
@@ -415,6 +443,7 @@ public int hashCode() {
415443
public String toString() {
416444
StringBuilder sb = new StringBuilder();
417445
sb.append("class AwsCURConfigAttributes {\n");
446+
sb.append(" accountFilters: ").append(toIndentedString(accountFilters)).append("\n");
418447
sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n");
419448
sb.append(" bucketName: ").append(toIndentedString(bucketName)).append("\n");
420449
sb.append(" bucketRegion: ").append(toIndentedString(bucketRegion)).append("\n");

0 commit comments

Comments
 (0)