UNPKG

cloudworker-proxy

Version:
753 lines 111 kB
import {Request} from '../lib/request'; import {Response} from '../lib/response'; import {AWSError} from '../lib/error'; import {Service} from '../lib/service'; import {ServiceConfigurationOptions} from '../lib/service'; import {ConfigBase as Config} from '../lib/config-base'; interface Blob {} declare class CostExplorer extends Service { /** * Constructs a service object. This object has one method for each API operation. */ constructor(options?: CostExplorer.Types.ClientConfiguration) config: Config & CostExplorer.Types.ClientConfiguration; /** * Creates a new Cost Category with the requested name and rules. */ createCostCategoryDefinition(params: CostExplorer.Types.CreateCostCategoryDefinitionRequest, callback?: (err: AWSError, data: CostExplorer.Types.CreateCostCategoryDefinitionResponse) => void): Request<CostExplorer.Types.CreateCostCategoryDefinitionResponse, AWSError>; /** * Creates a new Cost Category with the requested name and rules. */ createCostCategoryDefinition(callback?: (err: AWSError, data: CostExplorer.Types.CreateCostCategoryDefinitionResponse) => void): Request<CostExplorer.Types.CreateCostCategoryDefinitionResponse, AWSError>; /** * Deletes a Cost Category. Expenses from this month going forward will no longer be categorized with this Cost Category. */ deleteCostCategoryDefinition(params: CostExplorer.Types.DeleteCostCategoryDefinitionRequest, callback?: (err: AWSError, data: CostExplorer.Types.DeleteCostCategoryDefinitionResponse) => void): Request<CostExplorer.Types.DeleteCostCategoryDefinitionResponse, AWSError>; /** * Deletes a Cost Category. Expenses from this month going forward will no longer be categorized with this Cost Category. */ deleteCostCategoryDefinition(callback?: (err: AWSError, data: CostExplorer.Types.DeleteCostCategoryDefinitionResponse) => void): Request<CostExplorer.Types.DeleteCostCategoryDefinitionResponse, AWSError>; /** * Returns the name, ARN, rules, definition, and effective dates of a Cost Category that's defined in the account. You have the option to use EffectiveOn to return a Cost Category that is active on a specific date. If there is no EffectiveOn specified, you’ll see a Cost Category that is effective on the current date. If Cost Category is still effective, EffectiveEnd is omitted in the response. */ describeCostCategoryDefinition(params: CostExplorer.Types.DescribeCostCategoryDefinitionRequest, callback?: (err: AWSError, data: CostExplorer.Types.DescribeCostCategoryDefinitionResponse) => void): Request<CostExplorer.Types.DescribeCostCategoryDefinitionResponse, AWSError>; /** * Returns the name, ARN, rules, definition, and effective dates of a Cost Category that's defined in the account. You have the option to use EffectiveOn to return a Cost Category that is active on a specific date. If there is no EffectiveOn specified, you’ll see a Cost Category that is effective on the current date. If Cost Category is still effective, EffectiveEnd is omitted in the response. */ describeCostCategoryDefinition(callback?: (err: AWSError, data: CostExplorer.Types.DescribeCostCategoryDefinitionResponse) => void): Request<CostExplorer.Types.DescribeCostCategoryDefinitionResponse, AWSError>; /** * Retrieves cost and usage metrics for your account. You can specify which cost and usage-related metric, such as BlendedCosts or UsageQuantity, that you want the request to return. You can also filter and group your data by various dimensions, such as SERVICE or AZ, in a specific time range. For a complete list of valid dimensions, see the GetDimensionValues operation. Master accounts in an organization in AWS Organizations have access to all member accounts. */ getCostAndUsage(params: CostExplorer.Types.GetCostAndUsageRequest, callback?: (err: AWSError, data: CostExplorer.Types.GetCostAndUsageResponse) => void): Request<CostExplorer.Types.GetCostAndUsageResponse, AWSError>; /** * Retrieves cost and usage metrics for your account. You can specify which cost and usage-related metric, such as BlendedCosts or UsageQuantity, that you want the request to return. You can also filter and group your data by various dimensions, such as SERVICE or AZ, in a specific time range. For a complete list of valid dimensions, see the GetDimensionValues operation. Master accounts in an organization in AWS Organizations have access to all member accounts. */ getCostAndUsage(callback?: (err: AWSError, data: CostExplorer.Types.GetCostAndUsageResponse) => void): Request<CostExplorer.Types.GetCostAndUsageResponse, AWSError>; /** * Retrieves cost and usage metrics with resources for your account. You can specify which cost and usage-related metric, such as BlendedCosts or UsageQuantity, that you want the request to return. You can also filter and group your data by various dimensions, such as SERVICE or AZ, in a specific time range. For a complete list of valid dimensions, see the GetDimensionValues operation. Master accounts in an organization in AWS Organizations have access to all member accounts. This API is currently available for the Amazon Elastic Compute Cloud – Compute service only. This is an opt-in only feature. You can enable this feature from the Cost Explorer Settings page. For information on how to access the Settings page, see Controlling Access for Cost Explorer in the AWS Billing and Cost Management User Guide. */ getCostAndUsageWithResources(params: CostExplorer.Types.GetCostAndUsageWithResourcesRequest, callback?: (err: AWSError, data: CostExplorer.Types.GetCostAndUsageWithResourcesResponse) => void): Request<CostExplorer.Types.GetCostAndUsageWithResourcesResponse, AWSError>; /** * Retrieves cost and usage metrics with resources for your account. You can specify which cost and usage-related metric, such as BlendedCosts or UsageQuantity, that you want the request to return. You can also filter and group your data by various dimensions, such as SERVICE or AZ, in a specific time range. For a complete list of valid dimensions, see the GetDimensionValues operation. Master accounts in an organization in AWS Organizations have access to all member accounts. This API is currently available for the Amazon Elastic Compute Cloud – Compute service only. This is an opt-in only feature. You can enable this feature from the Cost Explorer Settings page. For information on how to access the Settings page, see Controlling Access for Cost Explorer in the AWS Billing and Cost Management User Guide. */ getCostAndUsageWithResources(callback?: (err: AWSError, data: CostExplorer.Types.GetCostAndUsageWithResourcesResponse) => void): Request<CostExplorer.Types.GetCostAndUsageWithResourcesResponse, AWSError>; /** * Retrieves a forecast for how much Amazon Web Services predicts that you will spend over the forecast time period that you select, based on your past costs. */ getCostForecast(params: CostExplorer.Types.GetCostForecastRequest, callback?: (err: AWSError, data: CostExplorer.Types.GetCostForecastResponse) => void): Request<CostExplorer.Types.GetCostForecastResponse, AWSError>; /** * Retrieves a forecast for how much Amazon Web Services predicts that you will spend over the forecast time period that you select, based on your past costs. */ getCostForecast(callback?: (err: AWSError, data: CostExplorer.Types.GetCostForecastResponse) => void): Request<CostExplorer.Types.GetCostForecastResponse, AWSError>; /** * Retrieves all available filter values for a specified filter over a period of time. You can search the dimension values for an arbitrary string. */ getDimensionValues(params: CostExplorer.Types.GetDimensionValuesRequest, callback?: (err: AWSError, data: CostExplorer.Types.GetDimensionValuesResponse) => void): Request<CostExplorer.Types.GetDimensionValuesResponse, AWSError>; /** * Retrieves all available filter values for a specified filter over a period of time. You can search the dimension values for an arbitrary string. */ getDimensionValues(callback?: (err: AWSError, data: CostExplorer.Types.GetDimensionValuesResponse) => void): Request<CostExplorer.Types.GetDimensionValuesResponse, AWSError>; /** * Retrieves the reservation coverage for your account. This enables you to see how much of your Amazon Elastic Compute Cloud, Amazon ElastiCache, Amazon Relational Database Service, or Amazon Redshift usage is covered by a reservation. An organization's master account can see the coverage of the associated member accounts. This supports dimensions, Cost Categories, and nested expressions. For any time period, you can filter data about reservation usage by the following dimensions: AZ CACHE_ENGINE DATABASE_ENGINE DEPLOYMENT_OPTION INSTANCE_TYPE LINKED_ACCOUNT OPERATING_SYSTEM PLATFORM REGION SERVICE TAG TENANCY To determine valid values for a dimension, use the GetDimensionValues operation. */ getReservationCoverage(params: CostExplorer.Types.GetReservationCoverageRequest, callback?: (err: AWSError, data: CostExplorer.Types.GetReservationCoverageResponse) => void): Request<CostExplorer.Types.GetReservationCoverageResponse, AWSError>; /** * Retrieves the reservation coverage for your account. This enables you to see how much of your Amazon Elastic Compute Cloud, Amazon ElastiCache, Amazon Relational Database Service, or Amazon Redshift usage is covered by a reservation. An organization's master account can see the coverage of the associated member accounts. This supports dimensions, Cost Categories, and nested expressions. For any time period, you can filter data about reservation usage by the following dimensions: AZ CACHE_ENGINE DATABASE_ENGINE DEPLOYMENT_OPTION INSTANCE_TYPE LINKED_ACCOUNT OPERATING_SYSTEM PLATFORM REGION SERVICE TAG TENANCY To determine valid values for a dimension, use the GetDimensionValues operation. */ getReservationCoverage(callback?: (err: AWSError, data: CostExplorer.Types.GetReservationCoverageResponse) => void): Request<CostExplorer.Types.GetReservationCoverageResponse, AWSError>; /** * Gets recommendations for which reservations to purchase. These recommendations could help you reduce your costs. Reservations provide a discounted hourly rate (up to 75%) compared to On-Demand pricing. AWS generates your recommendations by identifying your On-Demand usage during a specific time period and collecting your usage into categories that are eligible for a reservation. After AWS has these categories, it simulates every combination of reservations in each category of usage to identify the best number of each type of RI to purchase to maximize your estimated savings. For example, AWS automatically aggregates your Amazon EC2 Linux, shared tenancy, and c4 family usage in the US West (Oregon) Region and recommends that you buy size-flexible regional reservations to apply to the c4 family usage. AWS recommends the smallest size instance in an instance family. This makes it easier to purchase a size-flexible RI. AWS also shows the equal number of normalized units so that you can purchase any instance size that you want. For this example, your RI recommendation would be for c4.large because that is the smallest size instance in the c4 instance family. */ getReservationPurchaseRecommendation(params: CostExplorer.Types.GetReservationPurchaseRecommendationRequest, callback?: (err: AWSError, data: CostExplorer.Types.GetReservationPurchaseRecommendationResponse) => void): Request<CostExplorer.Types.GetReservationPurchaseRecommendationResponse, AWSError>; /** * Gets recommendations for which reservations to purchase. These recommendations could help you reduce your costs. Reservations provide a discounted hourly rate (up to 75%) compared to On-Demand pricing. AWS generates your recommendations by identifying your On-Demand usage during a specific time period and collecting your usage into categories that are eligible for a reservation. After AWS has these categories, it simulates every combination of reservations in each category of usage to identify the best number of each type of RI to purchase to maximize your estimated savings. For example, AWS automatically aggregates your Amazon EC2 Linux, shared tenancy, and c4 family usage in the US West (Oregon) Region and recommends that you buy size-flexible regional reservations to apply to the c4 family usage. AWS recommends the smallest size instance in an instance family. This makes it easier to purchase a size-flexible RI. AWS also shows the equal number of normalized units so that you can purchase any instance size that you want. For this example, your RI recommendation would be for c4.large because that is the smallest size instance in the c4 instance family. */ getReservationPurchaseRecommendation(callback?: (err: AWSError, data: CostExplorer.Types.GetReservationPurchaseRecommendationResponse) => void): Request<CostExplorer.Types.GetReservationPurchaseRecommendationResponse, AWSError>; /** * Retrieves the reservation utilization for your account. Master accounts in an organization have access to member accounts. You can filter data by dimensions in a time period. You can use GetDimensionValues to determine the possible dimension values. Currently, you can group only by SUBSCRIPTION_ID. */ getReservationUtilization(params: CostExplorer.Types.GetReservationUtilizationRequest, callback?: (err: AWSError, data: CostExplorer.Types.GetReservationUtilizationResponse) => void): Request<CostExplorer.Types.GetReservationUtilizationResponse, AWSError>; /** * Retrieves the reservation utilization for your account. Master accounts in an organization have access to member accounts. You can filter data by dimensions in a time period. You can use GetDimensionValues to determine the possible dimension values. Currently, you can group only by SUBSCRIPTION_ID. */ getReservationUtilization(callback?: (err: AWSError, data: CostExplorer.Types.GetReservationUtilizationResponse) => void): Request<CostExplorer.Types.GetReservationUtilizationResponse, AWSError>; /** * Creates recommendations that help you save cost by identifying idle and underutilized Amazon EC2 instances. Recommendations are generated to either downsize or terminate instances, along with providing savings detail and metrics. For details on calculation and function, see Optimizing Your Cost with Rightsizing Recommendations in the AWS Billing and Cost Management User Guide. */ getRightsizingRecommendation(params: CostExplorer.Types.GetRightsizingRecommendationRequest, callback?: (err: AWSError, data: CostExplorer.Types.GetRightsizingRecommendationResponse) => void): Request<CostExplorer.Types.GetRightsizingRecommendationResponse, AWSError>; /** * Creates recommendations that help you save cost by identifying idle and underutilized Amazon EC2 instances. Recommendations are generated to either downsize or terminate instances, along with providing savings detail and metrics. For details on calculation and function, see Optimizing Your Cost with Rightsizing Recommendations in the AWS Billing and Cost Management User Guide. */ getRightsizingRecommendation(callback?: (err: AWSError, data: CostExplorer.Types.GetRightsizingRecommendationResponse) => void): Request<CostExplorer.Types.GetRightsizingRecommendationResponse, AWSError>; /** * Retrieves the Savings Plans covered for your account. This enables you to see how much of your cost is covered by a Savings Plan. An organization’s master account can see the coverage of the associated member accounts. This supports dimensions, Cost Categories, and nested expressions. For any time period, you can filter data for Savings Plans usage with the following dimensions: LINKED_ACCOUNT REGION SERVICE INSTANCE_FAMILY To determine valid values for a dimension, use the GetDimensionValues operation. */ getSavingsPlansCoverage(params: CostExplorer.Types.GetSavingsPlansCoverageRequest, callback?: (err: AWSError, data: CostExplorer.Types.GetSavingsPlansCoverageResponse) => void): Request<CostExplorer.Types.GetSavingsPlansCoverageResponse, AWSError>; /** * Retrieves the Savings Plans covered for your account. This enables you to see how much of your cost is covered by a Savings Plan. An organization’s master account can see the coverage of the associated member accounts. This supports dimensions, Cost Categories, and nested expressions. For any time period, you can filter data for Savings Plans usage with the following dimensions: LINKED_ACCOUNT REGION SERVICE INSTANCE_FAMILY To determine valid values for a dimension, use the GetDimensionValues operation. */ getSavingsPlansCoverage(callback?: (err: AWSError, data: CostExplorer.Types.GetSavingsPlansCoverageResponse) => void): Request<CostExplorer.Types.GetSavingsPlansCoverageResponse, AWSError>; /** * Retrieves your request parameters, Savings Plan Recommendations Summary and Details. */ getSavingsPlansPurchaseRecommendation(params: CostExplorer.Types.GetSavingsPlansPurchaseRecommendationRequest, callback?: (err: AWSError, data: CostExplorer.Types.GetSavingsPlansPurchaseRecommendationResponse) => void): Request<CostExplorer.Types.GetSavingsPlansPurchaseRecommendationResponse, AWSError>; /** * Retrieves your request parameters, Savings Plan Recommendations Summary and Details. */ getSavingsPlansPurchaseRecommendation(callback?: (err: AWSError, data: CostExplorer.Types.GetSavingsPlansPurchaseRecommendationResponse) => void): Request<CostExplorer.Types.GetSavingsPlansPurchaseRecommendationResponse, AWSError>; /** * Retrieves the Savings Plans utilization for your account across date ranges with daily or monthly granularity. Master accounts in an organization have access to member accounts. You can use GetDimensionValues in SAVINGS_PLANS to determine the possible dimension values. You cannot group by any dimension values for GetSavingsPlansUtilization. */ getSavingsPlansUtilization(params: CostExplorer.Types.GetSavingsPlansUtilizationRequest, callback?: (err: AWSError, data: CostExplorer.Types.GetSavingsPlansUtilizationResponse) => void): Request<CostExplorer.Types.GetSavingsPlansUtilizationResponse, AWSError>; /** * Retrieves the Savings Plans utilization for your account across date ranges with daily or monthly granularity. Master accounts in an organization have access to member accounts. You can use GetDimensionValues in SAVINGS_PLANS to determine the possible dimension values. You cannot group by any dimension values for GetSavingsPlansUtilization. */ getSavingsPlansUtilization(callback?: (err: AWSError, data: CostExplorer.Types.GetSavingsPlansUtilizationResponse) => void): Request<CostExplorer.Types.GetSavingsPlansUtilizationResponse, AWSError>; /** * Retrieves attribute data along with aggregate utilization and savings data for a given time period. This doesn't support granular or grouped data (daily/monthly) in response. You can't retrieve data by dates in a single response similar to GetSavingsPlanUtilization, but you have the option to make multiple calls to GetSavingsPlanUtilizationDetails by providing individual dates. You can use GetDimensionValues in SAVINGS_PLANS to determine the possible dimension values. GetSavingsPlanUtilizationDetails internally groups data by SavingsPlansArn. */ getSavingsPlansUtilizationDetails(params: CostExplorer.Types.GetSavingsPlansUtilizationDetailsRequest, callback?: (err: AWSError, data: CostExplorer.Types.GetSavingsPlansUtilizationDetailsResponse) => void): Request<CostExplorer.Types.GetSavingsPlansUtilizationDetailsResponse, AWSError>; /** * Retrieves attribute data along with aggregate utilization and savings data for a given time period. This doesn't support granular or grouped data (daily/monthly) in response. You can't retrieve data by dates in a single response similar to GetSavingsPlanUtilization, but you have the option to make multiple calls to GetSavingsPlanUtilizationDetails by providing individual dates. You can use GetDimensionValues in SAVINGS_PLANS to determine the possible dimension values. GetSavingsPlanUtilizationDetails internally groups data by SavingsPlansArn. */ getSavingsPlansUtilizationDetails(callback?: (err: AWSError, data: CostExplorer.Types.GetSavingsPlansUtilizationDetailsResponse) => void): Request<CostExplorer.Types.GetSavingsPlansUtilizationDetailsResponse, AWSError>; /** * Queries for available tag keys and tag values for a specified period. You can search the tag values for an arbitrary string. */ getTags(params: CostExplorer.Types.GetTagsRequest, callback?: (err: AWSError, data: CostExplorer.Types.GetTagsResponse) => void): Request<CostExplorer.Types.GetTagsResponse, AWSError>; /** * Queries for available tag keys and tag values for a specified period. You can search the tag values for an arbitrary string. */ getTags(callback?: (err: AWSError, data: CostExplorer.Types.GetTagsResponse) => void): Request<CostExplorer.Types.GetTagsResponse, AWSError>; /** * Retrieves a forecast for how much Amazon Web Services predicts that you will use over the forecast time period that you select, based on your past usage. */ getUsageForecast(params: CostExplorer.Types.GetUsageForecastRequest, callback?: (err: AWSError, data: CostExplorer.Types.GetUsageForecastResponse) => void): Request<CostExplorer.Types.GetUsageForecastResponse, AWSError>; /** * Retrieves a forecast for how much Amazon Web Services predicts that you will use over the forecast time period that you select, based on your past usage. */ getUsageForecast(callback?: (err: AWSError, data: CostExplorer.Types.GetUsageForecastResponse) => void): Request<CostExplorer.Types.GetUsageForecastResponse, AWSError>; /** * Returns the name, ARN, NumberOfRules and effective dates of all Cost Categories defined in the account. You have the option to use EffectiveOn to return a list of Cost Categories that were active on a specific date. If there is no EffectiveOn specified, you’ll see Cost Categories that are effective on the current date. If Cost Category is still effective, EffectiveEnd is omitted in the response. ListCostCategoryDefinitions supports pagination. The request can have a MaxResults range up to 100. */ listCostCategoryDefinitions(params: CostExplorer.Types.ListCostCategoryDefinitionsRequest, callback?: (err: AWSError, data: CostExplorer.Types.ListCostCategoryDefinitionsResponse) => void): Request<CostExplorer.Types.ListCostCategoryDefinitionsResponse, AWSError>; /** * Returns the name, ARN, NumberOfRules and effective dates of all Cost Categories defined in the account. You have the option to use EffectiveOn to return a list of Cost Categories that were active on a specific date. If there is no EffectiveOn specified, you’ll see Cost Categories that are effective on the current date. If Cost Category is still effective, EffectiveEnd is omitted in the response. ListCostCategoryDefinitions supports pagination. The request can have a MaxResults range up to 100. */ listCostCategoryDefinitions(callback?: (err: AWSError, data: CostExplorer.Types.ListCostCategoryDefinitionsResponse) => void): Request<CostExplorer.Types.ListCostCategoryDefinitionsResponse, AWSError>; /** * Updates an existing Cost Category. Changes made to the Cost Category rules will be used to categorize the current month’s expenses and future expenses. This won’t change categorization for the previous months. */ updateCostCategoryDefinition(params: CostExplorer.Types.UpdateCostCategoryDefinitionRequest, callback?: (err: AWSError, data: CostExplorer.Types.UpdateCostCategoryDefinitionResponse) => void): Request<CostExplorer.Types.UpdateCostCategoryDefinitionResponse, AWSError>; /** * Updates an existing Cost Category. Changes made to the Cost Category rules will be used to categorize the current month’s expenses and future expenses. This won’t change categorization for the previous months. */ updateCostCategoryDefinition(callback?: (err: AWSError, data: CostExplorer.Types.UpdateCostCategoryDefinitionResponse) => void): Request<CostExplorer.Types.UpdateCostCategoryDefinitionResponse, AWSError>; } declare namespace CostExplorer { export type AccountScope = "PAYER"|"LINKED"|string; export type AmortizedRecurringFee = string; export type AmortizedUpfrontFee = string; export type Arn = string; export type AttributeType = string; export type AttributeValue = string; export type Attributes = {[key: string]: AttributeValue}; export type Context = "COST_AND_USAGE"|"RESERVATIONS"|"SAVINGS_PLANS"|string; export interface CostCategory { /** * The unique identifier for your Cost Category. */ CostCategoryArn: Arn; /** * The Cost Category's effective start date. */ EffectiveStart: ZonedDateTime; /** * The Cost Category's effective end date. */ EffectiveEnd?: ZonedDateTime; Name: CostCategoryName; RuleVersion: CostCategoryRuleVersion; /** * Rules are processed in order. If there are multiple rules that match the line item, then the first rule to match is used to determine that Cost Category value. */ Rules: CostCategoryRulesList; } export type CostCategoryMaxResults = number; export type CostCategoryName = string; export interface CostCategoryReference { /** * The unique identifier for your Cost Category. */ CostCategoryArn?: Arn; Name?: CostCategoryName; /** * The Cost Category's effective start date. */ EffectiveStart?: ZonedDateTime; /** * The Cost Category's effective end date. */ EffectiveEnd?: ZonedDateTime; /** * The number of rules associated with a specific Cost Category. */ NumberOfRules?: NonNegativeInteger; } export type CostCategoryReferencesList = CostCategoryReference[]; export interface CostCategoryRule { Value: CostCategoryValue; /** * An Expression object used to categorize costs. This supports dimensions, Tags, and nested expressions. Currently the only dimensions supported are LINKED_ACCOUNT, SERVICE_CODE, RECORD_TYPE, and LINKED_ACCOUNT_NAME. Root level OR is not supported. We recommend that you create a separate rule instead. RECORD_TYPE is a dimension used for Cost Explorer APIs, and is also supported for Cost Category expressions. This dimension uses different terms, depending on whether you're using the console or API/JSON editor. For a detailed comparison, see Term Comparisons in the AWS Billing and Cost Management User Guide. */ Rule: Expression; } export type CostCategoryRuleVersion = "CostCategoryExpression.v1"|string; export type CostCategoryRulesList = CostCategoryRule[]; export type CostCategoryValue = string; export interface CostCategoryValues { Key?: CostCategoryName; /** * The specific value of the Cost Category. */ Values?: Values; } export interface Coverage { /** * The amount of instance usage that the reservation covered, in hours. */ CoverageHours?: CoverageHours; /** * The amount of instance usage that the reservation covered, in normalized units. */ CoverageNormalizedUnits?: CoverageNormalizedUnits; /** * The amount of cost that the reservation covered. */ CoverageCost?: CoverageCost; } export interface CoverageByTime { /** * The period that this coverage was used over. */ TimePeriod?: DateInterval; /** * The groups of instances that the reservation covered. */ Groups?: ReservationCoverageGroups; /** * The total reservation coverage, in hours. */ Total?: Coverage; } export interface CoverageCost { /** * How much an On-Demand Instance costs. */ OnDemandCost?: OnDemandCost; } export interface CoverageHours { /** * The number of instance running hours that On-Demand Instances covered. */ OnDemandHours?: OnDemandHours; /** * The number of instance running hours that reservations covered. */ ReservedHours?: ReservedHours; /** * The total instance usage, in hours. */ TotalRunningHours?: TotalRunningHours; /** * The percentage of instance hours that a reservation covered. */ CoverageHoursPercentage?: CoverageHoursPercentage; } export type CoverageHoursPercentage = string; export interface CoverageNormalizedUnits { /** * The number of normalized units that are covered by On-Demand Instances instead of a reservation. */ OnDemandNormalizedUnits?: OnDemandNormalizedUnits; /** * The number of normalized units that a reservation covers. */ ReservedNormalizedUnits?: ReservedNormalizedUnits; /** * The total number of normalized units that you used. */ TotalRunningNormalizedUnits?: TotalRunningNormalizedUnits; /** * The percentage of your used instance normalized units that a reservation covers. */ CoverageNormalizedUnitsPercentage?: CoverageNormalizedUnitsPercentage; } export type CoverageNormalizedUnitsPercentage = string; export type CoveragesByTime = CoverageByTime[]; export interface CreateCostCategoryDefinitionRequest { Name: CostCategoryName; RuleVersion: CostCategoryRuleVersion; /** * The Cost Category rules used to categorize costs. For more information, see CostCategoryRule. */ Rules: CostCategoryRulesList; } export interface CreateCostCategoryDefinitionResponse { /** * The unique identifier for your newly created Cost Category. */ CostCategoryArn?: Arn; /** * The Cost Category's effective start date. */ EffectiveStart?: ZonedDateTime; } export interface CurrentInstance { /** * Resource ID of the current instance. */ ResourceId?: GenericString; /** * The name you've given an instance. This field will show as blank if you haven't given the instance a name. */ InstanceName?: GenericString; /** * Cost allocation resource tags applied to the instance. */ Tags?: TagValuesList; /** * Details about the resource and utilization. */ ResourceDetails?: ResourceDetails; /** * Utilization information of the current instance during the lookback period. */ ResourceUtilization?: ResourceUtilization; /** * Number of hours during the lookback period covered by reservations. */ ReservationCoveredHoursInLookbackPeriod?: GenericString; /** * Number of hours during the lookback period covered by Savings Plans. */ SavingsPlansCoveredHoursInLookbackPeriod?: GenericString; /** * Number of hours during the lookback period billed at On Demand rates. */ OnDemandHoursInLookbackPeriod?: GenericString; /** * The total number of hours the instance ran during the lookback period. */ TotalRunningHoursInLookbackPeriod?: GenericString; /** * Current On Demand cost of operating this instance on a monthly basis. */ MonthlyCost?: GenericString; /** * The currency code that Amazon Web Services used to calculate the costs for this instance. */ CurrencyCode?: GenericString; } export interface DateInterval { /** * The beginning of the time period that you want the usage and costs for. The start date is inclusive. For example, if start is 2017-01-01, AWS retrieves cost and usage data starting at 2017-01-01 up to the end date. */ Start: YearMonthDay; /** * The end of the time period that you want the usage and costs for. The end date is exclusive. For example, if end is 2017-05-01, AWS retrieves cost and usage data from the start date up to, but not including, 2017-05-01. */ End: YearMonthDay; } export interface DeleteCostCategoryDefinitionRequest { /** * The unique identifier for your Cost Category. */ CostCategoryArn: Arn; } export interface DeleteCostCategoryDefinitionResponse { /** * The unique identifier for your Cost Category. */ CostCategoryArn?: Arn; /** * The effective end date of the Cost Category as a result of deleting it. No costs after this date will be categorized by the deleted Cost Category. */ EffectiveEnd?: ZonedDateTime; } export interface DescribeCostCategoryDefinitionRequest { /** * The unique identifier for your Cost Category. */ CostCategoryArn: Arn; /** * The date when the Cost Category was effective. */ EffectiveOn?: ZonedDateTime; } export interface DescribeCostCategoryDefinitionResponse { CostCategory?: CostCategory; } export type Dimension = "AZ"|"INSTANCE_TYPE"|"LINKED_ACCOUNT"|"LINKED_ACCOUNT_NAME"|"OPERATION"|"PURCHASE_TYPE"|"REGION"|"SERVICE"|"SERVICE_CODE"|"USAGE_TYPE"|"USAGE_TYPE_GROUP"|"RECORD_TYPE"|"OPERATING_SYSTEM"|"TENANCY"|"SCOPE"|"PLATFORM"|"SUBSCRIPTION_ID"|"LEGAL_ENTITY_NAME"|"DEPLOYMENT_OPTION"|"DATABASE_ENGINE"|"CACHE_ENGINE"|"INSTANCE_TYPE_FAMILY"|"BILLING_ENTITY"|"RESERVATION_ID"|"RESOURCE_ID"|"RIGHTSIZING_TYPE"|"SAVINGS_PLANS_TYPE"|"SAVINGS_PLAN_ARN"|"PAYMENT_OPTION"|string; export interface DimensionValues { /** * The names of the metadata types that you can use to filter and group your results. For example, AZ returns a list of Availability Zones. */ Key?: Dimension; /** * The metadata values that you can use to filter and group your results. You can use GetDimensionValues to find specific values. */ Values?: Values; /** * The match options that you can use to filter your results. MatchOptions is only applicable for actions related to Cost Category. The default values for MatchOptions is EQUALS and CASE_SENSITIVE. */ MatchOptions?: MatchOptions; } export interface DimensionValuesWithAttributes { /** * The value of a dimension with a specific attribute. */ Value?: Value; /** * The attribute that applies to a specific Dimension. */ Attributes?: Attributes; } export type DimensionValuesWithAttributesList = DimensionValuesWithAttributes[]; export interface EC2InstanceDetails { /** * The instance family of the recommended reservation. */ Family?: GenericString; /** * The type of instance that AWS recommends. */ InstanceType?: GenericString; /** * The AWS Region of the recommended reservation. */ Region?: GenericString; /** * The Availability Zone of the recommended reservation. */ AvailabilityZone?: GenericString; /** * The platform of the recommended reservation. The platform is the specific combination of operating system, license model, and software on an instance. */ Platform?: GenericString; /** * Whether the recommended reservation is dedicated or shared. */ Tenancy?: GenericString; /** * Whether the recommendation is for a current-generation instance. */ CurrentGeneration?: GenericBoolean; /** * Whether the recommended reservation is size flexible. */ SizeFlexEligible?: GenericBoolean; } export interface EC2ResourceDetails { /** * Hourly public On Demand rate for the instance type. */ HourlyOnDemandRate?: GenericString; /** * The type of Amazon Web Services instance. */ InstanceType?: GenericString; /** * The platform of the Amazon Web Services instance. The platform is the specific combination of operating system, license model, and software on an instance. */ Platform?: GenericString; /** * The Amazon Web Services Region of the instance. */ Region?: GenericString; /** * The SKU of the product. */ Sku?: GenericString; /** * Memory capacity of Amazon Web Services instance. */ Memory?: GenericString; /** * Network performance capacity of the Amazon Web Services instance. */ NetworkPerformance?: GenericString; /** * The disk storage of the Amazon Web Services instance (Not EBS storage). */ Storage?: GenericString; /** * Number of VCPU cores in the Amazon Web Services instance type. */ Vcpu?: GenericString; } export interface EC2ResourceUtilization { /** * Maximum observed or expected CPU utilization of the instance. */ MaxCpuUtilizationPercentage?: GenericString; /** * Maximum observed or expected memory utilization of the instance. */ MaxMemoryUtilizationPercentage?: GenericString; /** * Maximum observed or expected storage utilization of the instance (does not measure EBS storage). */ MaxStorageUtilizationPercentage?: GenericString; } export interface EC2Specification { /** * Whether you want a recommendation for standard or convertible reservations. */ OfferingClass?: OfferingClass; } export interface ESInstanceDetails { /** * The class of instance that AWS recommends. */ InstanceClass?: GenericString; /** * The size of instance that AWS recommends. */ InstanceSize?: GenericString; /** * The AWS Region of the recommended reservation. */ Region?: GenericString; /** * Whether the recommendation is for a current-generation instance. */ CurrentGeneration?: GenericBoolean; /** * Whether the recommended reservation is size flexible. */ SizeFlexEligible?: GenericBoolean; } export interface ElastiCacheInstanceDetails { /** * The instance family of the recommended reservation. */ Family?: GenericString; /** * The type of node that AWS recommends. */ NodeType?: GenericString; /** * The AWS Region of the recommended reservation. */ Region?: GenericString; /** * The description of the recommended reservation. */ ProductDescription?: GenericString; /** * Whether the recommendation is for a current generation instance. */ CurrentGeneration?: GenericBoolean; /** * Whether the recommended reservation is size flexible. */ SizeFlexEligible?: GenericBoolean; } export type Entity = string; export type Estimated = boolean; export interface Expression { /** * Return results that match either Dimension object. */ Or?: Expressions; /** * Return results that match both Dimension objects. */ And?: Expressions; /** * Return results that don't match a Dimension object. */ Not?: Expression; /** * The specific Dimension to use for Expression. */ Dimensions?: DimensionValues; /** * The specific Tag to use for Expression. */ Tags?: TagValues; /** * The filter based on CostCategory values. */ CostCategories?: CostCategoryValues; } export type Expressions = Expression[]; export interface ForecastResult { /** * The period of time that the forecast covers. */ TimePeriod?: DateInterval; /** * The mean value of the forecast. */ MeanValue?: GenericString; /** * The lower limit for the prediction interval. */ PredictionIntervalLowerBound?: GenericString; /** * The upper limit for the prediction interval. */ PredictionIntervalUpperBound?: GenericString; } export type ForecastResultsByTime = ForecastResult[]; export type GenericBoolean = boolean; export type GenericString = string; export interface GetCostAndUsageRequest { /** * Sets the start and end dates for retrieving AWS costs. The start date is inclusive, but the end date is exclusive. For example, if start is 2017-01-01 and end is 2017-05-01, then the cost and usage data is retrieved from 2017-01-01 up to and including 2017-04-30 but not including 2017-05-01. */ TimePeriod: DateInterval; /** * Sets the AWS cost granularity to MONTHLY or DAILY, or HOURLY. If Granularity isn't set, the response object doesn't include the Granularity, either MONTHLY or DAILY, or HOURLY. */ Granularity?: Granularity; /** * Filters AWS costs by different dimensions. For example, you can specify SERVICE and LINKED_ACCOUNT and get the costs that are associated with that account's usage of that service. You can nest Expression objects to define any combination of dimension filters. For more information, see Expression. */ Filter?: Expression; /** * Which metrics are returned in the query. For more information about blended and unblended rates, see Why does the "blended" annotation appear on some line items in my bill?. Valid values are AmortizedCost, BlendedCost, NetAmortizedCost, NetUnblendedCost, NormalizedUsageAmount, UnblendedCost, and UsageQuantity. If you return the UsageQuantity metric, the service aggregates all usage numbers without taking into account the units. For example, if you aggregate usageQuantity across all of Amazon EC2, the results aren't meaningful because Amazon EC2 compute hours and data transfer are measured in different units (for example, hours vs. GB). To get more meaningful UsageQuantity metrics, filter by UsageType or UsageTypeGroups. Metrics is required for GetCostAndUsage requests. */ Metrics?: MetricNames; /** * You can group AWS costs using up to two different groups, either dimensions, tag keys, or both. When you group by tag key, you get all tag values, including empty strings. Valid values are AZ, INSTANCE_TYPE, LEGAL_ENTITY_NAME, LINKED_ACCOUNT, OPERATION, PLATFORM, PURCHASE_TYPE, SERVICE, TAGS, TENANCY, RECORD_TYPE, and USAGE_TYPE. */ GroupBy?: GroupDefinitions; /** * The token to retrieve the next set of results. AWS provides the token when the response from a previous call has more results than the maximum page size. */ NextPageToken?: NextPageToken; } export interface GetCostAndUsageResponse { /** * The token for the next set of retrievable results. AWS provides the token when the response from a previous call has more results than the maximum page size. */ NextPageToken?: NextPageToken; /** * The groups that are specified by the Filter or GroupBy parameters in the request. */ GroupDefinitions?: GroupDefinitions; /** * The time period that is covered by the results in the response. */ ResultsByTime?: ResultsByTime; } export interface GetCostAndUsageWithResourcesRequest { /** * Sets the start and end dates for retrieving Amazon Web Services costs. The range must be within the last 14 days (the start date cannot be earlier than 14 days ago). The start date is inclusive, but the end date is exclusive. For example, if start is 2017-01-01 and end is 2017-05-01, then the cost and usage data is retrieved from 2017-01-01 up to and including 2017-04-30 but not including 2017-05-01. */ TimePeriod: DateInterval; /** * Sets the AWS cost granularity to MONTHLY, DAILY, or HOURLY. If Granularity isn't set, the response object doesn't include the Granularity, MONTHLY, DAILY, or HOURLY. */ Granularity?: Granularity; /** * Filters Amazon Web Services costs by different dimensions. For example, you can specify SERVICE and LINKED_ACCOUNT and get the costs that are associated with that account's usage of that service. You can nest Expression objects to define any combination of dimension filters. For more information, see Expression. The GetCostAndUsageWithResources operation requires that you either group by or filter by a ResourceId. */ Filter?: Expression; /** * Which metrics are returned in the query. For more information about blended and unblended rates, see Why does the "blended" annotation appear on some line items in my bill?. Valid values are AmortizedCost, BlendedCost, NetAmortizedCost, NetUnblendedCost, NormalizedUsageAmount, UnblendedCost, and UsageQuantity. If you return the UsageQuantity metric, the service aggregates all usage numbers without taking the units into account. For example, if you aggregate usageQuantity across all of Amazon EC2, the results aren't meaningful because Amazon EC2 compute hours and data transfer are measured in different units (for example, hours vs. GB). To get more meaningful UsageQuantity metrics, filter by UsageType or UsageTypeGroups. Metrics is required for GetCostAndUsageWithResources requests. */ Metrics?: MetricNames; /** * You can group Amazon Web Services costs using up to two different groups: either dimensions, tag keys, or both. */ GroupBy?: GroupDefinitions; /** * The token to retrieve the next set of results. AWS provides the token when the response from a previous call has more results than the maximum page size. */ NextPageToken?: NextPageToken; } export interface GetCostAndUsageWithResourcesResponse { /** * The token for the next set of retrievable results. AWS provides the token when the response from a previous call has more results than the maximum page size. */ NextPageToken?: NextPageToken; /** * The groups that are specified by the Filter or GroupBy parameters in the request. */ GroupDefinitions?: GroupDefinitions; /** * The time period that is covered by the results in the response. */ ResultsByTime?: ResultsByTime; } export interface GetCostForecastRequest { /** * The period of time that you want the forecast to cover. */ TimePeriod: DateInterval; /** * Which metric Cost Explorer uses to create your forecast. For more information about blended and unblended rates, see Why does the "blended" annotation appear on some line items in my bill?. Valid values for a GetCostForecast call are the following: AMORTIZED_COST BLENDED_COST NET_AMORTIZED_COST NET_UNBLENDED_COST UNBLENDED_COST */ Metric: Metric; /** * How granular you want the forecast to be. You can get 3 months of DAILY forecasts or 12 months of MONTHLY forecasts. The GetCostForecast operation supports only DAILY and MONTHLY granularities. */ Granularity: Granularity; /** * The filters that you want to use to filter your forecast. Cost Explorer API supports all of the Cost Explorer filters. */ Filter?: Expression; /** * Cost Explorer always returns the mean forecast as a single point. You can request a prediction interval around the mean by specifying a confidence level. The higher the confidence level, the more confident Cost Explorer is about the actual value falling in the prediction interval. Higher confidence levels result in wider prediction intervals. */ PredictionIntervalLevel?: PredictionIntervalLevel; } export interface GetCostForecastResponse { /** * How much you are forecasted to spend over the forecast period, in USD. */ Total?: MetricValue; /** * The forecasts for your query, in order. For DAILY forecasts, this is a list of days. For MONTHLY forecasts, this is a list of months. */ ForecastResultsByTime?: ForecastResultsByTime; } export interface GetDimensionValuesRequest { /** * The value that you want to search the filter values for. */ SearchString?: SearchString; /** * The start and end dates for retrieving the dimension values. The start date is inclusive, but the end date is exclusive. For example, if start is 2017-01-01 and end is 2017-05-01, then the cost and usage data is retrieved from 2017-01-01 up to and including 2017-04-30 but not including 2017-05-01. */ TimePeriod: DateInterval; /** * The name of the dimension. Each Dimension is available for a different Context. For more information, see Context. */ Dimension: Dimension; /** * The context for the call to GetDimensionValues. This can be RESERVATIONS or COST_AND_USAGE. The default value is COST_AND_USAGE. If the context is set to RESERVATIONS, the resulting dimension values can be used in the GetReservationUtilization operation. If the context is set to COST_AND_USAGE, the resulting dimension values can be used in the GetCostAndUsage operation. If you set the context to COST_AND_USAGE, you can use the following dimensions for searching: AZ - The Availability Zone. An example is us-east-1a. DATABASE_ENGINE - The Amazon Relational Database Service database. Examples are Aurora or MySQL. INSTANCE_TYPE - The type of Amazon EC2 instance. An example is m4.xlarge. LEGAL_ENTITY_NAME - The name of the organization that sells you AWS services, such as Amazon Web Services. LINKED_ACCOUNT - The description in the attribute map that includes the full name of the member account. The value field contains the AWS ID of the member account. OPERATING_SYSTEM - The operating system. Examples are Windows or Linux. OPERATION - The action performed. Examples include RunInstance and CreateBucket. PLATFORM - The Amazon EC2 operating system. Examples are Windows or Linux. PURCHASE_TYPE - The reservation type of the purchase to which this usage is related. Examples include On-Demand Instances and Standard Reserved Instances. SERVICE - The AWS service such as Amazon DynamoDB. USAGE_TYPE - The type of usage. An example is DataTransfer-In-Bytes. The response for the GetDimensionValues operation includes a unit attribute. Examples include GB and Hrs. USAGE_TYPE_GROUP - The grouping of common usage types. An example is Amazon EC2: CloudWatch – Alarms. The response for this operation includes a unit attribute. RECORD_TYPE - The different types of charges such as RI fees, usage costs, tax refunds, an