ContainersOperations Class

ContainersOperations operations.

You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute.

Inheritance
builtins.object
ContainersOperations

Constructor

ContainersOperations(client, config, serializer, deserializer)

Parameters

client
Required

Client for service requests.

config
Required

Configuration of service client.

serializer
Required

An object model serializer.

deserializer
Required

An object model deserializer.

Variables

models

Alias to model classes used in this operation group.

Methods

attach

Attach to the output of a specific container instance.

Attach to the output stream of a specific container instance in a specified resource group and container group.

execute_command

Executes a command in a specific container instance.

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

list_logs

Get the logs for a specified container instance.

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

attach

Attach to the output of a specific container instance.

Attach to the output stream of a specific container instance in a specified resource group and container group.

attach(resource_group_name, container_group_name, container_name, **kwargs)

Parameters

resource_group_name
str
Required

The name of the resource group.

container_group_name
str
Required

The name of the container group.

container_name
str
Required

The name of the container instance.

cls
callable

A custom type or function that will be passed the direct response

Returns

ContainerAttachResponse, or the result of cls(response)

Return type

execute_command

Executes a command in a specific container instance.

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

execute_command(resource_group_name, container_group_name, container_name, container_exec_request, **kwargs)

Parameters

resource_group_name
str
Required

The name of the resource group.

container_group_name
str
Required

The name of the container group.

container_name
str
Required

The name of the container instance.

container_exec_request
ContainerExecRequest
Required

The request for the exec command.

cls
callable

A custom type or function that will be passed the direct response

Returns

ContainerExecResponse, or the result of cls(response)

Return type

list_logs

Get the logs for a specified container instance.

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

list_logs(resource_group_name, container_group_name, container_name, tail=None, timestamps=None, **kwargs)

Parameters

resource_group_name
str
Required

The name of the resource group.

container_group_name
str
Required

The name of the container group.

container_name
str
Required

The name of the container instance.

tail
int
default value: None

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.

timestamps
bool
default value: None

If true, adds a timestamp at the beginning of every line of log output. If not provided, defaults to false.

cls
callable

A custom type or function that will be passed the direct response

Returns

Logs, or the result of cls(response)

Return type

Attributes

models

models = <module 'azure.mgmt.containerinstance.models' from 'C:\\hostedtoolcache\\windows\\Python\\3.6.8\\x64\\lib\\site-packages\\azure\\mgmt\\containerinstance\\models\\__init__.py'>