openapi: 3.1.0 info: title: AWS Braket Spending Limits API description: > Create, update, search, and delete optional per-device spending limits for Amazon Braket QPUs. Spending limits are opt-in cost controls: when set, Amazon Braket validates each CreateQuantumTask request against the remaining budget and rejects tasks whose estimated cost would exceed the limit. Limits can be scoped to a time window. Spending limits apply only to on-demand and hybrid-job QPU tasks; they exclude simulator usage, notebooks, hybrid-job EC2 cost, and Braket Direct reservations. version: 2019-09-01 contact: name: AWS Support url: https://aws.amazon.com/contact-us/ servers: - url: https://braket.us-east-1.amazonaws.com description: US East (N. Virginia) - url: https://braket.us-west-2.amazonaws.com description: US West (Oregon) - url: https://braket.eu-north-1.amazonaws.com description: EU (Stockholm) security: - SigV4: [] tags: - name: SpendingLimits description: Per-device opt-in cost controls for QPU tasks. paths: /spending-limit: post: summary: AWS Braket Create A Spending Limit description: > Create a new spending limit for a specified QPU device in the current region. Rejected if a limit already exists for the device. operationId: createSpendingLimit tags: - SpendingLimits requestBody: required: true content: application/json: schema: type: object required: [deviceArn, spendingLimit, clientToken] properties: deviceArn: { type: string, description: ARN of the target QPU device. } spendingLimit: type: string description: Maximum cumulative USD spend on this device within the period. timePeriod: type: object properties: start: { type: string, format: date-time } end: { type: string, format: date-time } clientToken: { type: string, minLength: 1, maxLength: 64 } tags: type: object additionalProperties: { type: string } responses: '201': description: Spending limit created. content: application/json: schema: type: object properties: spendingLimitArn: { type: string } /spending-limit/{spendingLimitArn}: put: summary: AWS Braket Update A Spending Limit description: > Update the maximum spend value and/or time period for an existing spending limit. Rejected if the sum of current spend and queued spend already exceeds the requested new maximum. operationId: updateSpendingLimit tags: - SpendingLimits parameters: - name: spendingLimitArn in: path required: true schema: { type: string } requestBody: required: true content: application/json: schema: type: object properties: spendingLimit: { type: string } timePeriod: type: object properties: start: { type: string, format: date-time } end: { type: string, format: date-time } responses: '200': description: Spending limit updated. delete: summary: AWS Braket Delete A Spending Limit description: Delete the spending limit, removing all restrictions on the device. operationId: deleteSpendingLimit tags: - SpendingLimits parameters: - name: spendingLimitArn in: path required: true schema: { type: string } responses: '204': description: Spending limit deleted. /spending-limits: post: summary: AWS Braket Search Spending Limits description: Search spending limits, typically filtered by deviceArn. operationId: searchSpendingLimits tags: - SpendingLimits requestBody: required: true content: application/json: schema: type: object required: [filters] properties: filters: type: array items: type: object properties: name: { type: string, enum: [deviceArn, spendingLimitArn] } operator: { type: string, enum: [EQUAL] } values: { type: array, items: { type: string } } maxResults: { type: integer } nextToken: { type: string } responses: '200': description: Spending limit results. content: application/json: schema: type: object properties: spendingLimits: type: array items: type: object properties: spendingLimitArn: { type: string } deviceArn: { type: string } spendingLimit: { type: string } currentSpend: { type: string } queuedSpend: { type: string } remainingBudget: { type: string } timePeriod: type: object properties: start: { type: string, format: date-time } end: { type: string, format: date-time } nextToken: { type: string } components: securitySchemes: SigV4: type: apiKey name: Authorization in: header