Skip to content

Commit 441c610

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Update description, operationId and examples for tag pipeline and custom allocation rules (#3178)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent 7e5cffb commit 441c610

File tree

57 files changed

+1633
-1095
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+1633
-1095
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 293 additions & 41 deletions
Large diffs are not rendered by default.

examples/v2/cloud-cost-management/CreateArbitraryCostRule.java renamed to examples/v2/cloud-cost-management/CreateCustomAllocationRule.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Create arbitrary cost rule returns "OK" response
1+
// Create custom allocation rule returns "OK" response
22

33
import com.datadog.api.client.ApiClient;
44
import com.datadog.api.client.ApiException;
@@ -59,10 +59,11 @@ public static void main(String[] args) {
5959
.type(ArbitraryCostUpsertRequestDataType.UPSERT_ARBITRARY_RULE));
6060

6161
try {
62-
ArbitraryRuleResponse result = apiInstance.createArbitraryCostRule(body);
62+
ArbitraryRuleResponse result = apiInstance.createCustomAllocationRule(body);
6363
System.out.println(result);
6464
} catch (ApiException e) {
65-
System.err.println("Exception when calling CloudCostManagementApi#createArbitraryCostRule");
65+
System.err.println(
66+
"Exception when calling CloudCostManagementApi#createCustomAllocationRule");
6667
System.err.println("Status code: " + e.getCode());
6768
System.err.println("Reason: " + e.getResponseBody());
6869
System.err.println("Response headers: " + e.getResponseHeaders());

examples/v2/cloud-cost-management/CreateRuleset.java renamed to examples/v2/cloud-cost-management/CreateTagPipelinesRuleset.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Create ruleset returns "OK" response
1+
// Create tag pipeline ruleset returns "OK" response
22

33
import com.datadog.api.client.ApiClient;
44
import com.datadog.api.client.ApiException;
@@ -48,10 +48,10 @@ public static void main(String[] args) {
4848
.type(CreateRulesetRequestDataType.CREATE_RULESET));
4949

5050
try {
51-
RulesetResp result = apiInstance.createRuleset(body);
51+
RulesetResp result = apiInstance.createTagPipelinesRuleset(body);
5252
System.out.println(result);
5353
} catch (ApiException e) {
54-
System.err.println("Exception when calling CloudCostManagementApi#createRuleset");
54+
System.err.println("Exception when calling CloudCostManagementApi#createTagPipelinesRuleset");
5555
System.err.println("Status code: " + e.getCode());
5656
System.err.println("Reason: " + e.getResponseBody());
5757
System.err.println("Response headers: " + e.getResponseHeaders());

examples/v2/cloud-cost-management/DeleteRuleset.java renamed to examples/v2/cloud-cost-management/DeleteCustomAllocationRule.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Delete ruleset returns "No Content" response
1+
// Delete custom allocation rule returns "No Content" response
22

33
import com.datadog.api.client.ApiClient;
44
import com.datadog.api.client.ApiException;
@@ -10,9 +10,10 @@ public static void main(String[] args) {
1010
CloudCostManagementApi apiInstance = new CloudCostManagementApi(defaultClient);
1111

1212
try {
13-
apiInstance.deleteRuleset("1c5dae14-237d-4b9a-a515-aa55b3939142");
13+
apiInstance.deleteCustomAllocationRule(683L);
1414
} catch (ApiException e) {
15-
System.err.println("Exception when calling CloudCostManagementApi#deleteRuleset");
15+
System.err.println(
16+
"Exception when calling CloudCostManagementApi#deleteCustomAllocationRule");
1617
System.err.println("Status code: " + e.getCode());
1718
System.err.println("Reason: " + e.getResponseBody());
1819
System.err.println("Response headers: " + e.getResponseHeaders());

examples/v2/cloud-cost-management/DeleteArbitraryCostRule.java renamed to examples/v2/cloud-cost-management/DeleteTagPipelinesRuleset.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Delete arbitrary cost rule returns "No Content" response
1+
// Delete tag pipeline ruleset returns "No Content" response
22

33
import com.datadog.api.client.ApiClient;
44
import com.datadog.api.client.ApiException;
@@ -10,9 +10,9 @@ public static void main(String[] args) {
1010
CloudCostManagementApi apiInstance = new CloudCostManagementApi(defaultClient);
1111

1212
try {
13-
apiInstance.deleteArbitraryCostRule(123456L);
13+
apiInstance.deleteTagPipelinesRuleset("ee10c3ff-312f-464c-b4f6-46adaa6d00a1");
1414
} catch (ApiException e) {
15-
System.err.println("Exception when calling CloudCostManagementApi#deleteArbitraryCostRule");
15+
System.err.println("Exception when calling CloudCostManagementApi#deleteTagPipelinesRuleset");
1616
System.err.println("Status code: " + e.getCode());
1717
System.err.println("Reason: " + e.getResponseBody());
1818
System.err.println("Response headers: " + e.getResponseHeaders());

examples/v2/cloud-cost-management/GetArbitraryCostRule.java renamed to examples/v2/cloud-cost-management/GetCustomAllocationRule.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Get arbitrary cost rule returns "OK" response
1+
// Get custom allocation rule returns "OK" response
22

33
import com.datadog.api.client.ApiClient;
44
import com.datadog.api.client.ApiException;
@@ -11,10 +11,10 @@ public static void main(String[] args) {
1111
CloudCostManagementApi apiInstance = new CloudCostManagementApi(defaultClient);
1212

1313
try {
14-
ArbitraryRuleResponse result = apiInstance.getArbitraryCostRule(123456L);
14+
ArbitraryRuleResponse result = apiInstance.getCustomAllocationRule(683L);
1515
System.out.println(result);
1616
} catch (ApiException e) {
17-
System.err.println("Exception when calling CloudCostManagementApi#getArbitraryCostRule");
17+
System.err.println("Exception when calling CloudCostManagementApi#getCustomAllocationRule");
1818
System.err.println("Status code: " + e.getCode());
1919
System.err.println("Reason: " + e.getResponseBody());
2020
System.err.println("Response headers: " + e.getResponseHeaders());

examples/v2/cloud-cost-management/GetRuleset.java renamed to examples/v2/cloud-cost-management/GetTagPipelinesRuleset.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ public static void main(String[] args) {
1111
CloudCostManagementApi apiInstance = new CloudCostManagementApi(defaultClient);
1212

1313
try {
14-
RulesetResp result = apiInstance.getRuleset("da0e30e2-615d-4dae-9a22-38cf86a87dde");
14+
RulesetResp result = apiInstance.getTagPipelinesRuleset("ruleset_id");
1515
System.out.println(result);
1616
} catch (ApiException e) {
17-
System.err.println("Exception when calling CloudCostManagementApi#getRuleset");
17+
System.err.println("Exception when calling CloudCostManagementApi#getTagPipelinesRuleset");
1818
System.err.println("Status code: " + e.getCode());
1919
System.err.println("Reason: " + e.getResponseBody());
2020
System.err.println("Response headers: " + e.getResponseHeaders());
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
// Get tag pipeline ruleset returns "OK" response
2+
3+
import com.datadog.api.client.ApiClient;
4+
import com.datadog.api.client.ApiException;
5+
import com.datadog.api.client.v2.api.CloudCostManagementApi;
6+
import com.datadog.api.client.v2.model.RulesetResp;
7+
8+
public class Example {
9+
public static void main(String[] args) {
10+
ApiClient defaultClient = ApiClient.getDefaultApiClient();
11+
CloudCostManagementApi apiInstance = new CloudCostManagementApi(defaultClient);
12+
13+
try {
14+
RulesetResp result =
15+
apiInstance.getTagPipelinesRuleset("ee10c3ff-312f-464c-b4f6-46adaa6d00a1");
16+
System.out.println(result);
17+
} catch (ApiException e) {
18+
System.err.println("Exception when calling CloudCostManagementApi#getTagPipelinesRuleset");
19+
System.err.println("Status code: " + e.getCode());
20+
System.err.println("Reason: " + e.getResponseBody());
21+
System.err.println("Response headers: " + e.getResponseHeaders());
22+
e.printStackTrace();
23+
}
24+
}
25+
}

examples/v2/cloud-cost-management/ListArbitraryCostRules.java renamed to examples/v2/cloud-cost-management/ListCustomAllocationRules.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// List arbitrary cost rules returns "OK" response
1+
// List custom allocation rules returns "OK" response
22

33
import com.datadog.api.client.ApiClient;
44
import com.datadog.api.client.ApiException;
@@ -11,10 +11,10 @@ public static void main(String[] args) {
1111
CloudCostManagementApi apiInstance = new CloudCostManagementApi(defaultClient);
1212

1313
try {
14-
ArbitraryRuleResponseArray result = apiInstance.listArbitraryCostRules();
14+
ArbitraryRuleResponseArray result = apiInstance.listCustomAllocationRules();
1515
System.out.println(result);
1616
} catch (ApiException e) {
17-
System.err.println("Exception when calling CloudCostManagementApi#listArbitraryCostRules");
17+
System.err.println("Exception when calling CloudCostManagementApi#listCustomAllocationRules");
1818
System.err.println("Status code: " + e.getCode());
1919
System.err.println("Reason: " + e.getResponseBody());
2020
System.err.println("Response headers: " + e.getResponseHeaders());

examples/v2/cloud-cost-management/ListRulesets.java renamed to examples/v2/cloud-cost-management/ListTagPipelinesRulesets.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// List rulesets returns "OK" response
1+
// List tag pipeline rulesets returns "OK" response
22

33
import com.datadog.api.client.ApiClient;
44
import com.datadog.api.client.ApiException;
@@ -11,10 +11,10 @@ public static void main(String[] args) {
1111
CloudCostManagementApi apiInstance = new CloudCostManagementApi(defaultClient);
1212

1313
try {
14-
RulesetRespArray result = apiInstance.listRulesets();
14+
RulesetRespArray result = apiInstance.listTagPipelinesRulesets();
1515
System.out.println(result);
1616
} catch (ApiException e) {
17-
System.err.println("Exception when calling CloudCostManagementApi#listRulesets");
17+
System.err.println("Exception when calling CloudCostManagementApi#listTagPipelinesRulesets");
1818
System.err.println("Status code: " + e.getCode());
1919
System.err.println("Reason: " + e.getResponseBody());
2020
System.err.println("Response headers: " + e.getResponseHeaders());

0 commit comments

Comments
 (0)