Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add spot storage to open api AWSEG-24085 #476

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions api/services/storage/aws/paths/listEfsRecommendations.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
get:
summary: List Spot Storage Efs Recommendations
description: |
Get all Efs Recommendations in Aws for this account.
operationId: "SpotStorageAwsEfsRecommendationsGetAll"
tags:
- "Spotinst Storage AWS"
parameters:
- $ref: "../../../../commons/parameters/accountId.yaml"
responses:
200:
$ref: "../responses/listEfsRecommendationsResponse.yaml"
400:
description: "Bad Request"
14 changes: 14 additions & 0 deletions api/services/storage/aws/paths/listVolumeRecommendations.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
get:
summary: "List Spot Storage Volume Recommendations"
description: >
List All Volume Recommendations in Aws for this account.
operationId: "SpotStorageVolumeRecommendationsGetAll"
tags:
- "Spotinst Storage AWS"
parameters:
- $ref: "../../../../commons/parameters/accountId.yaml"
responses:
200:
$ref: "../responses/listVolumeRecommendationsResponse.yaml"
400:
description: "Bad Request"
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
description: Spot Storage Response
content:
application/json:
schema:
allOf:
- $ref: "../../../../commons/schemas/responseItemWrapper.yaml"
- type: "object"
properties:
request:
type: "object"
properties:
url:
example: /aws/storage/efs/recommendation?accountId=act-123456
method:
example: GET
response:
type: "object"
properties:
items:
type: "array"
items:
$ref: "../schemas/listEfsRecommendationsGetAll.yaml"
kind:
example: "spotinst:aws:efs:recommendation"
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
description: Spot Storage Response
content:
application/json:
schema:
allOf:
- $ref: "../../../../commons/schemas/responseItemWrapper.yaml"
- type: "object"
properties:
request:
type: "object"
properties:
url:
example: /aws/storage/ec2/volume/recommendation?accountId=act-123456
method:
example: GET
response:
type: "object"
properties:
items:
type: "array"
items:
$ref: "../schemas/listVolumeRecommendationsGetAll.yaml"
kind:
example: "spotinst:aws:ec2:volume:recommendation"
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
type: object
properties:
fileSystem:
type: object
properties:
region:
type: string
example: us-west-1
ownerId:
type: string
example: 012345678912
fileSystemId:
type: string
example: fs-015383988444fa156
fileSystemArn:
type: string
example: arn:aws:elasticfilesystem:us-west-1:123456789012:file-system/fs-0123456789012345
creationTime:
type: string
example: 2022-10-23T12:20:29.000Z
name:
type: string
example: efs-test
numberOfMountTargets:
type: integer
example: 2
sizeInBytes:
type: object
properties:
value:
type: integer
example: 614400
timestamp:
type: string
example: 2023-05-22T08:30:23.000Z
valueInIa:
type: integer
example: 0
valueInStandard:
type: integer
example: 614400
recommendations:
type: array
items:
type: object
properties:
type:
type: string
enum: [ "DELETE" ]
example: DELETE
reason:
type: string
enum: [ "UNUSED" ]
example: UNUSED
saving:
type: object
properties:
frequency:
type: string
enum: [ "monthly" ]
example: monthly
currentCost:
type: integer
example: 10
futureEstimatedCost:
type: integer
example: 0
potentialSavings:
type: integer
example: 10
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
type: object
properties:
volume:
type: object
properties:
volumeId:
type: string
example: vol-0123456789123456
availabilityZone:
type: string
example: us-west-2c
volumeType:
type: string
enum: [ "standard", "io1", "io2", "sc1" , "st1", "gp2", "gp3" ]
example: standard
iops:
type: integer
example: 3000
throughput:
type: integer
example: 125
attachments:
type: array
items:
type: object
properties:
instanceId:
type: string
example: i-0123456789123456
device:
type: string
example: /dev/sdh
state:
type: string
example: attached
size:
type: integer
example: 100
encrypted:
type: boolean
example: false
createdAt:
type: string
example: 2022-06-23T13:08:28.630Z
sizeInBytes:
type: object
properties:
value:
type: integer
example: 614400
timestamp:
type: string
example: 2023-05-22T08:30:23.000Z
valueInIa:
type: integer
example: 0
valueInStandard:
type: integer
example: 614400
recommendations:
type: array
items:
type: object
properties:
type:
type: string
enum: [ "DELETE", "UPGRADE" ]
example: DELETE
reason:
type: string
enum: [ "UNUSED", "ATTACHED_TO_STOPPED", "GP2_TO_GP3", "IO1_TO_IO2" ]
example: UNUSED
saving:
type: object
properties:
frequency:
type: string
enum: [ "monthly" ]
example: monthly
currentCost:
type: integer
example: 10
futureEstimatedCost:
type: integer
example: 0
potentialSavings:
type: integer
example: 10
15 changes: 15 additions & 0 deletions api/spot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,14 @@ tags:
description: Stateful Node for AWS Concepts and Tutorials
url: https://docs.spot.io/managed-instance/

- name: Spotinst Storage AWS
description: |
Spot Storage is a managed service that optimizes cloud storage using capacity and performance auto-scaling engines and waste management technology for object, block, and file storage.
Based on historical usage and modeling of future application storage needs, Spot Storage removes wasted, unused storage and optimizes the underlying storage type, disk size, and filesystem to achieve maximum performance and efficiency at the lowest cost.
externalDocs:
description: Spot Storage for AWS
url: https://docs.spot.io/spot-storage/

- name: Create an API Token
description: |
* Please log in to the [Spot Console](https://console.spotinst.com) to create an API token. Navigate to `Settings` and select `API`.
Expand Down Expand Up @@ -205,6 +213,9 @@ x-tagGroups:
- name: Stateful Node
tags:
- Stateful Node AWS
- name: Spotinst Storage
tags:
- Spotinst Storage AWS
- name: Services
tags:
- Audit Service
Expand Down Expand Up @@ -551,6 +562,10 @@ paths:
$ref: services/managedInstance/aws/paths/bulkMigrationStatusMi.yaml
/aws/ec2/managedInstance/state:
$ref: services/managedInstance/aws/paths/state/updateManagedInstanceStates.yaml
/aws/storage/ec2/volume/recommendation:
$ref: services/storage/aws/paths/listVolumeRecommendations.yaml
/aws/storage/efs/recommendation:
$ref: services/storage/aws/paths/listEfsRecommendations.yaml
/audit/events:
$ref: services/administration/general/paths/auditListAll.yaml
/healthCheck:
Expand Down