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('o9lnd3c1w-4b', 'c9jr');
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: 9057,
gpuClasses: ['gpu_classes'],
storageAmount: 34911830561,
};
const containerGroupPriority = ContainerGroupPriority.HIGH;
const loggingAxiom2: LoggingAxiom2 = {
host: 'host',
apiToken: 'api_token',
dataset: 'dataset',
};
const datadogTags2: DatadogTags2 = {
name: 'name',
value: 'value',
};
const loggingDatadog2: LoggingDatadog2 = {
host: 'host',
apiKey: 'api_key',
tags: [datadogTags2],
};
const loggingNewRelic2: LoggingNewRelic2 = {
host: 'host',
ingestionKey: 'ingestion_key',
};
const loggingSplunk2: LoggingSplunk2 = {
host: 'host',
token: 'token',
};
const loggingTcp2: LoggingTcp2 = {
host: 'host',
port: 32723,
};
const httpFormat2 = HttpFormat2.JSON;
const httpHeaders3: HttpHeaders3 = {
name: 'name',
value: 'value',
};
const httpCompression2 = HttpCompression2.NONE;
const loggingHttp2: LoggingHttp2 = {
host: 'host',
port: 51830,
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: 'image',
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.ROUND_ROBIN;
const createContainerGroupNetworking: CreateContainerGroupNetworking = {
protocol: containerNetworkingProtocol,
port: 4465,
auth: true,
loadBalancer: createContainerGroupNetworkingLoadBalancer,
singleConnectionLimit: true,
clientRequestTimeout: 100000,
serverResponseTimeout: 100000,
};
const containerGroupProbeTcp: ContainerGroupProbeTcp = {
port: 993,
};
const containerProbeHttpScheme = ContainerProbeHttpScheme.HTTP;
const containerGroupProbeHttpHeaders2: ContainerGroupProbeHttpHeaders2 = {
name: 'name',
value: 'value',
};
const containerGroupProbeHttp: ContainerGroupProbeHttp = {
path: 'path',
port: 64175,
scheme: containerProbeHttpScheme,
headers: [containerGroupProbeHttpHeaders2],
};
const containerGroupProbeGrpc: ContainerGroupProbeGrpc = {
service: 'service',
port: 8441,
};
const containerGroupProbeExec: ContainerGroupProbeExec = {
command: ['command'],
};
const containerGroupLivenessProbe: ContainerGroupLivenessProbe = {
tcp: containerGroupProbeTcp,
http: containerGroupProbeHttp,
grpc: containerGroupProbeGrpc,
exec: containerGroupProbeExec,
initialDelaySeconds: 8,
periodSeconds: 10,
timeoutSeconds: 30,
successThreshold: 1,
failureThreshold: 3,
};
const containerGroupReadinessProbe: ContainerGroupReadinessProbe = {
tcp: containerGroupProbeTcp,
http: containerGroupProbeHttp,
grpc: containerGroupProbeGrpc,
exec: containerGroupProbeExec,
initialDelaySeconds: 10,
periodSeconds: 1,
timeoutSeconds: 1,
successThreshold: 1,
failureThreshold: 3,
};
const containerGroupStartupProbe: ContainerGroupStartupProbe = {
tcp: containerGroupProbeTcp,
http: containerGroupProbeHttp,
grpc: containerGroupProbeGrpc,
exec: containerGroupProbeExec,
initialDelaySeconds: 7,
periodSeconds: 3,
timeoutSeconds: 10,
successThreshold: 2,
failureThreshold: 1200,
};
const containerGroupQueueConnection: ContainerGroupQueueConnection = {
path: 'path',
port: 43154,
queueName: 'oujbls0vsz6xilo12xl52y9c178cmdya6ykpby-hunb0b6s7s2mppfvzd5f4e',
};
const queueAutoscaler: QueueAutoscaler = {
minReplicas: 41,
maxReplicas: 135,
desiredQueueLength: 51,
pollingPeriod: 188,
maxUpscalePerMinute: 30,
maxDownscalePerMinute: 42,
};
const createContainerGroup: CreateContainerGroup = {
name: 'name',
displayName: 'hfR',
container: createContainer,
autostartPolicy: true,
restartPolicy: containerRestartPolicy,
replicas: 169,
countryCodes: [countryCode],
networking: createContainerGroupNetworking,
livenessProbe: containerGroupLivenessProbe,
readinessProbe: containerGroupReadinessProbe,
startupProbe: containerGroupStartupProbe,
queueConnection: containerGroupQueueConnection,
queueAutoscaler: queueAutoscaler,
};
const { data } = await saladCloudSdk.containerGroups.createContainerGroup(
'o9lnd3c1w-4b',
'c9jr',
createContainerGroup,
);
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(
'mk0yct7b8bo1g8tvl9',
'ax4qyju9jcnr3fw8e9al8o-4oreg5ocaz2jbu5pfmpygxffsf4bh4e6',
'dzh9lv6afpamv8cx0x6',
);
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: 12,
memory: 16671,
gpuClasses: ['gpu_classes'],
storageAmount: 47892181137,
};
const containerGroupPriority = ContainerGroupPriority.HIGH;
const loggingAxiom3: LoggingAxiom3 = {
host: 'host',
apiToken: 'api_token',
dataset: 'dataset',
};
const datadogTags3: DatadogTags3 = {
name: 'name',
value: 'value',
};
const loggingDatadog3: LoggingDatadog3 = {
host: 'host',
apiKey: 'api_key',
tags: [datadogTags3],
};
const loggingNewRelic3: LoggingNewRelic3 = {
host: 'host',
ingestionKey: 'ingestion_key',
};
const loggingSplunk3: LoggingSplunk3 = {
host: 'host',
token: 'token',
};
const loggingTcp3: LoggingTcp3 = {
host: 'host',
port: 4071,
};
const httpFormat3 = HttpFormat3.JSON;
const httpHeaders4: HttpHeaders4 = {
name: 'name',
value: 'value',
};
const httpCompression3 = HttpCompression3.NONE;
const loggingHttp3: LoggingHttp3 = {
host: 'host',
port: 52384,
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: 'image',
resources: resources,
command: ['command'],
priority: containerGroupPriority,
environmentVariables: [],
logging: updateContainerLogging,
registryAuthentication: updateContainerRegistryAuthentication,
};
const countryCode = CountryCode.AF;
const updateContainerGroupNetworking: UpdateContainerGroupNetworking = {
port: 49186,
};
const containerGroupProbeTcp: ContainerGroupProbeTcp = {
port: 993,
};
const containerProbeHttpScheme = ContainerProbeHttpScheme.HTTP;
const containerGroupProbeHttpHeaders2: ContainerGroupProbeHttpHeaders2 = {
name: 'name',
value: 'value',
};
const containerGroupProbeHttp: ContainerGroupProbeHttp = {
path: 'path',
port: 64175,
scheme: containerProbeHttpScheme,
headers: [containerGroupProbeHttpHeaders2],
};
const containerGroupProbeGrpc: ContainerGroupProbeGrpc = {
service: 'service',
port: 8441,
};
const containerGroupProbeExec: ContainerGroupProbeExec = {
command: ['command'],
};
const containerGroupLivenessProbe: ContainerGroupLivenessProbe = {
tcp: containerGroupProbeTcp,
http: containerGroupProbeHttp,
grpc: containerGroupProbeGrpc,
exec: containerGroupProbeExec,
initialDelaySeconds: 8,
periodSeconds: 10,
timeoutSeconds: 30,
successThreshold: 1,
failureThreshold: 3,
};
const containerGroupReadinessProbe: ContainerGroupReadinessProbe = {
tcp: containerGroupProbeTcp,
http: containerGroupProbeHttp,
grpc: containerGroupProbeGrpc,
exec: containerGroupProbeExec,
initialDelaySeconds: 10,
periodSeconds: 1,
timeoutSeconds: 1,
successThreshold: 1,
failureThreshold: 3,
};
const containerGroupStartupProbe: ContainerGroupStartupProbe = {
tcp: containerGroupProbeTcp,
http: containerGroupProbeHttp,
grpc: containerGroupProbeGrpc,
exec: containerGroupProbeExec,
initialDelaySeconds: 7,
periodSeconds: 3,
timeoutSeconds: 10,
successThreshold: 2,
failureThreshold: 1200,
};
const queueAutoscaler: QueueAutoscaler = {
minReplicas: 41,
maxReplicas: 135,
desiredQueueLength: 51,
pollingPeriod: 188,
maxUpscalePerMinute: 30,
maxDownscalePerMinute: 42,
};
const updateContainerGroup: UpdateContainerGroup = {
displayName: 'hx6nAEIR',
container: updateContainer,
replicas: 90,
countryCodes: [countryCode],
networking: updateContainerGroupNetworking,
livenessProbe: containerGroupLivenessProbe,
readinessProbe: containerGroupReadinessProbe,
startupProbe: containerGroupStartupProbe,
queueAutoscaler: queueAutoscaler,
};
const { data } = await saladCloudSdk.containerGroups.updateContainerGroup(
'mk0yct7b8bo1g8tvl9',
'ax4qyju9jcnr3fw8e9al8o-4oreg5ocaz2jbu5pfmpygxffsf4bh4e6',
'dzh9lv6afpamv8cx0x6',
updateContainerGroup,
);
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(
'mk0yct7b8bo1g8tvl9',
'ax4qyju9jcnr3fw8e9al8o-4oreg5ocaz2jbu5pfmpygxffsf4bh4e6',
'dzh9lv6afpamv8cx0x6',
);
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(
'vrwopvwr-1961g-m85nbqda3ufsy',
'm780t45z2tw4xt1b86w0clx6u',
'h-405x811v32aty9s-ghx1hm2nw1m',
);
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(
'fooidhvnhwad',
'azuh19krhv62or5c-im9-8sae7tz',
'oo0emyztq64o8ut710qtepjztx34mk6lruecseiyq06ab3ok5xsg-okxar',
);
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(
'y7y892q4m5rifzmevenpg1u',
'k8xgbal184sloim-c7555huym18dia9d-gb',
'opn2qgtohqud110sou2jqi50g1umdxtc9fte8n',
);
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(
'z-5ux2vsm',
'mjjt13u7q3pryx',
'qnnyigut20zp1dyfm2yp4-lw',
'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(
'a7tl0fwms3fu3myo74a99jr6ouv4w914sp420zyiuo43jexn',
'czq6rnxf04dqmccakh',
'k9g3a72svbjzx0y-i4o1cvulgdrylaujk1yrzfoq1',
'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(
'l7wk9jgwxjp56dzbnwtbgowklqt1wsbe00osnj3370c21vihvroq1cuqjb',
'g-0jo001xz6w2uhgmhtgvpqzhztmaqawqn92-rig0bznv-21cb7s',
'ghp2ecbvldrihtmaa78lqy5q1wdpi7ayf187etvt65ezckogou9lhenou1q2jx',
'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(
'ogx1pei8lousb7ikadj659qttkrqdm5b9xdq',
'cmet9ioqxf-a3suyfz4tkhle7s9-vpaj7uvpjx9jbtvwzjwvj900',
'bqh9-1g8glb2305o-txbnrdvt2jc9nvk5fkdf18q9zdv3',
'container_group_instance_id',
);
console.log(data);
})();