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
Query Parameters
  • 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.
  • 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.
  • if Y, then usage cost is grouped per datacenter. This is optional.
  • Specifies the end time of the interval for which usage cost is being retrieved.This is mandatory.
  • Resource name filter. Example PIC_COMPUTE_VM_STANDARD, PIC_BLOCK_STORAGE_STANDARD etc. This is optional.
  • 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.
  • Service Entitlement Id filter. This is optional.
  • Service name filter. Examples DATATRANSFERBM, EXADATABM. This is optional.
  • Specifies the start of the interval for which usage cost is being retrieved. This is mandatory.
  • 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 in which start and end times are specified. Examples UTC, US/Pacific,America/Los_Angeles.
  • 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.
Back to Top

Response

Supported Media Types

200 Response

Success
Body ()
Root Schema : AccountUsageCostRecord
Type: object
Title: AccountUsageCostRecord
Show Source
Nested Schema : items
Type: array
Show Source
Nested Schema : items
Type: array
Show Source
Nested Schema : UsageCostRecord
Type: object
Title: UsageCostRecord
Show Source
Nested Schema : costs
Type: array
Show Source
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 : items
Type: array
Show Source
Nested Schema : UsageCost
Type: object
Title: UsageCost
Show Source

Default Response

Unexpected error.
Back to Top

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.

Back to Top