Azure Container Instance (Preview)

Azure Container Instance (Preview)

Easily run containers on Azure with a single command. Create container groups, get the logs of a container and more.

Throttling Limits

Name Calls Renewal Period
API calls per connection 100 60 seconds

Creating a connection

To connect your account, you will need the following information:

Client ID
string
Client (or Application) ID of the Azure Active Directory application.
Client Secret
securestring
Client secret of the Azure Active Directory application.
Tenant
string
The tenant of ID for the Azure Active Directory application.
ResourceUri
string
The resource you are requesting authorization to use.
Grant Type
string
Grant type

Actions

Create container group

Create or update a container group with specified configurations.

Required Parameters

Subscription Id
string
Microsoft Azure subscription.
Resource Group
string
The name of the resource group.
Container Group Name
string
The name of the container group.
Location
string
The location to deploy container group.
Container Name
string
The name of the container.
Container Image
string
The name of the image used to create the container. E.g. nginx:latest
Port
integer
The port number exposed within the container group.
Environment Variable Name
string
The name of the environment variable.
Environment Variable Value
string
The value of the environment variable.
Memory Request
number
The memory request in GB of this container. E.g. 3.5
CPU Request
number
The CPU request of this container. E.g. 2.0
Volume Name
string
The name of the volume.
Path
string
The path within the container where the volume should be mounted. Must not contain colon (:).
Server
string
The Docker image registry server without a protocol such as "myacr.azurecr.io".
User Name
string
The username for the private registry.
Port
integer
The port number.
IP Address Type
string
Specifies if the IP is exposed to the public internet.
OS Type
string
The operating system type required by the container.
Name
string
The name of the volume.
Azure File Share Name
string
The name of the Azure File share to be mounted as a volume.
Storage Account Name
string
The name of the storage account that contains the Azure File share.

Optional Parameters

id
string
The resource id.
name
string
The resource name.
type
string
The resource type.
provisioningState
string
The provisioning state of the container group. This only appears in the response.
Command Segment
string
The command to execute. Split by space and one segment per line.
Protocol
string
The protocol associated with the port.
restartCount
integer
The number of times that the container instance has been restarted.
state
string
The state of the container instance.
startTime
date-time
The date-time when the container instance state started.
exitCode
integer
The container instance exit codes correspond to those from the `docker run` command.
finishTime
date-time
The date-time when the container instance state finished.
detailStatus
string
The human-readable status of the container instance state.
state
string
The state of the container instance.
startTime
date-time
The date-time when the container instance state started.
exitCode
integer
The container instance exit codes correspond to those from the `docker run` command.
finishTime
date-time
The date-time when the container instance state finished.
detailStatus
string
The human-readable status of the container instance state.
count
integer
The count of the event.
firstTimestamp
date-time
The date-time of the earliest logged event.
lastTimestamp
date-time
The date-time of the latest logged event.
name
string
The event name.
message
string
The event message.
type
string
The event type.
Memory Limit
double
The memory limit in GB of this container.
CPU Limit
double
The CPU limit of this container.
Readonly
boolean
The flag indicating whether the volume mount is read-only.
Password
string
The password for the private registry.
Restart Policy
string
Restart policy for all containers within the container group.
Protocol
string
The protocol associated with the port.
ip
string
The IP exposed to the public internet.
ReadOnly
boolean
The flag indicating whether the Azure File shared mounted as a volume is read-only.
Storage Account Key
string
The storage account access key used to access the Azure File share.
count
integer
The count of the event.
firstTimestamp
date-time
The date-time of the earliest logged event.
lastTimestamp
date-time
The date-time of the latest logged event.
name
string
The event name.
message
string
The event message.
type
string
The event type.
state
string
The state of the container group. Only valid in response.

Returns

Body
ContainerGroup

A container group.

Delete 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.

Required Parameters

Subscription Id
string
Microsoft Azure subscription.
Resource Group
string
The name of the resource group.
Container Group Name
string
The name of the container group.

Returns

Body
ContainerGroup

A container group.

Get a list of container groups in 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.

Required Parameters

Subscription Id
string
Microsoft Azure subscription.
Resource Group
string
The name of the resource group.

Returns

Body
ContainerGroupListResult

The container group list response that contains the container group properties.

Get a list of container groups in 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.

Required Parameters

Subscription Id
string
Microsoft Azure subscription.

Returns

Body
ContainerGroupListResult

The container group list response that contains the container group properties.

Get logs of a container

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

Required Parameters

Subscription Id
string
Microsoft Azure subscription.
Resource Group
string
The name of the resource group.
Container Group Name
string
The name of the container group.
Container Name
string
The name of the container instance.

Optional Parameters

Tail Lines
integer
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.

Returns

Body
Logs

The logs.

Get properties of a 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.

Required Parameters

Subscription Id
string
Microsoft Azure subscription.
Resource Group
string
The name of the resource group.
Container Group Name
string
The name of the container group.

Returns

Body
ContainerGroup

A container group.

Definitions

Container

A container instance.

Container Name
string
The name of the container.
properties
ContainerProperties
The container properties.

ContainerProperties

The container properties.

Command
array of string
The commands to execute within the container. E.g. [ "echo", "hello aci" ]
Container Image
string
The name of the image used to create the container. E.g. nginx:latest
Environment Variables
array of EnvironmentVariable
The environment variables to set in the container instance.
Ports
array of ContainerPort
The exposed ports on the container instance.
Volume Mounts
array of VolumeMount
The volume mounts available to the container instance.
currentState
ContainerState
The container instance state.
events
array of Event
The events of the container instance.
previousState
ContainerState
The container instance state.
resources
ResourceRequirements
The resource requirements.
restartCount
integer
The number of times that the container instance has been restarted.

ContainerState

The container instance state.

detailStatus
string
The human-readable status of the container instance state.
exitCode
integer
The container instance exit codes correspond to those from the `docker run` command.
finishTime
date-time
The date-time when the container instance state finished.
startTime
date-time
The date-time when the container instance state started.
state
string
The state of the container instance.

Event

A container group or container instance event.

count
integer
The count of the event.
firstTimestamp
date-time
The date-time of the earliest logged event.
lastTimestamp
date-time
The date-time of the latest logged event.
message
string
The event message.
name
string
The event name.
type
string
The event type.

ResourceRequirements

The resource requirements.

limits
ResourceLimits
The resource limits.
requests
ResourceRequests
The resource requests.

ResourceRequests

The resource requests.

CPU Request
number
The CPU request of this container. E.g. 2.0
Memory Request
number
The memory request in GB of this container. E.g. 3.5

ResourceLimits

The resource limits.

CPU Limit
double
The CPU limit of this container.
Memory Limit
double
The memory limit in GB of this container.

AzureFileVolume

The properties of the Azure File volume. Azure File shares are mounted as volumes.

Azure File Share Name
string
The name of the Azure File share to be mounted as a volume.
ReadOnly
boolean
The flag indicating whether the Azure File shared mounted as a volume is read-only.
Storage Account Key
string
The storage account access key used to access the Azure File share.
Storage Account Name
string
The name of the storage account that contains the Azure File share.

Volume

The properties of the volume.

Name
string
The name of the volume.
azureFile
AzureFileVolume
The properties of the Azure File volume. Azure File shares are mounted as volumes.

VolumeMount

The properties of the volume mount.

Path
string
The path within the container where the volume should be mounted. Must not contain colon (:).
Readonly
boolean
The flag indicating whether the volume mount is read-only.
Volume Name
string
The name of the volume.

ContainerGroup

A container group.

Location
string
The location to deploy container group.
OS Type
string
The operating system type required by the container.
Restart Policy
string
Restart policy for all containers within the container group.
Tags
object
The resource tags.
containers
array of Container
The containers within the container group.
events
array of Event
The events of this container group.
id
string
The resource id.
imageRegistryCredentials
array of ImageRegistryCredential
The image registry credentials by which the container group is created from.
ipAddress
IpAddress
IP address for the container group.
name
string
The resource name.
provisioningState
string
The provisioning state of the container group. This only appears in the response.
state
string
The state of the container group. Only valid in response.
type
string
The resource type.
volumes
array of Volume
The list of volumes that can be mounted by containers in this container group.

ImageRegistryCredential

Image registry credential.

Password
string
The password for the private registry.
Server
string
The Docker image registry server without a protocol such as "myacr.azurecr.io".
User Name
string
The username for the private registry.

IpAddress

IP address for the container group.

IP Address Type
string
Specifies if the IP is exposed to the public internet.
Ports
array of Port
The list of ports exposed on the container group.
ip
string
The IP exposed to the public internet.

Port

The port exposed on the container group.

Port
integer
The port number.
Protocol
string
The protocol associated with the port.

ContainerPort

The port exposed on the container instance.

Port
integer
The port number exposed within the container group.
Protocol
string
The protocol associated with the port.

EnvironmentVariable

The environment variable to set within the container instance.

Environment Variable Name
string
The name of the environment variable.
Environment Variable Value
string
The value of the environment variable.

ContainerGroupListResult

The container group list response that contains the container group properties.

nextLink
string
The URI to fetch the next page of container groups.
value
array of ContainerGroup
The list of container groups.

Logs

The logs.

content
string
The content of the log.