Report Resource Controller resource usage

POST /v4/metering/resources/{resource_id}/usage

The Resource Controller is responsible for controlling and tracking the lifecycle of resources in an IBM Cloud account. Resources can mean anything from an instance of a service, or entities associated with an account. Report usage for these resource instances that were provisioned through the resource controller.

Authorization

To call this method, you must be assigned one or more IAM access roles that include the following action.

  • billing.resource-usage.write

Request

Request Body

resource_usage

Response

202 - Indicates that the submitted payload was successfully stored. The status of individual usage records is available as a part of the resources array, and it has one-to-one correspondence with the usage records in the payload. A status value of `201` indicates that they will be rated, and any other value indicates a failure.

resources

array

Response body that contains the status of each submitted usage record.

400 - Schema validation failed for the payload.

errors

array

An array of errors.

401 - The requesting service is unauthenticated.

errors

array

An array of errors.

403 - The requesting service is not authorized to submit usage for the resource.

errors

array

An array of errors.

404 - The resource definition was not found.

errors

array

An array of errors.

413 - The payload is too large.

errors

array

An array of errors.