Skip to content

Commit bee8d24

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Remove /api/v2/cost/enabled (#1943)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent 923731a commit bee8d24

File tree

13 files changed

+4
-401
lines changed

13 files changed

+4
-401
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-12-10 13:52:28.859737",
8-
"spec_repo_commit": "4f71be94"
7+
"regenerated": "2024-12-10 14:43:48.447453",
8+
"spec_repo_commit": "408f0b84"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2024-12-10 13:52:28.879223",
13-
"spec_repo_commit": "4f71be94"
12+
"regenerated": "2024-12-10 14:43:48.467636",
13+
"spec_repo_commit": "408f0b84"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 0 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -4929,42 +4929,6 @@ components:
49294929
type: string
49304930
x-enum-varnames:
49314931
- CLOUD_CONFIGURATION
4932-
CloudCostActivity:
4933-
description: Cloud Cost Activity.
4934-
properties:
4935-
attributes:
4936-
$ref: '#/components/schemas/CloudCostActivityAttributes'
4937-
type:
4938-
$ref: '#/components/schemas/CloudCostActivityType'
4939-
required:
4940-
- attributes
4941-
- type
4942-
type: object
4943-
CloudCostActivityAttributes:
4944-
description: Attributes for Cloud Cost activity.
4945-
properties:
4946-
is_enabled:
4947-
description: Whether or not the cloud account is enabled.
4948-
example: true
4949-
type: boolean
4950-
required:
4951-
- is_enabled
4952-
type: object
4953-
CloudCostActivityResponse:
4954-
description: Response for Cloud Cost activity.
4955-
properties:
4956-
data:
4957-
$ref: '#/components/schemas/CloudCostActivity'
4958-
type: object
4959-
CloudCostActivityType:
4960-
default: cloud_cost_activity
4961-
description: Type of Cloud Cost Activity.
4962-
enum:
4963-
- cloud_cost_activity
4964-
example: cloud_cost_activity
4965-
type: string
4966-
x-enum-varnames:
4967-
- CLOUD_COST_ACTIVITY
49684932
CloudWorkloadSecurityAgentRuleAction:
49694933
description: The action the rule can perform if triggered.
49704934
properties:
@@ -30572,38 +30536,6 @@ paths:
3057230536
summary: Get Custom Costs file
3057330537
tags:
3057430538
- Cloud Cost Management
30575-
/api/v2/cost/enabled:
30576-
get:
30577-
deprecated: true
30578-
description: Get the Cloud Cost Management activity.
30579-
operationId: GetCloudCostActivity
30580-
responses:
30581-
'200':
30582-
content:
30583-
application/json:
30584-
schema:
30585-
$ref: '#/components/schemas/CloudCostActivityResponse'
30586-
description: OK
30587-
'403':
30588-
content:
30589-
application/json:
30590-
schema:
30591-
$ref: '#/components/schemas/APIErrorResponse'
30592-
description: Forbidden
30593-
'429':
30594-
$ref: '#/components/responses/TooManyRequestsResponse'
30595-
security:
30596-
- apiKeyAuth: []
30597-
appKeyAuth: []
30598-
- AuthZ:
30599-
- cloud_cost_management_read
30600-
summary: Cloud Cost Enabled
30601-
tags:
30602-
- Cloud Cost Management
30603-
x-permission:
30604-
operator: OR
30605-
permissions:
30606-
- cloud_cost_management_read
3060730539
/api/v2/cost_by_tag/active_billing_dimensions:
3060830540
get:
3060930541
description: Get active billing dimensions for cost attribution. Cost data for

examples/v2/cloud-cost-management/GetCloudCostActivity.ts

Lines changed: 0 additions & 17 deletions
This file was deleted.

features/support/scenarios_model_mapping.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3124,9 +3124,6 @@ export const ScenariosModelMappings: {[key: string]: {[key: string]: any}} = {
31243124
},
31253125
"operationResponseType": "CustomCostsFileGetResponse",
31263126
},
3127-
"v2.GetCloudCostActivity": {
3128-
"operationResponseType": "CloudCostActivityResponse",
3129-
},
31303127
"v2.GetActiveBillingDimensions": {
31313128
"operationResponseType": "ActiveBillingDimensionsResponse",
31323129
},

features/v2/cloud_cost_management.feature

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,6 @@ Feature: Cloud Cost Management
1313
And a valid "appKeyAuth" key in the system
1414
And an instance of "CloudCostManagement" API
1515

16-
@generated @skip @team:Datadog/cloud-cost-management
17-
Scenario: Cloud Cost Enabled returns "OK" response
18-
Given new "GetCloudCostActivity" request
19-
When the request is sent
20-
Then the response status is 200 OK
21-
2216
@generated @skip @team:Datadog/cloud-cost-management
2317
Scenario: Create Cloud Cost Management AWS CUR config returns "Bad Request" response
2418
Given new "CreateCostAWSCURConfig" request

features/v2/undo.json

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -462,12 +462,6 @@
462462
"type": "safe"
463463
}
464464
},
465-
"GetCloudCostActivity": {
466-
"tag": "Cloud Cost Management",
467-
"undo": {
468-
"type": "safe"
469-
}
470-
},
471465
"GetActiveBillingDimensions": {
472466
"tag": "Usage Metering",
473467
"undo": {

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

Lines changed: 0 additions & 102 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ import { AzureUCConfigPairsResponse } from "../models/AzureUCConfigPairsResponse
2525
import { AzureUCConfigPatchRequest } from "../models/AzureUCConfigPatchRequest";
2626
import { AzureUCConfigPostRequest } from "../models/AzureUCConfigPostRequest";
2727
import { AzureUCConfigsResponse } from "../models/AzureUCConfigsResponse";
28-
import { CloudCostActivityResponse } from "../models/CloudCostActivityResponse";
2928
import { CustomCostsFileGetResponse } from "../models/CustomCostsFileGetResponse";
3029
import { CustomCostsFileLineItem } from "../models/CustomCostsFileLineItem";
3130
import { CustomCostsFileListResponse } from "../models/CustomCostsFileListResponse";
@@ -220,31 +219,6 @@ export class CloudCostManagementApiRequestFactory extends BaseAPIRequestFactory
220219
return requestContext;
221220
}
222221

223-
public async getCloudCostActivity(
224-
_options?: Configuration
225-
): Promise<RequestContext> {
226-
const _config = _options || this.configuration;
227-
228-
// Path Params
229-
const localVarPath = "/api/v2/cost/enabled";
230-
231-
// Make Request Context
232-
const requestContext = _config
233-
.getServer("v2.CloudCostManagementApi.getCloudCostActivity")
234-
.makeRequestContext(localVarPath, HttpMethod.GET);
235-
requestContext.setHeaderParam("Accept", "application/json");
236-
requestContext.setHttpConfig(_config.httpConfig);
237-
238-
// Apply auth methods
239-
applySecurityAuthentication(_config, requestContext, [
240-
"AuthZ",
241-
"apiKeyAuth",
242-
"appKeyAuth",
243-
]);
244-
245-
return requestContext;
246-
}
247-
248222
public async getCustomCostsFile(
249223
fileId: string,
250224
_options?: Configuration
@@ -794,64 +768,6 @@ export class CloudCostManagementApiResponseProcessor {
794768
);
795769
}
796770

797-
/**
798-
* Unwraps the actual response sent by the server from the response context and deserializes the response content
799-
* to the expected objects
800-
*
801-
* @params response Response returned by the server for a request to getCloudCostActivity
802-
* @throws ApiException if the response code was not in [200, 299]
803-
*/
804-
public async getCloudCostActivity(
805-
response: ResponseContext
806-
): Promise<CloudCostActivityResponse> {
807-
const contentType = ObjectSerializer.normalizeMediaType(
808-
response.headers["content-type"]
809-
);
810-
if (response.httpStatusCode === 200) {
811-
const body: CloudCostActivityResponse = ObjectSerializer.deserialize(
812-
ObjectSerializer.parse(await response.body.text(), contentType),
813-
"CloudCostActivityResponse"
814-
) as CloudCostActivityResponse;
815-
return body;
816-
}
817-
if (response.httpStatusCode === 403 || response.httpStatusCode === 429) {
818-
const bodyText = ObjectSerializer.parse(
819-
await response.body.text(),
820-
contentType
821-
);
822-
let body: APIErrorResponse;
823-
try {
824-
body = ObjectSerializer.deserialize(
825-
bodyText,
826-
"APIErrorResponse"
827-
) as APIErrorResponse;
828-
} catch (error) {
829-
logger.debug(`Got error deserializing error: ${error}`);
830-
throw new ApiException<APIErrorResponse>(
831-
response.httpStatusCode,
832-
bodyText
833-
);
834-
}
835-
throw new ApiException<APIErrorResponse>(response.httpStatusCode, body);
836-
}
837-
838-
// Work around for missing responses in specification, e.g. for petstore.yaml
839-
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
840-
const body: CloudCostActivityResponse = ObjectSerializer.deserialize(
841-
ObjectSerializer.parse(await response.body.text(), contentType),
842-
"CloudCostActivityResponse",
843-
""
844-
) as CloudCostActivityResponse;
845-
return body;
846-
}
847-
848-
const body = (await response.body.text()) || "";
849-
throw new ApiException<string>(
850-
response.httpStatusCode,
851-
'Unknown API Status Code!\nBody: "' + body + '"'
852-
);
853-
}
854-
855771
/**
856772
* Unwraps the actual response sent by the server from the response context and deserializes the response content
857773
* to the expected objects
@@ -1466,24 +1382,6 @@ export class CloudCostManagementApi {
14661382
});
14671383
}
14681384

1469-
/**
1470-
* Get the Cloud Cost Management activity.
1471-
* @param param The request object
1472-
*/
1473-
public getCloudCostActivity(
1474-
options?: Configuration
1475-
): Promise<CloudCostActivityResponse> {
1476-
const requestContextPromise =
1477-
this.requestFactory.getCloudCostActivity(options);
1478-
return requestContextPromise.then((requestContext) => {
1479-
return this.configuration.httpApi
1480-
.send(requestContext)
1481-
.then((responseContext) => {
1482-
return this.responseProcessor.getCloudCostActivity(responseContext);
1483-
});
1484-
});
1485-
}
1486-
14871385
/**
14881386
* Fetch the specified Custom Costs file.
14891387
* @param param The request object

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -849,10 +849,6 @@ export { CloudConfigurationRuleCreatePayload } from "./models/CloudConfiguration
849849
export { CloudConfigurationRuleOptions } from "./models/CloudConfigurationRuleOptions";
850850
export { CloudConfigurationRulePayload } from "./models/CloudConfigurationRulePayload";
851851
export { CloudConfigurationRuleType } from "./models/CloudConfigurationRuleType";
852-
export { CloudCostActivity } from "./models/CloudCostActivity";
853-
export { CloudCostActivityAttributes } from "./models/CloudCostActivityAttributes";
854-
export { CloudCostActivityResponse } from "./models/CloudCostActivityResponse";
855-
export { CloudCostActivityType } from "./models/CloudCostActivityType";
856852
export { CloudflareAccountCreateRequest } from "./models/CloudflareAccountCreateRequest";
857853
export { CloudflareAccountCreateRequestAttributes } from "./models/CloudflareAccountCreateRequestAttributes";
858854
export { CloudflareAccountCreateRequestData } from "./models/CloudflareAccountCreateRequestData";

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

Lines changed: 0 additions & 64 deletions
This file was deleted.

0 commit comments

Comments
 (0)