diff --git a/providers/src/lambda/v00.00.00000/provider.yaml b/providers/src/lambda/v00.00.00000/provider.yaml new file mode 100644 index 00000000..f7a8c232 --- /dev/null +++ b/providers/src/lambda/v00.00.00000/provider.yaml @@ -0,0 +1,89 @@ +id: lambda +name: lambda +version: v00.00.00000 +providerServices: + audit: + id: audit:v00.00.00000 + name: audit + preferred: true + service: + $ref: lambda/v00.00.00000/services/audit.yaml + title: Audit Events + version: v00.00.00000 + description: Audit events recorded for the account. + filesystems: + id: filesystems:v00.00.00000 + name: filesystems + preferred: true + service: + $ref: lambda/v00.00.00000/services/filesystems.yaml + title: Filesystems + version: v00.00.00000 + description: Persistent filesystems that can be mounted on instances. + firewall: + id: firewall:v00.00.00000 + name: firewall + preferred: true + service: + $ref: lambda/v00.00.00000/services/firewall.yaml + title: Firewall + version: v00.00.00000 + description: Inbound firewall rules, firewall rulesets and the global firewall ruleset. + images: + id: images:v00.00.00000 + name: images + preferred: true + service: + $ref: lambda/v00.00.00000/services/images.yaml + title: Images + version: v00.00.00000 + description: Machine images available for instance launches, by region. + instance_types: + id: instance_types:v00.00.00000 + name: instance_types + preferred: true + service: + $ref: lambda/v00.00.00000/services/instance_types.yaml + title: Instance Types + version: v00.00.00000 + description: Instance types offered on Lambda Cloud with their specifications, price in US cents per hour and the regions that have capacity at the time of the request. + instances: + id: instances:v00.00.00000 + name: instances + preferred: true + service: + $ref: lambda/v00.00.00000/services/instances.yaml + title: Instances + version: v00.00.00000 + description: 'On-demand instances: inventory, launch, update, restart and terminate.' + regions: + id: regions:v00.00.00000 + name: regions + preferred: true + service: + $ref: lambda/v00.00.00000/services/regions.yaml + title: Regions + version: v00.00.00000 + description: Lambda Cloud regions. + ssh_keys: + id: ssh_keys:v00.00.00000 + name: ssh_keys + preferred: true + service: + $ref: lambda/v00.00.00000/services/ssh_keys.yaml + title: SSH Keys + version: v00.00.00000 + description: SSH keys registered in the account, used for access to launched instances. + support: + id: support:v00.00.00000 + name: support + preferred: true + service: + $ref: lambda/v00.00.00000/services/support.yaml + title: Support + version: v00.00.00000 + description: Support tickets and ticket attachments. +config: + auth: + type: bearer + credentialsenvvar: LAMBDA_CLOUD_API_KEY diff --git a/providers/src/lambda/v00.00.00000/services/audit.yaml b/providers/src/lambda/v00.00.00000/services/audit.yaml new file mode 100644 index 00000000..d87e00b1 --- /dev/null +++ b/providers/src/lambda/v00.00.00000/services/audit.yaml @@ -0,0 +1,436 @@ +openapi: 3.0.3 +info: + title: Audit Events + description: Audit events recorded for the account. + version: 1.10.0 +paths: + /audit-events: + get: + responses: + '200': + description: OK + content: + application/json: + schema: + additionalProperties: false + properties: + data: + type: array + items: + $ref: '#/components/schemas/AuditEvent' + page_token: + description: Provide this token in your next request to retrieve the next page of results. If there are no additional pages, this field has a null value. + nullable: true + type: string + example: eyJuZXh0IjoxNzA0MTk2ODAwfQ== + required: + - data + - page_token + type: object + '400': + description: Bad Request + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorInvalidParameters' + required: + - error + type: object + '401': + description: Unauthorized + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorUnauthorized' + required: + - error + type: object + '403': + description: Forbidden + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorAccountInactive' + required: + - error + type: object + '404': + description: Not Found + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorNotFound' + required: + - error + type: object + '429': + description: Too Many Requests + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorRateLimited' + required: + - error + type: object + tags: + - Audit Events + summary: Get audit events + description: Retrieves a list of audit events that have occurred in your account. To view the full catalog of possible audit events, visit [Access and security > Audit logs](https://docs.lambda.ai/public-cloud/access-security#audit-logs) in the Lambda Cloud documentation. + operationId: getAuditEvents + parameters: + - name: start + in: query + description: An ISO 8601 timestamp defining the start of the time range to query, inclusive. If omitted, the response starts at the earliest available event. + required: false + schema: + description: An ISO 8601 timestamp defining the start of the time range to query, inclusive. If omitted, the response starts at the earliest available event. + format: date-time + type: string + example: '2025-09-01T10:30:45.123456Z' + example: '2025-09-01T10:30:45.123456Z' + - name: end + in: query + description: An ISO 8601 timestamp defining the end of the time range to query, inclusive. If omitted, the response ends at the most recent event. + required: false + schema: + description: An ISO 8601 timestamp defining the end of the time range to query, inclusive. If omitted, the response ends at the most recent event. + format: date-time + type: string + example: '2025-09-15T10:30:45.123456Z' + example: '2025-09-15T10:30:45.123456Z' + - name: page_token + in: query + description: The token returned by the previous API response to retrieve the next page of results. + required: false + schema: + description: The token returned by the previous API response to retrieve the next page of results. + type: string + example: abCdEFg0h1I2jKlm34n5O6Pq78r= + example: abCdEFg0h1I2jKlm34n5O6Pq78r= + - name: resource_type + in: query + description: The resource type to filter by. By default, all available resource types are retrieved. + required: false + schema: + description: The resource type to filter by. By default, all available resource types are retrieved. + type: string + example: cloud.api_key + example: cloud.api_key +components: + schemas: + AuditEvent: + type: object + properties: + service_name: + type: string + description: The service in which the action was performed. + example: cloud + resource_name: + type: string + description: The type of resource that was affected. + example: api_key + action: + type: string + description: The action that was performed. + example: created + catalog_version: + type: string + description: The version of the event catalog schema. + example: '2025-09-06' + event_id: + type: string + description: The unique identifier (ID) for this audit event. + example: 0123456789abcdef0123456789abcdef + event_time: + type: string + description: The UTC timestamp for when the event occurred (ISO 8601 format). + example: '2025-09-15T10:30:45.123456Z' + actor_lrn: + description: The Lambda Resource Name (LRN) of the actor who performed the action. This is the stable identifier for the actor; emails and display names can change or be reassigned over time. + nullable: true + type: string + example: lrn:cloud:identity:00112233445566778899aabbccddeeff + actor_email: + description: The email address of the actor, resolved at read time from the actor's identity. Reflects the current email, not the email at the time of the event. `null` for service identities (which have no email), system-generated events, and actors that no longer resolve to an identity in this account. + nullable: true + type: string + example: alice@example.com + actor_display_name: + description: 'A human-readable name for the actor, resolved at read time: the user''s full name, or the display name of a service identity. `null` when unavailable or when the actor no longer resolves to an identity in this account.' + nullable: true + type: string + example: Alice Example + resource_lrns: + type: array + items: + type: string + description: The Lambda Resource Names (LRNs) of the resources affected by this action. + example: + - lrn:cloud:api_key:ffeeddccbbaa99887766554433221100 + resource_owner_lrn: + description: The Lambda Resource Name (LRN) of the account that owns the affected resources. + nullable: true + type: string + example: lrn:cloud:account:fedcba9876543210fedcba9876543210 + request_api_key_lrn: + description: The Lambda Resource Name (LRN) of the API key used to authenticate the request, if applicable. + nullable: true + type: string + example: lrn:cloud:api_key:0f1e2d3c4b5a69788796a5b4c3d2e1f0 + workspace_lrn: + description: The Lambda Resource Name (LRN) of the workspace the affected resources belong to, if applicable. + nullable: true + type: string + example: lrn:cloud:workspace:abcdef0123456789abcdef0123456789 + client_ip: + description: The IP address the request originated from. Shows `lambda-internal` for actions performed by Lambda staff. `null` for system-generated events and events recorded before this field was introduced. + nullable: true + type: string + example: 203.0.113.42 + client_user_agent: + description: The User-Agent header supplied by the client that made the request. This value is client-controlled and informational only. `null` for system-generated events and events recorded before this field was introduced. + nullable: true + type: string + example: curl/8.5.0 + surface: + description: 'The surface the request came through: `console` (logged-in browser session), `api` (API key), or `system` (generated by Lambda systems without a request). `null` when the surface could not be determined (for example, unauthenticated requests) and for events recorded before this field was introduced.' + nullable: true + type: string + example: console + result: + description: The result of the audited action, including its status and the HTTP status code when the action originated from an API request. `null` for events recorded before this field was introduced. + nullable: true + $ref: '#/components/schemas/AuditResult' + example: + status: success + status_code: 200 + additional_details: + type: object + additionalProperties: true + description: Additional event-specific details. The exact keys returned vary by event type. + properties: {} + example: + api_key_lrn: lrn:cloud:api_key:ffeeddccbbaa99887766554433221100 + required: + - service_name + - resource_name + - action + - catalog_version + - event_id + - event_time + - actor_lrn + - actor_email + - actor_display_name + - resource_lrns + - resource_owner_lrn + - request_api_key_lrn + - workspace_lrn + - client_ip + - client_user_agent + - surface + - result + - additional_details + title: AuditEvent + description: |- + Audit event in the account's audit log. To view the full catalog of + possible audit events, visit + [Access and security > Audit logs](https://docs.lambda.ai/public-cloud/access-security#audit-logs) + in the Lambda Cloud documentation. + ApiErrorInvalidParameters: + type: object + properties: + code: + type: string + description: The unique identifier for the type of error. + enum: + - global/invalid-parameters + message: + type: string + default: Invalid request data. + description: A description of the error. + suggestion: + type: string + description: One or more suggestions of possible ways to fix the error. + request_id: + type: string + description: 'Uniquely identifies the request that produced this error. Quote it when contacting support: it is how a failed call is found in our logs and traces.' + required: + - code + - message + title: ApiErrorInvalidParameters + ApiErrorUnauthorized: + type: object + properties: + code: + type: string + description: The unique identifier for the type of error. + enum: + - global/invalid-api-key + message: + type: string + default: API key was invalid, expired, or deleted. + description: A description of the error. + suggestion: + type: string + default: Check your API key or create a new one, then try again. + description: One or more suggestions of possible ways to fix the error. + request_id: + type: string + description: 'Uniquely identifies the request that produced this error. Quote it when contacting support: it is how a failed call is found in our logs and traces.' + required: + - code + - message + - suggestion + title: ApiErrorUnauthorized + ApiErrorAccountInactive: + type: object + properties: + code: + type: string + description: The unique identifier for the type of error. + enum: + - global/account-inactive + message: + type: string + default: Your account is inactive. + description: A description of the error. + suggestion: + type: string + default: Make sure you have verified your email address and have a valid payment method. Contact Support if problems continue. + description: One or more suggestions of possible ways to fix the error. + request_id: + type: string + description: 'Uniquely identifies the request that produced this error. Quote it when contacting support: it is how a failed call is found in our logs and traces.' + required: + - code + - message + - suggestion + title: ApiErrorAccountInactive + description: |- + The account or identity is not in good standing to make the request. + + Your account is inactive or suspended, your identity is deactivated or has + not verified its email, or your account is missing a payment method the + endpoint requires. + ApiErrorNotFound: + type: object + properties: + code: + type: string + description: The unique identifier for the type of error. + enum: + - global/not-found + message: + type: string + default: The requested resource was not found. + description: A description of the error. + suggestion: + type: string + description: One or more suggestions of possible ways to fix the error. + request_id: + type: string + description: 'Uniquely identifies the request that produced this error. Quote it when contacting support: it is how a failed call is found in our logs and traces.' + required: + - code + - message + title: ApiErrorNotFound + description: |- + The resource does not exist, or the caller is not permitted to access it. + + If you believe the ID is correct, ask an account administrator whether or not + you have been granted a role that permits the action. + ApiErrorRateLimited: + type: object + properties: + code: + type: string + description: The unique identifier for the type of error. + enum: + - global/rate-limited + message: + type: string + default: Too many requests. Retry after the interval given in the Retry-After response header. + description: A description of the error. + suggestion: + type: string + default: Wait for the interval in the Retry-After header, then retry the request. Reduce the rate of concurrent requests if this recurs. + description: One or more suggestions of possible ways to fix the error. + request_id: + type: string + description: 'Uniquely identifies the request that produced this error. Quote it when contacting support: it is how a failed call is found in our logs and traces.' + required: + - code + - message + - suggestion + title: ApiErrorRateLimited + description: |- + The request was rate limited upstream and should be retried. + + Carries no detail about which limit was hit. The limit is enforced at the + edge and is not part of the API contract, so naming it here would publish an + implementation detail we intend to keep free to change. + AuditResult: + type: object + properties: + status: + $ref: '#/components/schemas/ResultStatus' + status_code: + nullable: true + type: integer + required: + - status + title: AuditResult + description: The result of an audited action. + ResultStatus: + title: ResultStatus + description: The result of an audited action, open to future status values. + enum: + - success + - failure + type: string + x-speakeasy-unknown-values: allow + x-stackQL-resources: + audit_events: + id: lambda.audit.audit_events + name: audit_events + title: Audit Events + methods: + list: + operation: + $ref: '#/paths/~1audit-events/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/audit_events/methods/list' + insert: [] + update: [] + delete: [] + replace: [] +servers: + - url: https://cloud.lambda.ai/api/v1 +x-stackQL-config: + pagination: + requestToken: + key: page_token + location: query + responseToken: + key: $.page_token + location: body diff --git a/providers/src/lambda/v00.00.00000/services/filesystems.yaml b/providers/src/lambda/v00.00.00000/services/filesystems.yaml new file mode 100644 index 00000000..a36bb598 --- /dev/null +++ b/providers/src/lambda/v00.00.00000/services/filesystems.yaml @@ -0,0 +1,821 @@ +openapi: 3.0.3 +info: + title: Filesystems + description: Persistent filesystems that can be mounted on instances. + version: 1.10.0 +paths: + /file-systems: + get: + responses: + '200': + description: OK + content: + application/json: + schema: + additionalProperties: false + properties: + data: + type: array + items: + $ref: '#/components/schemas/Filesystem' + required: + - data + type: object + '400': + description: Bad Request + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorInvalidParameters' + required: + - error + type: object + '401': + description: Unauthorized + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorUnauthorized' + required: + - error + type: object + '403': + description: Forbidden + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorAccountInactive' + required: + - error + type: object + '404': + description: Not Found + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorNotFound' + required: + - error + type: object + '429': + description: Too Many Requests + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorRateLimited' + required: + - error + type: object + tags: + - Filesystems + summary: List filesystems (deprecated path) + description: |- + Retrieves a list of your filesystems. + + This path is deprecated in favor of `GET /api/v1/filesystems`, which is the spelling every other filesystem operation uses. The two return identical responses. This path is not scheduled for removal, so existing integrations keep working, but new ones should use `/api/v1/filesystems`. + operationId: listFileSystemsDeprecated + deprecated: true + /filesystems: + get: + responses: + '200': + description: OK + content: + application/json: + schema: + additionalProperties: false + properties: + data: + type: array + items: + $ref: '#/components/schemas/Filesystem' + required: + - data + type: object + '400': + description: Bad Request + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorInvalidParameters' + required: + - error + type: object + '401': + description: Unauthorized + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorUnauthorized' + required: + - error + type: object + '403': + description: Forbidden + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorAccountInactive' + required: + - error + type: object + '404': + description: Not Found + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorNotFound' + required: + - error + type: object + '429': + description: Too Many Requests + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorRateLimited' + required: + - error + type: object + tags: + - Filesystems + summary: List filesystems + description: Retrieves a list of your filesystems. + operationId: listFilesystems + post: + responses: + '200': + description: OK + content: + application/json: + schema: + additionalProperties: false + properties: + data: + $ref: '#/components/schemas/Filesystem' + required: + - data + type: object + '400': + description: Bad Request + content: + application/json: + schema: + additionalProperties: false + properties: + error: + type: object + properties: + code: + type: string + description: The unique identifier for the type of error. + enum: + - global/duplicate + message: + type: string + description: A description of the error. + suggestion: + type: string + description: One or more suggestions of possible ways to fix the error. + request_id: + type: string + description: 'Uniquely identifies the request that produced this error. Quote it when contacting support: it is how a failed call is found in our logs and traces.' + required: + - code + - message + - suggestion + title: ApiErrorDuplicate + required: + - error + type: object + '401': + description: Unauthorized + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorUnauthorized' + required: + - error + type: object + '403': + description: Forbidden + content: + application/json: + schema: + additionalProperties: false + properties: + error: + type: object + properties: + code: + type: string + description: The unique identifier for the type of error. + enum: + - global/account-inactive + message: + type: string + default: Your account is inactive. + description: A description of the error. + suggestion: + type: string + default: Make sure you have verified your email address and have a valid payment method. Contact Support if problems continue. + description: One or more suggestions of possible ways to fix the error. + request_id: + type: string + description: 'Uniquely identifies the request that produced this error. Quote it when contacting support: it is how a failed call is found in our logs and traces.' + required: + - code + - message + - suggestion + title: ApiErrorAccountInactive + description: |- + The account or identity is not in good standing to make the request. + + Your account is inactive or suspended, your identity is deactivated or has + not verified its email, or your account is missing a payment method the + endpoint requires. + required: + - error + type: object + '404': + description: Not Found + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorNotFound' + required: + - error + type: object + '429': + description: Too Many Requests + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorRateLimited' + required: + - error + type: object + tags: + - Filesystems + summary: Create filesystem + description: Creates a new filesystem. + operationId: createFilesystem + requestBody: + content: + application/json: + schema: + properties: + name: + type: string + minLength: 1 + maxLength: 60 + pattern: ^[a-zA-Z]+[0-9a-zA-Z-]*$ + description: The name of the filesystem. + example: my-filesystem + region: + type: string + description: The region in which you want to create the filesystem. + example: us-west-1 + required: + - name + - region + title: FilesystemCreateRequest + type: object + required: true + /filesystems/{id}: + delete: + responses: + '200': + description: OK + content: + application/json: + schema: + additionalProperties: false + properties: + data: + $ref: '#/components/schemas/FilesystemDeleteResponse' + required: + - data + type: object + '400': + description: Bad Request + content: + application/json: + schema: + additionalProperties: false + properties: + error: + type: object + properties: + code: + type: string + description: The unique identifier for the type of error. + enum: + - filesystems/filesystem-in-use + message: + type: string + description: A description of the error. + suggestion: + type: string + description: One or more suggestions of possible ways to fix the error. + request_id: + type: string + description: 'Uniquely identifies the request that produced this error. Quote it when contacting support: it is how a failed call is found in our logs and traces.' + required: + - code + - message + title: ApiErrorFilesystemInUse + required: + - error + type: object + '401': + description: Unauthorized + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorUnauthorized' + required: + - error + type: object + '403': + description: Forbidden + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorAccountInactive' + required: + - error + type: object + '404': + description: Not Found + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorFilesystemNotFound' + required: + - error + type: object + '429': + description: Too Many Requests + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorRateLimited' + required: + - error + type: object + tags: + - Filesystems + summary: Delete filesystem + description: Deletes the filesystem with the specified ID. The filesystem must not be mounted to any running instances at the time of deletion. + operationId: filesystemDelete + parameters: + - name: id + in: path + description: The unique identifier (ID) of the filesystem to delete + required: true + schema: + description: The unique identifier (ID) of the filesystem to delete + type: string + example: ddaedf1b7a0e41ac981711504493b242 + example: 398578a2336b49079e74043f0bd2cfe8 +components: + schemas: + Filesystem: + type: object + properties: + id: + type: string + description: The unique identifier (ID) of the filesystem. + example: 398578a2336b49079e74043f0bd2cfe8 + name: + type: string + description: The name of the filesystem. + example: my-filesystem + mount_point: + type: string + description: |- + The DEFAULT absolute path indicating where on instances the filesystem will be mounted. + If `file_system_mounts` were used at launch time, the actual mount point is in the + instance response. + example: /lambda/nfs/my-filesystem + created: + type: string + format: date-time + description: The date and time at which the filesystem was created. Formatted as an ISO 8601 timestamp. + created_by: + $ref: '#/components/schemas/User' + description: The user in your Team that created the filesystem. + is_in_use: + type: boolean + description: |- + Whether the filesystem is currently mounted to an instance. Filesystems that + are mounted cannot be deleted. + region: + $ref: '#/components/schemas/Region' + description: The region in which the filesystem is deployed. + bytes_used: + type: integer + description: |- + The approximate amount of storage used by the filesystem in bytes. This estimate is + updated every few hours. + required: + - id + - name + - mount_point + - created + - created_by + - is_in_use + - region + title: Filesystem + description: Information about a shared filesystem. + ApiErrorInvalidParameters: + type: object + properties: + code: + type: string + description: The unique identifier for the type of error. + enum: + - global/invalid-parameters + message: + type: string + default: Invalid request data. + description: A description of the error. + suggestion: + type: string + description: One or more suggestions of possible ways to fix the error. + request_id: + type: string + description: 'Uniquely identifies the request that produced this error. Quote it when contacting support: it is how a failed call is found in our logs and traces.' + required: + - code + - message + title: ApiErrorInvalidParameters + ApiErrorUnauthorized: + type: object + properties: + code: + type: string + description: The unique identifier for the type of error. + enum: + - global/invalid-api-key + message: + type: string + default: API key was invalid, expired, or deleted. + description: A description of the error. + suggestion: + type: string + default: Check your API key or create a new one, then try again. + description: One or more suggestions of possible ways to fix the error. + request_id: + type: string + description: 'Uniquely identifies the request that produced this error. Quote it when contacting support: it is how a failed call is found in our logs and traces.' + required: + - code + - message + - suggestion + title: ApiErrorUnauthorized + ApiErrorAccountInactive: + type: object + properties: + code: + type: string + description: The unique identifier for the type of error. + enum: + - global/account-inactive + message: + type: string + default: Your account is inactive. + description: A description of the error. + suggestion: + type: string + default: Make sure you have verified your email address and have a valid payment method. Contact Support if problems continue. + description: One or more suggestions of possible ways to fix the error. + request_id: + type: string + description: 'Uniquely identifies the request that produced this error. Quote it when contacting support: it is how a failed call is found in our logs and traces.' + required: + - code + - message + - suggestion + title: ApiErrorAccountInactive + description: |- + The account or identity is not in good standing to make the request. + + Your account is inactive or suspended, your identity is deactivated or has + not verified its email, or your account is missing a payment method the + endpoint requires. + ApiErrorNotFound: + type: object + properties: + code: + type: string + description: The unique identifier for the type of error. + enum: + - global/not-found + message: + type: string + default: The requested resource was not found. + description: A description of the error. + suggestion: + type: string + description: One or more suggestions of possible ways to fix the error. + request_id: + type: string + description: 'Uniquely identifies the request that produced this error. Quote it when contacting support: it is how a failed call is found in our logs and traces.' + required: + - code + - message + title: ApiErrorNotFound + description: |- + The resource does not exist, or the caller is not permitted to access it. + + If you believe the ID is correct, ask an account administrator whether or not + you have been granted a role that permits the action. + ApiErrorRateLimited: + type: object + properties: + code: + type: string + description: The unique identifier for the type of error. + enum: + - global/rate-limited + message: + type: string + default: Too many requests. Retry after the interval given in the Retry-After response header. + description: A description of the error. + suggestion: + type: string + default: Wait for the interval in the Retry-After header, then retry the request. Reduce the rate of concurrent requests if this recurs. + description: One or more suggestions of possible ways to fix the error. + request_id: + type: string + description: 'Uniquely identifies the request that produced this error. Quote it when contacting support: it is how a failed call is found in our logs and traces.' + required: + - code + - message + - suggestion + title: ApiErrorRateLimited + description: |- + The request was rate limited upstream and should be retried. + + Carries no detail about which limit was hit. The limit is enforced at the + edge and is not part of the API contract, so naming it here would publish an + implementation detail we intend to keep free to change. + ApiErrorDuplicate: + type: object + properties: + code: + type: string + description: The unique identifier for the type of error. + enum: + - global/duplicate + message: + type: string + description: A description of the error. + suggestion: + type: string + description: One or more suggestions of possible ways to fix the error. + request_id: + type: string + description: 'Uniquely identifies the request that produced this error. Quote it when contacting support: it is how a failed call is found in our logs and traces.' + required: + - code + - message + title: ApiErrorDuplicate + ApiErrorQuotaExceeded: + type: object + properties: + code: + type: string + description: The unique identifier for the type of error. + enum: + - global/quota-exceeded + message: + type: string + default: Quota exceeded. + description: A description of the error. + suggestion: + type: string + default: Contact Support to increase your quota. + description: One or more suggestions of possible ways to fix the error. + request_id: + type: string + description: 'Uniquely identifies the request that produced this error. Quote it when contacting support: it is how a failed call is found in our logs and traces.' + required: + - code + - message + - suggestion + title: ApiErrorQuotaExceeded + ApiErrorInvalidBillingAddress: + type: object + properties: + code: + type: string + description: The unique identifier for the type of error. + enum: + - global/invalid-address + message: + type: string + default: Your billing address is invalid. + description: A description of the error. + suggestion: + type: string + default: Make sure your billing address is valid. Contact Support if problems continue. + description: One or more suggestions of possible ways to fix the error. + request_id: + type: string + description: 'Uniquely identifies the request that produced this error. Quote it when contacting support: it is how a failed call is found in our logs and traces.' + required: + - code + - message + - suggestion + title: ApiErrorInvalidBillingAddress + FilesystemDeleteResponse: + type: object + properties: + deleted_ids: + type: array + items: + type: string + description: The unique identifiers of the filesystems that were deleted. + example: + - 398578a2336b49079e74043f0bd2cfe8 + required: + - deleted_ids + title: FilesystemDeleteResponse + ApiErrorFilesystemInUse: + type: object + properties: + code: + type: string + description: The unique identifier for the type of error. + enum: + - filesystems/filesystem-in-use + message: + type: string + description: A description of the error. + suggestion: + type: string + description: One or more suggestions of possible ways to fix the error. + request_id: + type: string + description: 'Uniquely identifies the request that produced this error. Quote it when contacting support: it is how a failed call is found in our logs and traces.' + required: + - code + - message + title: ApiErrorFilesystemInUse + ApiErrorFilesystemNotFound: + type: object + properties: + code: + type: string + description: The unique identifier for the type of error. + enum: + - global/object-does-not-exist + message: + type: string + default: Filesystem was not found. + description: A description of the error. + suggestion: + type: string + description: One or more suggestions of possible ways to fix the error. + request_id: + type: string + description: 'Uniquely identifies the request that produced this error. Quote it when contacting support: it is how a failed call is found in our logs and traces.' + required: + - code + - message + title: ApiErrorFilesystemNotFound + User: + type: object + properties: + id: + type: string + description: The unique identifier for the user. + example: 3da5a70a57a7422ea8a7203f98b2198b + email: + type: string + description: The email address of the user. + example: me@example.com + status: + $ref: '#/components/schemas/UserStatus' + description: The status of the user's account. + required: + - id + - email + - status + title: User + description: Information about a user in your Team. + Region: + type: object + properties: + name: + type: string + description: The region code. + description: + type: string + description: The region description. + required: + - name + - description + title: Region + UserStatus: + title: UserStatus + description: Status of the user's account. + enum: + - active + - deactivated + type: string + x-stackQL-resources: + filesystems: + id: lambda.filesystems.filesystems + name: filesystems + title: Filesystems + methods: + list: + operation: + $ref: '#/paths/~1filesystems/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1filesystems/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data + delete: + operation: + $ref: '#/paths/~1filesystems~1{id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/filesystems/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/filesystems/methods/create' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/filesystems/methods/delete' + replace: [] +servers: + - url: https://cloud.lambda.ai/api/v1 diff --git a/providers/src/lambda/v00.00.00000/services/firewall.yaml b/providers/src/lambda/v00.00.00000/services/firewall.yaml new file mode 100644 index 00000000..690c1e71 --- /dev/null +++ b/providers/src/lambda/v00.00.00000/services/firewall.yaml @@ -0,0 +1,1401 @@ +openapi: 3.0.3 +info: + title: Firewall + description: Inbound firewall rules, firewall rulesets and the global firewall ruleset. + version: 1.10.0 +paths: + /firewall-rules: + get: + responses: + '200': + description: OK + content: + application/json: + schema: + additionalProperties: false + properties: + data: + type: array + items: + $ref: '#/components/schemas/FirewallRule' + required: + - data + type: object + '401': + description: Unauthorized + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorUnauthorized' + required: + - error + type: object + '403': + description: Forbidden + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorAccountInactive' + required: + - error + type: object + '404': + description: Not Found + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorNotFound' + required: + - error + type: object + '429': + description: Too Many Requests + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorRateLimited' + required: + - error + type: object + tags: + - Firewalls + summary: List inbound firewall rules + description: |- + Retrieves a list of your firewall rules. + + **Note:** Firewall rules do not apply to the **us-south-1** region. + operationId: firewallRulesList + put: + responses: + '200': + description: OK + content: + application/json: + schema: + additionalProperties: false + properties: + data: + type: array + items: + $ref: '#/components/schemas/FirewallRule' + required: + - data + type: object + '400': + description: Bad Request + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorInvalidParameters' + required: + - error + type: object + '401': + description: Unauthorized + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorUnauthorized' + required: + - error + type: object + '403': + description: Forbidden + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorAccountInactive' + required: + - error + type: object + '404': + description: Not Found + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorNotFound' + required: + - error + type: object + '429': + description: Too Many Requests + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorRateLimited' + required: + - error + type: object + tags: + - Firewalls + summary: Replace inbound firewall rules + description: |- + Overwrites the inbound firewall rules currently active for your account's instances with the desired rules. + + **Note:** Firewall rules do not apply to the **us-south-1** region. + operationId: firewallRulesSet + requestBody: + content: + application/json: + schema: + properties: + data: + type: array + items: + $ref: '#/components/schemas/FirewallRule' + description: The list of inbound firewall rules. + required: + - data + title: FirewallRulesPutRequest + type: object + required: true + /firewall-rulesets: + get: + responses: + '200': + description: OK + content: + application/json: + schema: + additionalProperties: false + properties: + data: + type: array + items: + $ref: '#/components/schemas/FirewallRuleset' + required: + - data + type: object + '400': + description: Bad Request + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorInvalidParameters' + required: + - error + type: object + '401': + description: Unauthorized + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorUnauthorized' + required: + - error + type: object + '403': + description: Forbidden + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorAccountInactive' + required: + - error + type: object + '404': + description: Not Found + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorNotFound' + required: + - error + type: object + '429': + description: Too Many Requests + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorRateLimited' + required: + - error + type: object + tags: + - Firewalls + summary: List firewall rulesets + description: Retrieves a list of your firewall rulesets. + operationId: firewallRulesetsList + post: + responses: + '200': + description: OK + content: + application/json: + schema: + additionalProperties: false + properties: + data: + $ref: '#/components/schemas/FirewallRuleset' + required: + - data + type: object + '400': + description: Bad Request + content: + application/json: + schema: + additionalProperties: false + properties: + error: + type: object + properties: + code: + type: string + description: The unique identifier for the type of error. + enum: + - global/quota-exceeded + message: + type: string + default: Quota exceeded. + description: A description of the error. + suggestion: + type: string + default: Contact Support to increase your quota. + description: One or more suggestions of possible ways to fix the error. + request_id: + type: string + description: 'Uniquely identifies the request that produced this error. Quote it when contacting support: it is how a failed call is found in our logs and traces.' + required: + - code + - message + - suggestion + title: ApiErrorQuotaExceeded + required: + - error + type: object + '401': + description: Unauthorized + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorUnauthorized' + required: + - error + type: object + '403': + description: Forbidden + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorAccountInactive' + required: + - error + type: object + '404': + description: Not Found + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorNotFound' + required: + - error + type: object + '409': + description: Conflict + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorInternal' + required: + - error + type: object + '429': + description: Too Many Requests + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorRateLimited' + required: + - error + type: object + tags: + - Firewalls + summary: Create firewall ruleset + description: Creates a new firewall ruleset with the specified name and rules. + operationId: createFirewallRuleset + requestBody: + content: + application/json: + schema: + description: Request to create a new firewall ruleset. + properties: + name: + type: string + maxLength: 64 + description: The name of the firewall ruleset. + example: My Firewall Ruleset + region: + type: string + description: The region in which the firewall ruleset is deployed. + rules: + type: array + items: + $ref: '#/components/schemas/FirewallRule' + description: The firewall rules to include in the ruleset. + required: + - name + - region + - rules + title: FirewallRulesetCreateRequest + type: object + required: true + /firewall-rulesets/global: + get: + responses: + '200': + description: OK + content: + application/json: + schema: + additionalProperties: false + properties: + data: + $ref: '#/components/schemas/GlobalFirewallRuleset' + required: + - data + type: object + '400': + description: Bad Request + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorInvalidParameters' + required: + - error + type: object + '401': + description: Unauthorized + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorUnauthorized' + required: + - error + type: object + '403': + description: Forbidden + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorAccountInactive' + required: + - error + type: object + '404': + description: Not Found + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorNotFound' + required: + - error + type: object + '429': + description: Too Many Requests + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorRateLimited' + required: + - error + type: object + tags: + - Firewalls + summary: Retrieve global firewall ruleset details + description: Retrieves the details of the global firewall ruleset. + operationId: getGlobalFirewallRuleset + patch: + responses: + '200': + description: OK + content: + application/json: + schema: + additionalProperties: false + properties: + data: + $ref: '#/components/schemas/GlobalFirewallRuleset' + required: + - data + type: object + '400': + description: Bad Request + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorInvalidParameters' + required: + - error + type: object + '401': + description: Unauthorized + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorUnauthorized' + required: + - error + type: object + '403': + description: Forbidden + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorAccountInactive' + required: + - error + type: object + '404': + description: Not Found + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorNotFound' + required: + - error + type: object + '409': + description: Conflict + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorInternal' + required: + - error + type: object + '429': + description: Too Many Requests + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorRateLimited' + required: + - error + type: object + tags: + - Firewalls + summary: Update global firewall ruleset + description: Updates the global firewall ruleset. This allows updating the rules only. + operationId: updateGlobalFirewallRuleset + requestBody: + content: + application/json: + schema: + description: Request to update the global firewall ruleset. + properties: + rules: + type: array + items: + $ref: '#/components/schemas/FirewallRule' + description: The new firewall rules for the ruleset. If not provided, the rules will not be updated. + title: GlobalFirewallRulesetPatchRequest + type: object + required: true + /firewall-rulesets/{id}: + get: + responses: + '200': + description: OK + content: + application/json: + schema: + additionalProperties: false + properties: + data: + $ref: '#/components/schemas/FirewallRuleset' + required: + - data + type: object + '400': + description: Bad Request + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorInvalidParameters' + required: + - error + type: object + '401': + description: Unauthorized + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorUnauthorized' + required: + - error + type: object + '403': + description: Forbidden + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorAccountInactive' + required: + - error + type: object + '404': + description: Not Found + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorFirewallRulesetNotFound' + required: + - error + type: object + '429': + description: Too Many Requests + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorRateLimited' + required: + - error + type: object + tags: + - Firewalls + summary: Retrieve firewall ruleset details + description: Retrieves the details of a specific firewall ruleset. + operationId: getFirewallRuleset + parameters: + - name: id + in: path + description: The unique identifier (ID) of the firewall ruleset + required: true + schema: + description: The unique identifier (ID) of the firewall ruleset + type: string + example: ddaedf1b7a0e41ac981711504493b242 + example: c4d291f47f9d436fa39f58493ce3b50d + patch: + responses: + '200': + description: OK + content: + application/json: + schema: + additionalProperties: false + properties: + data: + $ref: '#/components/schemas/FirewallRuleset' + required: + - data + type: object + '400': + description: Bad Request + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorInvalidParameters' + required: + - error + type: object + '401': + description: Unauthorized + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorUnauthorized' + required: + - error + type: object + '403': + description: Forbidden + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorAccountInactive' + required: + - error + type: object + '404': + description: Not Found + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorFirewallRulesetNotFound' + required: + - error + type: object + '409': + description: Conflict + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorInternal' + required: + - error + type: object + '429': + description: Too Many Requests + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorRateLimited' + required: + - error + type: object + tags: + - Firewalls + summary: Update firewall ruleset + description: Updates a firewall ruleset. This is a partial update that allows updating either the name, rules, or both. + operationId: updateFirewallRuleset + parameters: + - name: id + in: path + description: The unique identifier (ID) of the firewall ruleset + required: true + schema: + description: The unique identifier (ID) of the firewall ruleset + type: string + example: ddaedf1b7a0e41ac981711504493b242 + example: c4d291f47f9d436fa39f58493ce3b50d + requestBody: + content: + application/json: + schema: + description: Request to partially update a firewall ruleset. + properties: + name: + type: string + maxLength: 64 + description: The new name for the firewall ruleset. If not provided, the name will not be updated. + example: My Updated Firewall Ruleset + rules: + type: array + items: + $ref: '#/components/schemas/FirewallRule' + description: The new firewall rules for the ruleset. If not provided, the rules will not be updated. + title: FirewallRulesetPatchRequest + type: object + required: true + delete: + responses: + '200': + description: OK + content: + application/json: + schema: + additionalProperties: false + properties: + data: + $ref: '#/components/schemas/EmptyResponse' + required: + - data + type: object + '400': + description: Bad Request + content: + application/json: + schema: + additionalProperties: false + properties: + error: + type: object + properties: + code: + type: string + description: The unique identifier for the type of error. + enum: + - firewall-rulesets/firewall-ruleset-in-use + message: + type: string + default: Firewall ruleset is in use by one or more instances. + description: A description of the error. + suggestion: + type: string + default: Terminate all instances that are using the ruleset before deleting it. + description: One or more suggestions of possible ways to fix the error. + request_id: + type: string + description: 'Uniquely identifies the request that produced this error. Quote it when contacting support: it is how a failed call is found in our logs and traces.' + required: + - code + - message + - suggestion + title: ApiErrorFirewallRulesetInUse + required: + - error + type: object + '401': + description: Unauthorized + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorUnauthorized' + required: + - error + type: object + '403': + description: Forbidden + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorAccountInactive' + required: + - error + type: object + '404': + description: Not Found + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorFirewallRulesetNotFound' + required: + - error + type: object + '409': + description: Conflict + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorInternal' + required: + - error + type: object + '429': + description: Too Many Requests + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorRateLimited' + required: + - error + type: object + tags: + - Firewalls + summary: Delete firewall ruleset + description: Deletes the firewall ruleset with the specified ID. + operationId: deleteFirewallRuleset + parameters: + - name: id + in: path + description: The unique identifier (ID) of the firewall ruleset + required: true + schema: + description: The unique identifier (ID) of the firewall ruleset + type: string + example: ddaedf1b7a0e41ac981711504493b242 + example: c4d291f47f9d436fa39f58493ce3b50d +components: + schemas: + FirewallRule: + type: object + properties: + protocol: + $ref: '#/components/schemas/NetworkProtocol' + description: The protocol to which the rule applies. + example: tcp + port_range: + type: array + items: + type: integer + maximum: 65535 + minimum: 1 + minItems: 2 + maxItems: 2 + description: |- + An inclusive range of network ports specified as `[min, max]`. + Not allowed for the `icmp` protocol but required for the others. + + To specify a single port, list it twice (for example, `[22,22]`). + example: + - 22 + - 22 + source_network: + type: string + format: ipv4network + description: |- + The set of source IPv4 addresses from which you want to allow inbound + traffic. These addresses must be specified in CIDR notation. You can + specify individual public IPv4 CIDR blocks such as `1.2.3.4` or + `1.2.3.4/32`, or you can specify `0.0.0.0/0` to allow access from any + address. + + This value is a string consisting of a public IPv4 address optionally + followed by a slash (/) and an integer mask (the network prefix). + If no mask is provided, the API assumes `/32` by default. + example: 0.0.0.0/0 + description: + type: string + minLength: 0 + maxLength: 128 + description: A human-readable description of the rule. + example: Allow SSH from anywhere + required: + - protocol + - source_network + - description + title: FirewallRule + ApiErrorUnauthorized: + type: object + properties: + code: + type: string + description: The unique identifier for the type of error. + enum: + - global/invalid-api-key + message: + type: string + default: API key was invalid, expired, or deleted. + description: A description of the error. + suggestion: + type: string + default: Check your API key or create a new one, then try again. + description: One or more suggestions of possible ways to fix the error. + request_id: + type: string + description: 'Uniquely identifies the request that produced this error. Quote it when contacting support: it is how a failed call is found in our logs and traces.' + required: + - code + - message + - suggestion + title: ApiErrorUnauthorized + ApiErrorAccountInactive: + type: object + properties: + code: + type: string + description: The unique identifier for the type of error. + enum: + - global/account-inactive + message: + type: string + default: Your account is inactive. + description: A description of the error. + suggestion: + type: string + default: Make sure you have verified your email address and have a valid payment method. Contact Support if problems continue. + description: One or more suggestions of possible ways to fix the error. + request_id: + type: string + description: 'Uniquely identifies the request that produced this error. Quote it when contacting support: it is how a failed call is found in our logs and traces.' + required: + - code + - message + - suggestion + title: ApiErrorAccountInactive + description: |- + The account or identity is not in good standing to make the request. + + Your account is inactive or suspended, your identity is deactivated or has + not verified its email, or your account is missing a payment method the + endpoint requires. + ApiErrorNotFound: + type: object + properties: + code: + type: string + description: The unique identifier for the type of error. + enum: + - global/not-found + message: + type: string + default: The requested resource was not found. + description: A description of the error. + suggestion: + type: string + description: One or more suggestions of possible ways to fix the error. + request_id: + type: string + description: 'Uniquely identifies the request that produced this error. Quote it when contacting support: it is how a failed call is found in our logs and traces.' + required: + - code + - message + title: ApiErrorNotFound + description: |- + The resource does not exist, or the caller is not permitted to access it. + + If you believe the ID is correct, ask an account administrator whether or not + you have been granted a role that permits the action. + ApiErrorRateLimited: + type: object + properties: + code: + type: string + description: The unique identifier for the type of error. + enum: + - global/rate-limited + message: + type: string + default: Too many requests. Retry after the interval given in the Retry-After response header. + description: A description of the error. + suggestion: + type: string + default: Wait for the interval in the Retry-After header, then retry the request. Reduce the rate of concurrent requests if this recurs. + description: One or more suggestions of possible ways to fix the error. + request_id: + type: string + description: 'Uniquely identifies the request that produced this error. Quote it when contacting support: it is how a failed call is found in our logs and traces.' + required: + - code + - message + - suggestion + title: ApiErrorRateLimited + description: |- + The request was rate limited upstream and should be retried. + + Carries no detail about which limit was hit. The limit is enforced at the + edge and is not part of the API contract, so naming it here would publish an + implementation detail we intend to keep free to change. + ApiErrorInvalidParameters: + type: object + properties: + code: + type: string + description: The unique identifier for the type of error. + enum: + - global/invalid-parameters + message: + type: string + default: Invalid request data. + description: A description of the error. + suggestion: + type: string + description: One or more suggestions of possible ways to fix the error. + request_id: + type: string + description: 'Uniquely identifies the request that produced this error. Quote it when contacting support: it is how a failed call is found in our logs and traces.' + required: + - code + - message + title: ApiErrorInvalidParameters + FirewallRuleset: + type: object + properties: + id: + type: string + description: The unique identifier of the firewall ruleset. + example: c4d291f47f9d436fa39f58493ce3b50d + name: + type: string + description: The name of the firewall ruleset. + example: My Firewall Ruleset + region: + $ref: '#/components/schemas/Region' + description: The region in which the firewall ruleset is deployed. + rules: + type: array + items: + $ref: '#/components/schemas/FirewallRule' + description: The list of firewall rules in this ruleset. + created: + type: string + format: date-time + description: The date and time at which the firewall ruleset was created. Formatted as an ISO 8601 timestamp. + instance_ids: + type: array + items: + type: string + description: The IDs of instances this firewall ruleset is associated with. + required: + - id + - name + - region + - rules + - created + - instance_ids + title: FirewallRuleset + description: A collection of firewall rules that can be associated with instances. + ApiErrorQuotaExceeded: + type: object + properties: + code: + type: string + description: The unique identifier for the type of error. + enum: + - global/quota-exceeded + message: + type: string + default: Quota exceeded. + description: A description of the error. + suggestion: + type: string + default: Contact Support to increase your quota. + description: One or more suggestions of possible ways to fix the error. + request_id: + type: string + description: 'Uniquely identifies the request that produced this error. Quote it when contacting support: it is how a failed call is found in our logs and traces.' + required: + - code + - message + - suggestion + title: ApiErrorQuotaExceeded + ApiErrorInternal: + type: object + properties: + code: + type: string + description: The unique identifier for the type of error. + enum: + - global/internal-error + message: + type: string + default: An internal server error occurred. + description: A description of the error. + suggestion: + type: string + default: Try again later. Contact Support if the problem persists. + description: One or more suggestions of possible ways to fix the error. + request_id: + type: string + description: 'Uniquely identifies the request that produced this error. Quote it when contacting support: it is how a failed call is found in our logs and traces.' + required: + - code + - message + - suggestion + title: ApiErrorInternal + GlobalFirewallRuleset: + type: object + properties: + id: + type: string + description: The unique identifier of the firewall ruleset. + enum: + - global + example: global + name: + type: string + description: The name of the firewall ruleset. + example: Default Workspace Global Rules + rules: + type: array + items: + $ref: '#/components/schemas/FirewallRule' + description: The list of firewall rules in this ruleset. + required: + - id + - name + - rules + title: GlobalFirewallRuleset + description: Firewall rules that apply across all regions. + ApiErrorFirewallRulesetNotFound: + type: object + properties: + code: + type: string + description: The unique identifier for the type of error. + enum: + - global/object-does-not-exist + message: + type: string + default: Firewall ruleset does not exist or you do not have permission to access it. + description: A description of the error. + suggestion: + type: string + default: Check your firewall ruleset ID and try again. + description: One or more suggestions of possible ways to fix the error. + request_id: + type: string + description: 'Uniquely identifies the request that produced this error. Quote it when contacting support: it is how a failed call is found in our logs and traces.' + required: + - code + - message + - suggestion + title: ApiErrorFirewallRulesetNotFound + EmptyResponse: + type: object + properties: {} + title: EmptyResponse + ApiErrorFirewallRulesetInUse: + type: object + properties: + code: + type: string + description: The unique identifier for the type of error. + enum: + - firewall-rulesets/firewall-ruleset-in-use + message: + type: string + default: Firewall ruleset is in use by one or more instances. + description: A description of the error. + suggestion: + type: string + default: Terminate all instances that are using the ruleset before deleting it. + description: One or more suggestions of possible ways to fix the error. + request_id: + type: string + description: 'Uniquely identifies the request that produced this error. Quote it when contacting support: it is how a failed call is found in our logs and traces.' + required: + - code + - message + - suggestion + title: ApiErrorFirewallRulesetInUse + NetworkProtocol: + title: NetworkProtocol + enum: + - tcp + - udp + - icmp + - all + type: string + Region: + type: object + properties: + name: + type: string + description: The region code. + description: + type: string + description: The region description. + required: + - name + - description + title: Region + x-stackQL-resources: + firewall_rules: + id: lambda.firewall.firewall_rules + name: firewall_rules + title: Firewall Rules + methods: + list: + operation: + $ref: '#/paths/~1firewall-rules/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data + replace: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1firewall-rules/put' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/firewall_rules/methods/list' + insert: [] + update: [] + delete: [] + replace: + - $ref: '#/components/x-stackQL-resources/firewall_rules/methods/replace' + firewall_rulesets: + id: lambda.firewall.firewall_rulesets + name: firewall_rulesets + title: Firewall Rulesets + methods: + list: + operation: + $ref: '#/paths/~1firewall-rulesets/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1firewall-rulesets/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data + get: + operation: + $ref: '#/paths/~1firewall-rulesets~1{id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data + update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1firewall-rulesets~1{id}/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data + delete: + operation: + $ref: '#/paths/~1firewall-rulesets~1{id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/firewall_rulesets/methods/get' + - $ref: '#/components/x-stackQL-resources/firewall_rulesets/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/firewall_rulesets/methods/create' + update: + - $ref: '#/components/x-stackQL-resources/firewall_rulesets/methods/update' + delete: + - $ref: '#/components/x-stackQL-resources/firewall_rulesets/methods/delete' + replace: [] + global_firewall_ruleset: + id: lambda.firewall.global_firewall_ruleset + name: global_firewall_ruleset + title: Global Firewall Ruleset + methods: + get: + operation: + $ref: '#/paths/~1firewall-rulesets~1global/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data + update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1firewall-rulesets~1global/patch' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/global_firewall_ruleset/methods/get' + insert: [] + update: + - $ref: '#/components/x-stackQL-resources/global_firewall_ruleset/methods/update' + delete: [] + replace: [] +servers: + - url: https://cloud.lambda.ai/api/v1 diff --git a/providers/src/lambda/v00.00.00000/services/images.yaml b/providers/src/lambda/v00.00.00000/services/images.yaml new file mode 100644 index 00000000..f674d124 --- /dev/null +++ b/providers/src/lambda/v00.00.00000/services/images.yaml @@ -0,0 +1,313 @@ +openapi: 3.0.3 +info: + title: Images + description: Machine images available for instance launches, by region. + version: 1.10.0 +paths: + /images: + get: + responses: + '200': + description: OK + content: + application/json: + schema: + additionalProperties: false + properties: + data: + type: array + items: + $ref: '#/components/schemas/Image' + required: + - data + type: object + '400': + description: Bad Request + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorInvalidParameters' + required: + - error + type: object + '401': + description: Unauthorized + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorUnauthorized' + required: + - error + type: object + '403': + description: Forbidden + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorAccountInactive' + required: + - error + type: object + '404': + description: Not Found + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorNotFound' + required: + - error + type: object + '429': + description: Too Many Requests + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorRateLimited' + required: + - error + type: object + tags: + - Images + summary: List available images + description: Retrieves a list of available images by region. + operationId: listImages +components: + schemas: + Image: + type: object + properties: + id: + type: string + description: The unique identifier (ID) for an image. + example: 43336648-096d-4cba-9aa2-f9bb7727639d + created_time: + type: string + format: date-time + description: The date and time that the image was created. + updated_time: + type: string + format: date-time + description: The date and time that the image was last updated. + name: + type: string + description: The human-readable identifier for an image. + example: ubuntu-24.04.01 + description: + type: string + description: Additional information about the image. + example: Ubuntu LTS + family: + type: string + description: The family the image belongs to. + example: ubuntu-lts + version: + type: string + description: The image version. + example: 24.04.01 + architecture: + $ref: '#/components/schemas/ImageArchitecture' + description: The CPU architecture the image supports. + region: + $ref: '#/components/schemas/Region' + description: The region in which this image is available. + required: + - id + - created_time + - updated_time + - name + - description + - family + - version + - architecture + - region + title: Image + description: An available machine image in Lambda Cloud. + ApiErrorInvalidParameters: + type: object + properties: + code: + type: string + description: The unique identifier for the type of error. + enum: + - global/invalid-parameters + message: + type: string + default: Invalid request data. + description: A description of the error. + suggestion: + type: string + description: One or more suggestions of possible ways to fix the error. + request_id: + type: string + description: 'Uniquely identifies the request that produced this error. Quote it when contacting support: it is how a failed call is found in our logs and traces.' + required: + - code + - message + title: ApiErrorInvalidParameters + ApiErrorUnauthorized: + type: object + properties: + code: + type: string + description: The unique identifier for the type of error. + enum: + - global/invalid-api-key + message: + type: string + default: API key was invalid, expired, or deleted. + description: A description of the error. + suggestion: + type: string + default: Check your API key or create a new one, then try again. + description: One or more suggestions of possible ways to fix the error. + request_id: + type: string + description: 'Uniquely identifies the request that produced this error. Quote it when contacting support: it is how a failed call is found in our logs and traces.' + required: + - code + - message + - suggestion + title: ApiErrorUnauthorized + ApiErrorAccountInactive: + type: object + properties: + code: + type: string + description: The unique identifier for the type of error. + enum: + - global/account-inactive + message: + type: string + default: Your account is inactive. + description: A description of the error. + suggestion: + type: string + default: Make sure you have verified your email address and have a valid payment method. Contact Support if problems continue. + description: One or more suggestions of possible ways to fix the error. + request_id: + type: string + description: 'Uniquely identifies the request that produced this error. Quote it when contacting support: it is how a failed call is found in our logs and traces.' + required: + - code + - message + - suggestion + title: ApiErrorAccountInactive + description: |- + The account or identity is not in good standing to make the request. + + Your account is inactive or suspended, your identity is deactivated or has + not verified its email, or your account is missing a payment method the + endpoint requires. + ApiErrorNotFound: + type: object + properties: + code: + type: string + description: The unique identifier for the type of error. + enum: + - global/not-found + message: + type: string + default: The requested resource was not found. + description: A description of the error. + suggestion: + type: string + description: One or more suggestions of possible ways to fix the error. + request_id: + type: string + description: 'Uniquely identifies the request that produced this error. Quote it when contacting support: it is how a failed call is found in our logs and traces.' + required: + - code + - message + title: ApiErrorNotFound + description: |- + The resource does not exist, or the caller is not permitted to access it. + + If you believe the ID is correct, ask an account administrator whether or not + you have been granted a role that permits the action. + ApiErrorRateLimited: + type: object + properties: + code: + type: string + description: The unique identifier for the type of error. + enum: + - global/rate-limited + message: + type: string + default: Too many requests. Retry after the interval given in the Retry-After response header. + description: A description of the error. + suggestion: + type: string + default: Wait for the interval in the Retry-After header, then retry the request. Reduce the rate of concurrent requests if this recurs. + description: One or more suggestions of possible ways to fix the error. + request_id: + type: string + description: 'Uniquely identifies the request that produced this error. Quote it when contacting support: it is how a failed call is found in our logs and traces.' + required: + - code + - message + - suggestion + title: ApiErrorRateLimited + description: |- + The request was rate limited upstream and should be retried. + + Carries no detail about which limit was hit. The limit is enforced at the + edge and is not part of the API contract, so naming it here would publish an + implementation detail we intend to keep free to change. + ImageArchitecture: + title: ImageArchitecture + enum: + - x86_64 + - arm64 + type: string + Region: + type: object + properties: + name: + type: string + description: The region code. + description: + type: string + description: The region description. + required: + - name + - description + title: Region + x-stackQL-resources: + images: + id: lambda.images.images + name: images + title: Images + methods: + list: + operation: + $ref: '#/paths/~1images/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/images/methods/list' + insert: [] + update: [] + delete: [] + replace: [] +servers: + - url: https://cloud.lambda.ai/api/v1 diff --git a/providers/src/lambda/v00.00.00000/services/instance_types.yaml b/providers/src/lambda/v00.00.00000/services/instance_types.yaml new file mode 100644 index 00000000..f027bbb2 --- /dev/null +++ b/providers/src/lambda/v00.00.00000/services/instance_types.yaml @@ -0,0 +1,502 @@ +openapi: 3.0.3 +info: + title: Instance Types + description: Instance types offered on Lambda Cloud with their specifications, price in US cents per hour and the regions that have capacity at the time of the request. + version: 1.10.0 +paths: + /instance-types: + get: + responses: + '200': + description: OK + content: + application/json: + schema: + additionalProperties: false + properties: + data: + $ref: '#/components/schemas/InstanceTypes' + required: + - data + type: object + '400': + description: Bad Request + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorInvalidParameters' + required: + - error + type: object + '401': + description: Unauthorized + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorUnauthorized' + required: + - error + type: object + '403': + description: Forbidden + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorAccountInactive' + required: + - error + type: object + '404': + description: Not Found + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorNotFound' + required: + - error + type: object + '429': + description: Too Many Requests + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorRateLimited' + required: + - error + type: object + tags: + - Instances + summary: List available instance types + description: |- + Retrieves a list of the instance types currently offered on Lambda's public cloud, as well as details about each type. Details include resource specifications, pricing, and regional availability. + + Capacity is point-in-time: the regions reported are those with capacity at the moment of the request, and they change continuously. + operationId: listInstanceTypes +components: + schemas: + InstanceTypes: + type: object + additionalProperties: + $ref: '#/components/schemas/InstanceTypesItem' + title: InstanceTypes + example: + gpu_8x_example: + instance_type: + name: gpu_8x_example + description: 8x Example GPU (40 GB SXM4) + gpu_description: Example GPU (40 GB SXM4) + price_cents_per_hour: 1592 + specs: + vcpus: 124 + memory_gib: 1800 + storage_gib: 6144 + gpus: 8 + architecture: x86_64 + regions_with_capacity_available: + - name: us-west-1 + description: California, USA + ApiErrorInvalidParameters: + type: object + properties: + code: + type: string + description: The unique identifier for the type of error. + enum: + - global/invalid-parameters + message: + type: string + default: Invalid request data. + description: A description of the error. + suggestion: + type: string + description: One or more suggestions of possible ways to fix the error. + request_id: + type: string + description: 'Uniquely identifies the request that produced this error. Quote it when contacting support: it is how a failed call is found in our logs and traces.' + required: + - code + - message + title: ApiErrorInvalidParameters + ApiErrorUnauthorized: + type: object + properties: + code: + type: string + description: The unique identifier for the type of error. + enum: + - global/invalid-api-key + message: + type: string + default: API key was invalid, expired, or deleted. + description: A description of the error. + suggestion: + type: string + default: Check your API key or create a new one, then try again. + description: One or more suggestions of possible ways to fix the error. + request_id: + type: string + description: 'Uniquely identifies the request that produced this error. Quote it when contacting support: it is how a failed call is found in our logs and traces.' + required: + - code + - message + - suggestion + title: ApiErrorUnauthorized + ApiErrorAccountInactive: + type: object + properties: + code: + type: string + description: The unique identifier for the type of error. + enum: + - global/account-inactive + message: + type: string + default: Your account is inactive. + description: A description of the error. + suggestion: + type: string + default: Make sure you have verified your email address and have a valid payment method. Contact Support if problems continue. + description: One or more suggestions of possible ways to fix the error. + request_id: + type: string + description: 'Uniquely identifies the request that produced this error. Quote it when contacting support: it is how a failed call is found in our logs and traces.' + required: + - code + - message + - suggestion + title: ApiErrorAccountInactive + description: |- + The account or identity is not in good standing to make the request. + + Your account is inactive or suspended, your identity is deactivated or has + not verified its email, or your account is missing a payment method the + endpoint requires. + ApiErrorNotFound: + type: object + properties: + code: + type: string + description: The unique identifier for the type of error. + enum: + - global/not-found + message: + type: string + default: The requested resource was not found. + description: A description of the error. + suggestion: + type: string + description: One or more suggestions of possible ways to fix the error. + request_id: + type: string + description: 'Uniquely identifies the request that produced this error. Quote it when contacting support: it is how a failed call is found in our logs and traces.' + required: + - code + - message + title: ApiErrorNotFound + description: |- + The resource does not exist, or the caller is not permitted to access it. + + If you believe the ID is correct, ask an account administrator whether or not + you have been granted a role that permits the action. + ApiErrorRateLimited: + type: object + properties: + code: + type: string + description: The unique identifier for the type of error. + enum: + - global/rate-limited + message: + type: string + default: Too many requests. Retry after the interval given in the Retry-After response header. + description: A description of the error. + suggestion: + type: string + default: Wait for the interval in the Retry-After header, then retry the request. Reduce the rate of concurrent requests if this recurs. + description: One or more suggestions of possible ways to fix the error. + request_id: + type: string + description: 'Uniquely identifies the request that produced this error. Quote it when contacting support: it is how a failed call is found in our logs and traces.' + required: + - code + - message + - suggestion + title: ApiErrorRateLimited + description: |- + The request was rate limited upstream and should be retried. + + Carries no detail about which limit was hit. The limit is enforced at the + edge and is not part of the API contract, so naming it here would publish an + implementation detail we intend to keep free to change. + InstanceTypesItem: + type: object + properties: + instance_type: + $ref: '#/components/schemas/InstanceType' + description: The description, technical specifications, and metadata for this instance type. + regions_with_capacity_available: + type: array + items: + $ref: '#/components/schemas/Region' + description: A list of the regions in which this instance type is available. + required: + - instance_type + - regions_with_capacity_available + title: InstanceTypesItem + description: Detailed information and regional availability for the instance type. + InstanceType: + type: object + properties: + name: + type: string + description: The name of the instance type. + example: gpu_8x_h100_sxm5gdr + description: + type: string + description: A description of the instance type. + example: 8x H100 (80 GB SXM5) + gpu_description: + type: string + description: The type of GPU used by this instance type. + example: H100 (80 GB SXM5) + price_cents_per_hour: + type: integer + description: The price of the instance type in US cents per hour. + example: 3592 + specs: + $ref: '#/components/schemas/InstanceTypeSpecs' + description: Detailed technical specifications for the instance type. + architecture: + $ref: '#/components/schemas/InstanceTypeArchitecture' + description: The CPU architecture of the instance type. + example: x86_64 + required: + - name + - description + - gpu_description + - price_cents_per_hour + - specs + - architecture + title: InstanceType + Region: + type: object + properties: + name: + type: string + description: The region code. + description: + type: string + description: The region description. + required: + - name + - description + title: Region + InstanceTypeSpecs: + type: object + properties: + vcpus: + type: integer + description: The number of virtual CPUs. + example: 208 + memory_gib: + type: integer + description: The amount of RAM in gibibytes (GiB). + example: 1800 + storage_gib: + type: integer + description: The amount of storage in gibibytes (GiB). + example: 24780 + gpus: + type: integer + description: The number of GPUs. + example: 8 + required: + - vcpus + - memory_gib + - storage_gib + - gpus + title: InstanceTypeSpecs + InstanceTypeArchitecture: + title: InstanceTypeArchitecture + description: CPU architecture of an instance type. + enum: + - x86_64 + - arm64 + type: string + InstanceTypeRows: + type: object + required: + - data + properties: + data: + type: array + items: + type: object + description: An instance type with its specifications, price and the regions that have capacity. + properties: + name: + type: string + description: The name of the instance type. + example: gpu_8x_h100_sxm5gdr + description: + type: string + description: A description of the instance type. + example: 8x H100 (80 GB SXM5) + gpu_description: + type: string + description: The type of GPU used by this instance type. + example: H100 (80 GB SXM5) + price_cents_per_hour: + type: integer + description: The price of the instance type in US cents per hour. + example: 3592 + architecture: + description: The CPU architecture of the instance type. + enum: + - x86_64 + - arm64 + type: string + vcpus: + type: integer + description: The number of virtual CPUs. + example: 208 + memory_gib: + type: integer + description: The amount of RAM in gibibytes (GiB). + example: 1800 + storage_gib: + type: integer + description: The amount of storage in gibibytes (GiB). + example: 24780 + gpus: + type: integer + description: The number of GPUs. + example: 8 + regions_with_capacity_available: + type: array + description: 'The regions in which this instance type has capacity (name, description). Empty when there is none. Capacity is point-in-time: the regions reported are those with capacity at the moment of the request, and they change continuously.' + items: + $ref: '#/components/schemas/Region' + RegionalCapacityRows: + type: object + required: + - data + properties: + data: + type: array + items: + type: object + description: An instance type and one region in which it has capacity. + properties: + region_name: + type: string + description: The code of a region in which the instance type has capacity. + region_description: + type: string + description: The location represented by the region code. + name: + type: string + description: The name of the instance type. + example: gpu_8x_h100_sxm5gdr + description: + type: string + description: A description of the instance type. + example: 8x H100 (80 GB SXM5) + gpu_description: + type: string + description: The type of GPU used by this instance type. + example: H100 (80 GB SXM5) + price_cents_per_hour: + type: integer + description: The price of the instance type in US cents per hour. + example: 3592 + architecture: + description: The CPU architecture of the instance type. + enum: + - x86_64 + - arm64 + type: string + vcpus: + type: integer + description: The number of virtual CPUs. + example: 208 + memory_gib: + type: integer + description: The amount of RAM in gibibytes (GiB). + example: 1800 + storage_gib: + type: integer + description: The amount of storage in gibibytes (GiB). + example: 24780 + gpus: + type: integer + description: The number of GPUs. + example: 8 + x-stackQL-resources: + instance_types: + id: lambda.instance_types.instance_types + name: instance_types + title: Instance Types + methods: + list: + operation: + $ref: '#/paths/~1instance-types/get' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data + schema_override: + $ref: '#/components/schemas/InstanceTypeRows' + transform: + type: golang_template_json_v0.3.0 + body: '{"data":[{{- $sep := separator "," -}}{{- range $key, $item := index . "data" -}}{{- $t := index $item "instance_type" -}}{{- $s := index $t "specs" -}}{{ call $sep }}{"name":{{ toJson (index $t "name") }},"description":{{ toJson (index $t "description") }},"gpu_description":{{ toJson (index $t "gpu_description") }},"price_cents_per_hour":{{ toJson (index $t "price_cents_per_hour") }},"architecture":{{ toJson (index $t "architecture") }},"vcpus":{{ toJson (index $s "vcpus") }},"memory_gib":{{ toJson (index $s "memory_gib") }},"storage_gib":{{ toJson (index $s "storage_gib") }},"gpus":{{ toJson (index $s "gpus") }},"regions_with_capacity_available":{{ toJson (index $item "regions_with_capacity_available") }}}{{- end -}}]}' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/instance_types/methods/list' + insert: [] + update: [] + delete: [] + replace: [] + regional_capacity: + id: lambda.instance_types.regional_capacity + name: regional_capacity + title: Regional Capacity + methods: + list: + operation: + $ref: '#/paths/~1instance-types/get' + response: + mediaType: application/json + openAPIDocKey: '200' + overrideMediaType: application/json + objectKey: $.data + schema_override: + $ref: '#/components/schemas/RegionalCapacityRows' + transform: + type: golang_template_json_v0.3.0 + body: '{"data":[{{- $sep := separator "," -}}{{- range $key, $item := index . "data" -}}{{- $t := index $item "instance_type" -}}{{- $s := index $t "specs" -}}{{- range $r := index $item "regions_with_capacity_available" -}}{{ call $sep }}{"region_name":{{ toJson (index $r "name") }},"region_description":{{ toJson (index $r "description") }},"name":{{ toJson (index $t "name") }},"description":{{ toJson (index $t "description") }},"gpu_description":{{ toJson (index $t "gpu_description") }},"price_cents_per_hour":{{ toJson (index $t "price_cents_per_hour") }},"architecture":{{ toJson (index $t "architecture") }},"vcpus":{{ toJson (index $s "vcpus") }},"memory_gib":{{ toJson (index $s "memory_gib") }},"storage_gib":{{ toJson (index $s "storage_gib") }},"gpus":{{ toJson (index $s "gpus") }}}{{- end -}}{{- end -}}]}' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/regional_capacity/methods/list' + insert: [] + update: [] + delete: [] + replace: [] +servers: + - url: https://cloud.lambda.ai/api/v1 diff --git a/providers/src/lambda/v00.00.00000/services/instances.yaml b/providers/src/lambda/v00.00.00000/services/instances.yaml new file mode 100644 index 00000000..14b2a596 --- /dev/null +++ b/providers/src/lambda/v00.00.00000/services/instances.yaml @@ -0,0 +1,1832 @@ +openapi: 3.0.3 +info: + title: Instances + description: 'On-demand instances: inventory, launch, update, restart and terminate.' + version: 1.10.0 +paths: + /instance-operations/launch: + post: + responses: + '200': + description: OK + content: + application/json: + schema: + additionalProperties: false + properties: + data: + $ref: '#/components/schemas/InstanceLaunchResponse' + required: + - data + type: object + '400': + description: Bad Request + content: + application/json: + schema: + additionalProperties: false + properties: + error: + type: object + properties: + code: + type: string + description: The unique identifier for the type of error. + enum: + - instance-operations/launch/file-system-in-wrong-region + message: + type: string + description: A description of the error. + suggestion: + type: string + description: One or more suggestions of possible ways to fix the error. + request_id: + type: string + description: 'Uniquely identifies the request that produced this error. Quote it when contacting support: it is how a failed call is found in our logs and traces.' + required: + - code + - message + - suggestion + title: ApiErrorFileSystemInWrongRegion + required: + - error + type: object + '401': + description: Unauthorized + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorUnauthorized' + required: + - error + type: object + '403': + description: Forbidden + content: + application/json: + schema: + additionalProperties: false + properties: + error: + type: object + properties: + code: + type: string + description: The unique identifier for the type of error. + enum: + - global/account-inactive + message: + type: string + default: Your account is inactive. + description: A description of the error. + suggestion: + type: string + default: Make sure you have verified your email address and have a valid payment method. Contact Support if problems continue. + description: One or more suggestions of possible ways to fix the error. + request_id: + type: string + description: 'Uniquely identifies the request that produced this error. Quote it when contacting support: it is how a failed call is found in our logs and traces.' + required: + - code + - message + - suggestion + title: ApiErrorAccountInactive + description: |- + The account or identity is not in good standing to make the request. + + Your account is inactive or suspended, your identity is deactivated or has + not verified its email, or your account is missing a payment method the + endpoint requires. + required: + - error + type: object + '404': + description: Not Found + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorLaunchResourceNotFound' + required: + - error + type: object + '429': + description: Too Many Requests + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorRateLimited' + required: + - error + type: object + tags: + - Instances + summary: Launch instances + description: |- + Launches a Lambda On-Demand Cloud instance. + + Returns an `instance_ids` array. The API launches one instance per request; launch requests are limited to one per 12 seconds. + operationId: launchInstance + requestBody: + content: + application/json: + schema: + properties: + region_name: + type: string + description: The region into which you want to launch the instance. + instance_type_name: + type: string + description: |- + The type of instance you want to launch. To retrieve a list of available instance types, see + [List available instance types](#listInstanceTypes). + example: gpu_8x_a100 + ssh_key_names: + type: array + items: + type: string + description: |- + The names of the SSH keys you want to use to provide access to the instance. + Currently, exactly one SSH key must be specified. + example: + - my-public-key + file_system_names: + type: array + items: + type: string + description: |- + The names of the filesystems you want to mount to the instance. When specified + alongside `file_system_mounts`, any filesystems referred to in both lists will use the + mount path specified in `file_system_mounts`, rather than the default. + example: + - my-filesystem + file_system_mounts: + type: array + items: + $ref: '#/components/schemas/RequestedFilesystemMountEntry' + description: |- + The filesystem mounts to mount to the instance. When specified alongside + `file_system_names`, any filesystems referred to in both lists will use the + mount path specified in `file_system_mounts`, rather than the default. + hostname: + type: string + minLength: 1 + maxLength: 63 + pattern: ^[a-z0-9][0-9a-z-]{0,62}$ + description: |- + The hostname to assign to the instance. If not specified, a default, IP-address-based + hostname is assigned. This hostname is driven into /etc/hostname on the instance. + example: headnode1 + name: + type: string + minLength: 0 + maxLength: 64 + description: The name you want to assign to your instance. Must be 64 characters or fewer. + example: My Instance + image: + description: The machine image you want to use. Defaults to the latest Lambda Stack image. + type: object + properties: + id: + type: string + example: ddaedf1b7a0e41ac981711504493b242 + family: + type: string + description: The family name of the image. + required: + - id + - family + title: ImageSpecificationID + user_data: + type: string + writeOnly: true + format: password + description: |- + An instance configuration string specified in a valid + [cloud-init user-data](https://cloudinit.readthedocs.io/en/latest/explanation/format.html) + format. You can use this field to configure your instance on launch. The + user data string must be plain text and cannot exceed 1MB in size. + example: | + #cloud-config + runcmd: + - echo "Hello, World" > /tmp/hello.txt + tags: + type: array + items: + $ref: '#/components/schemas/RequestedTagEntry' + description: Key/value pairs representing the instance's tags. + firewall_rulesets: + type: array + items: + $ref: '#/components/schemas/FirewallRulesetEntry' + description: |- + The firewall rulesets to associate with the instance. + The firewall rulesets must exist in the same region as the instance. + required: + - region_name + - instance_type_name + - ssh_key_names + title: InstanceLaunchRequest + type: object + required: true + /instance-operations/restart: + post: + responses: + '200': + description: OK + content: + application/json: + schema: + additionalProperties: false + properties: + data: + $ref: '#/components/schemas/InstanceRestartResponse' + example: + restarted_instances: + - id: 0920582c7ff041399e34823a0be62549 + name: My Instance + ip: 198.51.100.2 + private_ip: 10.0.2.100 + status: active + ssh_key_names: + - My SSH key + file_system_names: + - my-filesystem + file_system_mounts: + - mount_point: /lambda/nfs/my-filesystem + file_system_id: a098b0c7ff041399e34823a0be62549 + region: + name: us-west-1 + description: California, USA + instance_type: + name: gpu_8x_example + description: 8x Example GPU (40 GB SXM4) + gpu_description: Example GPU (40 GB SXM4) + price_cents_per_hour: 1592 + specs: + vcpus: 124 + memory_gib: 1800 + storage_gib: 6144 + gpus: 8 + architecture: x86_64 + workspace_id: c8f3a2b17ff041399e34823a0be62549 + image: + id: 43336648-096d-4cba-9aa2-f9bb7727639d + family: ubuntu-lts + hostname: 198.51.100.2 + jupyter_token: 03b7d30d9d3e4d8fa41657bc0d478c1b + jupyter_url: https://jupyter-249e1ccff1894822af39ac822637f881.lambdaspaces.com/?token=03b7d30d9d3e4d8fa41657bc0d478c1b + is_reserved: false + first_healthy: '2023-01-01T00:00:00Z' + actions: + migrate: + available: true + rebuild: + available: true + restart: + available: true + cold_reboot: + available: true + power_cycle: + available: true + terminate: + available: true + tags: + - key: key1 + value: value1 + - key: key2 + value: value2 + required: + - data + type: object + '400': + description: Bad Request + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorInvalidParameters' + required: + - error + type: object + '401': + description: Unauthorized + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorUnauthorized' + required: + - error + type: object + '403': + description: Forbidden + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorAccountInactive' + required: + - error + type: object + '404': + description: Not Found + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorInstanceNotFound' + required: + - error + type: object + '409': + description: Conflict + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorConflict' + required: + - error + type: object + '429': + description: Too Many Requests + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorRateLimited' + required: + - error + type: object + tags: + - Instances + summary: Restart instances + description: |- + Restarts one or more instances. + + Bulk operation: takes an `instance_ids` array (one or more instance IDs) and returns the restarted instances, one row per instance. + operationId: restartInstance + requestBody: + content: + application/json: + schema: + properties: + instance_ids: + type: array + items: + type: string + example: ddaedf1b7a0e41ac981711504493b242 + description: The unique identifiers (IDs) of the instances to restart. + example: + - 0920582c7ff041399e34823a0be62549 + required: + - instance_ids + title: InstanceRestartRequest + type: object + required: true + /instance-operations/terminate: + post: + responses: + '200': + description: OK + content: + application/json: + schema: + additionalProperties: false + properties: + data: + $ref: '#/components/schemas/InstanceTerminateResponse' + example: + terminated_instances: + - id: 0920582c7ff041399e34823a0be62549 + name: My Instance + ip: 198.51.100.2 + private_ip: 10.0.2.100 + status: terminating + ssh_key_names: + - My SSH key + file_system_names: + - my-filesystem + file_system_mounts: + - mount_point: /lambda/nfs/my-filesystem + file_system_id: a098b0c7ff041399e34823a0be62549 + region: + name: us-west-1 + description: California, USA + instance_type: + name: gpu_8x_example + description: 8x Example GPU (40 GB SXM4) + gpu_description: Example GPU (40 GB SXM4) + price_cents_per_hour: 1592 + specs: + vcpus: 124 + memory_gib: 1800 + storage_gib: 6144 + gpus: 8 + architecture: x86_64 + workspace_id: c8f3a2b17ff041399e34823a0be62549 + image: + id: 43336648-096d-4cba-9aa2-f9bb7727639d + family: ubuntu-lts + hostname: 198.51.100.2 + jupyter_token: 03b7d30d9d3e4d8fa41657bc0d478c1b + jupyter_url: https://jupyter-249e1ccff1894822af39ac822637f881.lambdaspaces.com/?token=03b7d30d9d3e4d8fa41657bc0d478c1b + is_reserved: false + first_healthy: '2023-01-01T00:00:00Z' + actions: + migrate: + available: true + rebuild: + available: true + restart: + available: true + cold_reboot: + available: true + power_cycle: + available: true + terminate: + available: true + tags: + - key: key1 + value: value1 + - key: key2 + value: value2 + required: + - data + type: object + '400': + description: Bad Request + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorInvalidParameters' + required: + - error + type: object + '401': + description: Unauthorized + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorUnauthorized' + required: + - error + type: object + '403': + description: Forbidden + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorAccountInactive' + required: + - error + type: object + '404': + description: Not Found + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorInstanceNotFound' + required: + - error + type: object + '429': + description: Too Many Requests + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorRateLimited' + required: + - error + type: object + tags: + - Instances + summary: Terminate instances + description: |- + Terminates one or more instances. + + Bulk operation: takes an `instance_ids` array (one or more instance IDs) and returns the terminated instances, one row per instance. + operationId: terminateInstance + requestBody: + content: + application/json: + schema: + properties: + instance_ids: + type: array + items: + type: string + example: ddaedf1b7a0e41ac981711504493b242 + description: The unique identifiers (IDs) of the instances to terminate. + example: + - 0920582c7ff041399e34823a0be62549 + required: + - instance_ids + title: InstanceTerminateRequest + type: object + required: true + /instances: + get: + responses: + '200': + description: OK + content: + application/json: + schema: + additionalProperties: false + properties: + data: + type: array + items: + $ref: '#/components/schemas/Instance' + page_token: + description: Provide this token in your next request to retrieve the next page of results. If there are no additional pages, this field has a null value. + nullable: true + type: string + example: eyJuZXh0IjoxNzA0MTk2ODAwfQ== + required: + - data + - page_token + type: object + '400': + description: Bad Request + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorInvalidParameters' + required: + - error + type: object + '401': + description: Unauthorized + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorUnauthorized' + required: + - error + type: object + '403': + description: Forbidden + content: + application/json: + schema: + additionalProperties: false + properties: + error: + type: object + properties: + code: + type: string + description: The unique identifier for the type of error. + enum: + - global/account-inactive + message: + type: string + default: Your account is inactive. + description: A description of the error. + suggestion: + type: string + default: Make sure you have verified your email address and have a valid payment method. Contact Support if problems continue. + description: One or more suggestions of possible ways to fix the error. + request_id: + type: string + description: 'Uniquely identifies the request that produced this error. Quote it when contacting support: it is how a failed call is found in our logs and traces.' + required: + - code + - message + - suggestion + title: ApiErrorAccountInactive + description: |- + The account or identity is not in good standing to make the request. + + Your account is inactive or suspended, your identity is deactivated or has + not verified its email, or your account is missing a payment method the + endpoint requires. + required: + - error + type: object + '404': + description: Not Found + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorNotFound' + required: + - error + type: object + '429': + description: Too Many Requests + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorRateLimited' + required: + - error + type: object + tags: + - Instances + summary: List running instances + description: |- + Retrieves a list of your running instances. + + Pagination is opt-in. If you send neither `page_size` nor `page_token`, the response contains every instance, oldest first, and `page_token` is null. If you send either, results are paged newest first, `page_size` (default 50) per page; pass the returned `page_token` to get the next page. + operationId: listInstances + parameters: + - name: page_size + in: query + description: Maximum number of results per page (1-100, default 50). + required: false + schema: + description: Maximum number of results per page (1-100, default 50). + ge: 1 + le: 100 + type: integer + example: 50 + example: 50 + - name: page_token + in: query + description: A page token for cursor-based pagination. + required: false + schema: + description: A page token for cursor-based pagination. + type: string + example: abCdEFg0h1I2jKlm34n5O6Pq78r= + example: abCdEFg0h1I2jKlm34n5O6Pq78r= + - name: cluster_id + in: query + description: |- + If provided, the resulting list will only include + instances that are part of a cluster with this unique identifier (ID). + required: false + schema: + description: |- + If provided, the resulting list will only include + instances that are part of a cluster with this unique identifier (ID). + type: string + example: ddaedf1b7a0e41ac981711504493b242 + example: ddaedf1b7a0e41ac981711504493b242 + /instances/{id}: + get: + responses: + '200': + description: OK + content: + application/json: + schema: + additionalProperties: false + properties: + data: + $ref: '#/components/schemas/Instance' + required: + - data + type: object + '400': + description: Bad Request + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorInvalidParameters' + required: + - error + type: object + '401': + description: Unauthorized + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorUnauthorized' + required: + - error + type: object + '403': + description: Forbidden + content: + application/json: + schema: + additionalProperties: false + properties: + error: + type: object + properties: + code: + type: string + description: The unique identifier for the type of error. + enum: + - global/account-inactive + message: + type: string + default: Your account is inactive. + description: A description of the error. + suggestion: + type: string + default: Make sure you have verified your email address and have a valid payment method. Contact Support if problems continue. + description: One or more suggestions of possible ways to fix the error. + request_id: + type: string + description: 'Uniquely identifies the request that produced this error. Quote it when contacting support: it is how a failed call is found in our logs and traces.' + required: + - code + - message + - suggestion + title: ApiErrorAccountInactive + description: |- + The account or identity is not in good standing to make the request. + + Your account is inactive or suspended, your identity is deactivated or has + not verified its email, or your account is missing a payment method the + endpoint requires. + required: + - error + type: object + '404': + description: Not Found + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorInstanceNotFound' + required: + - error + type: object + '429': + description: Too Many Requests + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorRateLimited' + required: + - error + type: object + tags: + - Instances + summary: Retrieve instance details + description: Retrieves the details of a specific instance, including whether or not the instance is running. + operationId: getInstance + parameters: + - name: id + in: path + description: The unique identifier (ID) of the instance + required: true + schema: + description: The unique identifier (ID) of the instance + type: string + example: ddaedf1b7a0e41ac981711504493b242 + example: ddaedf1b7a0e41ac981711504493b242 + post: + responses: + '200': + description: OK + content: + application/json: + schema: + additionalProperties: false + properties: + data: + $ref: '#/components/schemas/Instance' + required: + - data + type: object + '400': + description: Bad Request + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorInvalidParameters' + required: + - error + type: object + '401': + description: Unauthorized + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorUnauthorized' + required: + - error + type: object + '403': + description: Forbidden + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorAccountInactive' + required: + - error + type: object + '404': + description: Not Found + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorInstanceNotFound' + required: + - error + type: object + '429': + description: Too Many Requests + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorRateLimited' + required: + - error + type: object + tags: + - Instances + summary: Update instance details + description: Updates the details of the specified instance. + operationId: postInstance + parameters: + - name: id + in: path + description: The unique identifier (ID) of the instance + required: true + schema: + description: The unique identifier (ID) of the instance + type: string + example: ddaedf1b7a0e41ac981711504493b242 + example: ddaedf1b7a0e41ac981711504493b242 + requestBody: + content: + application/json: + schema: + properties: + name: + type: string + minLength: 0 + maxLength: 64 + description: The new, user-provided name for the instance. + example: My Instance + tags: + type: array + items: + $ref: '#/components/schemas/RequestedTagEntry' + description: The new tags for the instance. If provided, this replaces the existing tags (an empty list clears them). If not provided, the tags will not be updated. + title: InstanceModificationRequest + type: object + required: true +components: + schemas: + InstanceLaunchResponse: + type: object + properties: + instance_ids: + type: array + items: + type: string + description: The unique identifiers (IDs) of the launched instances. + example: + - 0920582c7ff041399e34823a0be62549 + required: + - instance_ids + title: InstanceLaunchResponse + ApiErrorFileSystemInWrongRegion: + type: object + properties: + code: + type: string + description: The unique identifier for the type of error. + enum: + - instance-operations/launch/file-system-in-wrong-region + message: + type: string + description: A description of the error. + suggestion: + type: string + description: One or more suggestions of possible ways to fix the error. + request_id: + type: string + description: 'Uniquely identifies the request that produced this error. Quote it when contacting support: it is how a failed call is found in our logs and traces.' + required: + - code + - message + title: ApiErrorFileSystemInWrongRegion + ApiErrorInsufficientCapacity: + type: object + properties: + code: + type: string + description: The unique identifier for the type of error. + enum: + - instance-operations/launch/insufficient-capacity + message: + type: string + default: Not enough capacity to fulfill launch request. + description: A description of the error. + suggestion: + type: string + description: One or more suggestions of possible ways to fix the error. + request_id: + type: string + description: 'Uniquely identifies the request that produced this error. Quote it when contacting support: it is how a failed call is found in our logs and traces.' + required: + - code + - message + title: ApiErrorInsufficientCapacity + ApiErrorInvalidParameters: + type: object + properties: + code: + type: string + description: The unique identifier for the type of error. + enum: + - global/invalid-parameters + message: + type: string + default: Invalid request data. + description: A description of the error. + suggestion: + type: string + description: One or more suggestions of possible ways to fix the error. + request_id: + type: string + description: 'Uniquely identifies the request that produced this error. Quote it when contacting support: it is how a failed call is found in our logs and traces.' + required: + - code + - message + title: ApiErrorInvalidParameters + ApiErrorLaunchResourceNotFound: + type: object + properties: + code: + type: string + description: The unique identifier for the type of error. + enum: + - global/object-does-not-exist + message: + type: string + description: The resource the API was unable to find. + suggestion: + type: string + description: One or more suggestions of possible ways to fix the error. + request_id: + type: string + description: 'Uniquely identifies the request that produced this error. Quote it when contacting support: it is how a failed call is found in our logs and traces.' + required: + - code + - message + - suggestion + title: ApiErrorLaunchResourceNotFound + ApiErrorQuotaExceeded: + type: object + properties: + code: + type: string + description: The unique identifier for the type of error. + enum: + - global/quota-exceeded + message: + type: string + default: Quota exceeded. + description: A description of the error. + suggestion: + type: string + default: Contact Support to increase your quota. + description: One or more suggestions of possible ways to fix the error. + request_id: + type: string + description: 'Uniquely identifies the request that produced this error. Quote it when contacting support: it is how a failed call is found in our logs and traces.' + required: + - code + - message + - suggestion + title: ApiErrorQuotaExceeded + ApiErrorUnauthorized: + type: object + properties: + code: + type: string + description: The unique identifier for the type of error. + enum: + - global/invalid-api-key + message: + type: string + default: API key was invalid, expired, or deleted. + description: A description of the error. + suggestion: + type: string + default: Check your API key or create a new one, then try again. + description: One or more suggestions of possible ways to fix the error. + request_id: + type: string + description: 'Uniquely identifies the request that produced this error. Quote it when contacting support: it is how a failed call is found in our logs and traces.' + required: + - code + - message + - suggestion + title: ApiErrorUnauthorized + ApiErrorAccountInactive: + type: object + properties: + code: + type: string + description: The unique identifier for the type of error. + enum: + - global/account-inactive + message: + type: string + default: Your account is inactive. + description: A description of the error. + suggestion: + type: string + default: Make sure you have verified your email address and have a valid payment method. Contact Support if problems continue. + description: One or more suggestions of possible ways to fix the error. + request_id: + type: string + description: 'Uniquely identifies the request that produced this error. Quote it when contacting support: it is how a failed call is found in our logs and traces.' + required: + - code + - message + - suggestion + title: ApiErrorAccountInactive + description: |- + The account or identity is not in good standing to make the request. + + Your account is inactive or suspended, your identity is deactivated or has + not verified its email, or your account is missing a payment method the + endpoint requires. + ApiErrorInvalidBillingAddress: + type: object + properties: + code: + type: string + description: The unique identifier for the type of error. + enum: + - global/invalid-address + message: + type: string + default: Your billing address is invalid. + description: A description of the error. + suggestion: + type: string + default: Make sure your billing address is valid. Contact Support if problems continue. + description: One or more suggestions of possible ways to fix the error. + request_id: + type: string + description: 'Uniquely identifies the request that produced this error. Quote it when contacting support: it is how a failed call is found in our logs and traces.' + required: + - code + - message + - suggestion + title: ApiErrorInvalidBillingAddress + ApiErrorRateLimited: + type: object + properties: + code: + type: string + description: The unique identifier for the type of error. + enum: + - global/rate-limited + message: + type: string + default: Too many requests. Retry after the interval given in the Retry-After response header. + description: A description of the error. + suggestion: + type: string + default: Wait for the interval in the Retry-After header, then retry the request. Reduce the rate of concurrent requests if this recurs. + description: One or more suggestions of possible ways to fix the error. + request_id: + type: string + description: 'Uniquely identifies the request that produced this error. Quote it when contacting support: it is how a failed call is found in our logs and traces.' + required: + - code + - message + - suggestion + title: ApiErrorRateLimited + description: |- + The request was rate limited upstream and should be retried. + + Carries no detail about which limit was hit. The limit is enforced at the + edge and is not part of the API contract, so naming it here would publish an + implementation detail we intend to keep free to change. + RequestedFilesystemMountEntry: + type: object + properties: + mount_point: + type: string + maxLength: 256 + pattern: ^(/home|/lambda/nfs|/data)[//a-zA-Z0-9-]*$ + description: The absolute path indicating where on the instance the filesystem will be mounted. + example: /data/custom-mount-point + file_system_id: + type: string + description: The id of the filesystem to mount to the instance. + example: 398578a2336b49079e74043f0bd2cfe8 + required: + - mount_point + - file_system_id + title: RequestedFilesystemMountEntry + description: The mount point for a filesystem mounted to an instance. + ImageSpecificationID: + type: object + properties: + id: + type: string + example: ddaedf1b7a0e41ac981711504493b242 + required: + - id + title: ImageSpecificationID + description: Specifies the image to use by its unique identifier. + ImageSpecificationFamily: + type: object + properties: + family: + type: string + description: The family name of the image. + required: + - family + title: ImageSpecificationFamily + description: Specifies the image to use by its family name. + RequestedTagEntry: + type: object + properties: + key: + type: string + maxLength: 55 + pattern: ^[a-z][a-z0-9-:]+$ + description: The key of the tag. On instances, keys starting with `lambda-ai-` are reserved. + example: key1 + value: + type: string + maxLength: 128 + description: The value of the tag. + example: value1 + required: + - key + - value + title: RequestedTagEntry + FirewallRulesetEntry: + type: object + properties: + id: + type: string + description: The unique identifier of the firewall ruleset. + example: c4d291f47f9d436fa39f58493ce3b50d + required: + - id + title: FirewallRulesetEntry + description: Reference to a firewall ruleset. + InstanceRestartResponse: + type: object + properties: + restarted_instances: + type: array + items: + $ref: '#/components/schemas/Instance' + description: The list of instances that were successfully restarted. + required: + - restarted_instances + title: InstanceRestartResponse + ApiErrorInstanceNotFound: + type: object + properties: + code: + type: string + description: The unique identifier for the type of error. + enum: + - global/object-does-not-exist + message: + type: string + default: Specified instance does not exist. + description: A description of the error. + suggestion: + type: string + description: One or more suggestions of possible ways to fix the error. + request_id: + type: string + description: 'Uniquely identifies the request that produced this error. Quote it when contacting support: it is how a failed call is found in our logs and traces.' + required: + - code + - message + title: ApiErrorInstanceNotFound + ApiErrorConflict: + type: object + properties: + code: + type: string + description: The unique identifier for the type of error. + enum: + - global/conflict + message: + type: string + default: The request conflicts with the current state of the resource. + description: A description of the error. + suggestion: + type: string + description: One or more suggestions of possible ways to fix the error. + request_id: + type: string + description: 'Uniquely identifies the request that produced this error. Quote it when contacting support: it is how a failed call is found in our logs and traces.' + required: + - code + - message + title: ApiErrorConflict + InstanceTerminateResponse: + type: object + properties: + terminated_instances: + type: array + items: + $ref: '#/components/schemas/Instance' + description: The list of instances that were successfully terminated. + required: + - terminated_instances + title: InstanceTerminateResponse + Instance: + type: object + properties: + id: + type: string + description: The unique identifier of the instance. + example: 0920582c7ff041399e34823a0be62549 + name: + type: string + minLength: 0 + maxLength: 64 + description: If set, the user-provided name of the instance. + example: My Instance + ip: + type: string + description: The public IPv4 address of the instance. + example: 198.51.100.2 + private_ip: + type: string + description: The private IPv4 address of the instance. + example: 10.0.2.100 + status: + $ref: '#/components/schemas/InstanceStatus' + ssh_key_names: + type: array + items: + type: string + description: The names of the SSH keys that are allowed to access the instance. + example: + - My SSH key + file_system_names: + type: array + items: + type: string + description: The names of the filesystems mounted to the instance. If no filesystems are mounted, this array is empty. + example: + - my-filesystem + file_system_mounts: + type: array + items: + $ref: '#/components/schemas/FilesystemMountEntry' + description: |- + The filesystems, along with the mount paths, mounted to + the instances. If no filesystems are mounted, this parameter + will be missing from the response. + region: + $ref: '#/components/schemas/Region' + description: The region in which the instance is deployed. + instance_type: + $ref: '#/components/schemas/InstanceType' + description: Detailed information about the instance's instance type. + image: + $ref: '#/components/schemas/InstanceImage' + description: The machine image the instance booted from. Absent when it can no longer be resolved, such as for a terminated instance. + hostname: + type: string + description: The hostname assigned to this instance, which resolves to the instance's IP. + example: headnode1 + jupyter_token: + type: string + description: The secret token used to log into the JupyterLab server hosted on the instance. + example: 03b7d30d9d3e4d8fa41657bc0d478c1b + jupyter_url: + type: string + description: The URL that opens the JupyterLab environment on the instance. + example: https://jupyter-249e1ccff1894822af39ac822637f881.lambdaspaces.com/?token=03b7d30d9d3e4d8fa41657bc0d478c1b + first_healthy: + description: When the instance first became healthy, or null if it never has. + nullable: true + type: string + format: date-time + actions: + $ref: '#/components/schemas/InstanceActionAvailability' + description: A set of status objects representing the current availability of common instance operations. + tags: + type: array + items: + $ref: '#/components/schemas/TagEntry' + description: Key/value pairs representing the instance's tags. + firewall_rulesets: + type: array + items: + $ref: '#/components/schemas/FirewallRulesetEntry' + description: The firewall rulesets associated with this instance. + required: + - id + - status + - ssh_key_names + - file_system_names + - region + - instance_type + - first_healthy + - actions + title: Instance + description: Detailed information about the instance. + ApiErrorForbidden: + type: object + properties: + code: + type: string + description: The unique identifier for the type of error. + enum: + - global/forbidden + message: + type: string + description: A description of the error. + suggestion: + type: string + description: One or more suggestions of possible ways to fix the error. + request_id: + type: string + description: 'Uniquely identifies the request that produced this error. Quote it when contacting support: it is how a failed call is found in our logs and traces.' + required: + - code + - message + title: ApiErrorForbidden + ApiErrorNotFound: + type: object + properties: + code: + type: string + description: The unique identifier for the type of error. + enum: + - global/not-found + message: + type: string + default: The requested resource was not found. + description: A description of the error. + suggestion: + type: string + description: One or more suggestions of possible ways to fix the error. + request_id: + type: string + description: 'Uniquely identifies the request that produced this error. Quote it when contacting support: it is how a failed call is found in our logs and traces.' + required: + - code + - message + title: ApiErrorNotFound + description: |- + The resource does not exist, or the caller is not permitted to access it. + + If you believe the ID is correct, ask an account administrator whether or not + you have been granted a role that permits the action. + InstanceStatus: + title: InstanceStatus + description: The current status of the instance. + enum: + - booting + - active + - unhealthy + - terminated + - terminating + - preempted + type: string + FilesystemMountEntry: + type: object + properties: + mount_point: + type: string + description: The absolute path indicating where on the instance the filesystem will be mounted. + example: /data/custom-mount-point + file_system_id: + type: string + description: The id of the filesystem to mount to the instance. + example: 398578a2336b49079e74043f0bd2cfe8 + required: + - mount_point + - file_system_id + title: FilesystemMountEntry + description: The mount point for a filesystem mounted to an instance. + Region: + type: object + properties: + name: + type: string + description: The region code. + description: + type: string + description: The region description. + required: + - name + - description + title: Region + InstanceType: + type: object + properties: + name: + type: string + description: The name of the instance type. + example: gpu_8x_h100_sxm5gdr + description: + type: string + description: A description of the instance type. + example: 8x H100 (80 GB SXM5) + gpu_description: + type: string + description: The type of GPU used by this instance type. + example: H100 (80 GB SXM5) + price_cents_per_hour: + type: integer + description: The price of the instance type in US cents per hour. + example: 3592 + specs: + $ref: '#/components/schemas/InstanceTypeSpecs' + description: Detailed technical specifications for the instance type. + architecture: + $ref: '#/components/schemas/InstanceTypeArchitecture' + description: The CPU architecture of the instance type. + example: x86_64 + required: + - name + - description + - gpu_description + - price_cents_per_hour + - specs + - architecture + title: InstanceType + InstanceImage: + type: object + properties: + id: + type: string + description: The unique identifier (ID) of the image. + example: 43336648-096d-4cba-9aa2-f9bb7727639d + family: + type: string + description: The family the image belongs to. + example: ubuntu-lts + required: + - id + - family + title: InstanceImage + description: The machine image an instance booted from. + InstanceActionAvailability: + type: object + properties: + migrate: + $ref: '#/components/schemas/InstanceActionAvailabilityDetails' + description: |- + Indicates whether the instance is currently able to be migrated. + If not, describes why the operation is blocked. + rebuild: + $ref: '#/components/schemas/InstanceActionAvailabilityDetails' + description: |- + Indicates whether the instance is currently able to be rebuilt. + If not, describes why the operation is blocked. + restart: + $ref: '#/components/schemas/InstanceActionAvailabilityDetails' + description: |- + Indicates whether the instance is currently able to be restarted. + If not, describes why the operation is blocked. + cold_reboot: + $ref: '#/components/schemas/InstanceActionAvailabilityDetails' + description: |- + Indicates whether the instance is currently eligible for a cold reboot. + If not, describes why the operation is blocked. + + Deprecated: use `power_cycle` instead, which reports the same availability. + power_cycle: + $ref: '#/components/schemas/InstanceActionAvailabilityDetails' + description: |- + Indicates whether the instance is currently eligible for a power cycle. + If not, describes why the operation is blocked. + terminate: + $ref: '#/components/schemas/InstanceActionAvailabilityDetails' + description: |- + Indicates whether the instance is currently able to be terminated. + If not, describes why the operation is blocked. + required: + - migrate + - rebuild + - restart + - cold_reboot + - power_cycle + - terminate + title: InstanceActionAvailability + TagEntry: + type: object + properties: + key: + type: string + description: The key of the tag. + example: key1 + value: + type: string + description: The value of the tag. + example: value1 + required: + - key + - value + title: TagEntry + InstanceTypeSpecs: + type: object + properties: + vcpus: + type: integer + description: The number of virtual CPUs. + example: 208 + memory_gib: + type: integer + description: The amount of RAM in gibibytes (GiB). + example: 1800 + storage_gib: + type: integer + description: The amount of storage in gibibytes (GiB). + example: 24780 + gpus: + type: integer + description: The number of GPUs. + example: 8 + required: + - vcpus + - memory_gib + - storage_gib + - gpus + title: InstanceTypeSpecs + InstanceTypeArchitecture: + title: InstanceTypeArchitecture + description: CPU architecture of an instance type. + enum: + - x86_64 + - arm64 + type: string + InstanceActionAvailabilityDetails: + type: object + properties: + available: + type: boolean + description: If set, indicates that the relevant operation can be performed on the instance in its current state. + reason_code: + description: A code representing the instance state that is blocking the operation. Only provided if the operation is blocked. + title: InstanceActionUnavailableCode + enum: + - vm-has-not-launched + - vm-is-too-old + - vm-is-terminating + - vm-action-in-progress + - vm-action-unavailable-bare-metal + - vm-action-unavailable-virtualized + type: string + reason_description: + type: string + description: A longer description of why this operation is currently blocked. Only provided if the operation is blocked. + required: + - available + title: InstanceActionAvailabilityDetails + InstanceActionUnavailableCode: + title: InstanceActionUnavailableCode + enum: + - vm-has-not-launched + - vm-is-too-old + - vm-is-terminating + - vm-action-in-progress + - vm-action-unavailable-bare-metal + - vm-action-unavailable-virtualized + type: string + x-stackQL-resources: + instances: + id: lambda.instances.instances + name: instances + title: Instances + methods: + launch: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1instance-operations~1launch/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data + restart: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1instance-operations~1restart/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.restarted_instances + terminate: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1instance-operations~1terminate/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.terminated_instances + list: + operation: + $ref: '#/paths/~1instances/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data + get: + operation: + $ref: '#/paths/~1instances~1{id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data + update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1instances~1{id}/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/instances/methods/get' + - $ref: '#/components/x-stackQL-resources/instances/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/instances/methods/launch' + update: + - $ref: '#/components/x-stackQL-resources/instances/methods/update' + delete: [] + replace: [] + vw_instance_costs: + name: vw_instance_costs + id: lambda.instances.vw_instance_costs + title: Instance Costs + config: + docs: + description: 'The running-instance estate with its cost, one row per instance: the nested region and instance_type objects of the instances resource flattened to columns, the instance type''s price in US cents per hour and in USD per hour and per day, and the hours since the instance first became healthy (the moment Lambda starts billing it; null while booting). The forgot-to-terminate report is SELECT * FROM lambda.instances.vw_instance_costs ORDER BY usd_per_hour DESC.' + fields: + - name: id + type: string + description: The unique identifier (ID) of the instance. + - name: name + type: string + description: The name of the instance. + - name: status + type: string + description: The current status of the instance (booting, active, unhealthy, terminating, terminated or preempted). + - name: region + type: string + description: The name of the region the instance is deployed in. + - name: instance_type + type: string + description: The name of the instance type. + - name: gpu_description + type: string + description: The type of GPU used by the instance type. + - name: gpus + type: integer + description: The number of GPUs. + - name: price_cents_per_hour + type: integer + description: The price of the instance type in US cents per hour. + - name: usd_per_hour + type: number + description: The price of the instance type in USD per hour. + - name: usd_per_day + type: number + description: The price of the instance type in USD per 24 hours. + - name: first_healthy + type: string + description: When the instance first became healthy (billing starts), or null if it never has. + - name: hours_running + type: number + description: Hours since first_healthy, to one decimal place; null while the instance is booting. + - name: ip + type: string + description: The public IPv4 address of the instance. + - name: ssh_key_names + type: array + description: The names of the SSH keys that are allowed to access the instance (JSON array). + views: + select: + predicate: sqlDialect == "sqlite3" + ddl: |- + SELECT id, + name, + status, + json_extract(region, '$.name') AS region, + json_extract(instance_type, '$.name') AS instance_type, + json_extract(instance_type, '$.gpu_description') AS gpu_description, + json_extract(instance_type, '$.specs.gpus') AS gpus, + json_extract(instance_type, '$.price_cents_per_hour') AS price_cents_per_hour, + json_extract(instance_type, '$.price_cents_per_hour') / 100.0 AS usd_per_hour, + json_extract(instance_type, '$.price_cents_per_hour') * 24 / 100.0 AS usd_per_day, + first_healthy, + ROUND((julianday('now') - julianday(first_healthy)) * 24, 1) AS hours_running, + ip, + ssh_key_names + FROM lambda.instances.instances + fallback: + predicate: sqlDialect == "postgres" + ddl: |- + SELECT id, + name, + status, + region::jsonb->>'name' AS region, + instance_type::jsonb->>'name' AS instance_type, + instance_type::jsonb->>'gpu_description' AS gpu_description, + (instance_type::jsonb->'specs'->>'gpus')::int AS gpus, + (instance_type::jsonb->>'price_cents_per_hour')::int AS price_cents_per_hour, + (instance_type::jsonb->>'price_cents_per_hour')::numeric / 100.0 AS usd_per_hour, + (instance_type::jsonb->>'price_cents_per_hour')::numeric * 24 / 100.0 AS usd_per_day, + first_healthy, + ROUND(EXTRACT(EPOCH FROM (now() - first_healthy::timestamptz)) / 3600, 1) AS hours_running, + ip, + ssh_key_names + FROM lambda.instances.instances +servers: + - url: https://cloud.lambda.ai/api/v1 +x-stackQL-config: + pagination: + requestToken: + key: page_token + location: query + responseToken: + key: $.page_token + location: body diff --git a/providers/src/lambda/v00.00.00000/services/regions.yaml b/providers/src/lambda/v00.00.00000/services/regions.yaml new file mode 100644 index 00000000..5cd9312b --- /dev/null +++ b/providers/src/lambda/v00.00.00000/services/regions.yaml @@ -0,0 +1,224 @@ +openapi: 3.0.3 +info: + title: Regions + description: Lambda Cloud regions. + version: 1.10.0 +paths: + /regions: + get: + responses: + '200': + description: OK + content: + application/json: + schema: + additionalProperties: false + properties: + data: + type: array + items: + $ref: '#/components/schemas/Region' + required: + - data + type: object + '401': + description: Unauthorized + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorUnauthorized' + required: + - error + type: object + '403': + description: Forbidden + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorAccountInactive' + required: + - error + type: object + '404': + description: Not Found + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorNotFound' + required: + - error + type: object + '429': + description: Too Many Requests + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorRateLimited' + required: + - error + type: object + tags: + - Regions + summary: List regions + description: Retrieves a list of available regions. + operationId: listRegions +components: + schemas: + Region: + type: object + properties: + name: + type: string + description: The region code. + description: + type: string + description: The region description. + required: + - name + - description + title: Region + ApiErrorUnauthorized: + type: object + properties: + code: + type: string + description: The unique identifier for the type of error. + enum: + - global/invalid-api-key + message: + type: string + default: API key was invalid, expired, or deleted. + description: A description of the error. + suggestion: + type: string + default: Check your API key or create a new one, then try again. + description: One or more suggestions of possible ways to fix the error. + request_id: + type: string + description: 'Uniquely identifies the request that produced this error. Quote it when contacting support: it is how a failed call is found in our logs and traces.' + required: + - code + - message + - suggestion + title: ApiErrorUnauthorized + ApiErrorAccountInactive: + type: object + properties: + code: + type: string + description: The unique identifier for the type of error. + enum: + - global/account-inactive + message: + type: string + default: Your account is inactive. + description: A description of the error. + suggestion: + type: string + default: Make sure you have verified your email address and have a valid payment method. Contact Support if problems continue. + description: One or more suggestions of possible ways to fix the error. + request_id: + type: string + description: 'Uniquely identifies the request that produced this error. Quote it when contacting support: it is how a failed call is found in our logs and traces.' + required: + - code + - message + - suggestion + title: ApiErrorAccountInactive + description: |- + The account or identity is not in good standing to make the request. + + Your account is inactive or suspended, your identity is deactivated or has + not verified its email, or your account is missing a payment method the + endpoint requires. + ApiErrorNotFound: + type: object + properties: + code: + type: string + description: The unique identifier for the type of error. + enum: + - global/not-found + message: + type: string + default: The requested resource was not found. + description: A description of the error. + suggestion: + type: string + description: One or more suggestions of possible ways to fix the error. + request_id: + type: string + description: 'Uniquely identifies the request that produced this error. Quote it when contacting support: it is how a failed call is found in our logs and traces.' + required: + - code + - message + title: ApiErrorNotFound + description: |- + The resource does not exist, or the caller is not permitted to access it. + + If you believe the ID is correct, ask an account administrator whether or not + you have been granted a role that permits the action. + ApiErrorRateLimited: + type: object + properties: + code: + type: string + description: The unique identifier for the type of error. + enum: + - global/rate-limited + message: + type: string + default: Too many requests. Retry after the interval given in the Retry-After response header. + description: A description of the error. + suggestion: + type: string + default: Wait for the interval in the Retry-After header, then retry the request. Reduce the rate of concurrent requests if this recurs. + description: One or more suggestions of possible ways to fix the error. + request_id: + type: string + description: 'Uniquely identifies the request that produced this error. Quote it when contacting support: it is how a failed call is found in our logs and traces.' + required: + - code + - message + - suggestion + title: ApiErrorRateLimited + description: |- + The request was rate limited upstream and should be retried. + + Carries no detail about which limit was hit. The limit is enforced at the + edge and is not part of the API contract, so naming it here would publish an + implementation detail we intend to keep free to change. + x-stackQL-resources: + regions: + id: lambda.regions.regions + name: regions + title: Regions + methods: + list: + operation: + $ref: '#/paths/~1regions/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/regions/methods/list' + insert: [] + update: [] + delete: [] + replace: [] +servers: + - url: https://cloud.lambda.ai/api/v1 diff --git a/providers/src/lambda/v00.00.00000/services/ssh_keys.yaml b/providers/src/lambda/v00.00.00000/services/ssh_keys.yaml new file mode 100644 index 00000000..986d58ad --- /dev/null +++ b/providers/src/lambda/v00.00.00000/services/ssh_keys.yaml @@ -0,0 +1,593 @@ +openapi: 3.0.3 +info: + title: SSH Keys + description: SSH keys registered in the account, used for access to launched instances. + version: 1.10.0 +paths: + /ssh-keys: + get: + responses: + '200': + description: OK + content: + application/json: + schema: + additionalProperties: false + properties: + data: + type: array + items: + $ref: '#/components/schemas/SSHKey' + required: + - data + type: object + '400': + description: Bad Request + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorInvalidParameters' + required: + - error + type: object + '401': + description: Unauthorized + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorUnauthorized' + required: + - error + type: object + '403': + description: Forbidden + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorAccountInactive' + required: + - error + type: object + '404': + description: Not Found + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorNotFound' + required: + - error + type: object + '429': + description: Too Many Requests + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorRateLimited' + required: + - error + type: object + tags: + - SSH keys + summary: List your SSH keys + description: Retrieves a list of your SSH keys. + operationId: listSSHKeys + post: + responses: + '200': + description: OK + content: + application/json: + schema: + additionalProperties: false + properties: + data: + type: object + properties: + id: + type: string + description: The unique identifier (ID) of the SSH key. + example: ddf9a910ceb744a0bb95242cbba6cb50 + name: + type: string + minLength: 1 + maxLength: 64 + description: The name of the SSH key. + example: my-public-key + public_key: + type: string + minLength: 1 + maxLength: 4096 + description: The public key for the SSH key. + example: ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICN+lJwsONkwrdsSnQsu1ydUkIuIg5oOC+Eslvmtt60T noname + private_key: + type: string + description: |- + The private key generated in the SSH key pair. Store this value locally; + Lambda does not retain the private key server-side. + example: '-----BEGIN RSA PRIVATE KEY-----\n...\n-----END RSA PRIVATE KEY-----\n' + required: + - id + - name + - public_key + - private_key + title: GeneratedSSHKey + description: Information about a server-generated SSH key. + required: + - data + type: object + '400': + description: Bad Request + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorInvalidParameters' + required: + - error + type: object + '401': + description: Unauthorized + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorUnauthorized' + required: + - error + type: object + '403': + description: Forbidden + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorAccountInactive' + required: + - error + type: object + '404': + description: Not Found + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorNotFound' + required: + - error + type: object + '429': + description: Too Many Requests + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorRateLimited' + required: + - error + type: object + tags: + - SSH keys + summary: Add an SSH key + description: |- + Add an SSH key to your Lambda Cloud account. You can upload an existing public + key, or you can generate a new key pair. + + - To use an existing key pair, set the `public_key` property in the request body + to your public key. + + - To generate a new key pair, omit the `public_key` property from the request + body. + + **Important:** Lambda doesn't store your private key after it's been generated. If you generate a new key pair, make sure to save the resulting private key locally. + + For example, to generate a new key pair and associate it with a Lambda + On-Demand Cloud instance: + + 1. Generate the key pair. The command provided below automatically extracts and + saves the returned private key to a new file called `key.pem`. Replace + `` with the name you want to assign to the SSH key: + + ```bash + curl --request POST --url 'https://cloud.lambda.ai/api/v1/ssh-keys' \ + --fail \ + --header "Authorization: Bearer ${LAMBDA_API_KEY}" \ + --data '{"name": ""}' \ + | jq -r '.data.private_key' > key.pem + ``` + + 2. Next, set the private key's permissions to read-only: + + ```bash + chmod 400 key.pem + ``` + + 3. Launch a new instance. Replace `` with the name you assigned + to your SSH key. + + ```bash + curl --request POST 'https://cloud.lambda.ai/api/v1/instance-operations/launch' \ + --fail \ + --header "Authorization: Bearer ${LAMBDA_API_KEY}" \ + --data '{"region_name":"us-west-1","instance_type_name":"gpu_1x_a10","ssh_key_names":[""],"file_system_names":[],"quantity":1,"name":"My Instance"}' + ``` + + 4. From your local terminal, establish an SSH connection to the instance. + Replace `` with the public IP of the instance: + + ```bash + ssh -i key.pem + ``` + operationId: addSSHKey + requestBody: + content: + application/json: + schema: + properties: + name: + type: string + minLength: 1 + maxLength: 64 + description: The name of the SSH key. + example: my-public-key + public_key: + type: string + minLength: 1 + maxLength: 4096 + description: The public key to store. Omit this to generate a new key pair. + example: ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICN+lJwsONkwrdsSnQsu1ydUkIuIg5oOC+Eslvmtt60T noname + required: + - name + title: AddSSHKeyRequest + type: object + required: true + /ssh-keys/{id}: + delete: + responses: + '200': + description: OK + content: + application/json: + schema: + additionalProperties: false + properties: + data: + $ref: '#/components/schemas/EmptyResponse' + required: + - data + type: object + '400': + description: Bad Request + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorInvalidParameters' + required: + - error + type: object + '401': + description: Unauthorized + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorUnauthorized' + required: + - error + type: object + '403': + description: Forbidden + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorAccountInactive' + required: + - error + type: object + '404': + description: Not Found + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorNotFound' + required: + - error + type: object + '429': + description: Too Many Requests + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorRateLimited' + required: + - error + type: object + tags: + - SSH keys + summary: Delete an SSH key + description: Deletes the specified SSH key. + operationId: deleteSSHKey + parameters: + - name: id + in: path + description: The unique identifier (ID) of the SSH key to delete + required: true + schema: + description: The unique identifier (ID) of the SSH key to delete + type: string + example: ddaedf1b7a0e41ac981711504493b242 + example: ddf9a910ceb744a0bb95242cbba6cb50 +components: + schemas: + SSHKey: + type: object + properties: + id: + type: string + description: The unique identifier (ID) of the SSH key. + example: ddf9a910ceb744a0bb95242cbba6cb50 + name: + type: string + minLength: 1 + maxLength: 64 + description: The name of the SSH key. + example: my-public-key + public_key: + type: string + minLength: 1 + maxLength: 4096 + description: The public key for the SSH key. + example: ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICN+lJwsONkwrdsSnQsu1ydUkIuIg5oOC+Eslvmtt60T noname + required: + - id + - name + - public_key + title: SSHKey + description: Information about a stored SSH key that can be used to access instances over SSH. + ApiErrorInvalidParameters: + type: object + properties: + code: + type: string + description: The unique identifier for the type of error. + enum: + - global/invalid-parameters + message: + type: string + default: Invalid request data. + description: A description of the error. + suggestion: + type: string + description: One or more suggestions of possible ways to fix the error. + request_id: + type: string + description: 'Uniquely identifies the request that produced this error. Quote it when contacting support: it is how a failed call is found in our logs and traces.' + required: + - code + - message + title: ApiErrorInvalidParameters + ApiErrorUnauthorized: + type: object + properties: + code: + type: string + description: The unique identifier for the type of error. + enum: + - global/invalid-api-key + message: + type: string + default: API key was invalid, expired, or deleted. + description: A description of the error. + suggestion: + type: string + default: Check your API key or create a new one, then try again. + description: One or more suggestions of possible ways to fix the error. + request_id: + type: string + description: 'Uniquely identifies the request that produced this error. Quote it when contacting support: it is how a failed call is found in our logs and traces.' + required: + - code + - message + - suggestion + title: ApiErrorUnauthorized + ApiErrorAccountInactive: + type: object + properties: + code: + type: string + description: The unique identifier for the type of error. + enum: + - global/account-inactive + message: + type: string + default: Your account is inactive. + description: A description of the error. + suggestion: + type: string + default: Make sure you have verified your email address and have a valid payment method. Contact Support if problems continue. + description: One or more suggestions of possible ways to fix the error. + request_id: + type: string + description: 'Uniquely identifies the request that produced this error. Quote it when contacting support: it is how a failed call is found in our logs and traces.' + required: + - code + - message + - suggestion + title: ApiErrorAccountInactive + description: |- + The account or identity is not in good standing to make the request. + + Your account is inactive or suspended, your identity is deactivated or has + not verified its email, or your account is missing a payment method the + endpoint requires. + ApiErrorNotFound: + type: object + properties: + code: + type: string + description: The unique identifier for the type of error. + enum: + - global/not-found + message: + type: string + default: The requested resource was not found. + description: A description of the error. + suggestion: + type: string + description: One or more suggestions of possible ways to fix the error. + request_id: + type: string + description: 'Uniquely identifies the request that produced this error. Quote it when contacting support: it is how a failed call is found in our logs and traces.' + required: + - code + - message + title: ApiErrorNotFound + description: |- + The resource does not exist, or the caller is not permitted to access it. + + If you believe the ID is correct, ask an account administrator whether or not + you have been granted a role that permits the action. + ApiErrorRateLimited: + type: object + properties: + code: + type: string + description: The unique identifier for the type of error. + enum: + - global/rate-limited + message: + type: string + default: Too many requests. Retry after the interval given in the Retry-After response header. + description: A description of the error. + suggestion: + type: string + default: Wait for the interval in the Retry-After header, then retry the request. Reduce the rate of concurrent requests if this recurs. + description: One or more suggestions of possible ways to fix the error. + request_id: + type: string + description: 'Uniquely identifies the request that produced this error. Quote it when contacting support: it is how a failed call is found in our logs and traces.' + required: + - code + - message + - suggestion + title: ApiErrorRateLimited + description: |- + The request was rate limited upstream and should be retried. + + Carries no detail about which limit was hit. The limit is enforced at the + edge and is not part of the API contract, so naming it here would publish an + implementation detail we intend to keep free to change. + GeneratedSSHKey: + type: object + properties: + id: + type: string + description: The unique identifier (ID) of the SSH key. + example: ddf9a910ceb744a0bb95242cbba6cb50 + name: + type: string + minLength: 1 + maxLength: 64 + description: The name of the SSH key. + example: my-public-key + public_key: + type: string + minLength: 1 + maxLength: 4096 + description: The public key for the SSH key. + example: ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICN+lJwsONkwrdsSnQsu1ydUkIuIg5oOC+Eslvmtt60T noname + private_key: + type: string + description: |- + The private key generated in the SSH key pair. Store this value locally; + Lambda does not retain the private key server-side. + example: '-----BEGIN RSA PRIVATE KEY-----\n...\n-----END RSA PRIVATE KEY-----\n' + required: + - id + - name + - public_key + - private_key + title: GeneratedSSHKey + description: Information about a server-generated SSH key. + EmptyResponse: + type: object + properties: {} + title: EmptyResponse + x-stackQL-resources: + ssh_keys: + id: lambda.ssh_keys.ssh_keys + name: ssh_keys + title: Ssh Keys + methods: + list: + operation: + $ref: '#/paths/~1ssh-keys/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1ssh-keys/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data + delete: + operation: + $ref: '#/paths/~1ssh-keys~1{id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/ssh_keys/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/ssh_keys/methods/create' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/ssh_keys/methods/delete' + replace: [] +servers: + - url: https://cloud.lambda.ai/api/v1 diff --git a/providers/src/lambda/v00.00.00000/services/support.yaml b/providers/src/lambda/v00.00.00000/services/support.yaml new file mode 100644 index 00000000..e6f60153 --- /dev/null +++ b/providers/src/lambda/v00.00.00000/services/support.yaml @@ -0,0 +1,2006 @@ +openapi: 3.0.3 +info: + title: Support + description: Support tickets and ticket attachments. + version: 1.10.0 +paths: + /tickets: + get: + responses: + '200': + description: OK + content: + application/json: + schema: + additionalProperties: false + properties: + data: + $ref: '#/components/schemas/TicketListResponse' + required: + - data + type: object + '400': + description: Bad Request + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorInvalidParameters' + required: + - error + type: object + '401': + description: Unauthorized + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorUnauthorized' + required: + - error + type: object + '403': + description: Forbidden + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorAccountInactive' + required: + - error + type: object + '404': + description: Not Found + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorNotFound' + required: + - error + type: object + '429': + description: Too Many Requests + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorRateLimited' + required: + - error + type: object + tags: + - Support Tickets + summary: List support tickets + description: Retrieves a list of support tickets for your account. + operationId: listTickets + parameters: + - name: status + in: query + description: The current status of a support ticket. + required: false + schema: + description: The current status of a support ticket. + items: + $ref: '#/components/schemas/TicketStatus' + type: array + example: + - open + - pending + example: + - open + - pending + - name: type + in: query + description: The type of support ticket. + required: false + schema: + description: The type of support ticket. + items: + $ref: '#/components/schemas/TicketType' + type: array + example: + - incident + - service_request + - automated_event + example: + - incident + - service_request + - automated_event + - name: severity + in: query + description: The severity level for incident tickets. + required: false + schema: + description: The severity level for incident tickets. + items: + $ref: '#/components/schemas/TicketSeverity' + type: array + example: + - sev_1 + - sev_2 + example: + - sev_1 + - sev_2 + - name: priority + in: query + description: The priority level of a support ticket. + required: false + schema: + description: The priority level of a support ticket. + items: + $ref: '#/components/schemas/TicketPriority' + type: array + example: + - high + - urgent + example: + - high + - urgent + - name: device_serial + in: query + description: The serial number of the affected device. Matching is case-insensitive. + required: false + schema: + description: The serial number of the affected device. Matching is case-insensitive. + items: + type: string + type: array + example: + - SN123456789 + - SN987654321 + example: + - SN123456789 + - SN987654321 + - name: order_by + in: query + description: Specifies the field used to sort the list of tickets. + required: false + schema: + $ref: '#/components/schemas/TicketOrderByField' + description: Specifies the field used to sort the list of tickets. + example: created_at + example: created_at + - name: direction + in: query + description: Specifies the order in which to sort the list of tickets. + required: false + schema: + $ref: '#/components/schemas/SortDirection' + description: Specifies the order in which to sort the list of tickets. + example: desc + example: desc + - name: page_token + in: query + description: A page token. Provide this token in your next request to retrieve the next page of results. If there are no additional pages, this field has a null value. + required: false + schema: + description: A page token. Provide this token in your next request to retrieve the next page of results. If there are no additional pages, this field has a null value. + type: string + example: abCdEFg0h1I2jKlm34n5O6Pq78r= + example: abCdEFg0h1I2jKlm34n5O6Pq78r= + post: + responses: + '200': + description: OK + content: + application/json: + schema: + additionalProperties: false + properties: + data: + $ref: '#/components/schemas/TicketCreateResponse' + required: + - data + type: object + '400': + description: Bad Request + content: + application/json: + schema: + additionalProperties: false + properties: + error: + type: object + properties: + code: + type: string + description: The unique identifier for the type of error. + enum: + - global/invalid-parameters + message: + type: string + default: Invalid request data. + description: A description of the error. + suggestion: + type: string + description: One or more suggestions of possible ways to fix the error. + request_id: + type: string + description: 'Uniquely identifies the request that produced this error. Quote it when contacting support: it is how a failed call is found in our logs and traces.' + required: + - code + - message + - suggestion + title: ApiErrorInvalidParameters + required: + - error + type: object + '401': + description: Unauthorized + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorUnauthorized' + required: + - error + type: object + '403': + description: Forbidden + content: + application/json: + schema: + additionalProperties: false + properties: + error: + type: object + properties: + code: + type: string + description: The unique identifier for the type of error. + enum: + - global/account-inactive + message: + type: string + default: Your account is inactive. + description: A description of the error. + suggestion: + type: string + default: Make sure you have verified your email address and have a valid payment method. Contact Support if problems continue. + description: One or more suggestions of possible ways to fix the error. + request_id: + type: string + description: 'Uniquely identifies the request that produced this error. Quote it when contacting support: it is how a failed call is found in our logs and traces.' + required: + - code + - message + - suggestion + title: ApiErrorAccountInactive + description: |- + The account or identity is not in good standing to make the request. + + Your account is inactive or suspended, your identity is deactivated or has + not verified its email, or your account is missing a payment method the + endpoint requires. + required: + - error + type: object + '404': + description: Not Found + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorNotFound' + required: + - error + type: object + '429': + description: Too Many Requests + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorRateLimited' + required: + - error + type: object + tags: + - Support Tickets + summary: Create a support ticket + description: Creates a new support ticket. + operationId: createTicket + requestBody: + content: + application/json: + schema: + properties: + subject: + type: string + description: A short summary of the issue. + example: GPU cluster experiencing performance degradation + description: + type: string + description: An initial description of the issue or request. When you make an API request to list the comments on this ticket, this will appear as the first public comment in the list. + example: Performance drops by 30-40% during peak hours. + type: + $ref: '#/components/schemas/TicketRequestType' + example: incident + severity: + $ref: '#/components/schemas/TicketSeverity' + description: The severity level of the issue. Required for incident tickets, must not be provided for service requests. + example: sev_1 + priority: + $ref: '#/components/schemas/TicketPriority' + description: The priority level of the ticket. + example: high + ip: + type: string + description: The IP address of the affected node. + example: 192.222.53.194 + instance_id: + type: string + description: The ID of the affected on-demand instance. + example: 2fbb7a309a7c475abe7ee58bd125ac36 + cluster_id: + type: string + description: The ID of the affected 1CC or Supercluster. + example: a0bacf07268245a2b596b5863185a4ff + hostname: + type: string + description: The hostname of the affected device. + example: abc-gpu-001 + device_serial: + type: string + description: The serial number of the affected device. + example: SN123456789 + requester_email: + type: string + description: The email address to associate with the ticket's requester. + example: alerts@example.com + affected_devices: + type: array + items: + type: string + description: The list of devices affected by the issue. + example: + - abc-gpu-001 + - abc-gpu-002 + required: + - subject + - description + - type + title: TicketCreateRequest + type: object + required: true + /tickets/{ticket_id}: + get: + responses: + '200': + description: OK + content: + application/json: + schema: + additionalProperties: false + properties: + data: + $ref: '#/components/schemas/Ticket' + required: + - data + type: object + '400': + description: Bad Request + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorInvalidParameters' + required: + - error + type: object + '401': + description: Unauthorized + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorUnauthorized' + required: + - error + type: object + '403': + description: Forbidden + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorAccountInactive' + required: + - error + type: object + '404': + description: Not Found + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorTicketNotFound' + required: + - error + type: object + '429': + description: Too Many Requests + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorRateLimited' + required: + - error + type: object + tags: + - Support Tickets + summary: Get a support ticket + description: Retrieves a specific support ticket by ID. + operationId: getTicket + parameters: + - name: ticket_id + in: path + description: The ticket ID. + required: true + schema: + description: The ticket ID. + type: string + example: 0920582c7ff041399e34823a0be62549 + patch: + responses: + '202': + description: Accepted + content: + application/json: + schema: + additionalProperties: false + properties: + data: + $ref: '#/components/schemas/EmptyResponse' + required: + - data + type: object + '400': + description: Bad Request + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorInvalidParameters' + required: + - error + type: object + '401': + description: Unauthorized + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorUnauthorized' + required: + - error + type: object + '403': + description: Forbidden + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorAccountInactive' + required: + - error + type: object + '404': + description: Not Found + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorTicketNotFound' + required: + - error + type: object + '429': + description: Too Many Requests + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorRateLimited' + required: + - error + type: object + tags: + - Support Tickets + summary: Update a support ticket + description: Updates a support ticket status, severity, or priority, or adds a comment to the ticket. Returns a 202. Ticket updates happen asynchronously so to see the result of an update, re-query the tickets API. + operationId: updateTicket + parameters: + - name: ticket_id + in: path + description: The ticket ID. + required: true + schema: + description: The ticket ID. + type: string + example: 0920582c7ff041399e34823a0be62549 + requestBody: + content: + application/json: + schema: + properties: + status: + type: string + description: The new status to set the ticket to. + enum: + - solved + example: solved + severity: + $ref: '#/components/schemas/TicketSeverity' + description: The new severity level to set the ticket to. + example: sev_2 + priority: + $ref: '#/components/schemas/TicketPriority' + description: The new priority level to set the ticket to. + example: high + comment: + $ref: '#/components/schemas/TicketCommentInput' + description: Adds a new comment. + affected_devices: + type: array + items: + type: string + description: The list of devices affected by the issue. + example: + - abc-gpu-001 + - abc-gpu-002 + title: TicketUpdateRequest + type: object + required: true + /tickets/{ticket_id}/attachments: + get: + responses: + '200': + description: OK + content: + application/json: + schema: + additionalProperties: false + properties: + data: + $ref: '#/components/schemas/AttachmentListResponse' + required: + - data + type: object + '400': + description: Bad Request + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorInvalidParameters' + required: + - error + type: object + '401': + description: Unauthorized + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorUnauthorized' + required: + - error + type: object + '403': + description: Forbidden + content: + application/json: + schema: + additionalProperties: false + properties: + error: + type: object + properties: + code: + type: string + description: The unique identifier for the type of error. + enum: + - global/account-inactive + message: + type: string + default: Your account is inactive. + description: A description of the error. + suggestion: + type: string + default: Make sure you have verified your email address and have a valid payment method. Contact Support if problems continue. + description: One or more suggestions of possible ways to fix the error. + request_id: + type: string + description: 'Uniquely identifies the request that produced this error. Quote it when contacting support: it is how a failed call is found in our logs and traces.' + required: + - code + - message + - suggestion + title: ApiErrorAccountInactive + description: |- + The account or identity is not in good standing to make the request. + + Your account is inactive or suspended, your identity is deactivated or has + not verified its email, or your account is missing a payment method the + endpoint requires. + required: + - error + type: object + '404': + description: Not Found + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorTicketNotFound' + required: + - error + type: object + '429': + description: Too Many Requests + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorRateLimited' + required: + - error + type: object + tags: + - Support Tickets + summary: List ticket attachments + description: Retrieves all attachments for a ticket. + operationId: listAttachments + parameters: + - name: ticket_id + in: path + description: The ticket ID. + required: true + schema: + description: The ticket ID. + type: string + example: 0920582c7ff041399e34823a0be62549 + - name: status + in: query + description: The current status of an attachment upload. + required: false + schema: + $ref: '#/components/schemas/AttachmentUploadStatus' + description: The current status of an attachment upload. + example: uploaded + example: uploaded + post: + responses: + '200': + description: OK + content: + application/json: + schema: + additionalProperties: false + properties: + data: + $ref: '#/components/schemas/AttachmentInitiateResponse' + required: + - data + type: object + '400': + description: Bad Request + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorInvalidParameters' + required: + - error + type: object + '401': + description: Unauthorized + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorUnauthorized' + required: + - error + type: object + '403': + description: Forbidden + content: + application/json: + schema: + additionalProperties: false + properties: + error: + type: object + properties: + code: + type: string + description: The unique identifier for the type of error. + enum: + - global/account-inactive + message: + type: string + default: Your account is inactive. + description: A description of the error. + suggestion: + type: string + default: Make sure you have verified your email address and have a valid payment method. Contact Support if problems continue. + description: One or more suggestions of possible ways to fix the error. + request_id: + type: string + description: 'Uniquely identifies the request that produced this error. Quote it when contacting support: it is how a failed call is found in our logs and traces.' + required: + - code + - message + - suggestion + title: ApiErrorAccountInactive + description: |- + The account or identity is not in good standing to make the request. + + Your account is inactive or suspended, your identity is deactivated or has + not verified its email, or your account is missing a payment method the + endpoint requires. + required: + - error + type: object + '404': + description: Not Found + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorTicketNotFound' + required: + - error + type: object + '429': + description: Too Many Requests + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorRateLimited' + required: + - error + type: object + tags: + - Support Tickets + summary: Initiate attachment upload + description: Start the upload process for a ticket attachment. Returns a presigned URL for direct upload to storage. + operationId: initiateAttachmentUpload + parameters: + - name: ticket_id + in: path + description: The ticket ID. + required: true + schema: + description: The ticket ID. + type: string + example: 0920582c7ff041399e34823a0be62549 + requestBody: + content: + application/json: + schema: + description: Request to initiate file upload for a ticket attachment. + properties: + filename: + type: string + maxLength: 255 + description: The original filename. + example: debug-logs.tar.gz + content_type: + type: string + description: The MIME type of the attachment, such as `application/gzip` for a .gz file or text/plain for a plaintext file. + example: application/gzip + size_bytes: + type: integer + minimum: 1 + description: The file size in bytes. The file size must be one or more bytes. + example: 1024000 + required: + - filename + - content_type + - size_bytes + title: AttachmentInitiateRequest + type: object + required: true + /tickets/{ticket_id}/attachments/{attachment_id}: + delete: + responses: + '200': + description: OK + content: + application/json: + schema: + additionalProperties: false + properties: + data: + $ref: '#/components/schemas/EmptyResponse' + required: + - data + type: object + '400': + description: Bad Request + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorInvalidParameters' + required: + - error + type: object + '401': + description: Unauthorized + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorUnauthorized' + required: + - error + type: object + '403': + description: Forbidden + content: + application/json: + schema: + additionalProperties: false + properties: + error: + type: object + properties: + code: + type: string + description: The unique identifier for the type of error. + enum: + - global/account-inactive + message: + type: string + default: Your account is inactive. + description: A description of the error. + suggestion: + type: string + default: Make sure you have verified your email address and have a valid payment method. Contact Support if problems continue. + description: One or more suggestions of possible ways to fix the error. + request_id: + type: string + description: 'Uniquely identifies the request that produced this error. Quote it when contacting support: it is how a failed call is found in our logs and traces.' + required: + - code + - message + - suggestion + title: ApiErrorAccountInactive + description: |- + The account or identity is not in good standing to make the request. + + Your account is inactive or suspended, your identity is deactivated or has + not verified its email, or your account is missing a payment method the + endpoint requires. + required: + - error + type: object + '404': + description: Not Found + content: + application/json: + schema: + additionalProperties: false + properties: + error: + type: object + properties: + code: + type: string + description: The unique identifier for the type of error. + enum: + - global/not-found + message: + type: string + default: Ticket not found. + description: A description of the error. + suggestion: + type: string + default: Check the ticket ID and try again. + description: One or more suggestions of possible ways to fix the error. + request_id: + type: string + description: 'Uniquely identifies the request that produced this error. Quote it when contacting support: it is how a failed call is found in our logs and traces.' + required: + - code + - message + - suggestion + title: ApiErrorTicketNotFound + required: + - error + type: object + '429': + description: Too Many Requests + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorRateLimited' + required: + - error + type: object + tags: + - Support Tickets + summary: Delete attachment + description: Delete an attachment. + operationId: deleteAttachment + parameters: + - name: ticket_id + in: path + description: The ticket ID. + required: true + schema: + description: The ticket ID. + type: string + example: 0920582c7ff041399e34823a0be62549 + - name: attachment_id + in: path + description: The attachment ID. + required: true + schema: + description: The attachment ID. + type: string + example: 0920582c7ff041399e34823a0be62549 + /tickets/{ticket_id}/attachments/{attachment_id}/complete: + post: + responses: + '200': + description: OK + content: + application/json: + schema: + additionalProperties: false + properties: + data: + $ref: '#/components/schemas/Attachment' + required: + - data + type: object + '400': + description: Bad Request + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorInvalidParameters' + required: + - error + type: object + '401': + description: Unauthorized + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorUnauthorized' + required: + - error + type: object + '403': + description: Forbidden + content: + application/json: + schema: + additionalProperties: false + properties: + error: + type: object + properties: + code: + type: string + description: The unique identifier for the type of error. + enum: + - global/account-inactive + message: + type: string + default: Your account is inactive. + description: A description of the error. + suggestion: + type: string + default: Make sure you have verified your email address and have a valid payment method. Contact Support if problems continue. + description: One or more suggestions of possible ways to fix the error. + request_id: + type: string + description: 'Uniquely identifies the request that produced this error. Quote it when contacting support: it is how a failed call is found in our logs and traces.' + required: + - code + - message + - suggestion + title: ApiErrorAccountInactive + description: |- + The account or identity is not in good standing to make the request. + + Your account is inactive or suspended, your identity is deactivated or has + not verified its email, or your account is missing a payment method the + endpoint requires. + required: + - error + type: object + '404': + description: Not Found + content: + application/json: + schema: + additionalProperties: false + properties: + error: + type: object + properties: + code: + type: string + description: The unique identifier for the type of error. + enum: + - global/not-found + message: + type: string + default: Ticket not found. + description: A description of the error. + suggestion: + type: string + default: Check the ticket ID and try again. + description: One or more suggestions of possible ways to fix the error. + request_id: + type: string + description: 'Uniquely identifies the request that produced this error. Quote it when contacting support: it is how a failed call is found in our logs and traces.' + required: + - code + - message + - suggestion + title: ApiErrorTicketNotFound + required: + - error + type: object + '429': + description: Too Many Requests + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorRateLimited' + required: + - error + type: object + tags: + - Support Tickets + summary: Complete attachment upload + description: Mark attachment upload as complete after client finishes uploading to storage. + operationId: completeAttachmentUpload + parameters: + - name: ticket_id + in: path + description: The ticket ID. + required: true + schema: + description: The ticket ID. + type: string + example: 0920582c7ff041399e34823a0be62549 + - name: attachment_id + in: path + description: The attachment ID. + required: true + schema: + description: The attachment ID. + type: string + example: 0920582c7ff041399e34823a0be62549 + /tickets/{ticket_id}/attachments/{attachment_id}/download: + get: + responses: + '200': + description: OK + content: + application/json: + schema: + additionalProperties: false + properties: + data: + $ref: '#/components/schemas/AttachmentDownloadResponse' + required: + - data + type: object + '400': + description: Bad Request + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorInvalidParameters' + required: + - error + type: object + '401': + description: Unauthorized + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorUnauthorized' + required: + - error + type: object + '403': + description: Forbidden + content: + application/json: + schema: + additionalProperties: false + properties: + error: + type: object + properties: + code: + type: string + description: The unique identifier for the type of error. + enum: + - global/account-inactive + message: + type: string + default: Your account is inactive. + description: A description of the error. + suggestion: + type: string + default: Make sure you have verified your email address and have a valid payment method. Contact Support if problems continue. + description: One or more suggestions of possible ways to fix the error. + request_id: + type: string + description: 'Uniquely identifies the request that produced this error. Quote it when contacting support: it is how a failed call is found in our logs and traces.' + required: + - code + - message + - suggestion + title: ApiErrorAccountInactive + description: |- + The account or identity is not in good standing to make the request. + + Your account is inactive or suspended, your identity is deactivated or has + not verified its email, or your account is missing a payment method the + endpoint requires. + required: + - error + type: object + '404': + description: Not Found + content: + application/json: + schema: + additionalProperties: false + properties: + error: + type: object + properties: + code: + type: string + description: The unique identifier for the type of error. + enum: + - global/not-found + message: + type: string + default: Ticket not found. + description: A description of the error. + suggestion: + type: string + default: Check the ticket ID and try again. + description: One or more suggestions of possible ways to fix the error. + request_id: + type: string + description: 'Uniquely identifies the request that produced this error. Quote it when contacting support: it is how a failed call is found in our logs and traces.' + required: + - code + - message + - suggestion + title: ApiErrorTicketNotFound + required: + - error + type: object + '429': + description: Too Many Requests + content: + application/json: + schema: + additionalProperties: false + properties: + error: + $ref: '#/components/schemas/ApiErrorRateLimited' + required: + - error + type: object + tags: + - Support Tickets + summary: Get attachment download URL + description: Generate a temporary download URL for an attachment. + operationId: getAttachmentDownloadUrl + parameters: + - name: ticket_id + in: path + description: The ticket ID. + required: true + schema: + description: The ticket ID. + type: string + example: 0920582c7ff041399e34823a0be62549 + - name: attachment_id + in: path + description: The attachment ID. + required: true + schema: + description: The attachment ID. + type: string + example: 0920582c7ff041399e34823a0be62549 +components: + schemas: + TicketListResponse: + type: object + properties: + tickets: + type: array + items: + $ref: '#/components/schemas/Ticket' + description: The current page of tickets. + page_token: + description: A page token. Provide this token in your next request to retrieve the next page of results. Null if there are no additional pages. + nullable: true + type: string + required: + - tickets + - page_token + title: TicketListResponse + ApiErrorInvalidParameters: + type: object + properties: + code: + type: string + description: The unique identifier for the type of error. + enum: + - global/invalid-parameters + message: + type: string + default: Invalid request data. + description: A description of the error. + suggestion: + type: string + description: One or more suggestions of possible ways to fix the error. + request_id: + type: string + description: 'Uniquely identifies the request that produced this error. Quote it when contacting support: it is how a failed call is found in our logs and traces.' + required: + - code + - message + title: ApiErrorInvalidParameters + ApiErrorUnauthorized: + type: object + properties: + code: + type: string + description: The unique identifier for the type of error. + enum: + - global/invalid-api-key + message: + type: string + default: API key was invalid, expired, or deleted. + description: A description of the error. + suggestion: + type: string + default: Check your API key or create a new one, then try again. + description: One or more suggestions of possible ways to fix the error. + request_id: + type: string + description: 'Uniquely identifies the request that produced this error. Quote it when contacting support: it is how a failed call is found in our logs and traces.' + required: + - code + - message + - suggestion + title: ApiErrorUnauthorized + ApiErrorAccountInactive: + type: object + properties: + code: + type: string + description: The unique identifier for the type of error. + enum: + - global/account-inactive + message: + type: string + default: Your account is inactive. + description: A description of the error. + suggestion: + type: string + default: Make sure you have verified your email address and have a valid payment method. Contact Support if problems continue. + description: One or more suggestions of possible ways to fix the error. + request_id: + type: string + description: 'Uniquely identifies the request that produced this error. Quote it when contacting support: it is how a failed call is found in our logs and traces.' + required: + - code + - message + - suggestion + title: ApiErrorAccountInactive + description: |- + The account or identity is not in good standing to make the request. + + Your account is inactive or suspended, your identity is deactivated or has + not verified its email, or your account is missing a payment method the + endpoint requires. + ApiErrorNotFound: + type: object + properties: + code: + type: string + description: The unique identifier for the type of error. + enum: + - global/not-found + message: + type: string + default: The requested resource was not found. + description: A description of the error. + suggestion: + type: string + description: One or more suggestions of possible ways to fix the error. + request_id: + type: string + description: 'Uniquely identifies the request that produced this error. Quote it when contacting support: it is how a failed call is found in our logs and traces.' + required: + - code + - message + title: ApiErrorNotFound + description: |- + The resource does not exist, or the caller is not permitted to access it. + + If you believe the ID is correct, ask an account administrator whether or not + you have been granted a role that permits the action. + ApiErrorRateLimited: + type: object + properties: + code: + type: string + description: The unique identifier for the type of error. + enum: + - global/rate-limited + message: + type: string + default: Too many requests. Retry after the interval given in the Retry-After response header. + description: A description of the error. + suggestion: + type: string + default: Wait for the interval in the Retry-After header, then retry the request. Reduce the rate of concurrent requests if this recurs. + description: One or more suggestions of possible ways to fix the error. + request_id: + type: string + description: 'Uniquely identifies the request that produced this error. Quote it when contacting support: it is how a failed call is found in our logs and traces.' + required: + - code + - message + - suggestion + title: ApiErrorRateLimited + description: |- + The request was rate limited upstream and should be retried. + + Carries no detail about which limit was hit. The limit is enforced at the + edge and is not part of the API contract, so naming it here would publish an + implementation detail we intend to keep free to change. + TicketStatus: + title: TicketStatus + description: The current status of a support ticket. + enum: + - open + - on_hold + - pending + - solved + - confirm_solved + type: string + TicketType: + title: TicketType + description: The type of support ticket. + enum: + - service_request + - incident + - automated_event + type: string + TicketSeverity: + title: TicketSeverity + description: The severity level for incident tickets. + enum: + - sev_1 + - sev_2 + - sev_3 + type: string + TicketPriority: + title: TicketPriority + description: The priority level of a support ticket. + enum: + - low + - normal + - high + - urgent + type: string + TicketOrderByField: + title: TicketOrderByField + description: Specifies the field used to sort the list of tickets. + enum: + - created_at + - updated_at + type: string + SortDirection: + title: SortDirection + description: Specifies the order in which to sort the list of tickets. + enum: + - asc + - desc + type: string + TicketCreateResponse: + type: object + properties: + id: + type: string + description: The unique identifier for the ticket. + example: 0920582c7ff041399e34823a0be62549 + external_ticket_provider: + type: string + description: The external ticketing provider name (e.g., "zendesk"). + example: zendesk + external_ticket_id: + type: string + description: The external provider ticket ID (e.g., Zendesk ticket ID). + example: '12345' + status: + $ref: '#/components/schemas/TicketStatus' + description: The current status of the ticket. + example: open + type: + $ref: '#/components/schemas/TicketType' + description: The type of issue or request. + example: incident + severity: + $ref: '#/components/schemas/TicketSeverity' + description: The severity level of the issue represented by the ticket. Omitted if the ticket isn't an `incident`. + example: sev_1 + priority: + $ref: '#/components/schemas/TicketPriority' + description: The priority level of the ticket. + example: high + affected_devices: + type: array + items: + type: string + description: The list of devices affected by the issue. + example: + - abc-gpu-001 + - abc-gpu-002 + hostname: + type: string + description: The hostname of the affected device. + example: abc-gpu-001 + device_serial: + type: string + description: The serial number of the affected device. + example: SN123456789 + created_at: + type: string + format: date-time + description: The date and time at which the ticket was created. Formatted as an ISO 8601 timestamp. + example: '2024-10-20T10:15:00Z' + required: + - id + - status + - type + - created_at + title: TicketCreateResponse + ApiErrorTicketCreationFailed: + type: object + properties: + code: + type: string + description: The unique identifier for the type of error. + enum: + - support-tickets/creation-failed + message: + type: string + default: Failed to create the ticket. + description: A description of the error. + suggestion: + type: string + default: Please try again. If the problem persists, contact support. + description: One or more suggestions of possible ways to fix the error. + request_id: + type: string + description: 'Uniquely identifies the request that produced this error. Quote it when contacting support: it is how a failed call is found in our logs and traces.' + required: + - code + - message + - suggestion + title: ApiErrorTicketCreationFailed + ApiErrorForbidden: + type: object + properties: + code: + type: string + description: The unique identifier for the type of error. + enum: + - global/forbidden + message: + type: string + description: A description of the error. + suggestion: + type: string + description: One or more suggestions of possible ways to fix the error. + request_id: + type: string + description: 'Uniquely identifies the request that produced this error. Quote it when contacting support: it is how a failed call is found in our logs and traces.' + required: + - code + - message + title: ApiErrorForbidden + TicketRequestType: + title: TicketRequestType + description: The type of support ticket. + enum: + - incident + - service_request + type: string + Ticket: + type: object + properties: + id: + type: string + description: The unique identifier for the ticket. + example: 0920582c7ff041399e34823a0be62549 + subject: + type: string + description: A short summary of the issue. + example: Node 12345 is experiencing an issue + description: + type: string + description: The initial text provided when creating the issue or request. + example: Performance drops by 30-40% during peak hours.. + type: + $ref: '#/components/schemas/TicketType' + example: incident + severity: + $ref: '#/components/schemas/TicketSeverity' + description: The severity level of the issue represented by the ticket. Omitted if the ticket isn't an `incident`. + example: sev_1 + priority: + $ref: '#/components/schemas/TicketPriority' + description: The priority level of the ticket. + example: high + status: + $ref: '#/components/schemas/TicketStatus' + description: The current status of the ticket. + example: open + external_ticket_provider: + type: string + description: The external ticketing provider name (e.g., "zendesk"). + example: zendesk + external_ticket_id: + type: string + description: The external provider ticket ID (e.g., Zendesk ticket ID). + example: '12345' + hostname: + type: string + description: The hostname of the affected device. + example: abc-gpu-001 + device_serial: + type: string + description: The serial number of the affected device. + example: SN123456789 + created_at: + type: string + format: date-time + description: The date and time at which the ticket was created. Formatted as an ISO 8601 timestamp. + example: '2024-10-20T10:15:00Z' + updated_at: + type: string + format: date-time + description: The date and time at which the ticket was last updated. Formatted as an ISO 8601 timestamp. + example: '2024-10-23T14:30:00Z' + resolved_at: + type: string + format: date-time + description: The date and time at which the ticket was resolved. Formatted as an ISO 8601 timestamp. + example: '2024-10-25T09:00:00Z' + affected_devices: + type: array + items: + type: string + description: The list of devices affected by the issue. + example: + - abc-gpu-001 + - abc-gpu-002 + comments: + type: array + items: + $ref: '#/components/schemas/TicketComment' + description: The ticket's full comment history. + required: + - id + - subject + - description + - status + - created_at + - comments + title: Ticket + ApiErrorTicketNotFound: + type: object + properties: + code: + type: string + description: The unique identifier for the type of error. + enum: + - global/not-found + message: + type: string + default: Ticket not found. + description: A description of the error. + suggestion: + type: string + default: Check the ticket ID and try again. + description: One or more suggestions of possible ways to fix the error. + request_id: + type: string + description: 'Uniquely identifies the request that produced this error. Quote it when contacting support: it is how a failed call is found in our logs and traces.' + required: + - code + - message + - suggestion + title: ApiErrorTicketNotFound + EmptyResponse: + type: object + properties: {} + title: EmptyResponse + TicketCommentInput: + type: object + properties: + body: + type: string + description: The text of the new comment. + example: Turns out this was a non-issue on our end. Closing the ticket. + required: + - body + title: TicketCommentInput + AttachmentListResponse: + type: object + properties: + attachments: + type: array + items: + $ref: '#/components/schemas/Attachment' + description: Retrieves all attachments associated with the specified ticket. If status is omitted, only uploaded attachments will be returned. + required: + - attachments + title: AttachmentListResponse + description: Response containing list of attachments. + AttachmentUploadStatus: + title: AttachmentUploadStatus + description: The current status of an attachment upload. + enum: + - pending + - uploaded + - failed + - deleted + type: string + AttachmentInitiateResponse: + type: object + properties: + attachment_id: + type: string + description: The unique identifier for the attachment. + example: 0920582c7ff041399e34823a0be62549 + upload_url: + type: string + description: A presigned URL. Use this URL to directly upload the attachment to storage. + example: https://s3.amazonaws.com/...presigned-url + upload_method: + type: string + description: The HTTP method to use when uploading your attachment (PUT or POST). + example: PUT + upload_status: + $ref: '#/components/schemas/AttachmentUploadStatus' + description: The current upload status of your attachment. + example: pending + expires_in: + type: integer + description: The window of time, in seconds, that the provided presigned URL is available to be uploaded to. + example: 3600 + required: + - attachment_id + - upload_url + - upload_method + - upload_status + - expires_in + title: AttachmentInitiateResponse + description: Response with upload instructions. + ApiErrorResourceNotFound: + type: object + properties: + code: + type: string + description: The unique identifier for the type of error. + enum: + - global/object-does-not-exist + message: + type: string + description: A description of the error. + suggestion: + type: string + description: One or more suggestions of possible ways to fix the error. + request_id: + type: string + description: 'Uniquely identifies the request that produced this error. Quote it when contacting support: it is how a failed call is found in our logs and traces.' + required: + - code + - message + - suggestion + title: ApiErrorResourceNotFound + Attachment: + type: object + properties: + id: + type: string + description: The unique identifier for the attachment. + example: 0920582c7ff041399e34823a0be62549 + filename: + type: string + description: The original filename. + example: debug-logs.tar.gz + content_type: + type: string + description: The MIME type of the attached file. + example: application/gzip + size_bytes: + type: integer + description: The attached file's size in bytes. + example: 1024000 + upload_status: + $ref: '#/components/schemas/AttachmentUploadStatus' + description: The current upload status of the attachment. + example: uploaded + uploaded_at: + type: string + format: date-time + description: The date and time at which the attachment finished uploading. Formatted as an ISO 8601 timestamp. Omitted if the attachment hasn't been uploaded yet. + example: '2024-10-20T10:15:00Z' + created_at: + type: string + format: date-time + description: The date and time at which the attachment was created. Formatted as an ISO 8601 timestamp. + example: '2024-10-20T10:10:00Z' + required: + - id + - filename + - content_type + - size_bytes + - upload_status + - created_at + title: Attachment + description: Attachment metadata. + AttachmentDownloadResponse: + type: object + properties: + download_url: + type: string + description: A presigned URL for downloading the file. + example: https://s3.amazonaws.com/...presigned-download-url + expires_in: + type: integer + description: The URL expiration time in seconds. + example: 3600 + required: + - download_url + - expires_in + title: AttachmentDownloadResponse + description: The response with the download URL. + TicketComment: + type: object + properties: + body: + type: string + description: Comment text. + example: Instance is experiencing high latency on GPU operations + author: + type: string + description: The identifier of the comment author. + example: support-agent-123 + created_at: + type: string + format: date-time + description: The date and time at which the comment was created. Formatted as an ISO 8601 timestamp. + example: '2024-10-23T14:30:00Z' + required: + - body + - author + - created_at + title: TicketComment + x-stackQL-resources: + tickets: + id: lambda.support.tickets + name: tickets + title: Tickets + methods: + list: + operation: + $ref: '#/paths/~1tickets/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.tickets + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1tickets/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data + get: + operation: + $ref: '#/paths/~1tickets~1{ticket_id}/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data + update: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1tickets~1{ticket_id}/patch' + response: + mediaType: application/json + openAPIDocKey: '202' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/tickets/methods/get' + - $ref: '#/components/x-stackQL-resources/tickets/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/tickets/methods/create' + update: + - $ref: '#/components/x-stackQL-resources/tickets/methods/update' + delete: [] + replace: [] + ticket_attachments: + id: lambda.support.ticket_attachments + name: ticket_attachments + title: Ticket Attachments + methods: + list: + operation: + $ref: '#/paths/~1tickets~1{ticket_id}~1attachments/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data.attachments + create: + config: + requestBodyTranslate: + algorithm: naive + operation: + $ref: '#/paths/~1tickets~1{ticket_id}~1attachments/post' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data + delete: + operation: + $ref: '#/paths/~1tickets~1{ticket_id}~1attachments~1{attachment_id}/delete' + response: + mediaType: application/json + openAPIDocKey: '200' + complete: + operation: + $ref: '#/paths/~1tickets~1{ticket_id}~1attachments~1{attachment_id}~1complete/post' + response: + mediaType: application/json + openAPIDocKey: '200' + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/ticket_attachments/methods/list' + insert: + - $ref: '#/components/x-stackQL-resources/ticket_attachments/methods/create' + update: [] + delete: + - $ref: '#/components/x-stackQL-resources/ticket_attachments/methods/delete' + replace: [] + ticket_attachment_download_urls: + id: lambda.support.ticket_attachment_download_urls + name: ticket_attachment_download_urls + title: Ticket Attachment Download Urls + methods: + get: + operation: + $ref: '#/paths/~1tickets~1{ticket_id}~1attachments~1{attachment_id}~1download/get' + response: + mediaType: application/json + openAPIDocKey: '200' + objectKey: $.data + sqlVerbs: + select: + - $ref: '#/components/x-stackQL-resources/ticket_attachment_download_urls/methods/get' + insert: [] + update: [] + delete: [] + replace: [] +servers: + - url: https://cloud.lambda.ai/api/v1 +x-stackQL-config: + pagination: + requestToken: + key: page_token + location: query + responseToken: + key: $.data.page_token + location: body