Alphaus Pricing API

(BETA) Pricing API. Base URL: https://api.alphaus.cloud/m/blue/pricing

OpenAPI Specification

alphaus-pricing-api-openapi.yml Raw ↑
swagger: '2.0'
info:
  title: Blue API reference Admin Pricing API
  description: 'Alphaus provides an API for interacting with its services. Blue API is a RESTful API that can be accessed by an HTTP client such as `curl`, or any HTTP library which is part of most modern programming languages. This API reference is autogenerated from [protocol buffers](https://developers.google.com/protocol-buffers) defined in this [repository](https://github.com/alphauslabs/blueapi), together with our supported [client libraries](https://alphauslabs.github.io/docs/blueapi/client-sdks/). See the official [documentation](https://alphauslabs.github.io/docs/blueapi/overview/) for more information.


    You may encounter the following feature maturity indicators:

    - **(WORK-IN-PROGRESS)** - Development is ongoing, don''t use yet;

    - **(BETA)** - New or experimental features, subject to changes; and

    - **(DEPRECATED)** - Outdated or replaced features.


    Some endpoints, especially those that return lists of resources, have streaming responses; newline-separated stream of “chunks”. Each chunk is an envelope that can contain either a response message or an error. Only the last chunk will include an error, if any.'
  version: v1
host: api.alphaus.cloud
basePath: /m/blue
schemes:
- https
consumes:
- application/json
produces:
- application/json
tags:
- name: Pricing
  description: '(BETA) Pricing API. Base URL: https://api.alphaus.cloud/m/blue/pricing'
  externalDocs:
    description: Service definition
    url: https://github.com/alphauslabs/blueapi/tree/main/pricing/
paths:
  /v0/info:
    get:
      summary: Test endpoint only.
      operationId: Pricing_GetInfo
      responses:
        '200':
          description: A successful response.
          schema:
            $ref: '#/definitions/blueapiPricingV1GetInfoResponse'
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/rpcStatus'
      tags:
      - Pricing
  /v0/{vendor}/pricing:
    post:
      summary: 'WORK-IN-PROGRESS: Get cloud pricing information'
      operationId: Pricing_GetPricing
      responses:
        '200':
          description: A successful response.
          schema:
            $ref: '#/definitions/v1GetPricingResponse'
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/rpcStatus'
      parameters:
      - name: vendor
        description: Required. Cloud vendor, only `aws` and `azure` are currently supported.
        in: path
        required: true
        type: string
      - name: body
        in: body
        required: true
        schema:
          $ref: '#/definitions/PricingGetPricingBody'
      tags:
      - Pricing
  /v0/{vendor}/services:
    get:
      summary: 'WORK-IN-PROGRESS: Get list of supported services, regions, attributes, and columns for filtering'
      operationId: Pricing_GetSupportedServices
      responses:
        '200':
          description: A successful response.
          schema:
            $ref: '#/definitions/v1GetSupportedServicesResponse'
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/rpcStatus'
      parameters:
      - name: vendor
        description: Required. Cloud vendor, only `aws` and `azure` are currently supported.
        in: path
        required: true
        type: string
      tags:
      - Pricing
definitions:
  PricingGetPricingBody:
    type: object
    properties:
      service:
        type: string
        description: "Required. Cloud vendor service. \nSupported services can be listed using `/{vendor}/services` endpoint. For usage information visit https://labs.alphaus.cloud/blueapidocs/#/Pricing/Pricing_GetSupportedServices."
      region:
        type: string
        description: 'Required. Region code.

          Supported regions can be listed using `/{vendor}/services` endpoint. For usage information visit https://labs.alphaus.cloud/blueapidocs/#/Pricing/Pricing_GetSupportedServices.

          View all available AWS services by region at https://aws.amazon.com/about-aws/global-infrastructure/regional-product-services/.

          View all available Azure services by region at https://azure.microsoft.com/en-us/explore/global-infrastructure/products-by-region/.'
      token:
        type: string
        description: Optional. Supply token that is included in the latest response to continue fetching the remaining chunks of data. No further data can be retrieved once the token returned is empty.
      filters:
        type: object
        additionalProperties:
          type: string
        description: "Optional. Filters to apply to the pricing data.\nThis is a map of column names and values to filter pricing items. Each key-value pair in the map represents a filter condition.\nSupported filter key-value pairs can be listed using `/{vendor}/services` endpoint. For usage information visit https://labs.alphaus.cloud/blueapidocs/#/Pricing/Pricing_GetSupportedServices.\n\nFor example, if you want to return AWS EC2 items that has All Upfront purchase option, add `\"purchaseOption\": \"All Upfront\"` to the filters.\n\nMultiple key-value pairs are supported but keys should not be duplicated.\nFor example, for AWS EC2, the following is valid,\n```\n\"filters\": {\n  \"purchaseOption\": \"All Upfront\",\n  \"operatingSystem\": \"Windows\"\n}\n```\nbut not the following,\n```\n\"filters\": {\n  \"purchaseOption\": \"All Upfront\",\n  \"purchaseOption\": \"Partial Upfront\"\n}\n```"
      columns:
        type: array
        items:
          type: string
        description: 'Optional. Only specified columns will be returned, if provided.

          All columns will be returned if this array is empty.

          Supported columns can be listed using `/{vendor}/services` endpoint. For usage information visit https://labs.alphaus.cloud/blueapidocs/#/Pricing/Pricing_GetSupportedServices.'
    description: Request message for Pricing.GetPricing rpc.
  v1Attribute:
    type: object
    properties:
      key:
        type: string
        description: Filter key.
      values:
        type: array
        items:
          type: string
        description: Array of filter values.
  v1GetPricingResponse:
    type: object
    properties:
      token:
        type: string
        description: Use token to retrieve next set of pricing items. An empty string means there are no more items to retrieve.
      pricingData:
        type: array
        items:
          type: object
          $ref: '#/definitions/pricingPricingData'
        description: Array of pricing items details. Maximum number of items returned per call is 1000.
    description: Response message for Pricing.GetPricing rpc.
  protobufAny:
    type: object
    properties:
      '@type':
        type: string
        description: "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n  value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n  URL, or have them precompiled into a binary to avoid any\n  lookup. Therefore, binary compatibility needs to be preserved\n  on changes to types. (Use versioned type names to manage\n  breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com. As of May 2023, there are no widely used type server\nimplementations and no plans to implement one.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics."
    additionalProperties: {}
    description: "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n    Foo foo = ...;\n    Any any;\n    any.PackFrom(foo);\n    ...\n    if (any.UnpackTo(&foo)) {\n      ...\n    }\n\nExample 2: Pack and unpack a message in Java.\n\n    Foo foo = ...;\n    Any any = Any.pack(foo);\n    ...\n    if (any.is(Foo.class)) {\n      foo = any.unpack(Foo.class);\n    }\n    // or ...\n    if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n      foo = any.unpack(Foo.getDefaultInstance());\n    }\n\n Example 3: Pack and unpack a message in Python.\n\n    foo = Foo(...)\n    any = Any()\n    any.Pack(foo)\n    ...\n    if any.Is(Foo.DESCRIPTOR):\n      any.Unpack(foo)\n      ...\n\n Example 4: Pack and unpack a message in Go\n\n     foo := &pb.Foo{...}\n     any, err := anypb.New(foo)\n     if err != nil {\n       ...\n     }\n     ...\n     foo := &pb.Foo{}\n     if err := any.UnmarshalTo(foo); err != nil {\n       ...\n     }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n    package google.profile;\n    message Person {\n      string first_name = 1;\n      string last_name = 2;\n    }\n\n    {\n      \"@type\": \"type.googleapis.com/google.profile.Person\",\n      \"firstName\": <string>,\n      \"lastName\": <string>\n    }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n    {\n      \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n      \"value\": \"1.212s\"\n    }"
  v1SupportedService:
    type: object
    properties:
      service:
        type: string
        description: AWS or Azure services only as of now.
      regions:
        type: array
        items:
          type: string
        description: Array of regions supported for the specific service.
      attributes:
        type: array
        items:
          type: object
          $ref: '#/definitions/v1Attribute'
        description: Array of attributes that can be used as key-value pairs for filtering.
      columns:
        type: array
        items:
          type: string
        description: 'Array of column names that can be used to specify what columns should `/{vendor}/pricing` return.

          For usage information, visit https://labs.alphaus.cloud/blueapidocs/#/Pricing/Pricing_GetPricing.'
  rpcStatus:
    type: object
    properties:
      code:
        type: integer
        format: int32
        description: The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].
      message:
        type: string
        description: 'A developer-facing error message, which should be in English. Any

          user-facing error message should be localized and sent in the

          [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.'
      details:
        type: array
        items:
          type: object
          $ref: '#/definitions/protobufAny'
        description: 'A list of messages that carry the error details.  There is a common set of

          message types for APIs to use.'
    description: 'The `Status` type defines a logical error model that is suitable for

      different programming environments, including REST APIs and RPC APIs. It is

      used by [gRPC](https://github.com/grpc). Each `Status` message contains

      three pieces of data: error code, error message, and error details.


      You can find out more about this error model and how to work with it in the

      [API Design Guide](https://cloud.google.com/apis/design/errors).'
  v1GetSupportedServicesResponse:
    type: object
    properties:
      supportedServices:
        type: array
        items:
          type: object
          $ref: '#/definitions/v1SupportedService'
        description: 'Suported services, regions, and attributes that can be used to specify which pricing data to retrieve from `/{vendor}/pricing`.

          For usage information, visit https://labs.alphaus.cloud/blueapidocs/#/Pricing/Pricing_GetPricing.'
    description: Response message for Pricing.GetSupportedServices rpc.
  blueapiPricingV1GetInfoResponse:
    type: object
    properties:
      response:
        type: string
    description: Response message for the Pricing.GetInfo rpc.
  pricingPricingData:
    type: object
    properties:
      vendor:
        type: string
        description: Cloud vendor.
      service:
        type: string
        description: 'Cloud vendor service. We have a limited number of services supported currently.

          Refer to https://labs.alphaus.cloud/blueapidocs/#/Pricing/Pricing_GetSupportedServices to list supported services.'
      regionCode:
        type: string
        description: Region code.
      sku:
        type: string
        description: SKU ID.
      unit:
        type: string
        description: Unit of measure.
      pricePerUnit:
        type: number
        format: double
        description: Price per unit.
      serviceDetails:
        type: object
        description: "Service details. A protobuf struct which translates to a map for HTTP. Keys are of type string and values can be of type string, float, or bool, depending on the detail.\n\nThe following is an example of a serviceDetails field of a response,\n```\n\"serviceDetails\": {\n  \"availabilityZone\": \"NA\",\n  \"capacityStatus\": \"Used\",\n  \"classicNetworkingSupport\": \"false\",\n  \"clockSpeed\": \"3.5 GHz\",\n  \"currency\": \"USD\",\n  \"currentGeneration\": \"Yes\",\n  \"dedicatedEbsThroughput\": \"Up to 10000 Mbps\",\n  \"ebsOptimized\": \"\",\n  \"ecu\": \"NA\",\n  \"effectiveDate\": \"2022-04-01\",\n  \"elasticGraphicsType\": \"\",\n  \"endingRange\": \"Inf\",\n  \"enhancedNetworkingSupported\": \"Yes\",\n  \"fromLocation\": \"\",\n  \"fromLocationType\": \"\",\n  \"fromRegionCode\": \"\",\n  \"gpu\": \"\",\n  \"gpuMemory\": \"NA\",\n  \"groupDescription\": \"\",\n  \"groupings\": \"\",\n  \"instance\": \"\",\n  \"instanceCapacity10Xlarge\": \"\",\n  \"instanceCapacity12Xlarge\": \"\",\n  \"instanceCapacity16Xlarge\": \"\",\n  \"instanceCapacity18Xlarge\": \"\",\n  \"instanceCapacity24Xlarge\": \"\",\n  \"instanceCapacity2Xlarge\": \"\",\n  \"instanceCapacity32Xlarge\": \"\",\n  \"instanceCapacity4Xlarge\": \"\",\n  \"instanceCapacity8Xlarge\": \"\",\n  \"instanceCapacity9Xlarge\": \"\",\n  \"instanceCapacityLarge\": \"\",\n  \"instanceCapacityMedium\": \"\",\n  \"instanceCapacityMetal\": \"\",\n  \"instanceCapacityXlarge\": \"\",\n  \"instanceFamily\": \"Compute optimized\",\n  \"instanceSku\": \"\",\n  \"instanceType\": \"c6i.large\",\n  \"intelAvx2Available\": \"Yes\",\n  \"intelAvxAvailable\": \"Yes\",\n  \"intelTurboAvailable\": \"Yes\",\n  \"leaseContractLength\": \"1yr\",\n  \"licenseModel\": \"No License required\",\n  \"location\": \"Asia Pacific (Tokyo)\",\n  \"locationType\": \"AWS Region\",\n  \"marketOption\": \"OnDemand\",\n  \"maxIopsBurstPerformance\": \"\",\n  \"maxIopsVolume\": \"\",\n  \"maxThroughputVolume\": \"\",\n  \"maxVolumeSize\": \"\",\n  \"memory\": \"4 GiB\",\n  \"networkPerformance\": \"Up to 12500 Megabit\",\n  \"normalizationSizeFactor\": \"4\",\n  \"offerTermCode\": \"4NA7Y494T4\",\n  \"offeringClass\": \"standard\",\n  \"operatingSystem\": \"Windows\",\n  \"operation\": \"RunInstances:0202\",\n  \"physicalCores\": \"\",\n  \"physicalProcessor\": \"Intel Xeon 8375C (Ice Lake)\",\n  \"preInstalledSw\": \"SQL Web\",\n  \"priceDescription\": \"Windows with SQL Server Web (Amazon VPC), c6i.large reserved instance applied\",\n  \"processorArchitecture\": \"64-bit\",\n  \"processorFeatures\": \"Intel AVX; Intel AVX2; Intel AVX512; Intel Turbo\",\n  \"productFamily\": \"Compute Instance\",\n  \"productType\": \"\",\n  \"provisioned\": \"\",\n  \"purchaseOption\": \"No Upfront\",\n  \"rateCode\": \"2223B6PCG6QAUYY6.4NA7Y494T4.6YS6EN2CT7\",\n  \"relatedTo\": \"\",\n  \"resourceType\": \"\",\n  \"serviceCode\": \"AmazonEC2\",\n  \"serviceName\": \"Amazon Elastic Compute Cloud\",\n  \"snapShotArchiveFeeType\": \"\",\n  \"startingRange\": \"0\",\n  \"storage\": \"EBS only\",\n  \"storageMedia\": \"\",\n  \"tenancy\": \"Dedicated\",\n  \"termType\": \"Reserved\",\n  \"toLocation\": \"\",\n  \"toLocationType\": \"\",\n  \"toRegionCode\": \"\",\n  \"transferType\": \"\",\n  \"usageType\": \"APN1-DedicatedUsage:c6i.large\",\n  \"vcpu\": \"2\",\n  \"volumeApiName\": \"\",\n  \"volumeType\": \"\",\n  \"vpcNetworkingSupport\": \"true\"\n}\n```"
    title: Pricing details