Skip to content

Latest commit

 

History

History
366 lines (236 loc) · 28.1 KB

ContainerGroupsService.md

File metadata and controls

366 lines (236 loc) · 28.1 KB

ContainerGroupsService

A list of all methods in the ContainerGroupsService service. Click on the method name to view detailed information about that method.

Methods Description
ListContainerGroupsAsync Gets the list of container groups
CreateContainerGroupAsync Creates a new container group
GetContainerGroupAsync Gets a container group
UpdateContainerGroupAsync Updates a container group
DeleteContainerGroupAsync Deletes a container group
StartContainerGroupAsync Starts a container group
StopContainerGroupAsync Stops a container group
ListContainerGroupInstancesAsync Gets the list of container group instances
GetContainerGroupInstanceAsync Gets a container group instance
ReallocateContainerGroupInstanceAsync Reallocates a container group instance to run on a different Salad Node
RecreateContainerGroupInstanceAsync Stops a container, destroys it, and starts a new one without requiring the image to be downloaded again on a new Salad Node
RestartContainerGroupInstanceAsync Stops a container and restarts it on the same Salad Node

ListContainerGroupsAsync

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

using Salad.Cloud.SDK;

var client = new SaladCloudSdkClient();

var response = await client.ContainerGroups.ListContainerGroupsAsync("v50imwzgi4em4q035", "m6yw3-xm60cb7tiev8rketqiiwjepibzf2ust1cvjx8oua8mepeueo5-1");

Console.WriteLine(response);

CreateContainerGroupAsync

Creates a new container group

  • HTTP Method: POST
  • Endpoint: /organizations/{organization_name}/projects/{project_name}/containers

Parameters

Name Type Required Description
input 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

using Salad.Cloud.SDK;
using Salad.Cloud.SDK.Models;

var client = new SaladCloudSdkClient();

var resources = new ContainerResourceRequirements(10, 35273);
var container = new CreateContainer("reprehenderit", resources);
var input = new CreateContainerGroup("xvih", container, false, ContainerRestartPolicy.Always, 12);

var response = await client.ContainerGroups.CreateContainerGroupAsync(input, "v50imwzgi4em4q035", "m6yw3-xm60cb7tiev8rketqiiwjepibzf2ust1cvjx8oua8mepeueo5-1");

Console.WriteLine(response);

GetContainerGroupAsync

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

using Salad.Cloud.SDK;

var client = new SaladCloudSdkClient();

var response = await client.ContainerGroups.GetContainerGroupAsync("oji7lyvxb3ca5hc", "olb1uzytbhhukf1u0-ahl0b9oqfjj", "s7z7dvdopv2czgde1zrufxgiv5tp-j");

Console.WriteLine(response);

UpdateContainerGroupAsync

Updates a container group

  • HTTP Method: PATCH
  • Endpoint: /organizations/{organization_name}/projects/{project_name}/containers/{container_group_name}

Parameters

Name Type Required Description
input 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

using Salad.Cloud.SDK;
using Salad.Cloud.SDK.Models;

var client = new SaladCloudSdkClient();

var input = new UpdateContainerGroup();

var response = await client.ContainerGroups.UpdateContainerGroupAsync(input, "oji7lyvxb3ca5hc", "olb1uzytbhhukf1u0-ahl0b9oqfjj", "s7z7dvdopv2czgde1zrufxgiv5tp-j");

Console.WriteLine(response);

DeleteContainerGroupAsync

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

using Salad.Cloud.SDK;

var client = new SaladCloudSdkClient();

await client.ContainerGroups.DeleteContainerGroupAsync("oji7lyvxb3ca5hc", "olb1uzytbhhukf1u0-ahl0b9oqfjj", "s7z7dvdopv2czgde1zrufxgiv5tp-j");

StartContainerGroupAsync

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

using Salad.Cloud.SDK;

var client = new SaladCloudSdkClient();

await client.ContainerGroups.StartContainerGroupAsync("jfybnugpd6", "jngr", "vjne2vq5j0d2m4f21ex5ozb1-4j-you0d7uftlpfgcaqa-2oc58y844mz");

StopContainerGroupAsync

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

using Salad.Cloud.SDK;

var client = new SaladCloudSdkClient();

await client.ContainerGroups.StopContainerGroupAsync("jpqhlkkgd", "a9h5upyur493wxwbxrj4xt9wfx07sgyz1fs97sfhtue78-54vd", "jp2qrcnt-8a3");

ListContainerGroupInstancesAsync

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

using Salad.Cloud.SDK;

var client = new SaladCloudSdkClient();

var response = await client.ContainerGroups.ListContainerGroupInstancesAsync("kjhy3jn2rdf012fi7ouno3mk-ax4d0ajj5ajjquzeg-z3kvqxtnoxnlzhi", "ft-8nawc40o0gqev-m", "jpy8af-s7rq68p2lenu");

Console.WriteLine(response);

GetContainerGroupInstanceAsync

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

using Salad.Cloud.SDK;

var client = new SaladCloudSdkClient();

var response = await client.ContainerGroups.GetContainerGroupInstanceAsync("a09xnu6-fkv3", "ca4ydy-pi16e4ddle58fi8u9w2qgnsgj7cn", "b4p90a72aagy0fz", "container_group_instance_id");

Console.WriteLine(response);

ReallocateContainerGroupInstanceAsync

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

using Salad.Cloud.SDK;

var client = new SaladCloudSdkClient();

await client.ContainerGroups.ReallocateContainerGroupInstanceAsync("sws1rwna83a3asu0izd6ugn07m5xpcp89lefemdke05z4s9d", "ed2caksvlhpzmfccbh2v7dcapp3enb9gd2f4k49vviu53s5", "xkwwnw", "container_group_instance_id");

RecreateContainerGroupInstanceAsync

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

using Salad.Cloud.SDK;

var client = new SaladCloudSdkClient();

await client.ContainerGroups.RecreateContainerGroupInstanceAsync("m-gfjsmt", "qljdg4", "nzzyoj4pl2kuh4c67m3ae7qwlwipkdye-ad90-cq0up7kyr6", "container_group_instance_id");

RestartContainerGroupInstanceAsync

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

using Salad.Cloud.SDK;

var client = new SaladCloudSdkClient();

await client.ContainerGroups.RestartContainerGroupInstanceAsync("pb", "dvb96iwcvlvvm1n", "ngljb", "container_group_instance_id");