-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding ocean spark cluster spark core hours
- Loading branch information
Showing
4 changed files
with
66 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
summary: Ocean Spark | ||
|
||
get: | ||
summary: "Cluster Spark Core Hours" | ||
description: > | ||
Gets the number of core hours applications have consumed. | ||
operationId: "OceanSparkClusterSparkCoreHours" | ||
tags: | ||
- "Ocean Spark" | ||
parameters: | ||
- $ref: "../../../../commons/parameters/nonRequiredAccountId.yaml" | ||
- name: clusterId | ||
in: query | ||
required: false | ||
schema: | ||
type: array | ||
items: | ||
"$ref": "../schemas/oceanSparkClusterId.yaml" | ||
- in: query | ||
name: period | ||
required: false | ||
example: "2021-11" | ||
description: > | ||
The month to query from. | ||
schema: | ||
format: date-time | ||
type: string | ||
|
||
responses: | ||
200: | ||
$ref: "../responses/sparkCoreHours.yaml" | ||
400: | ||
description: "Bad Request" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
description: Number of spark core hours consumed by cluster | ||
content: | ||
application/json: | ||
schema: | ||
allOf: | ||
- $ref: "../../../../commons/schemas/responseItemWrapper.yaml" | ||
- type: object | ||
properties: | ||
response: | ||
type: object | ||
description: > | ||
response body | ||
properties: | ||
items: | ||
type: array | ||
items: | ||
$ref: "../schemas/oceanSparkClusterSparkCoreHours.yaml" |
14 changes: 14 additions & 0 deletions
14
api/services/ocean/spark/schemas/oceanSparkClusterSparkCoreHours.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
type: object | ||
required: | ||
- id | ||
- coreHours | ||
description: > | ||
Object that holds a pair of ocean cluster id and core hours that this cluster has consumed. | ||
properties: | ||
id: | ||
$ref: "oceanSparkClusterId.yaml" | ||
coreHours: | ||
type: number | ||
description: > | ||
Number of core hours that the cluster has consumed. | ||
example: 99 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters