Skip to main content
Operations Management/Billing Management Operations

CalculateAccountSpending

CalculateAccountSpending

PUT/zstack/v1/billings/accounts/{accountUuid}/actions

Operation ID

CalculateAccountSpending

Since

0.6

Execution Mode

Synchronous

Auth Context

Auth Required

Auth Context

Send these values as request headers when calling this API.

AuthorizationstringRequired

Bearer Token

X-Tenant-IDstring

X-Tenant-ID

Request Inputs

application/json

Path Parameters

  • accountUuid
    StringRequired

    Path parameter.

Body Fields

  • accountUuid
    StringRequired

    The account UUID.

  • dateStart
    Long

    Optional. The start date.

  • dateEnd
    Long

    Optional. The end date.

  • systemTags
    List

    Optional. The system tags.

  • userTags
    List

    Optional. The user tags.

Responses

200 OK
200 OK

On success, this API returns the following response structure.

  • total
    doubleRequired

    The total amount.

  • success
    booleanRequired

    Whether the API succeeds.

  • error
    ErrorCodeRequired

    The error code. If not null, the operation fails, or vice versa. For more information, see error.

    • code
      StringRequired

      The error code, which is a numbered or alphanumeric code that specifies an error. For example, SYS.1000, HOST.1001.

    • description
      StringRequired

      The brief description of the error.

    • details
      StringRequired

      The details about the error.

      • resourceUuid
        StringRequired

        The resource UUID.

      • resourceName
        StringRequired

        The resource name.

      • spending
        doubleRequired

        The spending.

        • spendingType
          StringRequired

          The spending type.

        • spending
          doubleRequired

          The total spending.

        • dateStart
          LongRequired

          The billing start date.

        • dateEnd
          LongRequired

          The billing end date.

        • details
          ListRequired

          See details.

      • type
        StringRequired

        The type.

    • elaboration
      StringRequired

      The reserved field. Default value: null.

    • opaque
      LinkedHashMapRequired

      The reserved field. Default value: null.

    • cause
      ErrorCodeRequired

      The root error, which is the associated root cause of the current error. If no root error exists, this parameter is null.

  • spending
    ListRequired

    See spending.

    • spendingType
      StringRequired

      The spending type.

    • spending
      doubleRequired

      The total spending.

    • dateStart
      LongRequired

      The billing start date.

    • dateEnd
      LongRequired

      The billing end date.

    • details
      ListRequired

      See details.

      • resourceUuid
        StringRequired

        The resource UUID.

      • resourceName
        StringRequired

        The resource name.

      • spending
        doubleRequired

        The spending.

      • type
        StringRequired

        The type.

  • error
    ErrorCodeRequired

    See error.

    • code
      StringRequired

      The error code, which is a numbered or alphanumeric code that specifies an error. For example, SYS.1000, HOST.1001.

    • description
      StringRequired

      The brief description of the error.

    • details
      StringRequired

      The details about the error.

      • resourceUuid
        StringRequired

        The resource UUID.

      • resourceName
        StringRequired

        The resource name.

      • spending
        doubleRequired

        The spending.

        • spendingType
          StringRequired

          The spending type.

        • spending
          doubleRequired

          The total spending.

        • dateStart
          LongRequired

          The billing start date.

        • dateEnd
          LongRequired

          The billing end date.

        • details
          ListRequired

          See details.

      • type
        StringRequired

        The type.

    • elaboration
      StringRequired

      The reserved field. Default value: null.

    • opaque
      LinkedHashMapRequired

      The reserved field. Default value: null.

    • cause
      ErrorCodeRequired

      The root error, which is the associated root cause of the current error. If no root error exists, this parameter is null.