Skip to content

Commit

Permalink
Merge pull request #115 from yunkon-kim/241119-20
Browse files Browse the repository at this point in the history
Add Object Storage APIs for AWS and Azure
  • Loading branch information
yunkon-kim authored Nov 19, 2024
2 parents ae856dc + a05ed7b commit 062c213
Show file tree
Hide file tree
Showing 9 changed files with 2,299 additions and 3 deletions.
513 changes: 513 additions & 0 deletions api/docs.go

Large diffs are not rendered by default.

513 changes: 513 additions & 0 deletions api/swagger.json

Large diffs are not rendered by default.

347 changes: 347 additions & 0 deletions api/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,11 @@ definitions:
tfVars:
$ref: '#/definitions/model.TfVarsGcpAzureVpnTunnel'
type: object
model.CreateInfracodeOfObjectStorageRequest:
properties:
tfVars:
$ref: '#/definitions/model.TfVarsObjectStorage'
type: object
model.CreateInfracodeOfSqlDbRequest:
properties:
tfVars:
Expand Down Expand Up @@ -180,6 +185,18 @@ definitions:
example: ""
type: string
type: object
model.TfVarsObjectStorage:
properties:
csp_region:
example: ap-northeast-2
type: string
csp_resource_group:
example: koreacentral
type: string
terrarium_id:
example: ""
type: string
type: object
model.TfVarsSqlDb:
properties:
csp_region:
Expand Down Expand Up @@ -799,6 +816,336 @@ paths:
summary: Read a terrarium
tags:
- '[Terrarium] An environment to enrich the multi-cloud infrastructure'
/tr/{trId}/object-storage:
delete:
consumes:
- application/json
description: Destroy Object Storage
parameters:
- default: tr01
description: Terrarium ID
in: path
name: trId
required: true
type: string
- description: Custom request ID
in: header
name: x-request-id
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/model.Response'
"400":
description: Bad Request
schema:
$ref: '#/definitions/model.Response'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/model.Response'
"503":
description: Service Unavailable
schema:
$ref: '#/definitions/model.Response'
summary: Destroy Object Storage
tags:
- '[Object Storage] Operations'
get:
consumes:
- application/json
description: Get resource info of Object Storage
parameters:
- default: tr01
description: Terrarium ID
in: path
name: trId
required: true
type: string
- default: refined
description: Resource info by detail (refined, raw)
in: query
name: detail
type: string
- description: custom request ID
in: header
name: x-request-id
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/model.Response'
"400":
description: Bad Request
schema:
$ref: '#/definitions/model.Response'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/model.Response'
"503":
description: Service Unavailable
schema:
$ref: '#/definitions/model.Response'
summary: Get resource info of Object Storage
tags:
- '[Object Storage] Operations'
post:
consumes:
- application/json
description: Create Object Storage
parameters:
- default: tr01
description: Terrarium ID
in: path
name: trId
required: true
type: string
- description: Custom request ID
in: header
name: x-request-id
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/model.Response'
"400":
description: Bad Request
schema:
$ref: '#/definitions/model.Response'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/model.Response'
"503":
description: Service Unavailable
schema:
$ref: '#/definitions/model.Response'
summary: Create Object Storage
tags:
- '[Object Storage] Operations'
/tr/{trId}/object-storage/env:
delete:
consumes:
- application/json
description: Clear the entire directory and configuration files
parameters:
- default: tr01
description: Terrarium ID
in: path
name: trId
required: true
type: string
- default: ""
description: Action
enum:
- force
in: query
name: action
type: string
- description: Custom request ID
in: header
name: x-request-id
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/model.Response'
"400":
description: Bad Request
schema:
$ref: '#/definitions/model.Response'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/model.Response'
"503":
description: Service Unavailable
schema:
$ref: '#/definitions/model.Response'
summary: Clear the entire directory and configuration files
tags:
- '[Object Storage] Operations'
post:
consumes:
- application/json
description: Initialize a multi-cloud terrarium for Object Storage (e.g., AWS
S3 Bucket, Azure Blob Storage)
parameters:
- default: tr01
description: Terrarium ID
in: path
name: trId
required: true
type: string
- default: aws
description: Provider
enum:
- aws
- azure
in: query
name: provider
type: string
- description: Custom request ID
in: header
name: x-request-id
type: string
produces:
- application/json
responses:
"201":
description: Created
schema:
$ref: '#/definitions/model.Response'
"400":
description: Bad Request
schema:
$ref: '#/definitions/model.Response'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/model.Response'
"503":
description: Service Unavailable
schema:
$ref: '#/definitions/model.Response'
summary: Initialize a multi-cloud terrarium for Object Storage (e.g., AWS S3
Bucket, Azure Blob Storage)
tags:
- '[Object Storage] Operations'
/tr/{trId}/object-storage/infracode:
post:
consumes:
- application/json
description: Create the infracode for Object Storage
parameters:
- default: tr01
description: Terrarium ID
in: path
name: trId
required: true
type: string
- description: Parameters of infracode for Object Storage
in: body
name: ParamsForInfracode
required: true
schema:
$ref: '#/definitions/model.CreateInfracodeOfObjectStorageRequest'
- description: Custom request ID
in: header
name: x-request-id
type: string
produces:
- application/json
responses:
"201":
description: Created
schema:
$ref: '#/definitions/model.Response'
"400":
description: Bad Request
schema:
$ref: '#/definitions/model.Response'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/model.Response'
"503":
description: Service Unavailable
schema:
$ref: '#/definitions/model.Response'
summary: Create the infracode for Object Storage
tags:
- '[Object Storage] Operations'
/tr/{trId}/object-storage/plan:
post:
consumes:
- application/json
description: Check and show changes by the current infracode
parameters:
- default: tr01
description: Terrarium ID
in: path
name: trId
required: true
type: string
- description: Custom request ID
in: header
name: x-request-id
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/model.Response'
"400":
description: Bad Request
schema:
$ref: '#/definitions/model.Response'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/model.Response'
"503":
description: Service Unavailable
schema:
$ref: '#/definitions/model.Response'
summary: Check and show changes by the current infracode
tags:
- '[Object Storage] Operations'
/tr/{trId}/object-storage/request/{requestId}:
get:
consumes:
- application/json
description: Check the status of a specific request by its ID
parameters:
- default: tr01
description: Terrarium ID
in: path
name: trId
required: true
type: string
- description: Request ID
in: path
name: requestId
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/model.Response'
"400":
description: Bad Request
schema:
$ref: '#/definitions/model.Response'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/model.Response'
"503":
description: Service Unavailable
schema:
$ref: '#/definitions/model.Response'
summary: Check the status of a specific request by its ID
tags:
- '[Object Storage] Operations'
/tr/{trId}/sql-db:
delete:
consumes:
Expand Down
Loading

0 comments on commit 062c213

Please sign in to comment.