A list of all methods in the ContainerGroupsService
service. Click on the method name to view detailed information about that method.
Methods | Description |
---|---|
list_container_groups | Gets the list of container groups |
create_container_group | Creates a new container group |
get_container_group | Gets a container group |
update_container_group | Updates a container group |
delete_container_group | Deletes a container group |
start_container_group | Starts a container group |
stop_container_group | Stops a container group |
list_container_group_instances | Gets the list of container group instances |
get_container_group_instance | Gets a container group instance |
reallocate_container_group_instance | Reallocates a container group instance to run on a different Salad Node |
recreate_container_group_instance | Stops a container, destroys it, and starts a new one without requiring the image to be downloaded again on a new Salad Node |
restart_container_group_instance | 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 |
---|---|---|---|
organization_name | str | ✅ | 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. |
project_name | str | ✅ | 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
from salad_cloud_sdk import SaladCloudSdk, Environment
sdk = SaladCloudSdk(
api_key="YOUR_API_KEY",
api_key_header="YOUR_API_KEY_HEADER",
base_url=Environment.DEFAULT.value,
timeout=10000
)
result = sdk.container_groups.list_container_groups(
organization_name="v50imwzgi4em4q035",
project_name="m6yw3-xm60cb7tiev8rketqiiwjepibzf2ust1cvjx8oua8mepeueo5-1"
)
print(result)
Creates a new container group
- HTTP Method:
POST
- Endpoint:
/organizations/{organization_name}/projects/{project_name}/containers
Parameters
Name | Type | Required | Description |
---|---|---|---|
request_body | CreateContainerGroup | ✅ | The request body. |
organization_name | str | ✅ | 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. |
project_name | str | ✅ | 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
from salad_cloud_sdk import SaladCloudSdk, Environment
from salad_cloud_sdk.models import CreateContainerGroup
sdk = SaladCloudSdk(
api_key="YOUR_API_KEY",
api_key_header="YOUR_API_KEY_HEADER",
base_url=Environment.DEFAULT.value,
timeout=10000
)
request_body = CreateContainerGroup(
name="xvih",
display_name="INce5LCTy",
container={
"image": "reprehenderit",
"resources": {
"cpu": 10,
"memory": 35273,
"gpu_classes": [
"gpu_classes"
],
"storage_amount": 32391110488
},
"command": [
"command"
],
"priority": "high",
"environment_variables": {},
"logging": {
"axiom": {
"host": "irure ut eiusmod velit incididunt",
"api_token": "deserunt aute cillum dolor occaecat",
"dataset": "exercitation sit"
},
"datadog": {
"host": "sunt consequat irure fugiat",
"api_key": "magna",
"tags": [
{
"name": "name",
"value": "value"
}
]
},
"new_relic": {
"host": "quis aute in id proident",
"ingestion_key": "aliqua enim pariatur"
},
"splunk": {
"host": "ad",
"token": "irure velit labore nostrud elit"
},
"tcp": {
"host": "fugiat do",
"port": 1272
},
"http": {
"host": "cillum",
"port": 21241,
"user": "user",
"password": "password",
"path": "path",
"format": "json",
"headers": [
{
"name": "name",
"value": "value"
}
],
"compression": "none"
}
},
"registry_authentication": {
"basic": {
"username": "username",
"password": "password"
},
"gcp_gcr": {
"service_key": "service_key"
},
"aws_ecr": {
"access_key_id": "access_key_id",
"secret_access_key": "secret_access_key"
},
"docker_hub": {
"username": "username",
"personal_access_token": "personal_access_token"
},
"gcp_gar": {
"service_key": "service_key"
}
}
},
autostart_policy=False,
restart_policy="always",
replicas=12,
country_codes=[
"af"
],
networking={
"protocol": "http",
"port": 43901,
"auth": False,
"load_balancer": "round_robin",
"single_connection_limit": True,
"client_request_timeout": 100000,
"server_response_timeout": 100000
},
liveness_probe={
"tcp": {
"port": 61900
},
"http": {
"path": "path",
"port": 58759,
"scheme": "http",
"headers": [
{
"name": "name",
"value": "value"
}
]
},
"grpc": {
"service": "service",
"port": 32748
},
"exec_": {
"command": [
"command"
]
},
"initial_delay_seconds": 6,
"period_seconds": 10,
"timeout_seconds": 30,
"success_threshold": 1,
"failure_threshold": 3
},
readiness_probe={
"tcp": {
"port": 61900
},
"http": {
"path": "path",
"port": 58759,
"scheme": "http",
"headers": [
{
"name": "name",
"value": "value"
}
]
},
"grpc": {
"service": "service",
"port": 32748
},
"exec_": {
"command": [
"command"
]
},
"initial_delay_seconds": 4,
"period_seconds": 1,
"timeout_seconds": 1,
"success_threshold": 1,
"failure_threshold": 3
},
startup_probe={
"tcp": {
"port": 61900
},
"http": {
"path": "path",
"port": 58759,
"scheme": "http",
"headers": [
{
"name": "name",
"value": "value"
}
]
},
"grpc": {
"service": "service",
"port": 32748
},
"exec_": {
"command": [
"command"
]
},
"initial_delay_seconds": 10,
"period_seconds": 3,
"timeout_seconds": 10,
"success_threshold": 2,
"failure_threshold": 1200
},
queue_connection={
"path": "pariatur Ut aliqua irure",
"port": 34903,
"queue_name": "nz26lyemw7nednorlqjlsihb3"
},
queue_autoscaler={
"min_replicas": 96,
"max_replicas": 190,
"desired_queue_length": 42,
"polling_period": 684,
"max_upscale_per_minute": 95,
"max_downscale_per_minute": 10
}
)
result = sdk.container_groups.create_container_group(
request_body=request_body,
organization_name="v50imwzgi4em4q035",
project_name="m6yw3-xm60cb7tiev8rketqiiwjepibzf2ust1cvjx8oua8mepeueo5-1"
)
print(result)
Gets a container group
- HTTP Method:
GET
- Endpoint:
/organizations/{organization_name}/projects/{project_name}/containers/{container_group_name}
Parameters
Name | Type | Required | Description |
---|---|---|---|
organization_name | str | ✅ | 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. |
project_name | str | ✅ | Your project name. This represents a collection of related SaladCloud resources. The project must be created before using the API. |
container_group_name | str | ✅ | The unique container group name |
Return Type
ContainerGroup
Example Usage Code Snippet
from salad_cloud_sdk import SaladCloudSdk, Environment
sdk = SaladCloudSdk(
api_key="YOUR_API_KEY",
api_key_header="YOUR_API_KEY_HEADER",
base_url=Environment.DEFAULT.value,
timeout=10000
)
result = sdk.container_groups.get_container_group(
organization_name="oji7lyvxb3ca5hc",
project_name="olb1uzytbhhukf1u0-ahl0b9oqfjj",
container_group_name="s7z7dvdopv2czgde1zrufxgiv5tp-j"
)
print(result)
Updates a container group
- HTTP Method:
PATCH
- Endpoint:
/organizations/{organization_name}/projects/{project_name}/containers/{container_group_name}
Parameters
Name | Type | Required | Description |
---|---|---|---|
request_body | UpdateContainerGroup | ✅ | The request body. |
organization_name | str | ✅ | 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. |
project_name | str | ✅ | Your project name. This represents a collection of related SaladCloud resources. The project must be created before using the API. |
container_group_name | str | ✅ | The unique container group name |
Return Type
ContainerGroup
Example Usage Code Snippet
from salad_cloud_sdk import SaladCloudSdk, Environment
from salad_cloud_sdk.models import UpdateContainerGroup
sdk = SaladCloudSdk(
api_key="YOUR_API_KEY",
api_key_header="YOUR_API_KEY_HEADER",
base_url=Environment.DEFAULT.value,
timeout=10000
)
request_body = UpdateContainerGroup(
display_name="01n75",
container={
"image": "labore",
"resources": {
"cpu": 3,
"memory": 14678,
"gpu_classes": [
"gpu_classes"
],
"storage_amount": 47984533464
},
"command": [
"command"
],
"priority": "high",
"environment_variables": {},
"logging": {
"axiom": {
"host": "aute veniam exercitation eiusmod et",
"api_token": "mollit",
"dataset": "nisi in Lorem"
},
"datadog": {
"host": "velit officia consequat",
"api_key": "sit in veniam",
"tags": [
{
"name": "name",
"value": "value"
}
]
},
"new_relic": {
"host": "consequat sed",
"ingestion_key": "tempor exercitation"
},
"splunk": {
"host": "qui enim Ut nostrud deserunt",
"token": "cillum sint ullamco veniam occaecat"
},
"tcp": {
"host": "Ut amet",
"port": 30110
},
"http": {
"host": "eiusmod labore proident sit ut",
"port": 17490,
"user": "user",
"password": "password",
"path": "path",
"format": "json",
"headers": [
{
"name": "name",
"value": "value"
}
],
"compression": "none"
}
},
"registry_authentication": {
"basic": {
"username": "username",
"password": "password"
},
"gcp_gcr": {
"service_key": "service_key"
},
"aws_ecr": {
"access_key_id": "access_key_id",
"secret_access_key": "secret_access_key"
},
"docker_hub": {
"username": "username",
"personal_access_token": "personal_access_token"
},
"gcp_gar": {
"service_key": "service_key"
}
}
},
replicas=232,
country_codes=[
"af"
],
networking={
"port": 35022
},
liveness_probe={
"tcp": {
"port": 61900
},
"http": {
"path": "path",
"port": 58759,
"scheme": "http",
"headers": [
{
"name": "name",
"value": "value"
}
]
},
"grpc": {
"service": "service",
"port": 32748
},
"exec_": {
"command": [
"command"
]
},
"initial_delay_seconds": 6,
"period_seconds": 10,
"timeout_seconds": 30,
"success_threshold": 1,
"failure_threshold": 3
},
readiness_probe={
"tcp": {
"port": 61900
},
"http": {
"path": "path",
"port": 58759,
"scheme": "http",
"headers": [
{
"name": "name",
"value": "value"
}
]
},
"grpc": {
"service": "service",
"port": 32748
},
"exec_": {
"command": [
"command"
]
},
"initial_delay_seconds": 4,
"period_seconds": 1,
"timeout_seconds": 1,
"success_threshold": 1,
"failure_threshold": 3
},
startup_probe={
"tcp": {
"port": 61900
},
"http": {
"path": "path",
"port": 58759,
"scheme": "http",
"headers": [
{
"name": "name",
"value": "value"
}
]
},
"grpc": {
"service": "service",
"port": 32748
},
"exec_": {
"command": [
"command"
]
},
"initial_delay_seconds": 10,
"period_seconds": 3,
"timeout_seconds": 10,
"success_threshold": 2,
"failure_threshold": 1200
},
queue_autoscaler={
"min_replicas": 96,
"max_replicas": 190,
"desired_queue_length": 42,
"polling_period": 684,
"max_upscale_per_minute": 95,
"max_downscale_per_minute": 10
}
)
result = sdk.container_groups.update_container_group(
request_body=request_body,
organization_name="oji7lyvxb3ca5hc",
project_name="olb1uzytbhhukf1u0-ahl0b9oqfjj",
container_group_name="s7z7dvdopv2czgde1zrufxgiv5tp-j"
)
print(result)
Deletes a container group
- HTTP Method:
DELETE
- Endpoint:
/organizations/{organization_name}/projects/{project_name}/containers/{container_group_name}
Parameters
Name | Type | Required | Description |
---|---|---|---|
organization_name | str | ✅ | 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. |
project_name | str | ✅ | Your project name. This represents a collection of related SaladCloud resources. The project must be created before using the API. |
container_group_name | str | ✅ | The unique container group name |
Example Usage Code Snippet
from salad_cloud_sdk import SaladCloudSdk, Environment
sdk = SaladCloudSdk(
api_key="YOUR_API_KEY",
api_key_header="YOUR_API_KEY_HEADER",
base_url=Environment.DEFAULT.value,
timeout=10000
)
result = sdk.container_groups.delete_container_group(
organization_name="oji7lyvxb3ca5hc",
project_name="olb1uzytbhhukf1u0-ahl0b9oqfjj",
container_group_name="s7z7dvdopv2czgde1zrufxgiv5tp-j"
)
print(result)
Starts a container group
- HTTP Method:
POST
- Endpoint:
/organizations/{organization_name}/projects/{project_name}/containers/{container_group_name}/start
Parameters
Name | Type | Required | Description |
---|---|---|---|
organization_name | str | ✅ | 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. |
project_name | str | ✅ | Your project name. This represents a collection of related SaladCloud resources. The project must be created before using the API. |
container_group_name | str | ✅ | The unique container group name |
Example Usage Code Snippet
from salad_cloud_sdk import SaladCloudSdk, Environment
sdk = SaladCloudSdk(
api_key="YOUR_API_KEY",
api_key_header="YOUR_API_KEY_HEADER",
base_url=Environment.DEFAULT.value,
timeout=10000
)
result = sdk.container_groups.start_container_group(
organization_name="jfybnugpd6",
project_name="jngr",
container_group_name="vjne2vq5j0d2m4f21ex5ozb1-4j-you0d7uftlpfgcaqa-2oc58y844mz"
)
print(result)
Stops a container group
- HTTP Method:
POST
- Endpoint:
/organizations/{organization_name}/projects/{project_name}/containers/{container_group_name}/stop
Parameters
Name | Type | Required | Description |
---|---|---|---|
organization_name | str | ✅ | 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. |
project_name | str | ✅ | Your project name. This represents a collection of related SaladCloud resources. The project must be created before using the API. |
container_group_name | str | ✅ | The unique container group name |
Example Usage Code Snippet
from salad_cloud_sdk import SaladCloudSdk, Environment
sdk = SaladCloudSdk(
api_key="YOUR_API_KEY",
api_key_header="YOUR_API_KEY_HEADER",
base_url=Environment.DEFAULT.value,
timeout=10000
)
result = sdk.container_groups.stop_container_group(
organization_name="jpqhlkkgd",
project_name="a9h5upyur493wxwbxrj4xt9wfx07sgyz1fs97sfhtue78-54vd",
container_group_name="jp2qrcnt-8a3"
)
print(result)
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 |
---|---|---|---|
organization_name | str | ✅ | 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. |
project_name | str | ✅ | Your project name. This represents a collection of related SaladCloud resources. The project must be created before using the API. |
container_group_name | str | ✅ | The unique container group name |
Return Type
ContainerGroupInstances
Example Usage Code Snippet
from salad_cloud_sdk import SaladCloudSdk, Environment
sdk = SaladCloudSdk(
api_key="YOUR_API_KEY",
api_key_header="YOUR_API_KEY_HEADER",
base_url=Environment.DEFAULT.value,
timeout=10000
)
result = sdk.container_groups.list_container_group_instances(
organization_name="kjhy3jn2rdf012fi7ouno3mk-ax4d0ajj5ajjquzeg-z3kvqxtnoxnlzhi",
project_name="ft-8nawc40o0gqev-m",
container_group_name="jpy8af-s7rq68p2lenu"
)
print(result)
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 |
---|---|---|---|
organization_name | str | ✅ | 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. |
project_name | str | ✅ | Your project name. This represents a collection of related SaladCloud resources. The project must be created before using the API. |
container_group_name | str | ✅ | The unique container group name |
container_group_instance_id | str | ✅ | The unique instance identifier |
Return Type
ContainerGroupInstance
Example Usage Code Snippet
from salad_cloud_sdk import SaladCloudSdk, Environment
sdk = SaladCloudSdk(
api_key="YOUR_API_KEY",
api_key_header="YOUR_API_KEY_HEADER",
base_url=Environment.DEFAULT.value,
timeout=10000
)
result = sdk.container_groups.get_container_group_instance(
organization_name="a09xnu6-fkv3",
project_name="ca4ydy-pi16e4ddle58fi8u9w2qgnsgj7cn",
container_group_name="b4p90a72aagy0fz",
container_group_instance_id="container_group_instance_id"
)
print(result)
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 |
---|---|---|---|
organization_name | str | ✅ | 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. |
project_name | str | ✅ | Your project name. This represents a collection of related SaladCloud resources. The project must be created before using the API. |
container_group_name | str | ✅ | The unique container group name |
container_group_instance_id | str | ✅ | The unique instance identifier |
Example Usage Code Snippet
from salad_cloud_sdk import SaladCloudSdk, Environment
sdk = SaladCloudSdk(
api_key="YOUR_API_KEY",
api_key_header="YOUR_API_KEY_HEADER",
base_url=Environment.DEFAULT.value,
timeout=10000
)
result = sdk.container_groups.reallocate_container_group_instance(
organization_name="sws1rwna83a3asu0izd6ugn07m5xpcp89lefemdke05z4s9d",
project_name="ed2caksvlhpzmfccbh2v7dcapp3enb9gd2f4k49vviu53s5",
container_group_name="xkwwnw",
container_group_instance_id="container_group_instance_id"
)
print(result)
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 |
---|---|---|---|
organization_name | str | ✅ | 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. |
project_name | str | ✅ | Your project name. This represents a collection of related SaladCloud resources. The project must be created before using the API. |
container_group_name | str | ✅ | The unique container group name |
container_group_instance_id | str | ✅ | The unique instance identifier |
Example Usage Code Snippet
from salad_cloud_sdk import SaladCloudSdk, Environment
sdk = SaladCloudSdk(
api_key="YOUR_API_KEY",
api_key_header="YOUR_API_KEY_HEADER",
base_url=Environment.DEFAULT.value,
timeout=10000
)
result = sdk.container_groups.recreate_container_group_instance(
organization_name="m-gfjsmt",
project_name="qljdg4",
container_group_name="nzzyoj4pl2kuh4c67m3ae7qwlwipkdye-ad90-cq0up7kyr6",
container_group_instance_id="container_group_instance_id"
)
print(result)
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 |
---|---|---|---|
organization_name | str | ✅ | 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. |
project_name | str | ✅ | Your project name. This represents a collection of related SaladCloud resources. The project must be created before using the API. |
container_group_name | str | ✅ | The unique container group name |
container_group_instance_id | str | ✅ | The unique instance identifier |
Example Usage Code Snippet
from salad_cloud_sdk import SaladCloudSdk, Environment
sdk = SaladCloudSdk(
api_key="YOUR_API_KEY",
api_key_header="YOUR_API_KEY_HEADER",
base_url=Environment.DEFAULT.value,
timeout=10000
)
result = sdk.container_groups.restart_container_group_instance(
organization_name="pb",
project_name="dvb96iwcvlvvm1n",
container_group_name="ngljb",
container_group_instance_id="container_group_instance_id"
)
print(result)