5.0.0 • Published 7 years ago

@datafire/amazonaws_ce v5.0.0

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

@datafire/amazonaws_ce

Client library for AWS Cost Explorer Service

Installation and Usage

npm install --save @datafire/amazonaws_ce
let amazonaws_ce = require('@datafire/amazonaws_ce').create({
  accessKeyId: "",
  secretAccessKey: "",
  region: ""
});

amazonaws_ce.GetCostAndUsage({}).then(data => {
  console.log(data);
});

Description

Actions

GetCostAndUsage

amazonaws_ce.GetCostAndUsage({}, context)

Input

Output

GetDimensionValues

amazonaws_ce.GetDimensionValues({
  "TimePeriod": {
    "Start": "",
    "End": ""
  },
  "Dimension": ""
}, context)

Input

Output

GetReservationUtilization

amazonaws_ce.GetReservationUtilization({
  "TimePeriod": {
    "Start": "",
    "End": ""
  }
}, context)

Input

Output

GetTags

amazonaws_ce.GetTags({
  "TimePeriod": {
    "Start": "",
    "End": ""
  }
}, context)

Input

Output

Definitions

AttributeType

  • AttributeType string

AttributeValue

  • AttributeValue string

Attributes

Context

  • Context string (values: COST_AND_USAGE, RESERVATIONS)

DateInterval

  • DateInterval object: The time period that you want the usage and costs for.

Dimension

  • Dimension string (values: AZ, INSTANCE_TYPE, LINKED_ACCOUNT, OPERATION, PURCHASE_TYPE, REGION, SERVICE, USAGE_TYPE, USAGE_TYPE_GROUP, RECORD_TYPE, OPERATING_SYSTEM, TENANCY, SCOPE, PLATFORM, SUBSCRIPTION_ID)

DimensionValues

  • DimensionValues object: The metadata that you can use to filter and group your results. You can use GetDimensionValues to find specific values.

DimensionValuesWithAttributes

  • DimensionValuesWithAttributes object: The metadata of a specific type that you can use to filter and group your results. You can use GetDimensionValues to find specific values.

DimensionValuesWithAttributesList

Entity

  • Entity string

ErrorMessage

  • ErrorMessage string

Estimated

  • Estimated boolean

Expression

  • Expression object: Use Expression to filter by cost or by usage. There are two patterns: Simple dimension values - You can set the dimension name and values for the filters that you plan to use. For example, you can filter for InstanceType==m4.xlarge OR InstanceType==c4.large. The Expression for that looks like this. { "Dimensions": { "Key": "InstanceType", "Values": "m4.xlarge", “c4.large” } } The list of dimension values are OR'd together to retrieve cost or usage data. You can create Expression and DimensionValues objects using either with methods or set methods in multiple lines. Compound dimension values with logical operations - You can use multiple Expression types and the logical operators AND/OR/NOT to create a list of one or more Expression objects. This allows you to filter on more advanced options. For example, you can filter on ((InstanceType == m4.large OR InstanceType == m3.large) OR (Tag.Type == Type1)) AND (UsageType != DataTransfer). The Expression for that looks like this. { "And": [ {"Or": [ {"Dimensions": { "Key": "InstanceType", "Values": "m4.x.large", "c4.large" }}, {"Tag": { "Key": "TagName", "Values": "Value1" } } ]}, {"Not": {"dimensions": { "Key": "UsageType", "Values": "DataTransfer" }}} ] } Because each Expression can have only one operator, the service returns an error if more than one is specified. The following example shows an Expression object that will create an error. { "And": ... , "DimensionValues": { "Dimension": "UsageType", "Values": "DataTransfer" } }

Expressions

GetCostAndUsageRequest

GetCostAndUsageResponse

GetDimensionValuesRequest

GetDimensionValuesResponse

GetReservationUtilizationRequest

GetReservationUtilizationResponse

GetTagsRequest

GetTagsResponse

Granularity

  • Granularity string (values: DAILY, MONTHLY)

Group

  • Group object: One level of grouped data within the results.

GroupDefinition

GroupDefinitionKey

  • GroupDefinitionKey string

GroupDefinitionType

  • GroupDefinitionType string (values: DIMENSION, TAG)

GroupDefinitions

Groups

Key

  • Key string

Keys

  • Keys array

LimitExceededException

  • LimitExceededException object: You made too many calls in a short period of time. Try again later.

MetricAmount

  • MetricAmount string

MetricName

  • MetricName string

MetricNames

MetricUnit

  • MetricUnit string

MetricValue

Metrics

NextPageToken

  • NextPageToken string

PageSize

  • PageSize integer

PurchasedHours

  • PurchasedHours string

ReservationAggregates

ReservationGroupKey

  • ReservationGroupKey string

ReservationGroupValue

  • ReservationGroupValue string

ReservationUtilizationGroup

ReservationUtilizationGroups

ResultByTime

ResultsByTime

SearchString

  • SearchString string

TagKey

  • TagKey string

TagList

TagValues

  • TagValues object: The values that are available for a tag.

TotalActualHours

  • TotalActualHours string

UnusedHours

  • UnusedHours string

UtilizationByTime

UtilizationPercentage

  • UtilizationPercentage string

UtilizationsByTime

Value

  • Value string

Values

YearMonthDay

  • YearMonthDay string