Skip to main content
Operations Management/Billing Management Operations
POSTBilling Management OperationsSince 0.6SynchronousAuth Required

CreateResourcePrice

CreateResourcePrice

Execution Availability

Try It Out

Submit a mock request using the current auth context and example-driven inputs.

Request Inputs

Body Fields

  • paramsObjectRequired

    Request body parameter object.

    • resourceNameStringRequired

      The resource name.

    • resourceUnitString

      Optional. The billing unit of the resource.

    • timeUnitStringRequired

      The billing time unit.

    • pricedoubleRequired

      The unit price.

    • accountUuidString

      Optional. The account UUID.

    • dateInLongLong

      Optional. The long-integer time.

    • tableUuidString

      Optional. The price table UUID.

  • systemTagsList

    Optional. The system tags.

  • userTagsList

    Optional. The user tags.

Responses

200 OK

On success, this API returns the following response structure.

  • errorErrorCodeRequired

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

    • codeStringRequired

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

    • descriptionStringRequired

      The brief description of the error.

    • detailsStringRequired

      The details about the error.

    • elaborationStringRequired

      The reserved field. Default value: null.

    • opaqueLinkedHashMapRequired

      The reserved field. Default value: null.

    • causeErrorCodeRequired

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

  • inventoryPriceInventoryRequired

    See inventory.

    • uuidStringRequired

      The resource UUID.

    • resourceNameStringRequired

      The resource name.

    • resourceUnitStringRequired

      The billing unit of the resource.

    • timeUnitStringRequired

      The billing time unit.

    • priceDoubleRequired

      The unit price.

    • dateInLongLongRequired

      The long-integer time.

    • createDateTimestampRequired

      The creation date.

    • lastOpDateTimestampRequired

      The last operation date.

    • tableUuidStringRequired

      The price table UUID.

    • pciDeviceOfferingsListRequired

      See pciDeviceOfferings.

      • priceUuidStringRequired

        No description provided.

      • pciDeviceOfferingUuidStringRequired

        No description provided.

      • createDateTimestampRequired

        The creation date.

      • lastOpDateTimestampRequired

        The last operation date.

Endpoint

POST/zstack/v1/billings/prices

/zstack/v1/billings/prices

Operation ID

CreateResourcePrice

Permalink

Request Example

curl -X POST 'http://{host}/zstack/v1/billings/prices' -H 'Authorization: OAuth {sessionUuid}' -H 'Content-Type: application/json;charset=UTF-8' -d '{"params":{"resourceName":"<resourceName>","resourceUnit":"<resourceUnit>","timeUnit":"<timeUnit>","price":1,"accountUuid":"<accountUuid>","dateInLong":1,"tableUuid":"<tableUuid>"},"systemTags":["<systemTags>"],"userTags":["<userTags>"]}'

Response Example

200
{ "inventory": { "uuid": "437ade61b17e4c658844fdacfb0fc6de", "resourceName": "Volume", "resourceUnit": "1", "timeUnit": "s", "price": 2.0 } }

Change History

This API has no change history records yet.

View all change history