openapi: 3.0.0 info: description: >- The product info application uses the cloud provider APIs to asynchronously fetch and parse instance type attributes and prices, while storing the results in an in memory cache and making it available as structured data through a REST API. title: Product Info. contact: name: Banzai Cloud email: info@banzaicloud.com license: name: Apache 2.0 url: http://www.apache.org/licenses/LICENSE-2.0.html version: 0.0.1 paths: /continents: get: description: Returns the supported continents tags: - continents operationId: getContinents responses: "200": description: ContinentsResponse content: application/json: schema: $ref: "#/components/schemas/ContinentsResponse" /providers: get: description: Returns the supported providers tags: - providers operationId: getProviders responses: "200": description: ProvidersResponse content: application/json: schema: $ref: "#/components/schemas/ProvidersResponse" "/providers/{provider}": get: description: Returns the requested provider tags: - provider operationId: getProvider parameters: - x-go-name: Provider name: provider in: path required: true schema: type: string responses: "200": description: ProviderResponse content: application/json: schema: $ref: "#/components/schemas/ProviderResponse" "/providers/{provider}/services": get: description: Provides a list with the available services for the provider tags: - services operationId: getServices parameters: - x-go-name: Provider name: provider in: path required: true schema: type: string responses: "200": description: ServicesResponse content: application/json: schema: $ref: "#/components/schemas/ServicesResponse" "/providers/{provider}/services/{service}": get: description: Provides service details for the given service on the provider in the given region tags: - service operationId: getService parameters: - x-go-name: Provider name: provider in: path required: true schema: type: string - x-go-name: Service name: service in: path required: true schema: type: string responses: "200": description: ServiceResponse content: application/json: schema: $ref: "#/components/schemas/ServiceResponse" "/providers/{provider}/services/{service}/continents": get: description: Provides the list of available continents and regions of a cloud provider tags: - continents operationId: getContinentsData parameters: - x-go-name: Provider name: provider in: path required: true schema: type: string - x-go-name: Service name: service in: path required: true schema: type: string responses: "200": description: ContinentsDataResponse content: application/json: schema: $ref: "#/components/schemas/ContinentsDataResponse" "/providers/{provider}/services/{service}/regions": get: description: Provides the list of available regions of a cloud provider tags: - regions operationId: getRegions parameters: - x-go-name: Provider name: provider in: path required: true schema: type: string - x-go-name: Service name: service in: path required: true schema: type: string responses: "200": description: RegionsResponse content: application/json: schema: $ref: "#/components/schemas/RegionsResponse" "/providers/{provider}/services/{service}/regions/{region}": get: description: Provides the detailed info of a specific region of a cloud provider tags: - region operationId: getRegion parameters: - x-go-name: Provider name: provider in: path required: true schema: type: string - x-go-name: Service name: service in: path required: true schema: type: string - x-go-name: Region name: region in: path required: true schema: type: string responses: "200": description: GetRegionResp content: application/json: schema: $ref: "#/components/schemas/GetRegionResp" "/providers/{provider}/services/{service}/regions/{region}/images": get: tags: - images summary: Provides a list of available images on a given provider in a specific region for a service. operationId: getImages parameters: - x-go-name: Provider name: provider in: path required: true schema: type: string - x-go-name: Service name: service in: path required: true schema: type: string - x-go-name: Region name: region in: path required: true schema: type: string - x-go-name: Gpu name: gpu in: query schema: type: string - x-go-name: Version name: version in: query schema: type: string - x-go-name: Os name: os in: query schema: type: string - x-go-name: PkeVersion name: pkeVersion in: query schema: type: string - x-go-name: LatestOnly name: latestOnly in: query schema: type: string responses: "200": description: ImagesResponse content: application/json: schema: $ref: "#/components/schemas/ImagesResponse" "/providers/{provider}/services/{service}/regions/{region}/products": get: tags: - products summary: Provides a list of available machine types on a given provider in a specific region. operationId: getProducts parameters: - x-go-name: Provider name: provider in: path required: true schema: type: string - x-go-name: Service name: service in: path required: true schema: type: string - x-go-name: Region name: region in: path required: true schema: type: string responses: "200": description: ProductDetailsResponse content: application/json: schema: $ref: "#/components/schemas/ProductDetailsResponse" "/providers/{provider}/services/{service}/regions/{region}/versions": get: tags: - versions summary: Provides a list of available versions on a given provider in a specific region for a service. operationId: getVersions parameters: - x-go-name: Provider name: provider in: path required: true schema: type: string - x-go-name: Service name: service in: path required: true schema: type: string - x-go-name: Region name: region in: path required: true schema: type: string responses: "200": description: VersionsResponse content: application/json: schema: $ref: "#/components/schemas/VersionsResponse" servers: - url: /api/v1 components: schemas: AttributeResponse: description: AttributeResponse holds attribute values type: object properties: attributeName: type: string x-go-name: AttributeName attributeValues: type: array items: type: number format: double x-go-name: AttributeValues x-go-package: github.com/banzaicloud/cloudinfo/internal/app/cloudinfo/api Continent: description: Continent holds continent and regions of a cloud provider type: object properties: name: type: string x-go-name: Name regions: type: array items: $ref: "#/components/schemas/Region" x-go-name: Regions x-go-package: github.com/banzaicloud/cloudinfo/internal/app/cloudinfo/api ContinentsDataResponse: description: ContinentsDataResponse holds the list of available continents and regions of a cloud provider type: array items: $ref: "#/components/schemas/Continent" x-go-package: github.com/banzaicloud/cloudinfo/internal/app/cloudinfo/api ContinentsResponse: description: ContinentsResponse holds the list of available continents type: array items: type: string x-go-package: github.com/banzaicloud/cloudinfo/internal/app/cloudinfo/api GetRegionResp: description: GetRegionResp holds the detailed description of a specific region of a cloud provider type: object properties: id: type: string x-go-name: Id name: type: string x-go-name: Name zones: type: array items: type: string x-go-name: Zones x-go-package: github.com/banzaicloud/cloudinfo/internal/app/cloudinfo/api Image: description: Image represents an image type: object properties: creationDate: type: string format: date-time x-go-name: CreationDate gpu: type: boolean x-go-name: GpuAvailable name: type: string x-go-name: Name tags: type: object additionalProperties: type: string x-go-name: Tags version: type: string x-go-name: Version x-go-package: github.com/banzaicloud/cloudinfo/internal/cloudinfo/types ImagesResponse: description: ImagesResponse holds the list of available images type: array items: $ref: "#/components/schemas/Image" x-go-package: github.com/banzaicloud/cloudinfo/internal/app/cloudinfo/api LocationVersion: description: LocationVersion struct for displaying version information per location type: object properties: default: type: string x-go-name: Default location: type: string x-go-name: Location versions: type: array items: type: string x-go-name: Versions x-go-package: github.com/banzaicloud/cloudinfo/internal/cloudinfo/types ProductDetails: description: ProductDetails extended view of the virtual machine details type: object properties: attributes: type: object additionalProperties: type: string x-go-name: Attributes burst: description: Burst this is derived for now type: boolean x-go-name: Burst category: type: string x-go-name: Category cpusPerVm: type: number format: double x-go-name: Cpus currentGen: description: CurrentGen signals whether the instance type generation is the current one. Only applies for amazon type: boolean x-go-name: CurrentGen gpusPerVm: type: number format: double x-go-name: Gpus memPerVm: type: number format: double x-go-name: Mem ntwPerf: type: string x-go-name: NtwPerf ntwPerfCategory: type: string x-go-name: NtwPerfCat onDemandPrice: type: number format: double x-go-name: OnDemandPrice spotPrice: type: array items: $ref: "#/components/schemas/ZonePrice" x-go-name: SpotPrice type: type: string x-go-name: Type zones: type: array items: type: string x-go-name: Zones x-go-package: github.com/banzaicloud/cloudinfo/internal/cloudinfo/types ProductDetailsResponse: description: ProductDetailsResponse Api object to be mapped to product info response type: object properties: products: description: Products represents a slice of products for a given provider (VMs with attributes and process) type: array items: $ref: "#/components/schemas/ProductDetails" x-go-name: Products scrapingTime: description: ScrapingTime represents scraping time for a given provider in milliseconds type: string x-go-name: ScrapingTime x-go-package: github.com/banzaicloud/cloudinfo/internal/app/cloudinfo/api Provider: description: Provider represents a cloud provider type: object properties: provider: type: string x-go-name: Provider services: type: array items: $ref: "#/components/schemas/Service" x-go-name: Services x-go-package: github.com/banzaicloud/cloudinfo/internal/cloudinfo/types ProviderResponse: description: ProviderResponse is the response used for the requested provider type: object properties: provider: $ref: "#/components/schemas/Provider" x-go-package: github.com/banzaicloud/cloudinfo/internal/app/cloudinfo/api ProvidersResponse: description: ProvidersResponse is the response used for the supported providers type: object properties: providers: type: array items: $ref: "#/components/schemas/Provider" x-go-name: Providers x-go-package: github.com/banzaicloud/cloudinfo/internal/app/cloudinfo/api Region: description: Region hold the id and name of a cloud provider region type: object properties: id: type: string x-go-name: ID name: type: string x-go-name: Name x-go-package: github.com/banzaicloud/cloudinfo/internal/cloudinfo/types RegionsResponse: description: RegionsResponse holds the list of available regions of a cloud provider type: array items: $ref: "#/components/schemas/Region" x-go-package: github.com/banzaicloud/cloudinfo/internal/app/cloudinfo/api Service: description: it's intended to implement the ServiceDescriber interface type: object title: Service represents a service supported by a given provider. properties: isStatic: type: boolean x-go-name: IsStatic service: type: string x-go-name: Service x-go-package: github.com/banzaicloud/cloudinfo/internal/cloudinfo/types ServiceResponse: description: ServiceResponse holds the list of available services type: object properties: service: $ref: "#/components/schemas/Service" x-go-package: github.com/banzaicloud/cloudinfo/internal/app/cloudinfo/api ServicesResponse: description: ServicesResponse holds the list of available services type: object properties: services: type: array items: $ref: "#/components/schemas/Service" x-go-name: Services x-go-package: github.com/banzaicloud/cloudinfo/internal/app/cloudinfo/api VersionsResponse: description: VersionsResponse holds the list of available versions type: array items: $ref: "#/components/schemas/LocationVersion" x-go-package: github.com/banzaicloud/cloudinfo/internal/app/cloudinfo/api ZonePrice: description: ZonePrice struct for displaying price information per zone type: object properties: price: type: number format: double x-go-name: Price zone: type: string x-go-name: Zone x-go-package: github.com/banzaicloud/cloudinfo/internal/cloudinfo/types