x-generated: Automatically generated by CDP protoc plugin. Do not edit manually. swagger: '2.0' x-endpoint-name: consumption x-products: CDP x-form-factors: public x-cdp-releases: PUBLIC info: version: 0.9.163 title: Cloudera Consumption API Service license: name: Apache 2.0 description: Provides an interface to the consumption service. termsOfService: https://www.cloudera.com/legal/commercial-terms-and-conditions.html schemes: - https consumes: - application/json produces: - application/json paths: /api/v1/consumption/listComputeUsageRecords: post: summary: Lists compute usage records. description: Lists all compute usage records for requested duration. operationId: listComputeUsageRecords x-entitlement: CDP_CONSUMPTION x-right: consumption/listComputeUsageRecords x-paging-default-max-items: 100 parameters: - name: input in: body required: true schema: $ref: '#/definitions/ListComputeUsageRecordsRequest' responses: 200: description: Expected response to a valid request. schema: $ref: '#/definitions/ListComputeUsageRecordsResponse' default: description: The default response on an error. schema: $ref: '#/definitions/Error' x-mutating: false definitions: Error: type: object description: An object returned on an error. properties: code: type: string description: The error code. message: type: string description: The error message. ListComputeUsageRecordsRequest: type: object description: Request object for ListComputeUsageRecords method. required: - fromTimestamp - toTimestamp properties: fromTimestamp: type: string format: date-time description: The beginning timestamp for the search range (inclusive). toTimestamp: type: string format: date-time description: The ending timestamp for the search range (exclusive). pageSize: type: integer format: int32 minimum: 1 maximum: 5000 x-paging-page-size: true description: The page size. pageToken: type: string x-paging-input-token: true description: A token to specify where to start paginating. This is the nextToken from a previously truncated response. ListComputeUsageRecordsResponse: type: object description: Response object for ListComputeUsageRecords method. properties: records: type: array x-paging-result: true items: $ref: '#/definitions/ComputeUsageRecord' description: The list of compute usage records in the requested time duration. nextPageToken: type: string x-paging-output-token: true description: The token to use when requesting the next set of results. If not present, there are no additional results. ComputeUsageRecord: type: object description: Record of compute usage values aggregated hourly. properties: quantityType: type: string description: 'Type of usage by the cluster (Eg: INSTANCE_USAGE, COMPUTE_USAGE).' environmentName: type: string description: Name of the environment. environmentCrn: type: string description: CRN of the environment. clusterName: type: string description: Name of the cluster. clusterCrn: type: string description: CRN of the cluster. cloudProvider: type: string description: Cloud Provider on which cluster is running. serviceFeature: type: string description: Service Feature of the cluster. usageStartTimestamp: type: string description: Timestamp of start of the usage. usageEndTimestamp: type: string description: Timestamp of end of the usage. quantity: type: number format: double description: Quantity of usage of the cluster. grossCharge: type: number format: double description: Number of credits consumed by this usage. listRate: type: number format: double description: Rate in credits at which usage is charged for given cluster type, instance type and cloud provider. hours: type: number format: double description: Total number of hours for which instances were running. instanceType: type: string description: Type of instance of the cluster. instanceCount: type: integer format: int32 description: Total number of instances in the cluster which were in use. clusterType: type: string description: Type of the cluster. userTags: type: string description: 'The tags assigned to a cluster. The format of this is a map serialized into a string as json. e.g.: "tags": "{\"key1\":\"value1\",\"key2\":\"value2\"}"' clusterTemplate: type: string description: The template with which the cluster is created. x-audit: true