0.9.0-alpha.6 • Published 11 months ago

@saladtechnologies-oss/salad-cloud-sdk v0.9.0-alpha.6

Weekly downloads
-
License
MIT
Repository
-
Last release
11 months ago

SaladCloudSdk TypeScript SDK 0.9.0-alpha.6

Welcome to the SaladCloudSdk SDK documentation. This guide will help you get started with integrating and using the SaladCloudSdk SDK in your project.

Versions

  • API version: 0.9.0-alpha.5
  • SDK version: 0.9.0-alpha.6

About the API

The SaladCloud REST API. Please refer to the SaladCloud API Documentation for more details.

Table of Contents

Setup & Configuration

Supported Language Versions

This SDK is compatible with the following versions: TypeScript >= 4.8.4

Installation

To get started with the SDK, we recommend installing using npm:

npm install @saladtechnologies-oss/salad-cloud-sdk

Authentication

API Key Authentication

The SaladCloudSdk API uses API keys as a form of authentication. An API key is a unique identifier used to authenticate a user, developer, or a program that is calling the API.

Setting the API key

When you initialize the SDK, you can set the API key as follows:

const sdk = new SaladCloudSdk({ apiKey: 'YOUR_API_KEY' });

If you need to set or update the API key after initializing the SDK, you can use:

const sdk = new SaladCloudSdk();
sdk.apiKey = 'YOUR_API_KEY';

Setting a Custom Timeout

You can set a custom timeout for the SDK's HTTP requests as follows:

const saladCloudSdk = new SaladCloudSdk({ timeout: 10000 });

Sample Usage

Below is a comprehensive example demonstrating how to authenticate and call a simple endpoint:

import { SaladCloudSdk } from '@saladtechnologies-oss/salad-cloud-sdk';

(async () => {
  const saladCloudSdk = new SaladCloudSdk({
    apiKey: 'YOUR_API_KEY',
  });

  const { data } = await saladCloudSdk.quotas.getQuotas('oecson4k2eclxr');

  console.log(data);
})();

Services

The SDK provides various services to interact with the API.

Name
ContainerGroupsService
WorkloadErrorsService
QueuesService
QuotasService
InferenceEndpointsService
OrganizationDataService
WebhookSecretKeyService

Models

The SDK includes several models that represent the data structures used in API requests and responses. These models help in organizing and managing the data efficiently.

NameDescription
ContainerGroupListRepresents a list of container groups
CreateContainerGroupRepresents a request to create a container group
ContainerGroupRepresents a container group
UpdateContainerGroupRepresents a request to update a container group
ContainerGroupInstancesRepresents a list of container group instances
ContainerGroupInstanceRepresents the details of a single container group instance
WorkloadErrorListRepresents a list of workload errors
QueueListRepresents a list of queues
CreateQueueRepresents a request to create a new queue.
QueueRepresents a queue.
UpdateQueueRepresents a request to update an existing queue.
QueueJobListRepresents a list of queue jobs
CreateQueueJobRepresents a request to create a queue job
QueueJobRepresents a queue job
QuotasRepresents the organization quotas
InferenceEndpointsListRepresents a list of inference endpoints
InferenceEndpointRepresents an inference endpoint
InferenceEndpointJobListRepresents a list of inference endpoint jobs
CreateInferenceEndpointJobRepresents a request to create a inference endpoint job
InferenceEndpointJobRepresents a inference endpoint job
GpuClassesListRepresents a list of GPU classes
WebhookSecretKeyRepresents a webhook secret key
ContainerRepresents a container
ContainerRestartPolicy
ContainerGroupStateRepresents a container group state
CountryCode
ContainerGroupNetworkingRepresents container group networking parameters
ContainerGroupLivenessProbeRepresents the container group liveness probe
ContainerGroupReadinessProbeRepresents the container group readiness probe
ContainerGroupStartupProbeRepresents the container group startup probe
ContainerGroupQueueConnectionRepresents container group queue connection
QueueAutoscalerRepresents the autoscaling rules for a queue
ContainerResourceRequirementsRepresents a container resource requirements
ContainerGroupPriority
ContainerGroupStatus
ContainerGroupInstanceStatusCountRepresents a container group instance status count
ContainerNetworkingProtocol
ContainerGroupProbeTcp
ContainerGroupProbeHttp
ContainerGroupProbeGrpc
ContainerGroupProbeExec
ContainerProbeHttpScheme
ContainerGroupProbeHttpHeaders2
CreateContainerRepresents a container
CreateContainerGroupNetworkingRepresents container group networking parameters
UpdateContainerRepresents an update container object
UpdateContainerGroupNetworkingRepresents update container group networking parameters
WorkloadErrorRepresents a workload error
QueueJobEventRepresents an event for queue job
ContainerGroupsQuotas
InferenceEndpointJobEventRepresents an event for inference endpoint job
GpuClassRepresents a GPU Class
GpuClassPriceRepresents the price of a GPU class for a given container group priority

License

This SDK is licensed under the MIT License.

See the LICENSE file for more details.

0.9.0-alpha.4

11 months ago

0.9.0-alpha.5

11 months ago

0.9.0-alpha.6

11 months ago

0.9.0-alpha.3

12 months ago

0.9.0-alpha.2

12 months ago

0.9.0-alpha.1

12 months ago