UNPKG

@datadog/datadog-api-client

Version:

OpenAPI client for Datadog APIs

424 lines (423 loc) 19.8 kB
import { BaseAPIRequestFactory } from "../../datadog-api-client-common/baseapi"; import { Configuration } from "../../datadog-api-client-common/configuration"; import { RequestContext, ResponseContext } from "../../datadog-api-client-common/http/http"; import { AwsCURConfigPatchRequest } from "../models/AwsCURConfigPatchRequest"; import { AwsCURConfigPostRequest } from "../models/AwsCURConfigPostRequest"; import { AwsCURConfigResponse } from "../models/AwsCURConfigResponse"; import { AwsCURConfigsResponse } from "../models/AwsCURConfigsResponse"; import { AzureUCConfigPairsResponse } from "../models/AzureUCConfigPairsResponse"; import { AzureUCConfigPatchRequest } from "../models/AzureUCConfigPatchRequest"; import { AzureUCConfigPostRequest } from "../models/AzureUCConfigPostRequest"; import { AzureUCConfigsResponse } from "../models/AzureUCConfigsResponse"; import { BudgetArray } from "../models/BudgetArray"; import { BudgetWithEntries } from "../models/BudgetWithEntries"; import { CustomCostsFileGetResponse } from "../models/CustomCostsFileGetResponse"; import { CustomCostsFileLineItem } from "../models/CustomCostsFileLineItem"; import { CustomCostsFileListResponse } from "../models/CustomCostsFileListResponse"; import { CustomCostsFileUploadResponse } from "../models/CustomCostsFileUploadResponse"; import { GCPUsageCostConfigPatchRequest } from "../models/GCPUsageCostConfigPatchRequest"; import { GCPUsageCostConfigPostRequest } from "../models/GCPUsageCostConfigPostRequest"; import { GCPUsageCostConfigResponse } from "../models/GCPUsageCostConfigResponse"; import { GCPUsageCostConfigsResponse } from "../models/GCPUsageCostConfigsResponse"; export declare class CloudCostManagementApiRequestFactory extends BaseAPIRequestFactory { createCostAWSCURConfig(body: AwsCURConfigPostRequest, _options?: Configuration): Promise<RequestContext>; createCostAzureUCConfigs(body: AzureUCConfigPostRequest, _options?: Configuration): Promise<RequestContext>; createCostGCPUsageCostConfig(body: GCPUsageCostConfigPostRequest, _options?: Configuration): Promise<RequestContext>; deleteBudget(budgetId: string, _options?: Configuration): Promise<RequestContext>; deleteCostAWSCURConfig(cloudAccountId: string, _options?: Configuration): Promise<RequestContext>; deleteCostAzureUCConfig(cloudAccountId: string, _options?: Configuration): Promise<RequestContext>; deleteCostGCPUsageCostConfig(cloudAccountId: string, _options?: Configuration): Promise<RequestContext>; deleteCustomCostsFile(fileId: string, _options?: Configuration): Promise<RequestContext>; getBudget(budgetId: string, _options?: Configuration): Promise<RequestContext>; getCustomCostsFile(fileId: string, _options?: Configuration): Promise<RequestContext>; listBudgets(_options?: Configuration): Promise<RequestContext>; listCostAWSCURConfigs(_options?: Configuration): Promise<RequestContext>; listCostAzureUCConfigs(_options?: Configuration): Promise<RequestContext>; listCostGCPUsageCostConfigs(_options?: Configuration): Promise<RequestContext>; listCustomCostsFiles(_options?: Configuration): Promise<RequestContext>; updateCostAWSCURConfig(cloudAccountId: string, body: AwsCURConfigPatchRequest, _options?: Configuration): Promise<RequestContext>; updateCostAzureUCConfigs(cloudAccountId: string, body: AzureUCConfigPatchRequest, _options?: Configuration): Promise<RequestContext>; updateCostGCPUsageCostConfig(cloudAccountId: string, body: GCPUsageCostConfigPatchRequest, _options?: Configuration): Promise<RequestContext>; uploadCustomCostsFile(body: Array<CustomCostsFileLineItem>, _options?: Configuration): Promise<RequestContext>; upsertBudget(body: BudgetWithEntries, _options?: Configuration): Promise<RequestContext>; } export declare class CloudCostManagementApiResponseProcessor { /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to createCostAWSCURConfig * @throws ApiException if the response code was not in [200, 299] */ createCostAWSCURConfig(response: ResponseContext): Promise<AwsCURConfigResponse>; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to createCostAzureUCConfigs * @throws ApiException if the response code was not in [200, 299] */ createCostAzureUCConfigs(response: ResponseContext): Promise<AzureUCConfigPairsResponse>; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to createCostGCPUsageCostConfig * @throws ApiException if the response code was not in [200, 299] */ createCostGCPUsageCostConfig(response: ResponseContext): Promise<GCPUsageCostConfigResponse>; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to deleteBudget * @throws ApiException if the response code was not in [200, 299] */ deleteBudget(response: ResponseContext): Promise<void>; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to deleteCostAWSCURConfig * @throws ApiException if the response code was not in [200, 299] */ deleteCostAWSCURConfig(response: ResponseContext): Promise<void>; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to deleteCostAzureUCConfig * @throws ApiException if the response code was not in [200, 299] */ deleteCostAzureUCConfig(response: ResponseContext): Promise<void>; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to deleteCostGCPUsageCostConfig * @throws ApiException if the response code was not in [200, 299] */ deleteCostGCPUsageCostConfig(response: ResponseContext): Promise<void>; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to deleteCustomCostsFile * @throws ApiException if the response code was not in [200, 299] */ deleteCustomCostsFile(response: ResponseContext): Promise<void>; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to getBudget * @throws ApiException if the response code was not in [200, 299] */ getBudget(response: ResponseContext): Promise<BudgetWithEntries>; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to getCustomCostsFile * @throws ApiException if the response code was not in [200, 299] */ getCustomCostsFile(response: ResponseContext): Promise<CustomCostsFileGetResponse>; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to listBudgets * @throws ApiException if the response code was not in [200, 299] */ listBudgets(response: ResponseContext): Promise<BudgetArray>; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to listCostAWSCURConfigs * @throws ApiException if the response code was not in [200, 299] */ listCostAWSCURConfigs(response: ResponseContext): Promise<AwsCURConfigsResponse>; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to listCostAzureUCConfigs * @throws ApiException if the response code was not in [200, 299] */ listCostAzureUCConfigs(response: ResponseContext): Promise<AzureUCConfigsResponse>; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to listCostGCPUsageCostConfigs * @throws ApiException if the response code was not in [200, 299] */ listCostGCPUsageCostConfigs(response: ResponseContext): Promise<GCPUsageCostConfigsResponse>; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to listCustomCostsFiles * @throws ApiException if the response code was not in [200, 299] */ listCustomCostsFiles(response: ResponseContext): Promise<CustomCostsFileListResponse>; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to updateCostAWSCURConfig * @throws ApiException if the response code was not in [200, 299] */ updateCostAWSCURConfig(response: ResponseContext): Promise<AwsCURConfigsResponse>; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to updateCostAzureUCConfigs * @throws ApiException if the response code was not in [200, 299] */ updateCostAzureUCConfigs(response: ResponseContext): Promise<AzureUCConfigPairsResponse>; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to updateCostGCPUsageCostConfig * @throws ApiException if the response code was not in [200, 299] */ updateCostGCPUsageCostConfig(response: ResponseContext): Promise<GCPUsageCostConfigResponse>; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to uploadCustomCostsFile * @throws ApiException if the response code was not in [200, 299] */ uploadCustomCostsFile(response: ResponseContext): Promise<CustomCostsFileUploadResponse>; /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * * @params response Response returned by the server for a request to upsertBudget * @throws ApiException if the response code was not in [200, 299] */ upsertBudget(response: ResponseContext): Promise<BudgetWithEntries>; } export interface CloudCostManagementApiCreateCostAWSCURConfigRequest { /** * @type AwsCURConfigPostRequest */ body: AwsCURConfigPostRequest; } export interface CloudCostManagementApiCreateCostAzureUCConfigsRequest { /** * @type AzureUCConfigPostRequest */ body: AzureUCConfigPostRequest; } export interface CloudCostManagementApiCreateCostGCPUsageCostConfigRequest { /** * @type GCPUsageCostConfigPostRequest */ body: GCPUsageCostConfigPostRequest; } export interface CloudCostManagementApiDeleteBudgetRequest { /** * Budget id. * @type string */ budgetId: string; } export interface CloudCostManagementApiDeleteCostAWSCURConfigRequest { /** * Cloud Account id. * @type string */ cloudAccountId: string; } export interface CloudCostManagementApiDeleteCostAzureUCConfigRequest { /** * Cloud Account id. * @type string */ cloudAccountId: string; } export interface CloudCostManagementApiDeleteCostGCPUsageCostConfigRequest { /** * Cloud Account id. * @type string */ cloudAccountId: string; } export interface CloudCostManagementApiDeleteCustomCostsFileRequest { /** * File ID. * @type string */ fileId: string; } export interface CloudCostManagementApiGetBudgetRequest { /** * Budget id. * @type string */ budgetId: string; } export interface CloudCostManagementApiGetCustomCostsFileRequest { /** * File ID. * @type string */ fileId: string; } export interface CloudCostManagementApiUpdateCostAWSCURConfigRequest { /** * Cloud Account id. * @type string */ cloudAccountId: string; /** * @type AwsCURConfigPatchRequest */ body: AwsCURConfigPatchRequest; } export interface CloudCostManagementApiUpdateCostAzureUCConfigsRequest { /** * Cloud Account id. * @type string */ cloudAccountId: string; /** * @type AzureUCConfigPatchRequest */ body: AzureUCConfigPatchRequest; } export interface CloudCostManagementApiUpdateCostGCPUsageCostConfigRequest { /** * Cloud Account id. * @type string */ cloudAccountId: string; /** * @type GCPUsageCostConfigPatchRequest */ body: GCPUsageCostConfigPatchRequest; } export interface CloudCostManagementApiUploadCustomCostsFileRequest { /** * @type Array<CustomCostsFileLineItem> */ body: Array<CustomCostsFileLineItem>; } export interface CloudCostManagementApiUpsertBudgetRequest { /** * @type BudgetWithEntries */ body: BudgetWithEntries; } export declare class CloudCostManagementApi { private requestFactory; private responseProcessor; private configuration; constructor(configuration: Configuration, requestFactory?: CloudCostManagementApiRequestFactory, responseProcessor?: CloudCostManagementApiResponseProcessor); /** * Create a Cloud Cost Management account for an AWS CUR config. * @param param The request object */ createCostAWSCURConfig(param: CloudCostManagementApiCreateCostAWSCURConfigRequest, options?: Configuration): Promise<AwsCURConfigResponse>; /** * Create a Cloud Cost Management account for an Azure config. * @param param The request object */ createCostAzureUCConfigs(param: CloudCostManagementApiCreateCostAzureUCConfigsRequest, options?: Configuration): Promise<AzureUCConfigPairsResponse>; /** * Create a Cloud Cost Management account for an GCP Usage Cost config. * @param param The request object */ createCostGCPUsageCostConfig(param: CloudCostManagementApiCreateCostGCPUsageCostConfigRequest, options?: Configuration): Promise<GCPUsageCostConfigResponse>; /** * Delete a budget. * @param param The request object */ deleteBudget(param: CloudCostManagementApiDeleteBudgetRequest, options?: Configuration): Promise<void>; /** * Archive a Cloud Cost Management Account. * @param param The request object */ deleteCostAWSCURConfig(param: CloudCostManagementApiDeleteCostAWSCURConfigRequest, options?: Configuration): Promise<void>; /** * Archive a Cloud Cost Management Account. * @param param The request object */ deleteCostAzureUCConfig(param: CloudCostManagementApiDeleteCostAzureUCConfigRequest, options?: Configuration): Promise<void>; /** * Archive a Cloud Cost Management account. * @param param The request object */ deleteCostGCPUsageCostConfig(param: CloudCostManagementApiDeleteCostGCPUsageCostConfigRequest, options?: Configuration): Promise<void>; /** * Delete the specified Custom Costs file. * @param param The request object */ deleteCustomCostsFile(param: CloudCostManagementApiDeleteCustomCostsFileRequest, options?: Configuration): Promise<void>; /** * Get a budget. * @param param The request object */ getBudget(param: CloudCostManagementApiGetBudgetRequest, options?: Configuration): Promise<BudgetWithEntries>; /** * Fetch the specified Custom Costs file. * @param param The request object */ getCustomCostsFile(param: CloudCostManagementApiGetCustomCostsFileRequest, options?: Configuration): Promise<CustomCostsFileGetResponse>; /** * List budgets. * @param param The request object */ listBudgets(options?: Configuration): Promise<BudgetArray>; /** * List the AWS CUR configs. * @param param The request object */ listCostAWSCURConfigs(options?: Configuration): Promise<AwsCURConfigsResponse>; /** * List the Azure configs. * @param param The request object */ listCostAzureUCConfigs(options?: Configuration): Promise<AzureUCConfigsResponse>; /** * List the GCP Usage Cost configs. * @param param The request object */ listCostGCPUsageCostConfigs(options?: Configuration): Promise<GCPUsageCostConfigsResponse>; /** * List the Custom Costs files. * @param param The request object */ listCustomCostsFiles(options?: Configuration): Promise<CustomCostsFileListResponse>; /** * Update the status (active/archived) and/or account filtering configuration of an AWS CUR config. * @param param The request object */ updateCostAWSCURConfig(param: CloudCostManagementApiUpdateCostAWSCURConfigRequest, options?: Configuration): Promise<AwsCURConfigsResponse>; /** * Update the status of an Azure config (active/archived). * @param param The request object */ updateCostAzureUCConfigs(param: CloudCostManagementApiUpdateCostAzureUCConfigsRequest, options?: Configuration): Promise<AzureUCConfigPairsResponse>; /** * Update the status of an GCP Usage Cost config (active/archived). * @param param The request object */ updateCostGCPUsageCostConfig(param: CloudCostManagementApiUpdateCostGCPUsageCostConfigRequest, options?: Configuration): Promise<GCPUsageCostConfigResponse>; /** * Upload a Custom Costs file. * @param param The request object */ uploadCustomCostsFile(param: CloudCostManagementApiUploadCustomCostsFileRequest, options?: Configuration): Promise<CustomCostsFileUploadResponse>; /** * Create a new budget or update an existing one. * @param param The request object */ upsertBudget(param: CloudCostManagementApiUpsertBudgetRequest, options?: Configuration): Promise<BudgetWithEntries>; }