UNPKG

@datadog/datadog-api-client

Version:

OpenAPI client for Datadog APIs

963 lines 151 kB
"use strict"; var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; Object.defineProperty(exports, "__esModule", { value: true }); exports.CloudCostManagementApi = exports.CloudCostManagementApiResponseProcessor = exports.CloudCostManagementApiRequestFactory = void 0; const baseapi_1 = require("../../datadog-api-client-common/baseapi"); const configuration_1 = require("../../datadog-api-client-common/configuration"); const http_1 = require("../../datadog-api-client-common/http/http"); const logger_1 = require("../../../logger"); const ObjectSerializer_1 = require("../models/ObjectSerializer"); const exception_1 = require("../../datadog-api-client-common/exception"); class CloudCostManagementApiRequestFactory extends baseapi_1.BaseAPIRequestFactory { createCostAWSCURConfig(body, _options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; // verify required parameter 'body' is not null or undefined if (body === null || body === undefined) { throw new baseapi_1.RequiredError("body", "createCostAWSCURConfig"); } // Path Params const localVarPath = "/api/v2/cost/aws_cur_config"; // Make Request Context const requestContext = _config .getServer("v2.CloudCostManagementApi.createCostAWSCURConfig") .makeRequestContext(localVarPath, http_1.HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json"); requestContext.setHttpConfig(_config.httpConfig); // Body Params const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([ "application/json", ]); requestContext.setHeaderParam("Content-Type", contentType); const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(body, "AwsCURConfigPostRequest", ""), contentType); requestContext.setBody(serializedBody); // Apply auth methods (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", "AuthZ", ]); return requestContext; }); } createCostAzureUCConfigs(body, _options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; // verify required parameter 'body' is not null or undefined if (body === null || body === undefined) { throw new baseapi_1.RequiredError("body", "createCostAzureUCConfigs"); } // Path Params const localVarPath = "/api/v2/cost/azure_uc_config"; // Make Request Context const requestContext = _config .getServer("v2.CloudCostManagementApi.createCostAzureUCConfigs") .makeRequestContext(localVarPath, http_1.HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json"); requestContext.setHttpConfig(_config.httpConfig); // Body Params const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([ "application/json", ]); requestContext.setHeaderParam("Content-Type", contentType); const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(body, "AzureUCConfigPostRequest", ""), contentType); requestContext.setBody(serializedBody); // Apply auth methods (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", "AuthZ", ]); return requestContext; }); } createCostGCPUsageCostConfig(body, _options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; // verify required parameter 'body' is not null or undefined if (body === null || body === undefined) { throw new baseapi_1.RequiredError("body", "createCostGCPUsageCostConfig"); } // Path Params const localVarPath = "/api/v2/cost/gcp_uc_config"; // Make Request Context const requestContext = _config .getServer("v2.CloudCostManagementApi.createCostGCPUsageCostConfig") .makeRequestContext(localVarPath, http_1.HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json"); requestContext.setHttpConfig(_config.httpConfig); // Body Params const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([ "application/json", ]); requestContext.setHeaderParam("Content-Type", contentType); const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(body, "GCPUsageCostConfigPostRequest", ""), contentType); requestContext.setBody(serializedBody); // Apply auth methods (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", "AuthZ", ]); return requestContext; }); } createCustomAllocationRule(body, _options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; // verify required parameter 'body' is not null or undefined if (body === null || body === undefined) { throw new baseapi_1.RequiredError("body", "createCustomAllocationRule"); } // Path Params const localVarPath = "/api/v2/cost/arbitrary_rule"; // Make Request Context const requestContext = _config .getServer("v2.CloudCostManagementApi.createCustomAllocationRule") .makeRequestContext(localVarPath, http_1.HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json"); requestContext.setHttpConfig(_config.httpConfig); // Body Params const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([ "application/json", ]); requestContext.setHeaderParam("Content-Type", contentType); const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(body, "ArbitraryCostUpsertRequest", ""), contentType); requestContext.setBody(serializedBody); // Apply auth methods (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", "AuthZ", ]); return requestContext; }); } createTagPipelinesRuleset(body, _options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; // verify required parameter 'body' is not null or undefined if (body === null || body === undefined) { throw new baseapi_1.RequiredError("body", "createTagPipelinesRuleset"); } // Path Params const localVarPath = "/api/v2/tags/enrichment"; // Make Request Context const requestContext = _config .getServer("v2.CloudCostManagementApi.createTagPipelinesRuleset") .makeRequestContext(localVarPath, http_1.HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json"); requestContext.setHttpConfig(_config.httpConfig); // Body Params const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([ "application/json", ]); requestContext.setHeaderParam("Content-Type", contentType); const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(body, "CreateRulesetRequest", ""), contentType); requestContext.setBody(serializedBody); // Apply auth methods (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", "AuthZ", ]); return requestContext; }); } deleteBudget(budgetId, _options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; // verify required parameter 'budgetId' is not null or undefined if (budgetId === null || budgetId === undefined) { throw new baseapi_1.RequiredError("budgetId", "deleteBudget"); } // Path Params const localVarPath = "/api/v2/cost/budget/{budget_id}".replace("{budget_id}", encodeURIComponent(String(budgetId))); // Make Request Context const requestContext = _config .getServer("v2.CloudCostManagementApi.deleteBudget") .makeRequestContext(localVarPath, http_1.HttpMethod.DELETE); requestContext.setHeaderParam("Accept", "*/*"); requestContext.setHttpConfig(_config.httpConfig); // Apply auth methods (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", "AuthZ", ]); return requestContext; }); } deleteCostAWSCURConfig(cloudAccountId, _options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; // verify required parameter 'cloudAccountId' is not null or undefined if (cloudAccountId === null || cloudAccountId === undefined) { throw new baseapi_1.RequiredError("cloudAccountId", "deleteCostAWSCURConfig"); } // Path Params const localVarPath = "/api/v2/cost/aws_cur_config/{cloud_account_id}".replace("{cloud_account_id}", encodeURIComponent(String(cloudAccountId))); // Make Request Context const requestContext = _config .getServer("v2.CloudCostManagementApi.deleteCostAWSCURConfig") .makeRequestContext(localVarPath, http_1.HttpMethod.DELETE); requestContext.setHeaderParam("Accept", "*/*"); requestContext.setHttpConfig(_config.httpConfig); // Apply auth methods (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", "AuthZ", ]); return requestContext; }); } deleteCostAzureUCConfig(cloudAccountId, _options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; // verify required parameter 'cloudAccountId' is not null or undefined if (cloudAccountId === null || cloudAccountId === undefined) { throw new baseapi_1.RequiredError("cloudAccountId", "deleteCostAzureUCConfig"); } // Path Params const localVarPath = "/api/v2/cost/azure_uc_config/{cloud_account_id}".replace("{cloud_account_id}", encodeURIComponent(String(cloudAccountId))); // Make Request Context const requestContext = _config .getServer("v2.CloudCostManagementApi.deleteCostAzureUCConfig") .makeRequestContext(localVarPath, http_1.HttpMethod.DELETE); requestContext.setHeaderParam("Accept", "*/*"); requestContext.setHttpConfig(_config.httpConfig); // Apply auth methods (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", "AuthZ", ]); return requestContext; }); } deleteCostGCPUsageCostConfig(cloudAccountId, _options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; // verify required parameter 'cloudAccountId' is not null or undefined if (cloudAccountId === null || cloudAccountId === undefined) { throw new baseapi_1.RequiredError("cloudAccountId", "deleteCostGCPUsageCostConfig"); } // Path Params const localVarPath = "/api/v2/cost/gcp_uc_config/{cloud_account_id}".replace("{cloud_account_id}", encodeURIComponent(String(cloudAccountId))); // Make Request Context const requestContext = _config .getServer("v2.CloudCostManagementApi.deleteCostGCPUsageCostConfig") .makeRequestContext(localVarPath, http_1.HttpMethod.DELETE); requestContext.setHeaderParam("Accept", "*/*"); requestContext.setHttpConfig(_config.httpConfig); // Apply auth methods (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", "AuthZ", ]); return requestContext; }); } deleteCustomAllocationRule(ruleId, _options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; // verify required parameter 'ruleId' is not null or undefined if (ruleId === null || ruleId === undefined) { throw new baseapi_1.RequiredError("ruleId", "deleteCustomAllocationRule"); } // Path Params const localVarPath = "/api/v2/cost/arbitrary_rule/{rule_id}".replace("{rule_id}", encodeURIComponent(String(ruleId))); // Make Request Context const requestContext = _config .getServer("v2.CloudCostManagementApi.deleteCustomAllocationRule") .makeRequestContext(localVarPath, http_1.HttpMethod.DELETE); requestContext.setHeaderParam("Accept", "*/*"); requestContext.setHttpConfig(_config.httpConfig); // Apply auth methods (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", "AuthZ", ]); return requestContext; }); } deleteCustomCostsFile(fileId, _options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; // verify required parameter 'fileId' is not null or undefined if (fileId === null || fileId === undefined) { throw new baseapi_1.RequiredError("fileId", "deleteCustomCostsFile"); } // Path Params const localVarPath = "/api/v2/cost/custom_costs/{file_id}".replace("{file_id}", encodeURIComponent(String(fileId))); // Make Request Context const requestContext = _config .getServer("v2.CloudCostManagementApi.deleteCustomCostsFile") .makeRequestContext(localVarPath, http_1.HttpMethod.DELETE); requestContext.setHeaderParam("Accept", "*/*"); requestContext.setHttpConfig(_config.httpConfig); // Apply auth methods (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", "AuthZ", ]); return requestContext; }); } deleteTagPipelinesRuleset(rulesetId, _options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; // verify required parameter 'rulesetId' is not null or undefined if (rulesetId === null || rulesetId === undefined) { throw new baseapi_1.RequiredError("rulesetId", "deleteTagPipelinesRuleset"); } // Path Params const localVarPath = "/api/v2/tags/enrichment/{ruleset_id}".replace("{ruleset_id}", encodeURIComponent(String(rulesetId))); // Make Request Context const requestContext = _config .getServer("v2.CloudCostManagementApi.deleteTagPipelinesRuleset") .makeRequestContext(localVarPath, http_1.HttpMethod.DELETE); requestContext.setHeaderParam("Accept", "*/*"); requestContext.setHttpConfig(_config.httpConfig); // Apply auth methods (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", "AuthZ", ]); return requestContext; }); } getBudget(budgetId, _options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; // verify required parameter 'budgetId' is not null or undefined if (budgetId === null || budgetId === undefined) { throw new baseapi_1.RequiredError("budgetId", "getBudget"); } // Path Params const localVarPath = "/api/v2/cost/budget/{budget_id}".replace("{budget_id}", encodeURIComponent(String(budgetId))); // Make Request Context const requestContext = _config .getServer("v2.CloudCostManagementApi.getBudget") .makeRequestContext(localVarPath, http_1.HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json"); requestContext.setHttpConfig(_config.httpConfig); // Apply auth methods (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", "AuthZ", ]); return requestContext; }); } getCostAWSCURConfig(cloudAccountId, _options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; // verify required parameter 'cloudAccountId' is not null or undefined if (cloudAccountId === null || cloudAccountId === undefined) { throw new baseapi_1.RequiredError("cloudAccountId", "getCostAWSCURConfig"); } // Path Params const localVarPath = "/api/v2/cost/aws_cur_config/{cloud_account_id}".replace("{cloud_account_id}", encodeURIComponent(String(cloudAccountId))); // Make Request Context const requestContext = _config .getServer("v2.CloudCostManagementApi.getCostAWSCURConfig") .makeRequestContext(localVarPath, http_1.HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json"); requestContext.setHttpConfig(_config.httpConfig); // Apply auth methods (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", "AuthZ", ]); return requestContext; }); } getCostAzureUCConfig(cloudAccountId, _options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; // verify required parameter 'cloudAccountId' is not null or undefined if (cloudAccountId === null || cloudAccountId === undefined) { throw new baseapi_1.RequiredError("cloudAccountId", "getCostAzureUCConfig"); } // Path Params const localVarPath = "/api/v2/cost/azure_uc_config/{cloud_account_id}".replace("{cloud_account_id}", encodeURIComponent(String(cloudAccountId))); // Make Request Context const requestContext = _config .getServer("v2.CloudCostManagementApi.getCostAzureUCConfig") .makeRequestContext(localVarPath, http_1.HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json"); requestContext.setHttpConfig(_config.httpConfig); // Apply auth methods (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", "AuthZ", ]); return requestContext; }); } getCostGCPUsageCostConfig(cloudAccountId, _options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; // verify required parameter 'cloudAccountId' is not null or undefined if (cloudAccountId === null || cloudAccountId === undefined) { throw new baseapi_1.RequiredError("cloudAccountId", "getCostGCPUsageCostConfig"); } // Path Params const localVarPath = "/api/v2/cost/gcp_uc_config/{cloud_account_id}".replace("{cloud_account_id}", encodeURIComponent(String(cloudAccountId))); // Make Request Context const requestContext = _config .getServer("v2.CloudCostManagementApi.getCostGCPUsageCostConfig") .makeRequestContext(localVarPath, http_1.HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json"); requestContext.setHttpConfig(_config.httpConfig); // Apply auth methods (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", "AuthZ", ]); return requestContext; }); } getCustomAllocationRule(ruleId, _options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; // verify required parameter 'ruleId' is not null or undefined if (ruleId === null || ruleId === undefined) { throw new baseapi_1.RequiredError("ruleId", "getCustomAllocationRule"); } // Path Params const localVarPath = "/api/v2/cost/arbitrary_rule/{rule_id}".replace("{rule_id}", encodeURIComponent(String(ruleId))); // Make Request Context const requestContext = _config .getServer("v2.CloudCostManagementApi.getCustomAllocationRule") .makeRequestContext(localVarPath, http_1.HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json"); requestContext.setHttpConfig(_config.httpConfig); // Apply auth methods (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", "AuthZ", ]); return requestContext; }); } getCustomCostsFile(fileId, _options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; // verify required parameter 'fileId' is not null or undefined if (fileId === null || fileId === undefined) { throw new baseapi_1.RequiredError("fileId", "getCustomCostsFile"); } // Path Params const localVarPath = "/api/v2/cost/custom_costs/{file_id}".replace("{file_id}", encodeURIComponent(String(fileId))); // Make Request Context const requestContext = _config .getServer("v2.CloudCostManagementApi.getCustomCostsFile") .makeRequestContext(localVarPath, http_1.HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json"); requestContext.setHttpConfig(_config.httpConfig); // Apply auth methods (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", "AuthZ", ]); return requestContext; }); } getTagPipelinesRuleset(rulesetId, _options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; // verify required parameter 'rulesetId' is not null or undefined if (rulesetId === null || rulesetId === undefined) { throw new baseapi_1.RequiredError("rulesetId", "getTagPipelinesRuleset"); } // Path Params const localVarPath = "/api/v2/tags/enrichment/{ruleset_id}".replace("{ruleset_id}", encodeURIComponent(String(rulesetId))); // Make Request Context const requestContext = _config .getServer("v2.CloudCostManagementApi.getTagPipelinesRuleset") .makeRequestContext(localVarPath, http_1.HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json"); requestContext.setHttpConfig(_config.httpConfig); // Apply auth methods (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", "AuthZ", ]); return requestContext; }); } listBudgets(_options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; // Path Params const localVarPath = "/api/v2/cost/budgets"; // Make Request Context const requestContext = _config .getServer("v2.CloudCostManagementApi.listBudgets") .makeRequestContext(localVarPath, http_1.HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json"); requestContext.setHttpConfig(_config.httpConfig); // Apply auth methods (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", "AuthZ", ]); return requestContext; }); } listCostAWSCURConfigs(_options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; // Path Params const localVarPath = "/api/v2/cost/aws_cur_config"; // Make Request Context const requestContext = _config .getServer("v2.CloudCostManagementApi.listCostAWSCURConfigs") .makeRequestContext(localVarPath, http_1.HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json"); requestContext.setHttpConfig(_config.httpConfig); // Apply auth methods (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", "AuthZ", ]); return requestContext; }); } listCostAzureUCConfigs(_options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; // Path Params const localVarPath = "/api/v2/cost/azure_uc_config"; // Make Request Context const requestContext = _config .getServer("v2.CloudCostManagementApi.listCostAzureUCConfigs") .makeRequestContext(localVarPath, http_1.HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json"); requestContext.setHttpConfig(_config.httpConfig); // Apply auth methods (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", "AuthZ", ]); return requestContext; }); } listCostGCPUsageCostConfigs(_options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; // Path Params const localVarPath = "/api/v2/cost/gcp_uc_config"; // Make Request Context const requestContext = _config .getServer("v2.CloudCostManagementApi.listCostGCPUsageCostConfigs") .makeRequestContext(localVarPath, http_1.HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json"); requestContext.setHttpConfig(_config.httpConfig); // Apply auth methods (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", "AuthZ", ]); return requestContext; }); } listCustomAllocationRules(_options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; // Path Params const localVarPath = "/api/v2/cost/arbitrary_rule"; // Make Request Context const requestContext = _config .getServer("v2.CloudCostManagementApi.listCustomAllocationRules") .makeRequestContext(localVarPath, http_1.HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json"); requestContext.setHttpConfig(_config.httpConfig); // Apply auth methods (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", "AuthZ", ]); return requestContext; }); } listCustomCostsFiles(pageNumber, pageSize, filterStatus, sort, _options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; // Path Params const localVarPath = "/api/v2/cost/custom_costs"; // Make Request Context const requestContext = _config .getServer("v2.CloudCostManagementApi.listCustomCostsFiles") .makeRequestContext(localVarPath, http_1.HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json"); requestContext.setHttpConfig(_config.httpConfig); // Query Params if (pageNumber !== undefined) { requestContext.setQueryParam("page[number]", ObjectSerializer_1.ObjectSerializer.serialize(pageNumber, "number", "int64"), ""); } if (pageSize !== undefined) { requestContext.setQueryParam("page[size]", ObjectSerializer_1.ObjectSerializer.serialize(pageSize, "number", "int64"), ""); } if (filterStatus !== undefined) { requestContext.setQueryParam("filter[status]", ObjectSerializer_1.ObjectSerializer.serialize(filterStatus, "string", ""), ""); } if (sort !== undefined) { requestContext.setQueryParam("sort", ObjectSerializer_1.ObjectSerializer.serialize(sort, "string", ""), ""); } // Apply auth methods (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", "AuthZ", ]); return requestContext; }); } listTagPipelinesRulesets(_options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; // Path Params const localVarPath = "/api/v2/tags/enrichment"; // Make Request Context const requestContext = _config .getServer("v2.CloudCostManagementApi.listTagPipelinesRulesets") .makeRequestContext(localVarPath, http_1.HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json"); requestContext.setHttpConfig(_config.httpConfig); // Apply auth methods (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", "AuthZ", ]); return requestContext; }); } reorderCustomAllocationRules(body, _options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; // verify required parameter 'body' is not null or undefined if (body === null || body === undefined) { throw new baseapi_1.RequiredError("body", "reorderCustomAllocationRules"); } // Path Params const localVarPath = "/api/v2/cost/arbitrary_rule/reorder"; // Make Request Context const requestContext = _config .getServer("v2.CloudCostManagementApi.reorderCustomAllocationRules") .makeRequestContext(localVarPath, http_1.HttpMethod.POST); requestContext.setHeaderParam("Accept", "*/*"); requestContext.setHttpConfig(_config.httpConfig); // Body Params const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([ "application/json", ]); requestContext.setHeaderParam("Content-Type", contentType); const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(body, "ReorderRuleResourceArray", ""), contentType); requestContext.setBody(serializedBody); // Apply auth methods (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", "AuthZ", ]); return requestContext; }); } reorderTagPipelinesRulesets(body, _options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; // verify required parameter 'body' is not null or undefined if (body === null || body === undefined) { throw new baseapi_1.RequiredError("body", "reorderTagPipelinesRulesets"); } // Path Params const localVarPath = "/api/v2/tags/enrichment/reorder"; // Make Request Context const requestContext = _config .getServer("v2.CloudCostManagementApi.reorderTagPipelinesRulesets") .makeRequestContext(localVarPath, http_1.HttpMethod.POST); requestContext.setHeaderParam("Accept", "*/*"); requestContext.setHttpConfig(_config.httpConfig); // Body Params const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([ "application/json", ]); requestContext.setHeaderParam("Content-Type", contentType); const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(body, "ReorderRulesetResourceArray", ""), contentType); requestContext.setBody(serializedBody); // Apply auth methods (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", "AuthZ", ]); return requestContext; }); } updateCostAWSCURConfig(cloudAccountId, body, _options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; // verify required parameter 'cloudAccountId' is not null or undefined if (cloudAccountId === null || cloudAccountId === undefined) { throw new baseapi_1.RequiredError("cloudAccountId", "updateCostAWSCURConfig"); } // verify required parameter 'body' is not null or undefined if (body === null || body === undefined) { throw new baseapi_1.RequiredError("body", "updateCostAWSCURConfig"); } // Path Params const localVarPath = "/api/v2/cost/aws_cur_config/{cloud_account_id}".replace("{cloud_account_id}", encodeURIComponent(String(cloudAccountId))); // Make Request Context const requestContext = _config .getServer("v2.CloudCostManagementApi.updateCostAWSCURConfig") .makeRequestContext(localVarPath, http_1.HttpMethod.PATCH); requestContext.setHeaderParam("Accept", "application/json"); requestContext.setHttpConfig(_config.httpConfig); // Body Params const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([ "application/json", ]); requestContext.setHeaderParam("Content-Type", contentType); const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(body, "AwsCURConfigPatchRequest", ""), contentType); requestContext.setBody(serializedBody); // Apply auth methods (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", "AuthZ", ]); return requestContext; }); } updateCostAzureUCConfigs(cloudAccountId, body, _options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; // verify required parameter 'cloudAccountId' is not null or undefined if (cloudAccountId === null || cloudAccountId === undefined) { throw new baseapi_1.RequiredError("cloudAccountId", "updateCostAzureUCConfigs"); } // verify required parameter 'body' is not null or undefined if (body === null || body === undefined) { throw new baseapi_1.RequiredError("body", "updateCostAzureUCConfigs"); } // Path Params const localVarPath = "/api/v2/cost/azure_uc_config/{cloud_account_id}".replace("{cloud_account_id}", encodeURIComponent(String(cloudAccountId))); // Make Request Context const requestContext = _config .getServer("v2.CloudCostManagementApi.updateCostAzureUCConfigs") .makeRequestContext(localVarPath, http_1.HttpMethod.PATCH); requestContext.setHeaderParam("Accept", "application/json"); requestContext.setHttpConfig(_config.httpConfig); // Body Params const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([ "application/json", ]); requestContext.setHeaderParam("Content-Type", contentType); const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(body, "AzureUCConfigPatchRequest", ""), contentType); requestContext.setBody(serializedBody); // Apply auth methods (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", "AuthZ", ]); return requestContext; }); } updateCostGCPUsageCostConfig(cloudAccountId, body, _options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; // verify required parameter 'cloudAccountId' is not null or undefined if (cloudAccountId === null || cloudAccountId === undefined) { throw new baseapi_1.RequiredError("cloudAccountId", "updateCostGCPUsageCostConfig"); } // verify required parameter 'body' is not null or undefined if (body === null || body === undefined) { throw new baseapi_1.RequiredError("body", "updateCostGCPUsageCostConfig"); } // Path Params const localVarPath = "/api/v2/cost/gcp_uc_config/{cloud_account_id}".replace("{cloud_account_id}", encodeURIComponent(String(cloudAccountId))); // Make Request Context const requestContext = _config .getServer("v2.CloudCostManagementApi.updateCostGCPUsageCostConfig") .makeRequestContext(localVarPath, http_1.HttpMethod.PATCH); requestContext.setHeaderParam("Accept", "application/json"); requestContext.setHttpConfig(_config.httpConfig); // Body Params const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([ "application/json", ]); requestContext.setHeaderParam("Content-Type", contentType); const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(body, "GCPUsageCostConfigPatchRequest", ""), contentType); requestContext.setBody(serializedBody); // Apply auth methods (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", "AuthZ", ]); return requestContext; }); } updateCustomAllocationRule(ruleId, body, _options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; // verify required parameter 'ruleId' is not null or undefined if (ruleId === null || ruleId === undefined) { throw new baseapi_1.RequiredError("ruleId", "updateCustomAllocationRule"); } // verify required parameter 'body' is not null or undefined if (body === null || body === undefined) { throw new baseapi_1.RequiredError("body", "updateCustomAllocationRule"); } // Path Params const localVarPath = "/api/v2/cost/arbitrary_rule/{rule_id}".replace("{rule_id}", encodeURIComponent(String(ruleId))); // Make Request Context const requestContext = _config .getServer("v2.CloudCostManagementApi.updateCustomAllocationRule") .makeRequestContext(localVarPath, http_1.HttpMethod.PATCH); requestContext.setHeaderParam("Accept", "application/json"); requestContext.setHttpConfig(_config.httpConfig); // Body Params const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([ "application/json", ]); requestContext.setHeaderParam("Content-Type", contentType); const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(body, "ArbitraryCostUpsertRequest", ""), contentType); requestContext.setBody(serializedBody); // Apply auth methods (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", "AuthZ", ]); return requestContext; }); } updateTagPipelinesRuleset(rulesetId, body, _options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; // verify required parameter 'rulesetId' is not null or undefined if (rulesetId === null || rulesetId === undefined) { throw new baseapi_1.RequiredError("rulesetId", "updateTagPipelinesRuleset"); } // verify required parameter 'body' is not null or undefined if (body === null || body === undefined) { throw new baseapi_1.RequiredError("body", "updateTagPipelinesRuleset"); } // Path Params const localVarPath = "/api/v2/tags/enrichment/{ruleset_id}".replace("{ruleset_id}", encodeURIComponent(String(rulesetId))); // Make Request Context const requestContext = _config .getServer("v2.CloudCostManagementApi.updateTagPipelinesRuleset") .makeRequestContext(localVarPath, http_1.HttpMethod.PATCH); requestContext.setHeaderParam("Accept", "application/json"); requestContext.setHttpConfig(_config.httpConfig); // Body Params const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([ "application/json", ]); requestContext.setHeaderParam("Content-Type", contentType); const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(body, "UpdateRulesetRequest", ""), contentType); requestContext.setBody(serializedBody); // Apply auth methods (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", "AuthZ", ]); return requestContext; }); } uploadCustomCostsFile(body, _options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; // verify required parameter 'body' is not null or undefined if (body === null || body === undefined) { throw new baseapi_1.RequiredError("body", "uploadCustomCostsFile"); } // Path Params const localVarPath = "/api/v2/cost/custom_costs"; // Make Request Context const requestContext = _config .getServer("v2.CloudCostManagementApi.uploadCustomCostsFile") .makeRequestContext(localVarPath, http_1.HttpMethod.PUT); requestContext.setHeaderParam("Accept", "application/json"); requestContext.setHttpConfig(_config.httpConfig); // Body Params const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([ "application/json", ]); requestContext.setHeaderParam("Content-Type", contentType); const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(body, "Array<CustomCostsFileLineItem>", ""), contentType); requestContext.setBody(serializedBody); // Apply auth methods (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", "AuthZ", ]); return requestContext; }); } upsertBudget(body, _options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; // verify required parameter 'body' is not null or undefined if (body === null || body === undefined) { throw new baseapi_1.RequiredError("body", "upsertBudget"); } // Path Params const localVarPath = "/api/v2/cost/budget"; // Make Request Context const requestContext = _config .getServer("v2.CloudCostManagementApi.upsertBudget") .makeRequestContext(localVarPath, http_1.HttpMethod.PUT); requestContext.setHeaderParam("Accept", "application/json"); requestContext.setHttpConfig(_config.httpConfig); // Body Params const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([ "application/json", ]); requestContext.setHeaderParam("Content-Type", contentType); const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(body, "BudgetWithEntries", ""), contentType); requestContext.setBody(serializedBody); // Apply auth methods (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", "AuthZ", ]); return requestContext; }); } v