azure.mgmt.containerinstance.operations module

class azure.mgmt.containerinstance.operations.ContainerGroupsOperations(client, config, serializer, deserializer)[source]

Bases: object

ContainerGroupsOperations operations.

You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute.

Parameters
  • client – Client for service requests.

  • config – Configuration of service client.

  • serializer – An object model serializer.

  • deserializer – An object model deserializer.

Variables

api_version – Client API version. Constant value: “2019-12-01”.

create_or_update(resource_group_name, container_group_name, container_group, custom_headers=None, raw=False, polling=True, **operation_config)[source]

Create or update container groups.

Create or update container groups with specified configurations.

Parameters
  • resource_group_name (str) – The name of the resource group.

  • container_group_name (str) – The name of the container group.

  • container_group (ContainerGroup) – The properties of the container group to be created or updated.

  • custom_headers (dict) – headers that will be added to the request

  • raw (bool) – The poller return type is ClientRawResponse, the direct response alongside the deserialized response

  • polling – True for ARMPolling, False for no polling, or a polling object for personal polling strategy

Returns

An instance of LROPoller that returns ContainerGroup or ClientRawResponse<ContainerGroup> if raw==True

Return type

AzureOperationPoller[ContainerGroup] or AzureOperationPoller[ClientRawResponse[ContainerGroup]]

Raises

CloudError

delete(resource_group_name, container_group_name, custom_headers=None, raw=False, polling=True, **operation_config)[source]

Delete the specified container group.

Delete the specified container group in the specified subscription and resource group. The operation does not delete other resources provided by the user, such as volumes.

Parameters
  • resource_group_name (str) – The name of the resource group.

  • container_group_name (str) – The name of the container group.

  • custom_headers (dict) – headers that will be added to the request

  • raw (bool) – The poller return type is ClientRawResponse, the direct response alongside the deserialized response

  • polling – True for ARMPolling, False for no polling, or a polling object for personal polling strategy

Returns

An instance of LROPoller that returns ContainerGroup or ClientRawResponse<ContainerGroup> if raw==True

Return type

AzureOperationPoller[ContainerGroup] or AzureOperationPoller[ClientRawResponse[ContainerGroup]]

Raises

CloudError

get(resource_group_name, container_group_name, custom_headers=None, raw=False, **operation_config)[source]

Get the properties of the specified container group.

Gets the properties of the specified container group in the specified subscription and resource group. The operation returns the properties of each container group including containers, image registry credentials, restart policy, IP address type, OS type, state, and volumes.

Parameters
  • resource_group_name (str) – The name of the resource group.

  • container_group_name (str) – The name of the container group.

  • custom_headers (dict) – headers that will be added to the request

  • raw (bool) – returns the direct response alongside the deserialized response

  • operation_configOperation configuration overrides.

Returns

ContainerGroup or ClientRawResponse if raw=true

Return type

ContainerGroup or ClientRawResponse

Raises

CloudError

list(custom_headers=None, raw=False, **operation_config)[source]

Get a list of container groups in the specified subscription.

Get a list of container groups in the specified subscription. This operation returns properties of each container group including containers, image registry credentials, restart policy, IP address type, OS type, state, and volumes.

Parameters
  • custom_headers (dict) – headers that will be added to the request

  • raw (bool) – returns the direct response alongside the deserialized response

  • operation_configOperation configuration overrides.

Returns

An iterator like instance of ContainerGroup

Return type

ContainerGroupPaged[ContainerGroup]

Raises

CloudError

list_by_resource_group(resource_group_name, custom_headers=None, raw=False, **operation_config)[source]

Get a list of container groups in the specified subscription and resource group.

Get a list of container groups in a specified subscription and resource group. This operation returns properties of each container group including containers, image registry credentials, restart policy, IP address type, OS type, state, and volumes.

Parameters
  • resource_group_name (str) – The name of the resource group.

  • custom_headers (dict) – headers that will be added to the request

  • raw (bool) – returns the direct response alongside the deserialized response

  • operation_configOperation configuration overrides.

Returns

An iterator like instance of ContainerGroup

Return type

ContainerGroupPaged[ContainerGroup]

Raises

CloudError

restart(resource_group_name, container_group_name, custom_headers=None, raw=False, polling=True, **operation_config)[source]

Restarts all containers in a container group.

Restarts all containers in a container group in place. If container image has updates, new image will be downloaded.

Parameters
  • resource_group_name (str) – The name of the resource group.

  • container_group_name (str) – The name of the container group.

  • custom_headers (dict) – headers that will be added to the request

  • raw (bool) – The poller return type is ClientRawResponse, the direct response alongside the deserialized response

  • polling – True for ARMPolling, False for no polling, or a polling object for personal polling strategy

Returns

An instance of LROPoller that returns None or ClientRawResponse<None> if raw==True

Return type

AzureOperationPoller[None] or AzureOperationPoller[ClientRawResponse[None]]

Raises

CloudError

start(resource_group_name, container_group_name, custom_headers=None, raw=False, polling=True, **operation_config)[source]

Starts all containers in a container group.

Starts all containers in a container group. Compute resources will be allocated and billing will start.

Parameters
  • resource_group_name (str) – The name of the resource group.

  • container_group_name (str) – The name of the container group.

  • custom_headers (dict) – headers that will be added to the request

  • raw (bool) – The poller return type is ClientRawResponse, the direct response alongside the deserialized response

  • polling – True for ARMPolling, False for no polling, or a polling object for personal polling strategy

Returns

An instance of LROPoller that returns None or ClientRawResponse<None> if raw==True

Return type

AzureOperationPoller[None] or AzureOperationPoller[ClientRawResponse[None]]

Raises

CloudError

stop(resource_group_name, container_group_name, custom_headers=None, raw=False, **operation_config)[source]

Stops all containers in a container group.

Stops all containers in a container group. Compute resources will be deallocated and billing will stop.

Parameters
  • resource_group_name (str) – The name of the resource group.

  • container_group_name (str) – The name of the container group.

  • custom_headers (dict) – headers that will be added to the request

  • raw (bool) – returns the direct response alongside the deserialized response

  • operation_configOperation configuration overrides.

Returns

None or ClientRawResponse if raw=true

Return type

None or ClientRawResponse

Raises

CloudError

update(resource_group_name, container_group_name, location=None, tags=None, custom_headers=None, raw=False, **operation_config)[source]

Update container groups.

Updates container group tags with specified values.

Parameters
  • resource_group_name (str) – The name of the resource group.

  • container_group_name (str) – The name of the container group.

  • location (str) – The resource location.

  • tags (dict[str, str]) – The resource tags.

  • custom_headers (dict) – headers that will be added to the request

  • raw (bool) – returns the direct response alongside the deserialized response

  • operation_configOperation configuration overrides.

Returns

ContainerGroup or ClientRawResponse if raw=true

Return type

ContainerGroup or ClientRawResponse

Raises

CloudError

models = <module 'azure.mgmt.containerinstance.models' from '/home/vsts/work/1/s/sdk/containerinstance/azure-mgmt-containerinstance/.tox/sphinx/lib/python3.6/site-packages/azure/mgmt/containerinstance/models/__init__.py'>
class azure.mgmt.containerinstance.operations.ContainersOperations(client, config, serializer, deserializer)[source]

Bases: object

ContainersOperations operations.

You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute.

Parameters
  • client – Client for service requests.

  • config – Configuration of service client.

  • serializer – An object model serializer.

  • deserializer – An object model deserializer.

Variables

api_version – Client API version. Constant value: “2019-12-01”.

execute_command(resource_group_name, container_group_name, container_name, command=None, terminal_size=None, custom_headers=None, raw=False, **operation_config)[source]

Executes a command in a specific container instance.

Executes a command for a specific container instance in a specified resource group and container group.

Parameters
  • resource_group_name (str) – The name of the resource group.

  • container_group_name (str) – The name of the container group.

  • container_name (str) – The name of the container instance.

  • command (str) – The command to be executed.

  • terminal_size (ContainerExecRequestTerminalSize) – The size of the terminal.

  • custom_headers (dict) – headers that will be added to the request

  • raw (bool) – returns the direct response alongside the deserialized response

  • operation_configOperation configuration overrides.

Returns

ContainerExecResponse or ClientRawResponse if raw=true

Return type

ContainerExecResponse or ClientRawResponse

Raises

CloudError

list_logs(resource_group_name, container_group_name, container_name, tail=None, custom_headers=None, raw=False, **operation_config)[source]

Get the logs for a specified container instance.

Get the logs for a specified container instance in a specified resource group and container group.

Parameters
  • resource_group_name (str) – The name of the resource group.

  • container_group_name (str) – The name of the container group.

  • container_name (str) – The name of the container instance.

  • tail (int) – The number of lines to show from the tail of the container instance log. If not provided, all available logs are shown up to 4mb.

  • custom_headers (dict) – headers that will be added to the request

  • raw (bool) – returns the direct response alongside the deserialized response

  • operation_configOperation configuration overrides.

Returns

Logs or ClientRawResponse if raw=true

Return type

Logs or ClientRawResponse

Raises

CloudError

models = <module 'azure.mgmt.containerinstance.models' from '/home/vsts/work/1/s/sdk/containerinstance/azure-mgmt-containerinstance/.tox/sphinx/lib/python3.6/site-packages/azure/mgmt/containerinstance/models/__init__.py'>
class azure.mgmt.containerinstance.operations.LocationOperations(client, config, serializer, deserializer)[source]

Bases: object

LocationOperations operations.

You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute.

Parameters
  • client – Client for service requests.

  • config – Configuration of service client.

  • serializer – An object model serializer.

  • deserializer – An object model deserializer.

Variables

api_version – Client API version. Constant value: “2019-12-01”.

list_cached_images(location, custom_headers=None, raw=False, **operation_config)[source]

Get the list of cached images.

Get the list of cached images on specific OS type for a subscription in a region.

Parameters
  • location (str) – The identifier for the physical azure location.

  • custom_headers (dict) – headers that will be added to the request

  • raw (bool) – returns the direct response alongside the deserialized response

  • operation_configOperation configuration overrides.

Returns

An iterator like instance of CachedImages

Return type

CachedImagesPaged[CachedImages]

Raises

CloudError

list_capabilities(location, custom_headers=None, raw=False, **operation_config)[source]

Get the list of capabilities of the location.

Get the list of CPU/memory/GPU capabilities of a region.

Parameters
  • location (str) – The identifier for the physical azure location.

  • custom_headers (dict) – headers that will be added to the request

  • raw (bool) – returns the direct response alongside the deserialized response

  • operation_configOperation configuration overrides.

Returns

An iterator like instance of Capabilities

Return type

CapabilitiesPaged[Capabilities]

Raises

CloudError

list_usage(location, custom_headers=None, raw=False, **operation_config)[source]

Get the usage for a subscription.

Parameters
  • location (str) – The identifier for the physical azure location.

  • custom_headers (dict) – headers that will be added to the request

  • raw (bool) – returns the direct response alongside the deserialized response

  • operation_configOperation configuration overrides.

Returns

An iterator like instance of Usage

Return type

UsagePaged[Usage]

Raises

CloudError

models = <module 'azure.mgmt.containerinstance.models' from '/home/vsts/work/1/s/sdk/containerinstance/azure-mgmt-containerinstance/.tox/sphinx/lib/python3.6/site-packages/azure/mgmt/containerinstance/models/__init__.py'>
class azure.mgmt.containerinstance.operations.Operations(client, config, serializer, deserializer)[source]

Bases: object

Operations operations.

You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute.

Parameters
  • client – Client for service requests.

  • config – Configuration of service client.

  • serializer – An object model serializer.

  • deserializer – An object model deserializer.

Variables

api_version – Client API version. Constant value: “2019-12-01”.

list(custom_headers=None, raw=False, **operation_config)[source]

List the operations for Azure Container Instance service.

Parameters
  • custom_headers (dict) – headers that will be added to the request

  • raw (bool) – returns the direct response alongside the deserialized response

  • operation_configOperation configuration overrides.

Returns

An iterator like instance of Operation

Return type

OperationPaged[Operation]

Raises

CloudError

models = <module 'azure.mgmt.containerinstance.models' from '/home/vsts/work/1/s/sdk/containerinstance/azure-mgmt-containerinstance/.tox/sphinx/lib/python3.6/site-packages/azure/mgmt/containerinstance/models/__init__.py'>