View Tagged Resource Usage Cost for An Account
get
/metering/api/v1/usagecost/{accountId}/tagged
Retrieve usage cost of all resources tagged with the supplied tags.
Request
Path Parameters
-
accountId: string
Account name, starts with cacct.
Query Parameters
-
computeTypeEnabled: string
If Y, then usage cost is grouped by computeType, which is used to indicate the nature of cost incurred say Usage, Overage, Promotion, PAYG etc. This is optional.
-
dataCenter: string
A filter for which Datacenter for which cost needs to be retrieved. This is used with OCI Classic services and not needed when grabbing data from OCI services. This is an optional parameter.
-
dcAggEnabled: string
if Y, then usage cost is grouped per datacenter. This is optional.
-
endTime: string
Specifies the end time of the interval for which usage cost is being retrieved.This is mandatory.
-
resourceName: string
Resource name filter. Example PIC_COMPUTE_VM_STANDARD, PIC_BLOCK_STORAGE_STANDARD etc. This is optional.
-
rollupLevel: string
If rollupLevel is set to RESOURCE, usage cost per resource and tag combination will be provided. In that case, each repeated tags param should be a single tag. This is optional.
-
serviceEntitlementId: string
Service Entitlement Id filter. This is optional.
-
serviceName: string
Service name filter. Examples DATATRANSFERBM, EXADATABM. This is optional.
-
startTime: string
Specifies the start of the interval for which usage cost is being retrieved. This is mandatory.
-
tags: array
Collection Format:
multi
A tags parameter can use a pipe (|) separated to filter for multiple tags applied simultaneously with a logical AND. Repeated tags parameters are interpreted as or-clauses. You need to URL encode the tags which means . (dot) is replaced by %3A and = (equals) is replaced by %3D. E.g. Finance%3ACostCenter%3Dw1234 instead of Finance.CostCenter=w1234. -
timeZone: string
Timezone in which start and end times are specified. Examples UTC, US/Pacific,America/Los_Angeles.
-
usageType: string
UsageType can be TOTAL, HOURLY or DAILY. Defaults to TOTAL. For HOURLY usageType, we allow maximum interval of 7 days; for DAILY it is 30 days. The results are grouped by time interval according to usageType chosen.
Response
Supported Media Types
- application/vnd.com.oracle.oraclecloud.metering.usage+json
200 Response
Success
Nested Schema : items
Type:
Show Source
array
-
Array of:
object UsageCostRecord
Title:
UsageCostRecord
Nested Schema : UsageCostRecord
Type:
object
Title:
Show Source
UsageCostRecord
-
costs(optional):
array costs
-
currency(optional):
string
Currency.
-
dataCenterId(optional):
object dataCenterId
Datacenter Id
-
endTimeUtc(optional):
object endTimeUtc
End time of the interval for which cost is returned.
-
gsiProductId(optional):
string
GSI product id for the Sku.
-
lastComputationDate(optional):
object lastComputationDate
Time at which cost was synced from billing system.
-
quantity(optional):
number
Quantity.
-
resourceName(optional):
string
Resource Name.
-
serviceName(optional):
string
Service Name.
-
startTimeUtc(optional):
object startTimeUtc
Start time of the interval for which cost is returned.
-
subscriptionId(optional):
string
Purchase Entitlement Id.
-
subscriptionType(optional):
string
Trial or production.
-
tag(optional):
string
Tag applied on this usage.
Nested Schema : dataCenterId
Type:
object
Datacenter Id
Nested Schema : endTimeUtc
Type:
object
End time of the interval for which cost is returned.
Nested Schema : lastComputationDate
Type:
object
Time at which cost was synced from billing system.
Nested Schema : startTimeUtc
Type:
object
Start time of the interval for which cost is returned.
Nested Schema : UsageCost
Type:
object
Title:
Show Source
UsageCost
-
computedAmount(optional):
number
Cost computed for usage.
-
computedQuantity(optional):
number
Quantity used for computing cost.
-
overagesFlag(optional):
string
If Y, then the cost is an overage.
-
rateCardId(optional):
string
GSI rate card identifier.
-
unitPrice(optional):
number
Price per unit of resource.
Default Response
Unexpected error.
Examples
These APIs are deprecated. See Cost Analysis Overview, Using the API for more information on how to track and optimize your Oracle Cloud Infrastructure spending. See Deprecated Notices (Endpoints) to see if there is a replacement endpoint.