azure.mgmt.containerinstance.operations module

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

Bases: object

ContainerGroupsOperations operations.

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: “2018-06-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, **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) – 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

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

models = <module 'azure.mgmt.containerinstance.models' from '/usr/lib/python3.7/site-packages/azure/mgmt/containerinstance/models/__init__.py'>
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

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

Bases: object

Operations operations.

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: “2018-06-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:

OperationListResult or ClientRawResponse if raw=true

Return type:

OperationListResult or ClientRawResponse

Raises:

CloudError

models = <module 'azure.mgmt.containerinstance.models' from '/usr/lib/python3.7/site-packages/azure/mgmt/containerinstance/models/__init__.py'>
class azure.mgmt.containerinstance.operations.ContainerGroupUsageOperations(client, config, serializer, deserializer)[source]

Bases: object

ContainerGroupUsageOperations operations.

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: “2018-06-01”.

list(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:

UsageListResult or ClientRawResponse if raw=true

Return type:

UsageListResult or ClientRawResponse

Raises:

CloudError

models = <module 'azure.mgmt.containerinstance.models' from '/usr/lib/python3.7/site-packages/azure/mgmt/containerinstance/models/__init__.py'>
class azure.mgmt.containerinstance.operations.ContainerOperations(client, config, serializer, deserializer)[source]

Bases: object

ContainerOperations operations.

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: “2018-06-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 '/usr/lib/python3.7/site-packages/azure/mgmt/containerinstance/models/__init__.py'>