codegen-resources.service-2.json Maven / Gradle / Ivy
Show all versions of cost-explorer Show documentation
{
"version":"2.0",
"metadata":{
"apiVersion":"2017-10-25",
"endpointPrefix":"ce",
"jsonVersion":"1.1",
"protocol":"json",
"serviceAbbreviation":"AWS Cost Explorer",
"serviceFullName":"AWS Cost Explorer Service",
"serviceId":"Cost Explorer",
"signatureVersion":"v4",
"signingName":"ce",
"targetPrefix":"AWSInsightsIndexService",
"uid":"ce-2017-10-25"
},
"operations":{
"GetCostAndUsage":{
"name":"GetCostAndUsage",
"http":{
"method":"POST",
"requestUri":"/"
},
"input":{"shape":"GetCostAndUsageRequest"},
"output":{"shape":"GetCostAndUsageResponse"},
"errors":[
{"shape":"LimitExceededException"}
],
"documentation":"Retrieve 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 AWS Service
or AvailabilityZone
, in a specific time range. See the GetDimensionValues
action for a complete list of the valid dimensions. Master accounts in an organization have access to all member accounts.
"
},
"GetDimensionValues":{
"name":"GetDimensionValues",
"http":{
"method":"POST",
"requestUri":"/"
},
"input":{"shape":"GetDimensionValuesRequest"},
"output":{"shape":"GetDimensionValuesResponse"},
"errors":[
{"shape":"LimitExceededException"}
],
"documentation":"You can use GetDimensionValues
to retrieve all available filter values for a specific filter over a period of time. You can search the dimension values for an arbitrary string.
"
},
"GetReservationUtilization":{
"name":"GetReservationUtilization",
"http":{
"method":"POST",
"requestUri":"/"
},
"input":{"shape":"GetReservationUtilizationRequest"},
"output":{"shape":"GetReservationUtilizationResponse"},
"errors":[
{"shape":"LimitExceededException"}
],
"documentation":"You can retrieve the Reservation utilization for your account. Master accounts in an organization have access to their associated 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
.
"
},
"GetTags":{
"name":"GetTags",
"http":{
"method":"POST",
"requestUri":"/"
},
"input":{"shape":"GetTagsRequest"},
"output":{"shape":"GetTagsResponse"},
"errors":[
{"shape":"LimitExceededException"}
],
"documentation":"You can query for available tag keys and tag values for a specified period. You can search the tag values for an arbitrary string.
"
}
},
"shapes":{
"AttributeType":{"type":"string"},
"AttributeValue":{"type":"string"},
"Attributes":{
"type":"map",
"key":{"shape":"AttributeType"},
"value":{"shape":"AttributeValue"}
},
"Context":{
"type":"string",
"enum":[
"COST_AND_USAGE",
"RESERVATIONS"
]
},
"DateInterval":{
"type":"structure",
"required":[
"Start",
"End"
],
"members":{
"Start":{
"shape":"YearMonthDay",
"documentation":"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
, then the cost and usage data is retrieved starting at 2017-01-01
up to the end date.
"
},
"End":{
"shape":"YearMonthDay",
"documentation":"The end of the time period that you want the usage and costs for. The end date is exclusive. For example, if the end
is 2017-05-01
, then the cost and usage data is retrieved from the start date but not including 2017-05-01
.
"
}
},
"documentation":"The time period that you want the usage and costs for.
"
},
"Dimension":{
"type":"string",
"enum":[
"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":{
"type":"structure",
"members":{
"Key":{
"shape":"Dimension",
"documentation":"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.
"
},
"Values":{
"shape":"Values",
"documentation":"The metadata values that you can use to filter and group your results. You can use GetDimensionValues
to find specific values.
"
}
},
"documentation":"The metadata that you can use to filter and group your results. You can use GetDimensionValues
to find specific values.
"
},
"DimensionValuesWithAttributes":{
"type":"structure",
"members":{
"Value":{
"shape":"Value",
"documentation":"The value of a dimension with a specific attribute.
"
},
"Attributes":{
"shape":"Attributes",
"documentation":"The attribute that applies to a specific Dimension
.
"
}
},
"documentation":"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":{
"type":"list",
"member":{"shape":"DimensionValuesWithAttributes"}
},
"Entity":{"type":"string"},
"ErrorMessage":{"type":"string"},
"Estimated":{"type":"boolean"},
"Expression":{
"type":"structure",
"members":{
"Or":{
"shape":"Expressions",
"documentation":"Return results that match either Dimension
.
"
},
"And":{
"shape":"Expressions",
"documentation":"Return results that match both Dimension
objects.
"
},
"Not":{
"shape":"Expression",
"documentation":"Return results that don't match Dimension
.
"
},
"Dimensions":{
"shape":"DimensionValues",
"documentation":"The specific Dimension
to use for Expression
.
"
},
"Tags":{
"shape":"TagValues",
"documentation":"The specific Tag
to use for Expression
.
"
}
},
"documentation":"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":{
"type":"list",
"member":{"shape":"Expression"}
},
"GetCostAndUsageRequest":{
"type":"structure",
"members":{
"TimePeriod":{
"shape":"DateInterval",
"documentation":"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
.
"
},
"Granularity":{
"shape":"Granularity",
"documentation":"Sets the AWS cost granularity to MONTHLY
or DAILY
.
"
},
"Filter":{
"shape":"Expression",
"documentation":"Filters AWS costs by different dimensions. For example, you can specify Service
and Linked Account
and get the costs 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 the Expression
object or More Examples
.
"
},
"Metrics":{
"shape":"MetricNames",
"documentation":"Which metrics are returned in the query. For more information about blended and unblended rates, see https://aws.amazon.com/premiumsupport/knowledge-center/blended-rates-intro/.
Valid values are BlendedCost
, 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 EC2, the results aren't meaningful because 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
.
"
},
"GroupBy":{
"shape":"GroupDefinitions",
"documentation":"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
, LINKED_ACCCOUNT
, OPERATION
, PURCHASE_TYPE
, SERVICE
, USAGE_TYPE
, TAGS
, and PLATFORM
.
"
},
"NextPageToken":{
"shape":"NextPageToken",
"documentation":"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.
"
}
}
},
"GetCostAndUsageResponse":{
"type":"structure",
"members":{
"NextPageToken":{
"shape":"NextPageToken",
"documentation":"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.
"
},
"GroupDefinitions":{
"shape":"GroupDefinitions",
"documentation":"The groups specified by the the Filter
or GroupBy
parameters in the request.
"
},
"ResultsByTime":{
"shape":"ResultsByTime",
"documentation":"The time period covered by the results in the response.
"
}
}
},
"GetDimensionValuesRequest":{
"type":"structure",
"required":[
"TimePeriod",
"Dimension"
],
"members":{
"SearchString":{
"shape":"SearchString",
"documentation":"The value that you want to search the filter values for.
"
},
"TimePeriod":{
"shape":"DateInterval",
"documentation":"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
.
"
},
"Dimension":{
"shape":"Dimension",
"documentation":"The name of the dimension. Different Dimensions
are available for different Context
s. For more information, see Context
.
"
},
"Context":{
"shape":"Context",
"documentation":"The context for the call to GetDimensionValues
. This can be RESERVED_INSTANCE
or COST_AND_USAGE
. The default value is COST_AND_USAGE
. If the context is set to RESERVED_INSTANCE
, the resulting dimension values can be used in the GetReservationUtilization
action. 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 CostAndUsage
, you can use the following dimensions for searching:
-
AZ - The Availability Zone. An example is us-east-1a.
-
InstanceType - The type of EC2 instance. An example is m4.xlarge.
-
LinkedAccount - 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
-
Operation - The action performed. Examples include RunInstance and CreateBucket.
-
PurchaseType - 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 DynamoDB.
-
UsageType -The type of usage. An example is DataTransfer-In-Bytes. The response for the GetDimensionValues action includes a unit attribute, examples of which include GB and Hrs.
-
UsageTypeGroup - The grouping of common usage types. An example is EC2: CloudWatch – Alarms. The response for this action includes a unit attribute.
-
RecordType - The different types of charges such as RI fees, usage costs, tax refunds, and credits
If you set the context to ReservedInstance
, you can use the following dimensions for searching:
-
AZ - The Availability Zone. An example is us-east-1a.
-
InstanceType - The type of EC2 instance. An example is m4.xlarge.
-
LinkedAccount - 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
-
Platform - The operating system. Examples are Windows or Linux.
-
Region - The AWS region.
-
Scope - The scope of a reserved instance (RI). Values are regional or a single availability zone.
-
Tenancy - The tenancy of a resource. Examples are shared or dedicated.
"
},
"NextPageToken":{
"shape":"NextPageToken",
"documentation":"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.
"
}
}
},
"GetDimensionValuesResponse":{
"type":"structure",
"required":[
"DimensionValues",
"ReturnSize",
"TotalSize"
],
"members":{
"DimensionValues":{
"shape":"DimensionValuesWithAttributesList",
"documentation":"The filters that you used to filter your request. Some dimensions are available only for a specific context:
If you set the context to CostAndUsage
, you can use the following dimensions for searching:
-
AZ - The Availability Zone. An example is us-east-1a.
-
InstanceType - The type of EC2 instance. An example is m4.xlarge.
-
LinkedAccount - 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
-
Operation - The action performed. Examples include RunInstance and CreateBucket.
-
PurchaseType - 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 DynamoDB.
-
UsageType -The type of usage. An example is DataTransfer-In-Bytes. The response for the GetDimensionValues action includes a unit attribute, examples of which include GB and Hrs.
-
UsageTypeGroup - The grouping of common usage types. An example is EC2: CloudWatch – Alarms. The response for this action includes a unit attribute.
-
RecordType - The different types of charges such as RI fees, usage costs, tax refunds, and credits
If you set the context to ReservedInstance
, you can use the following dimensions for searching:
-
AZ - The Availability Zone. An example is us-east-1a.
-
InstanceType - The type of EC2 instance. An example is m4.xlarge.
-
LinkedAccount - 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
-
Platform - The operating system. Examples are Windows or Linux.
-
Region - The AWS region.
-
Scope - The scope of a reserved instance (RI). Values are regional or a single availability zone.
-
Tenancy - The tenancy of a resource. Examples are shared or dedicated.
"
},
"ReturnSize":{
"shape":"PageSize",
"documentation":"The number of results that AWS returned at one time.
"
},
"TotalSize":{
"shape":"PageSize",
"documentation":"The total number of search results.
"
},
"NextPageToken":{
"shape":"NextPageToken",
"documentation":"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.
"
}
}
},
"GetReservationUtilizationRequest":{
"type":"structure",
"required":["TimePeriod"],
"members":{
"TimePeriod":{
"shape":"DateInterval",
"documentation":"Sets the start and end dates for retrieving reserve instance (RI) utilization. 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
.
"
},
"GroupBy":{
"shape":"GroupDefinitions",
"documentation":"Groups only by SubscriptionId
. Metadata is included.
"
},
"Granularity":{
"shape":"Granularity",
"documentation":"Sets the AWS cost granularity to MONTHLY
or DAILY
. If both GroupBy
and granularity
are not set, GetReservationUtilization
defaults to DAILY
. If GroupBy
is set, Granularity
can't be set, and the response object doesn't include MONTHLY
or DAILY
granularity.
"
},
"Filter":{
"shape":"Expression",
"documentation":"Filters utilization data by using different dimensions. GetReservationUtilization
uses the same Expression
object as the other operations, but only AND
is supported among each dimension, and nesting is supported up to only one level deep. If there are multiple values for a dimension, they are OR'd together.
"
},
"NextPageToken":{
"shape":"NextPageToken",
"documentation":"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.
"
}
}
},
"GetReservationUtilizationResponse":{
"type":"structure",
"required":["UtilizationsByTime"],
"members":{
"UtilizationsByTime":{
"shape":"UtilizationsByTime",
"documentation":"The amount of time that you utilized your RIs.
"
},
"Total":{
"shape":"ReservationAggregates",
"documentation":"The total amount of time that you utilized your RIs.
"
},
"NextPageToken":{
"shape":"NextPageToken",
"documentation":"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.
"
}
}
},
"GetTagsRequest":{
"type":"structure",
"required":["TimePeriod"],
"members":{
"SearchString":{
"shape":"SearchString",
"documentation":"The value that you want to search for.
"
},
"TimePeriod":{
"shape":"DateInterval",
"documentation":"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
.
"
},
"TagKey":{
"shape":"TagKey",
"documentation":"The key of the tag that you want to return values for.
"
},
"NextPageToken":{
"shape":"NextPageToken",
"documentation":"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.
"
}
}
},
"GetTagsResponse":{
"type":"structure",
"required":[
"Tags",
"ReturnSize",
"TotalSize"
],
"members":{
"NextPageToken":{
"shape":"NextPageToken",
"documentation":"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.
"
},
"Tags":{
"shape":"TagList",
"documentation":"The tags that match your request.
"
},
"ReturnSize":{
"shape":"PageSize",
"documentation":"The number of query results that AWS returns at a time.
"
},
"TotalSize":{
"shape":"PageSize",
"documentation":"The total number of query results.
"
}
}
},
"Granularity":{
"type":"string",
"enum":[
"DAILY",
"MONTHLY"
]
},
"Group":{
"type":"structure",
"members":{
"Keys":{
"shape":"Keys",
"documentation":"The keys included in this group.
"
},
"Metrics":{
"shape":"Metrics",
"documentation":"The metrics included in this group.
"
}
},
"documentation":"One level of grouped data within the results.
"
},
"GroupDefinition":{
"type":"structure",
"members":{
"Type":{
"shape":"GroupDefinitionType",
"documentation":"The string that represents the type of group.
"
},
"Key":{
"shape":"GroupDefinitionKey",
"documentation":"The string that represents a key for a specified group.
"
}
},
"documentation":"Represents a group when you specify a group by criteria, or in the response to a query with a specific grouping.
"
},
"GroupDefinitionKey":{"type":"string"},
"GroupDefinitionType":{
"type":"string",
"enum":[
"DIMENSION",
"TAG"
]
},
"GroupDefinitions":{
"type":"list",
"member":{"shape":"GroupDefinition"}
},
"Groups":{
"type":"list",
"member":{"shape":"Group"}
},
"Key":{"type":"string"},
"Keys":{
"type":"list",
"member":{"shape":"Key"}
},
"LimitExceededException":{
"type":"structure",
"members":{
"Message":{"shape":"ErrorMessage"}
},
"documentation":"You made too many calls in a short period of time. Try again later.
",
"exception":true
},
"MetricAmount":{"type":"string"},
"MetricName":{"type":"string"},
"MetricNames":{
"type":"list",
"member":{"shape":"MetricName"}
},
"MetricUnit":{"type":"string"},
"MetricValue":{
"type":"structure",
"members":{
"Amount":{
"shape":"MetricAmount",
"documentation":"The actual number that represents the metric.
"
},
"Unit":{
"shape":"MetricUnit",
"documentation":"The unit that the metric is given in.
"
}
},
"documentation":"The aggregated value for a metric.
"
},
"Metrics":{
"type":"map",
"key":{"shape":"MetricName"},
"value":{"shape":"MetricValue"}
},
"NextPageToken":{"type":"string"},
"PageSize":{"type":"integer"},
"PurchasedHours":{"type":"string"},
"ReservationAggregates":{
"type":"structure",
"members":{
"UtilizationPercentage":{
"shape":"UtilizationPercentage",
"documentation":"The percentage of RI time that you used.
"
},
"PurchasedHours":{
"shape":"PurchasedHours",
"documentation":"How many RI hours you purchased.
"
},
"TotalActualHours":{
"shape":"TotalActualHours",
"documentation":"The total number of RI hours that you used.
"
},
"UnusedHours":{
"shape":"UnusedHours",
"documentation":"The number of RI hours that you didn't use.
"
}
},
"documentation":"The aggregated numbers for your RI usage.
"
},
"ReservationGroupKey":{"type":"string"},
"ReservationGroupValue":{"type":"string"},
"ReservationUtilizationGroup":{
"type":"structure",
"members":{
"Key":{
"shape":"ReservationGroupKey",
"documentation":"The key for a specific RI attribute.
"
},
"Value":{
"shape":"ReservationGroupValue",
"documentation":"The value of a specific RI attribute.
"
},
"Attributes":{
"shape":"Attributes",
"documentation":"The attributes for this group of RIs.
"
},
"Utilization":{
"shape":"ReservationAggregates",
"documentation":"How much you used this group of RIs.
"
}
},
"documentation":"A group of RIs that share a set of attributes.
"
},
"ReservationUtilizationGroups":{
"type":"list",
"member":{"shape":"ReservationUtilizationGroup"}
},
"ResultByTime":{
"type":"structure",
"members":{
"TimePeriod":{
"shape":"DateInterval",
"documentation":"The time period covered by a result.
"
},
"Total":{
"shape":"Metrics",
"documentation":"The total amount of cost or usage accrued during the time period.
"
},
"Groups":{
"shape":"Groups",
"documentation":"The groups that are included in this time period.
"
},
"Estimated":{
"shape":"Estimated",
"documentation":"Whether or not this result is estimated.
"
}
},
"documentation":"The result that is associated with a time period.
"
},
"ResultsByTime":{
"type":"list",
"member":{"shape":"ResultByTime"}
},
"SearchString":{"type":"string"},
"TagKey":{"type":"string"},
"TagList":{
"type":"list",
"member":{"shape":"Entity"}
},
"TagValues":{
"type":"structure",
"members":{
"Key":{
"shape":"TagKey",
"documentation":"The key for a tag.
"
},
"Values":{
"shape":"Values",
"documentation":"The specific value of a tag.
"
}
},
"documentation":"The values that are available for a tag.
"
},
"TotalActualHours":{"type":"string"},
"UnusedHours":{"type":"string"},
"UtilizationByTime":{
"type":"structure",
"members":{
"TimePeriod":{
"shape":"DateInterval",
"documentation":"The period of time over which this utilization was used.
"
},
"Groups":{
"shape":"ReservationUtilizationGroups",
"documentation":"The groups that are included in this utilization result.
"
},
"Total":{
"shape":"ReservationAggregates",
"documentation":"The total number of RI hours that were used.
"
}
},
"documentation":"The amount of utilization, in hours.
"
},
"UtilizationPercentage":{"type":"string"},
"UtilizationsByTime":{
"type":"list",
"member":{"shape":"UtilizationByTime"}
},
"Value":{"type":"string"},
"Values":{
"type":"list",
"member":{"shape":"Value"}
},
"YearMonthDay":{
"type":"string",
"pattern":"\\d{4}-\\d{2}-\\d{2}"
}
},
"documentation":"The Cost Explorer API allows you to programmatically query your cost and usage data. You can query for aggregated data such as total monthly costs or total daily usage. You can also query for granular data, such as the number of daily write operations for DynamoDB database tables in your production environment.
Service Endpoint
The Cost Explorer API provides the following endpoint:
-
https://ce.us-east-1.amazonaws.com
"
}