diff --git a/api/services/storage/aws/paths/listEfsRecommendations.yaml b/api/services/storage/aws/paths/listEfsRecommendations.yaml new file mode 100644 index 000000000..4627f45f4 --- /dev/null +++ b/api/services/storage/aws/paths/listEfsRecommendations.yaml @@ -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" \ No newline at end of file diff --git a/api/services/storage/aws/paths/listVolumeRecommendations.yaml b/api/services/storage/aws/paths/listVolumeRecommendations.yaml new file mode 100644 index 000000000..90a7bfe88 --- /dev/null +++ b/api/services/storage/aws/paths/listVolumeRecommendations.yaml @@ -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" \ No newline at end of file diff --git a/api/services/storage/aws/responses/listEfsRecommendationsResponse.yaml b/api/services/storage/aws/responses/listEfsRecommendationsResponse.yaml new file mode 100644 index 000000000..a8d1d78c7 --- /dev/null +++ b/api/services/storage/aws/responses/listEfsRecommendationsResponse.yaml @@ -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" \ No newline at end of file diff --git a/api/services/storage/aws/responses/listVolumeRecommendationsResponse.yaml b/api/services/storage/aws/responses/listVolumeRecommendationsResponse.yaml new file mode 100644 index 000000000..bccf3d86e --- /dev/null +++ b/api/services/storage/aws/responses/listVolumeRecommendationsResponse.yaml @@ -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" \ No newline at end of file diff --git a/api/services/storage/aws/schemas/listEfsRecommendationsGetAll.yaml b/api/services/storage/aws/schemas/listEfsRecommendationsGetAll.yaml new file mode 100644 index 000000000..6e7083cdf --- /dev/null +++ b/api/services/storage/aws/schemas/listEfsRecommendationsGetAll.yaml @@ -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 \ No newline at end of file diff --git a/api/services/storage/aws/schemas/listVolumeRecommendationsGetAll.yaml b/api/services/storage/aws/schemas/listVolumeRecommendationsGetAll.yaml new file mode 100644 index 000000000..81d958147 --- /dev/null +++ b/api/services/storage/aws/schemas/listVolumeRecommendationsGetAll.yaml @@ -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 \ No newline at end of file diff --git a/api/spot.yaml b/api/spot.yaml index 1b339932b..ee8a77d93 100644 --- a/api/spot.yaml +++ b/api/spot.yaml @@ -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`. @@ -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 @@ -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: