A list of all methods in the ContainerGroupsService
service. Click on the method name to view detailed information about that method.
Methods | Description |
---|---|
listContainerGroups | Gets the list of container groups |
createContainerGroup | Creates a new container group |
getContainerGroup | Gets a container group |
updateContainerGroup | Updates a container group |
deleteContainerGroup | Deletes a container group |
startContainerGroup | Starts a container group |
stopContainerGroup | Stops a container group |
listContainerGroupInstances | Gets the list of container group instances |
getContainerGroupInstance | Gets a container group instance |
reallocateContainerGroupInstance | Reallocates a container group instance to run on a different Salad Node |
recreateContainerGroupInstance | Stops a container, destroys it, and starts a new one without requiring the image to be downloaded again on a new Salad Node |
restartContainerGroupInstance | Stops a container and restarts it on the same Salad Node |
Gets the list of container groups
- HTTP Method:
GET
- Endpoint:
/organizations/{organization_name}/projects/{project_name}/containers
Parameters
Name | Type | Required | Description |
---|---|---|---|
organizationName | string | ✅ | Your organization name. This identifies the billing context for the API operation and represents a security boundary for SaladCloud resources. The organization must be created before using the API, and you must be a member of the organization. |
projectName | string | ✅ | Your project name. This represents a collection of related SaladCloud resources. The project must be created before using the API. |
Return Type
ContainerGroupList
Example Usage Code Snippet
import { SaladCloudSdk } from '@saladtechnologies-oss/salad-cloud-sdk';
(async () => {
const saladCloudSdk = new SaladCloudSdk({
apiKey: 'YOUR_API_KEY',
});
const { data } = await saladCloudSdk.containerGroups.listContainerGroups(
'v50imwzgi4em4q035',
'm6yw3-xm60cb7tiev8rketqiiwjepibzf2ust1cvjx8oua8mepeueo5-1',
);
console.log(data);
})();
Creates a new container group
- HTTP Method:
POST
- Endpoint:
/organizations/{organization_name}/projects/{project_name}/containers
Parameters
Name | Type | Required | Description |
---|---|---|---|
body | CreateContainerGroup | ✅ | The request body. |
organizationName | string | ✅ | Your organization name. This identifies the billing context for the API operation and represents a security boundary for SaladCloud resources. The organization must be created before using the API, and you must be a member of the organization. |
projectName | string | ✅ | Your project name. This represents a collection of related SaladCloud resources. The project must be created before using the API. |
Return Type
ContainerGroup
Example Usage Code Snippet
import {
ContainerGroupLivenessProbe,
ContainerGroupQueueConnection,
ContainerGroupReadinessProbe,
ContainerGroupStartupProbe,
ContainerRestartPolicy,
CountryCode,
CreateContainer,
CreateContainerGroup,
CreateContainerGroupNetworking,
QueueAutoscaler,
SaladCloudSdk,
} from '@saladtechnologies-oss/salad-cloud-sdk';
(async () => {
const saladCloudSdk = new SaladCloudSdk({
apiKey: 'YOUR_API_KEY',
});
const containerResourceRequirements: ContainerResourceRequirements = {
cpu: 10,
memory: 35273,
gpuClasses: ['gpu_classes'],
storageAmount: 32391110488,
};
const containerGroupPriority = ContainerGroupPriority.HIGH;
const loggingAxiom2: LoggingAxiom2 = {
host: 'irure ut eiusmod velit incididunt',
apiToken: 'deserunt aute cillum dolor occaecat',
dataset: 'exercitation sit',
};
const datadogTags2: DatadogTags2 = {
name: 'name',
value: 'value',
};
const loggingDatadog2: LoggingDatadog2 = {
host: 'sunt consequat irure fugiat',
apiKey: 'magna',
tags: [datadogTags2],
};
const loggingNewRelic2: LoggingNewRelic2 = {
host: 'quis aute in id proident',
ingestionKey: 'aliqua enim pariatur',
};
const loggingSplunk2: LoggingSplunk2 = {
host: 'ad',
token: 'irure velit labore nostrud elit',
};
const loggingTcp2: LoggingTcp2 = {
host: 'fugiat do',
port: 1272,
};
const httpFormat2 = HttpFormat2.JSON;
const httpHeaders3: HttpHeaders3 = {
name: 'name',
value: 'value',
};
const httpCompression2 = HttpCompression2.NONE;
const loggingHttp2: LoggingHttp2 = {
host: 'cillum',
port: 21241,
user: 'user',
password: 'password',
path: 'path',
format: httpFormat2,
headers: [httpHeaders3],
compression: httpCompression2,
};
const createContainerLogging: CreateContainerLogging = {
axiom: loggingAxiom2,
datadog: loggingDatadog2,
newRelic: loggingNewRelic2,
splunk: loggingSplunk2,
tcp: loggingTcp2,
http: loggingHttp2,
};
const registryAuthenticationBasic1: RegistryAuthenticationBasic1 = {
username: 'username',
password: 'password',
};
const registryAuthenticationGcpGcr1: RegistryAuthenticationGcpGcr1 = {
serviceKey: 'service_key',
};
const registryAuthenticationAwsEcr1: RegistryAuthenticationAwsEcr1 = {
accessKeyId: 'access_key_id',
secretAccessKey: 'secret_access_key',
};
const registryAuthenticationDockerHub1: RegistryAuthenticationDockerHub1 = {
username: 'username',
personalAccessToken: 'personal_access_token',
};
const registryAuthenticationGcpGar1: RegistryAuthenticationGcpGar1 = {
serviceKey: 'service_key',
};
const createContainerRegistryAuthentication: CreateContainerRegistryAuthentication = {
basic: registryAuthenticationBasic1,
gcpGcr: registryAuthenticationGcpGcr1,
awsEcr: registryAuthenticationAwsEcr1,
dockerHub: registryAuthenticationDockerHub1,
gcpGar: registryAuthenticationGcpGar1,
};
const createContainer: CreateContainer = {
image: 'reprehenderit',
resources: containerResourceRequirements,
command: ['command'],
priority: containerGroupPriority,
environmentVariables: [],
logging: createContainerLogging,
registryAuthentication: createContainerRegistryAuthentication,
};
const containerRestartPolicy = ContainerRestartPolicy.ALWAYS;
const countryCode = CountryCode.AF;
const containerNetworkingProtocol = ContainerNetworkingProtocol.HTTP;
const createContainerGroupNetworkingLoadBalancer = CreateContainerGroupNetworkingLoadBalancer.ROUNDROBIN;
const createContainerGroupNetworking: CreateContainerGroupNetworking = {
protocol: containerNetworkingProtocol,
port: 43901,
auth: true,
loadBalancer: createContainerGroupNetworkingLoadBalancer,
singleConnectionLimit: true,
clientRequestTimeout: 100000,
serverResponseTimeout: 100000,
};
const containerGroupProbeTcp: ContainerGroupProbeTcp = {
port: 61900,
};
const containerProbeHttpScheme = ContainerProbeHttpScheme.HTTP;
const containerGroupProbeHttpHeaders2: ContainerGroupProbeHttpHeaders2 = {
name: 'name',
value: 'value',
};
const containerGroupProbeHttp: ContainerGroupProbeHttp = {
path: 'path',
port: 58759,
scheme: containerProbeHttpScheme,
headers: [containerGroupProbeHttpHeaders2],
};
const containerGroupProbeGrpc: ContainerGroupProbeGrpc = {
service: 'service',
port: 32748,
};
const containerGroupProbeExec: ContainerGroupProbeExec = {
command: ['command'],
};
const containerGroupLivenessProbe: ContainerGroupLivenessProbe = {
tcp: containerGroupProbeTcp,
http: containerGroupProbeHttp,
grpc: containerGroupProbeGrpc,
exec: containerGroupProbeExec,
initialDelaySeconds: 6,
periodSeconds: 10,
timeoutSeconds: 30,
successThreshold: 1,
failureThreshold: 3,
};
const containerGroupReadinessProbe: ContainerGroupReadinessProbe = {
tcp: containerGroupProbeTcp,
http: containerGroupProbeHttp,
grpc: containerGroupProbeGrpc,
exec: containerGroupProbeExec,
initialDelaySeconds: 4,
periodSeconds: 1,
timeoutSeconds: 1,
successThreshold: 1,
failureThreshold: 3,
};
const containerGroupStartupProbe: ContainerGroupStartupProbe = {
tcp: containerGroupProbeTcp,
http: containerGroupProbeHttp,
grpc: containerGroupProbeGrpc,
exec: containerGroupProbeExec,
initialDelaySeconds: 10,
periodSeconds: 3,
timeoutSeconds: 10,
successThreshold: 2,
failureThreshold: 1200,
};
const containerGroupQueueConnection: ContainerGroupQueueConnection = {
path: 'pariatur Ut aliqua irure',
port: 34903,
queueName: 'nz26lyemw7nednorlqjlsihb3',
};
const queueAutoscaler: QueueAutoscaler = {
minReplicas: 96,
maxReplicas: 190,
desiredQueueLength: 42,
pollingPeriod: 684,
maxUpscalePerMinute: 95,
maxDownscalePerMinute: 10,
};
const createContainerGroup: CreateContainerGroup = {
name: 'xvih',
displayName: 'INce5LCTy',
container: createContainer,
autostartPolicy: true,
restartPolicy: containerRestartPolicy,
replicas: 12,
countryCodes: [countryCode],
networking: createContainerGroupNetworking,
livenessProbe: containerGroupLivenessProbe,
readinessProbe: containerGroupReadinessProbe,
startupProbe: containerGroupStartupProbe,
queueConnection: containerGroupQueueConnection,
queueAutoscaler: queueAutoscaler,
};
const { data } = await saladCloudSdk.containerGroups.createContainerGroup(
'v50imwzgi4em4q035',
'm6yw3-xm60cb7tiev8rketqiiwjepibzf2ust1cvjx8oua8mepeueo5-1',
input,
);
console.log(data);
})();
Gets a container group
- HTTP Method:
GET
- Endpoint:
/organizations/{organization_name}/projects/{project_name}/containers/{container_group_name}
Parameters
Name | Type | Required | Description |
---|---|---|---|
organizationName | string | ✅ | Your organization name. This identifies the billing context for the API operation and represents a security boundary for SaladCloud resources. The organization must be created before using the API, and you must be a member of the organization. |
projectName | string | ✅ | Your project name. This represents a collection of related SaladCloud resources. The project must be created before using the API. |
containerGroupName | string | ✅ | The unique container group name |
Return Type
ContainerGroup
Example Usage Code Snippet
import { SaladCloudSdk } from '@saladtechnologies-oss/salad-cloud-sdk';
(async () => {
const saladCloudSdk = new SaladCloudSdk({
apiKey: 'YOUR_API_KEY',
});
const { data } = await saladCloudSdk.containerGroups.getContainerGroup(
'oji7lyvxb3ca5hc',
'olb1uzytbhhukf1u0-ahl0b9oqfjj',
's7z7dvdopv2czgde1zrufxgiv5tp-j',
);
console.log(data);
})();
Updates a container group
- HTTP Method:
PATCH
- Endpoint:
/organizations/{organization_name}/projects/{project_name}/containers/{container_group_name}
Parameters
Name | Type | Required | Description |
---|---|---|---|
body | UpdateContainerGroup | ✅ | The request body. |
organizationName | string | ✅ | Your organization name. This identifies the billing context for the API operation and represents a security boundary for SaladCloud resources. The organization must be created before using the API, and you must be a member of the organization. |
projectName | string | ✅ | Your project name. This represents a collection of related SaladCloud resources. The project must be created before using the API. |
containerGroupName | string | ✅ | The unique container group name |
Return Type
ContainerGroup
Example Usage Code Snippet
import {
ContainerGroupLivenessProbe,
ContainerGroupReadinessProbe,
ContainerGroupStartupProbe,
CountryCode,
QueueAutoscaler,
SaladCloudSdk,
UpdateContainer,
UpdateContainerGroup,
UpdateContainerGroupNetworking,
} from '@saladtechnologies-oss/salad-cloud-sdk';
(async () => {
const saladCloudSdk = new SaladCloudSdk({
apiKey: 'YOUR_API_KEY',
});
const resources: Resources = {
cpu: 3,
memory: 14678,
gpuClasses: ['gpu_classes'],
storageAmount: 47984533464,
};
const containerGroupPriority = ContainerGroupPriority.HIGH;
const loggingAxiom3: LoggingAxiom3 = {
host: 'aute veniam exercitation eiusmod et',
apiToken: 'mollit',
dataset: 'nisi in Lorem',
};
const datadogTags3: DatadogTags3 = {
name: 'name',
value: 'value',
};
const loggingDatadog3: LoggingDatadog3 = {
host: 'velit officia consequat',
apiKey: 'sit in veniam',
tags: [datadogTags3],
};
const loggingNewRelic3: LoggingNewRelic3 = {
host: 'consequat sed',
ingestionKey: 'tempor exercitation',
};
const loggingSplunk3: LoggingSplunk3 = {
host: 'qui enim Ut nostrud deserunt',
token: 'cillum sint ullamco veniam occaecat',
};
const loggingTcp3: LoggingTcp3 = {
host: 'Ut amet',
port: 30110,
};
const httpFormat3 = HttpFormat3.JSON;
const httpHeaders4: HttpHeaders4 = {
name: 'name',
value: 'value',
};
const httpCompression3 = HttpCompression3.NONE;
const loggingHttp3: LoggingHttp3 = {
host: 'eiusmod labore proident sit ut',
port: 17490,
user: 'user',
password: 'password',
path: 'path',
format: httpFormat3,
headers: [httpHeaders4],
compression: httpCompression3,
};
const updateContainerLogging: UpdateContainerLogging = {
axiom: loggingAxiom3,
datadog: loggingDatadog3,
newRelic: loggingNewRelic3,
splunk: loggingSplunk3,
tcp: loggingTcp3,
http: loggingHttp3,
};
const registryAuthenticationBasic2: RegistryAuthenticationBasic2 = {
username: 'username',
password: 'password',
};
const registryAuthenticationGcpGcr2: RegistryAuthenticationGcpGcr2 = {
serviceKey: 'service_key',
};
const registryAuthenticationAwsEcr2: RegistryAuthenticationAwsEcr2 = {
accessKeyId: 'access_key_id',
secretAccessKey: 'secret_access_key',
};
const registryAuthenticationDockerHub2: RegistryAuthenticationDockerHub2 = {
username: 'username',
personalAccessToken: 'personal_access_token',
};
const registryAuthenticationGcpGar2: RegistryAuthenticationGcpGar2 = {
serviceKey: 'service_key',
};
const updateContainerRegistryAuthentication: UpdateContainerRegistryAuthentication = {
basic: registryAuthenticationBasic2,
gcpGcr: registryAuthenticationGcpGcr2,
awsEcr: registryAuthenticationAwsEcr2,
dockerHub: registryAuthenticationDockerHub2,
gcpGar: registryAuthenticationGcpGar2,
};
const updateContainer: UpdateContainer = {
image: 'labore',
resources: resources,
command: ['command'],
priority: containerGroupPriority,
environmentVariables: [],
logging: updateContainerLogging,
registryAuthentication: updateContainerRegistryAuthentication,
};
const countryCode = CountryCode.AF;
const updateContainerGroupNetworking: UpdateContainerGroupNetworking = {
port: 35022,
};
const containerGroupProbeTcp: ContainerGroupProbeTcp = {
port: 61900,
};
const containerProbeHttpScheme = ContainerProbeHttpScheme.HTTP;
const containerGroupProbeHttpHeaders2: ContainerGroupProbeHttpHeaders2 = {
name: 'name',
value: 'value',
};
const containerGroupProbeHttp: ContainerGroupProbeHttp = {
path: 'path',
port: 58759,
scheme: containerProbeHttpScheme,
headers: [containerGroupProbeHttpHeaders2],
};
const containerGroupProbeGrpc: ContainerGroupProbeGrpc = {
service: 'service',
port: 32748,
};
const containerGroupProbeExec: ContainerGroupProbeExec = {
command: ['command'],
};
const containerGroupLivenessProbe: ContainerGroupLivenessProbe = {
tcp: containerGroupProbeTcp,
http: containerGroupProbeHttp,
grpc: containerGroupProbeGrpc,
exec: containerGroupProbeExec,
initialDelaySeconds: 6,
periodSeconds: 10,
timeoutSeconds: 30,
successThreshold: 1,
failureThreshold: 3,
};
const containerGroupReadinessProbe: ContainerGroupReadinessProbe = {
tcp: containerGroupProbeTcp,
http: containerGroupProbeHttp,
grpc: containerGroupProbeGrpc,
exec: containerGroupProbeExec,
initialDelaySeconds: 4,
periodSeconds: 1,
timeoutSeconds: 1,
successThreshold: 1,
failureThreshold: 3,
};
const containerGroupStartupProbe: ContainerGroupStartupProbe = {
tcp: containerGroupProbeTcp,
http: containerGroupProbeHttp,
grpc: containerGroupProbeGrpc,
exec: containerGroupProbeExec,
initialDelaySeconds: 10,
periodSeconds: 3,
timeoutSeconds: 10,
successThreshold: 2,
failureThreshold: 1200,
};
const queueAutoscaler: QueueAutoscaler = {
minReplicas: 96,
maxReplicas: 190,
desiredQueueLength: 42,
pollingPeriod: 684,
maxUpscalePerMinute: 95,
maxDownscalePerMinute: 10,
};
const updateContainerGroup: UpdateContainerGroup = {
displayName: '01n75',
container: updateContainer,
replicas: 232,
countryCodes: [countryCode],
networking: updateContainerGroupNetworking,
livenessProbe: containerGroupLivenessProbe,
readinessProbe: containerGroupReadinessProbe,
startupProbe: containerGroupStartupProbe,
queueAutoscaler: queueAutoscaler,
};
const { data } = await saladCloudSdk.containerGroups.updateContainerGroup(
'oji7lyvxb3ca5hc',
'olb1uzytbhhukf1u0-ahl0b9oqfjj',
's7z7dvdopv2czgde1zrufxgiv5tp-j',
input,
);
console.log(data);
})();
Deletes a container group
- HTTP Method:
DELETE
- Endpoint:
/organizations/{organization_name}/projects/{project_name}/containers/{container_group_name}
Parameters
Name | Type | Required | Description |
---|---|---|---|
organizationName | string | ✅ | Your organization name. This identifies the billing context for the API operation and represents a security boundary for SaladCloud resources. The organization must be created before using the API, and you must be a member of the organization. |
projectName | string | ✅ | Your project name. This represents a collection of related SaladCloud resources. The project must be created before using the API. |
containerGroupName | string | ✅ | The unique container group name |
Example Usage Code Snippet
import { SaladCloudSdk } from '@saladtechnologies-oss/salad-cloud-sdk';
(async () => {
const saladCloudSdk = new SaladCloudSdk({
apiKey: 'YOUR_API_KEY',
});
const { data } = await saladCloudSdk.containerGroups.deleteContainerGroup(
'oji7lyvxb3ca5hc',
'olb1uzytbhhukf1u0-ahl0b9oqfjj',
's7z7dvdopv2czgde1zrufxgiv5tp-j',
);
console.log(data);
})();
Starts a container group
- HTTP Method:
POST
- Endpoint:
/organizations/{organization_name}/projects/{project_name}/containers/{container_group_name}/start
Parameters
Name | Type | Required | Description |
---|---|---|---|
organizationName | string | ✅ | Your organization name. This identifies the billing context for the API operation and represents a security boundary for SaladCloud resources. The organization must be created before using the API, and you must be a member of the organization. |
projectName | string | ✅ | Your project name. This represents a collection of related SaladCloud resources. The project must be created before using the API. |
containerGroupName | string | ✅ | The unique container group name |
Example Usage Code Snippet
import { SaladCloudSdk } from '@saladtechnologies-oss/salad-cloud-sdk';
(async () => {
const saladCloudSdk = new SaladCloudSdk({
apiKey: 'YOUR_API_KEY',
});
const { data } = await saladCloudSdk.containerGroups.startContainerGroup(
'jfybnugpd6',
'jngr',
'vjne2vq5j0d2m4f21ex5ozb1-4j-you0d7uftlpfgcaqa-2oc58y844mz',
);
console.log(data);
})();
Stops a container group
- HTTP Method:
POST
- Endpoint:
/organizations/{organization_name}/projects/{project_name}/containers/{container_group_name}/stop
Parameters
Name | Type | Required | Description |
---|---|---|---|
organizationName | string | ✅ | Your organization name. This identifies the billing context for the API operation and represents a security boundary for SaladCloud resources. The organization must be created before using the API, and you must be a member of the organization. |
projectName | string | ✅ | Your project name. This represents a collection of related SaladCloud resources. The project must be created before using the API. |
containerGroupName | string | ✅ | The unique container group name |
Example Usage Code Snippet
import { SaladCloudSdk } from '@saladtechnologies-oss/salad-cloud-sdk';
(async () => {
const saladCloudSdk = new SaladCloudSdk({
apiKey: 'YOUR_API_KEY',
});
const { data } = await saladCloudSdk.containerGroups.stopContainerGroup(
'jpqhlkkgd',
'a9h5upyur493wxwbxrj4xt9wfx07sgyz1fs97sfhtue78-54vd',
'jp2qrcnt-8a3',
);
console.log(data);
})();
Gets the list of container group instances
- HTTP Method:
GET
- Endpoint:
/organizations/{organization_name}/projects/{project_name}/containers/{container_group_name}/instances
Parameters
Name | Type | Required | Description |
---|---|---|---|
organizationName | string | ✅ | Your organization name. This identifies the billing context for the API operation and represents a security boundary for SaladCloud resources. The organization must be created before using the API, and you must be a member of the organization. |
projectName | string | ✅ | Your project name. This represents a collection of related SaladCloud resources. The project must be created before using the API. |
containerGroupName | string | ✅ | The unique container group name |
Return Type
ContainerGroupInstances
Example Usage Code Snippet
import { SaladCloudSdk } from '@saladtechnologies-oss/salad-cloud-sdk';
(async () => {
const saladCloudSdk = new SaladCloudSdk({
apiKey: 'YOUR_API_KEY',
});
const { data } = await saladCloudSdk.containerGroups.listContainerGroupInstances(
'kjhy3jn2rdf012fi7ouno3mk-ax4d0ajj5ajjquzeg-z3kvqxtnoxnlzhi',
'ft-8nawc40o0gqev-m',
'jpy8af-s7rq68p2lenu',
);
console.log(data);
})();
Gets a container group instance
- HTTP Method:
GET
- Endpoint:
/organizations/{organization_name}/projects/{project_name}/containers/{container_group_name}/instances/{container_group_instance_id}
Parameters
Name | Type | Required | Description |
---|---|---|---|
organizationName | string | ✅ | Your organization name. This identifies the billing context for the API operation and represents a security boundary for SaladCloud resources. The organization must be created before using the API, and you must be a member of the organization. |
projectName | string | ✅ | Your project name. This represents a collection of related SaladCloud resources. The project must be created before using the API. |
containerGroupName | string | ✅ | The unique container group name |
containerGroupInstanceId | string | ✅ | The unique instance identifier |
Return Type
ContainerGroupInstance
Example Usage Code Snippet
import { SaladCloudSdk } from '@saladtechnologies-oss/salad-cloud-sdk';
(async () => {
const saladCloudSdk = new SaladCloudSdk({
apiKey: 'YOUR_API_KEY',
});
const { data } = await saladCloudSdk.containerGroups.getContainerGroupInstance(
'a09xnu6-fkv3',
'ca4ydy-pi16e4ddle58fi8u9w2qgnsgj7cn',
'b4p90a72aagy0fz',
'container_group_instance_id',
);
console.log(data);
})();
Reallocates a container group instance to run on a different Salad Node
- HTTP Method:
POST
- Endpoint:
/organizations/{organization_name}/projects/{project_name}/containers/{container_group_name}/instances/{container_group_instance_id}/reallocate
Parameters
Name | Type | Required | Description |
---|---|---|---|
organizationName | string | ✅ | Your organization name. This identifies the billing context for the API operation and represents a security boundary for SaladCloud resources. The organization must be created before using the API, and you must be a member of the organization. |
projectName | string | ✅ | Your project name. This represents a collection of related SaladCloud resources. The project must be created before using the API. |
containerGroupName | string | ✅ | The unique container group name |
containerGroupInstanceId | string | ✅ | The unique instance identifier |
Example Usage Code Snippet
import { SaladCloudSdk } from '@saladtechnologies-oss/salad-cloud-sdk';
(async () => {
const saladCloudSdk = new SaladCloudSdk({
apiKey: 'YOUR_API_KEY',
});
const { data } = await saladCloudSdk.containerGroups.reallocateContainerGroupInstance(
'sws1rwna83a3asu0izd6ugn07m5xpcp89lefemdke05z4s9d',
'ed2caksvlhpzmfccbh2v7dcapp3enb9gd2f4k49vviu53s5',
'xkwwnw',
'container_group_instance_id',
);
console.log(data);
})();
Stops a container, destroys it, and starts a new one without requiring the image to be downloaded again on a new Salad Node
- HTTP Method:
POST
- Endpoint:
/organizations/{organization_name}/projects/{project_name}/containers/{container_group_name}/instances/{container_group_instance_id}/recreate
Parameters
Name | Type | Required | Description |
---|---|---|---|
organizationName | string | ✅ | Your organization name. This identifies the billing context for the API operation and represents a security boundary for SaladCloud resources. The organization must be created before using the API, and you must be a member of the organization. |
projectName | string | ✅ | Your project name. This represents a collection of related SaladCloud resources. The project must be created before using the API. |
containerGroupName | string | ✅ | The unique container group name |
containerGroupInstanceId | string | ✅ | The unique instance identifier |
Example Usage Code Snippet
import { SaladCloudSdk } from '@saladtechnologies-oss/salad-cloud-sdk';
(async () => {
const saladCloudSdk = new SaladCloudSdk({
apiKey: 'YOUR_API_KEY',
});
const { data } = await saladCloudSdk.containerGroups.recreateContainerGroupInstance(
'm-gfjsmt',
'qljdg4',
'nzzyoj4pl2kuh4c67m3ae7qwlwipkdye-ad90-cq0up7kyr6',
'container_group_instance_id',
);
console.log(data);
})();
Stops a container and restarts it on the same Salad Node
- HTTP Method:
POST
- Endpoint:
/organizations/{organization_name}/projects/{project_name}/containers/{container_group_name}/instances/{container_group_instance_id}/restart
Parameters
Name | Type | Required | Description |
---|---|---|---|
organizationName | string | ✅ | Your organization name. This identifies the billing context for the API operation and represents a security boundary for SaladCloud resources. The organization must be created before using the API, and you must be a member of the organization. |
projectName | string | ✅ | Your project name. This represents a collection of related SaladCloud resources. The project must be created before using the API. |
containerGroupName | string | ✅ | The unique container group name |
containerGroupInstanceId | string | ✅ | The unique instance identifier |
Example Usage Code Snippet
import { SaladCloudSdk } from '@saladtechnologies-oss/salad-cloud-sdk';
(async () => {
const saladCloudSdk = new SaladCloudSdk({
apiKey: 'YOUR_API_KEY',
});
const { data } = await saladCloudSdk.containerGroups.restartContainerGroupInstance(
'pb',
'dvb96iwcvlvvm1n',
'ngljb',
'container_group_instance_id',
);
console.log(data);
})();