Welcome to the SaladCloudSdk SDK documentation. This guide will help you get started with integrating and using the SaladCloudSdk SDK in your project.
- API version:
0.9.0-alpha.14
- SDK version:
0.9.0-alpha.14
The SaladCloud REST API. Please refer to the SaladCloud API Documentation for more details.
This SDK is compatible with the following versions: TypeScript >= 4.8.4
To get started with the SDK, we recommend installing using npm
:
npm install @saladtechnologies-oss/salad-cloud-sdk
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.
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';
You can set a custom timeout for the SDK's HTTP requests as follows:
const saladCloudSdk = new SaladCloudSdk({ timeout: 10000 });
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('acme-corp');
console.log(data);
})();
The SDK provides various services to interact with the API.
Below is a list of all available services with links to their detailed documentation:
Name |
---|
ContainerGroupsService |
WorkloadErrorsService |
SystemLogsService |
QueuesService |
QuotasService |
InferenceEndpointsService |
OrganizationDataService |
WebhookSecretKeyService |
LogsService |
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.
Below is a list of all available models with links to their detailed documentation:
Name | Description |
---|---|
ContainerGroupCollection | A paginated collection of container groups that provides a structured way to access multiple container group resources in a single response. |
ContainerGroup | A container group definition that represents a scalable set of identical containers running as a distributed service |
Container | Represents a container with its configuration and resource requirements. |
ContainerLogging | Configuration options for directing container logs to a logging provider. This schema enables you to specify a single logging destination for container output, supporting monitoring, debugging, and analytics use cases. Each provider has its own configuration parameters defined in the referenced schemas. Only one logging provider can be selected at a time. |
AxiomLoggingConfiguration | Configuration settings for integrating container logs with the Axiom logging service. When specified, container logs will be forwarded to the Axiom instance defined by these parameters. |
DatadogLoggingConfiguration | Configuration for forwarding container logs to Datadog monitoring service. |
DatadogTagForContainerLogging | Represents a Datadog tag used for container logging metadata. |
ContainerLoggingConfigurationHttp1 | Configuration for sending container logs to an HTTP endpoint. Defines how logs are formatted, compressed, and transmitted. |
ContainerLoggingHttpFormat | The format in which logs will be delivered |
ContainerLoggingHttpHeader | Represents an HTTP header used for container logging configuration. |
ContainerLoggingHttpCompression | The compression algorithm to apply to logs before transmission |
NewRelicLoggingConfiguration | Configuration for sending container logs to New Relic's log management platform. |
ContainerLoggingSplunkConfiguration | Configuration settings for forwarding container logs to a Splunk instance. |
TcpLoggingConfiguration | Configuration for forwarding container logs to a remote TCP endpoint |
ContainerResourceRequirements | Specifies the resource requirements for a container. |
CountryCode | ISO 3166-1 alpha-2 country codes |
ContainerGroupState | Represents the operational state of a container group during its lifecycle, including timing information, status, and instance distribution metrics. This state captures the current execution status, start and finish times, and provides visibility into the operational health across instances. |
ContainerGroupInstanceStatusCount | A summary of container group instances categorized by their current lifecycle status |
ContainerGroupStatus | Represents the current operational state of a container group within the Salad platform. |
ContainerGroupLivenessProbe | Defines a liveness probe for container groups that determines when to restart a container if it becomes unhealthy |
ContainerGroupProbeExec | Defines the exec action for a probe in a container group. This is used to execute a command inside a container for health checks. |
ContainerGroupGRpcProbe | Configuration for gRPC-based health probes in container groups, used to determine container health status. |
ContainerGroupHttpProbeConfiguration | Defines HTTP probe configuration for container health checks within a container group. |
ContainerGroupProbeHttpHeader | |
HttpScheme | The protocol scheme used for HTTP probe requests in container health checks. |
ContainerGroupTcpProbe | Configuration for a TCP probe used to check container health via network connectivity. |
ContainerGroupNetworkingConfiguration | Network configuration for container groups that defines connectivity, routing, and access control settings |
TheContainerGroupNetworkingLoadBalancer | The container group networking load balancer. |
ContainerNetworkingProtocol | Defines the communication protocol used for network traffic between containers or external systems. Currently supports HTTP protocol for web-based communication. |
ContainerGroupPriority | Specifies the priority level for container group execution, which determines resource allocation and scheduling precedence. |
QueueBasedAutoscalerConfiguration | Defines configuration for automatically scaling container instances based on queue length. The autoscaler monitors a queue and adjusts the number of running replicas to maintain the desired queue length. |
ContainerGroupQueueConnection | Configuration for connecting a container group to a message queue system, enabling asynchronous communication between services. |
ContainerGroupReadinessProbe | Defines how to check if a container is ready to serve traffic. The readiness probe determines whether the container's application is ready to accept traffic. If the readiness probe fails, the container is considered not ready and traffic will not be sent to it. |
ContainerRestartPolicy | Specifies the policy for restarting containers when they exit or fail. |
ContainerGroupStartupProbe | Defines a probe that checks if a container application has started successfully. Startup probes help prevent applications from being prematurely marked as unhealthy during initialization. The probe can use HTTP requests, TCP connections, gRPC calls, or shell commands to determine startup status. |
ProblemDetails | Represents an API error |
ContainerGroupCreationRequest | Represents a request to create a container group, which manages a collection of container instances with shared configuration and scaling policies |
ContainerConfiguration | Configuration for creating a container within a container group. Defines the container image, resource requirements, environment variables, and other settings needed to deploy and run the container. |
ContainerConfigurationLogging | Configuration options for directing container logs to a logging provider. This schema enables you to specify a single logging destination for container output, supporting monitoring, debugging, and analytics use cases. Each provider has its own configuration parameters defined in the referenced schemas. Only one logging provider can be selected at a time. |
ContainerLoggingConfigurationHttp2 | Configuration for sending container logs to an HTTP endpoint. Defines how logs are formatted, compressed, and transmitted. |
ContainerRegistryAuthentication | Authentication configuration for various container registry types, including AWS ECR, Docker Hub, GCP GAR, GCP GCR, and basic authentication. |
ContainerRegistryAuthenticationAwsEcr | Authentication details for AWS Elastic Container Registry (ECR) |
ContainerRegistryAuthenticationBasic | Basic username and password authentication for generic container registries |
ContainerRegistryAuthenticationDockerHub | Authentication details for Docker Hub registry |
ContainerRegistryAuthenticationGcpGar | Authentication details for Google Artifact Registry (GAR) |
ContainerRegistryAuthenticationGcpGcr | Authentication details for Google Container Registry (GCR) |
CreateContainerResourceRequirements | Specifies the resource requirements for creating a container. |
CreateContainerGroupNetworking | Network configuration for container groups specifying connectivity parameters, including authentication, protocol, and timeout settings |
ContainerGroupPatch | Represents a request to update a container group |
UpdateContainer | Represents an update container object |
UpdateContainerLogging | Configuration options for directing container logs to a logging provider. This schema enables you to specify a single logging destination for container output, supporting monitoring, debugging, and analytics use cases. Each provider has its own configuration parameters defined in the referenced schemas. Only one logging provider can be selected at a time. |
ContainerResourceUpdateSchema | Defines the resource specifications that can be modified for a container group, including CPU, memory, GPU classes, and storage allocations. |
UpdateContainerGroupNetworking | Represents update container group networking parameters |
ContainerGroupInstanceCollection | A collection of container group instances returned as part of a paginated response or batch operation result. |
ContainerGroupInstance | A Container Group Instance represents a running instance of a container group on a specific machine. It provides information about the execution state, readiness, and version of the deployed container group. |
TheContainerGroupInstanceState | The state of the container group instance |
ContainerGroupInstancePatch | Represents a request to update a container group instance |
WorkloadErrorList | Represents a list of workload errors |
WorkloadError | Represents a workload error |
ProblemDetails | Represents an API error |
SystemLogList | Represents a list of system logs |
SystemLog | Represents a system log |
ProblemDetails | Represents an API error |
QueueCollection | Represents a Queue Collection |
Queue | Represents a queue. |
ContainerGroup | A container group definition that represents a scalable set of identical containers running as a distributed service |
ProblemDetails | Represents an API error |
QueuePrototype | Represents a request to create a new queue. |
QueuePatch | Represents a request to update an existing queue. |
QueueJobCollection | Represents a Queue Job Collection |
QueueJob | Represents a queue job |
QueueJobEvent | Represents an event for queue job |
QueueJobPrototype | Represents a request to create a queue job |
Quotas | Represents the organization quotas |
ContainerGroupsQuotas | Represents the organization quotas for container groups |
ProblemDetails | Represents an API error |
InferenceEndpointCollection | Represents a page from the collection of inference endpoints. |
InferenceEndpoint | Represents an inference endpoint |
ProblemDetails | Represents an API error |
InferenceEndpointJobCollection | Represents a collection of inference endpoint jobs |
InferenceEndpointJob | Represents a inference endpoint job |
Status | The current status. |
InferenceEndpointJobEvent | Represents an event for inference endpoint job |
InferenceEndpointJobEventAction | The action that was taken on the inference endpoint job. |
InferenceEndpointJobPrototype | Represents a request to create a inference endpoint job |
GpuClassesList | Represents a list of GPU classes |
GpuClass | Represents a GPU Class |
GpuClassPrice | Represents the price of a GPU class for a given container group priority |
ContainerGroupPriority | Specifies the priority level for container group execution, which determines resource allocation and scheduling precedence. |
ProblemDetails | Represents an API error |
WebhookSecretKey | Represents a webhook secret key |
ProblemDetails | Represents an API error |
LogEntryQuery | Represents a query for logs |
LogEntryQuerySortOrder | The sort order of the log entries. asc will sort the log entries in chronological order. desc will sort the log entries in reverse chronological order. |
LogEntryCollection | Represents a page of organization logs |
LogEntry | |
LogEntryResource | The resource associated with the log entry |
LogEntrySeverity | The severity level of the log entry |
ProblemDetails | Represents an API error |
This SDK is licensed under the MIT License.
See the LICENSE file for more details.