Azure Container Instances Subscriptions API
The Subscriptions API from Azure Container Instances — 12 operation(s) for subscriptions.
The Subscriptions API from Azure Container Instances — 12 operation(s) for subscriptions.
swagger: '2.0'
info:
title: ContainerInstanceManagementClient Operations Subscriptions API
version: '2018-10-01'
x-apisguru-categories:
- cloud
x-logo:
url: https://api.apis.guru/v2/cache/logo/https_assets.onestore.ms_cdnfiles_onestorerolling-1606-01000_shell_v3_images_logo_microsoft.png
x-origin:
- format: swagger
url: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/containerinstance/resource-manager/Microsoft.ContainerInstance/stable/2018-10-01/containerInstance.json
version: '2.0'
x-preferred: true
x-providerName: azure.com
x-serviceName: containerinstance-containerInstance
x-tags:
- Azure
- Microsoft
host: management.azure.com
schemes:
- https
consumes:
- application/json
produces:
- application/json
security:
- azure_auth:
- user_impersonation
tags:
- name: Subscriptions
paths:
/subscriptions/{subscriptionId}/providers/Microsoft.ContainerInstance/containerGroups:
get:
description: 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.
operationId: ContainerGroups_List
parameters:
- $ref: '#/parameters/SubscriptionIdParameter'
- $ref: '#/parameters/ApiVersionParameter'
responses:
'200':
description: OK
schema:
$ref: '#/definitions/ContainerGroupListResult'
default:
description: Error response describing why the operation failed.
schema:
$ref: '#/definitions/CloudError'
summary: Azure Container Instances Get a List of Container Groups in the Specified Subscription.
x-ms-examples:
ContainerGroupsList:
parameters:
api-version: '2018-10-01'
subscriptionId: subid
responses:
'200':
body:
value:
- id: /subscriptions/subid/resourceGroups/demo/providers/Microsoft.ContainerInstance/containerGroups/demo1
location: WestUs
name: demo1
properties:
containers:
- name: demo1
properties:
command: []
environmentVariables: []
image: nginx
instanceView:
currentState:
detailStatus: ''
startTime: '2017-10-17T17:27:21Z'
state: Running
events: []
restartCount: 0
ports:
- port: 80
resources:
requests:
cpu: 1
memoryInGB: 1.5
volumeMounts:
- mountPath: /mnt/volume1
name: volume1
readOnly: false
imageRegistryCredentials:
- server: azcloudconsoleregistry.azurecr.io
username: azcloudconsoleregistry
ipAddress:
ip: 10.0.0.1
ports:
- port: 80
protocol: TCP
type: Public
osType: Linux
provisioningState: Succeeded
volumes:
- azureFile:
readOnly: false
shareName: share1
storageAccountName: storage1
name: volume1
type: Microsoft.ContainerInstance/containerGroups
x-ms-pageable:
nextLinkName: nextLink
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
tags:
- Subscriptions
/subscriptions/{subscriptionId}/providers/Microsoft.ContainerInstance/locations/{location}/cachedImages:
get:
description: Get the list of cached images on specific OS type for a subscription in a region.
operationId: ListCachedImages
parameters:
- $ref: '#/parameters/SubscriptionIdParameter'
- $ref: '#/parameters/LocationParameter'
- $ref: '#/parameters/ApiVersionParameter'
responses:
'200':
description: OK
schema:
$ref: '#/definitions/CachedImagesListResult'
default:
description: Error response describing why the operation failed.
schema:
$ref: '#/definitions/CloudError'
summary: Azure Container Instances Get the List of Cached Images.
x-ms-examples:
CachedImages:
parameters:
api-version: '2018-10-01'
location: westcentralus
subscriptionId: subid
responses:
'200':
body:
value:
- image: ubuntu:16.04
osType: Linux
- image: alpine:3.6
osType: Linux
- image: microsoft/nanoserver:10.0.14393.2485
osType: Windows
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
tags:
- Subscriptions
/subscriptions/{subscriptionId}/providers/Microsoft.ContainerInstance/locations/{location}/capabilities:
get:
description: Get the list of CPU/memory/GPU capabilities of a region.
operationId: ListCapabilities
parameters:
- $ref: '#/parameters/SubscriptionIdParameter'
- $ref: '#/parameters/LocationParameter'
- $ref: '#/parameters/ApiVersionParameter'
responses:
'200':
description: OK
schema:
$ref: '#/definitions/CapabilitiesListResult'
default:
description: Error response describing why the operation failed.
schema:
$ref: '#/definitions/CloudError'
summary: Azure Container Instances Get the List of Capabilities of the Location.
x-ms-examples:
GetCapabilities:
parameters:
api-version: '2018-10-01'
location: westus
subscriptionId: subid
responses:
'200':
body:
value:
- capabilities:
maxCpu: 4
maxGpuCount: 4
maxMemoryInGB: 14
gpu: K80
ipAddressType: Public
location: West US
osType: Linux
resourceType: containerGroups
- capabilities:
maxCpu: 4
maxGpuCount: 0
maxMemoryInGB: 14
gpu: None
ipAddressType: Public
location: West US
osType: Windows
resourceType: containerGroups
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
tags:
- Subscriptions
/subscriptions/{subscriptionId}/providers/Microsoft.ContainerInstance/locations/{location}/usages:
get:
description: Get the usage for a subscription
operationId: ContainerGroupUsage_List
parameters:
- $ref: '#/parameters/SubscriptionIdParameter'
- $ref: '#/parameters/LocationParameter'
- $ref: '#/parameters/ApiVersionParameter'
responses:
'200':
description: OK
schema:
$ref: '#/definitions/UsageListResult'
default:
description: Error response describing why the operation failed.
schema:
$ref: '#/definitions/CloudError'
x-ms-examples:
ContainerUsage:
parameters:
api-version: '2018-10-01'
location: westcentralus
subscriptionId: subid
responses:
'200':
body:
value:
- currentValue: 1
limit: 2000
name:
localizedValue: Container Groups
value: ContainerGroups
unit: Count
summary: Azure Container Instances Container Group Usage_ List
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
tags:
- Subscriptions
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups:
get:
description: 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.
operationId: ContainerGroups_ListByResourceGroup
parameters:
- $ref: '#/parameters/SubscriptionIdParameter'
- $ref: '#/parameters/ApiVersionParameter'
- $ref: '#/parameters/ResourceGroupNameParameter'
responses:
'200':
description: OK
schema:
$ref: '#/definitions/ContainerGroupListResult'
default:
description: Error response describing why the operation failed.
schema:
$ref: '#/definitions/CloudError'
summary: Azure Container Instances Get a List of Container Groups in the Specified Subscription and Resource Group.
x-ms-examples:
ContainerGroupsListByResourceGroup:
parameters:
api-version: '2018-10-01'
resourceGroupName: demo
subscriptionId: subid
responses:
'200':
body:
value:
- id: /subscriptions/subid/resourceGroups/demo/providers/Microsoft.ContainerInstance/containerGroups/demo1
location: WestUs
name: demo1
properties:
containers:
- name: demo1
properties:
command: []
environmentVariables: []
image: nginx
ports:
- port: 80
resources:
requests:
cpu: 1
memoryInGB: 1.5
volumeMounts:
- mountPath: /mnt/volume1
name: volume1
readOnly: false
imageRegistryCredentials:
- server: azcloudconsoleregistry.azurecr.io
username: azcloudconsoleregistry
ipAddress:
ip: 10.0.0.1
ports:
- port: 80
protocol: TCP
type: Public
osType: Linux
provisioningState: Succeeded
volumes:
- azureFile:
readOnly: false
shareName: share1
storageAccountName: storage1
name: volume1
type: Microsoft.ContainerInstance/containerGroups
x-ms-pageable:
nextLinkName: nextLink
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
tags:
- Subscriptions
? /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}
: delete:
description: 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.
operationId: ContainerGroups_Delete
parameters:
- $ref: '#/parameters/SubscriptionIdParameter'
- $ref: '#/parameters/ApiVersionParameter'
- $ref: '#/parameters/ResourceGroupNameParameter'
- $ref: '#/parameters/ContainerGroupNameParameter'
responses:
'200':
description: OK
schema:
$ref: '#/definitions/ContainerGroup'
'204':
description: No Content - the specified container group was not found.
default:
description: Error response describing why the operation failed.
schema:
$ref: '#/definitions/CloudError'
summary: Azure Container Instances Delete the Specified Container Group.
x-ms-examples:
ContainerGroupsDelete:
parameters:
api-version: '2018-10-01'
containerGroupName: demo1
resourceGroupName: demo
subscriptionId: subid
responses:
'200': {}
'204': {}
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
tags:
- Subscriptions
get:
description: 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.
operationId: ContainerGroups_Get
parameters:
- $ref: '#/parameters/SubscriptionIdParameter'
- $ref: '#/parameters/ApiVersionParameter'
- $ref: '#/parameters/ResourceGroupNameParameter'
- $ref: '#/parameters/ContainerGroupNameParameter'
responses:
'200':
description: OK
schema:
$ref: '#/definitions/ContainerGroup'
default:
description: Error response describing why the operation failed.
schema:
$ref: '#/definitions/CloudError'
summary: Azure Container Instances Get the Properties of the Specified Container Group.
x-ms-examples:
ContainerGroupsGet_Failed:
parameters:
api-version: '2018-10-01'
containerGroupName: demo1
resourceGroupName: demo
subscriptionId: subid
responses:
'200':
body:
id: /subscriptions/subid/resourceGroups/demo/providers/Microsoft.ContainerInstance/containerGroups/demo1
location: WestUs
name: demo1
properties:
containers:
- name: demo1
properties:
command: []
environmentVariables: []
image: nginx
instanceView:
currentState:
detailStatus: ''
startTime: '2017-08-08T00:09:10Z'
state: Waiting
events:
- count: 1
firstTimestamp: '2017-08-08T00:09:01Z'
lastTimestamp: '2017-08-08T00:09:01Z'
message: pulling image "nginx"
name: Pulling
type: Normal
- count: 1
firstTimestamp: '2017-08-08T00:09:10Z'
lastTimestamp: '2017-08-08T00:09:10Z'
message: Successfully pulled image "nginx"
name: Pulled
type: Normal
restartCount: 0
ports:
- port: 80
resources:
requests:
cpu: 1
memoryInGB: 1.5
volumeMounts:
- mountPath: /mnt/volume1
name: volume1
readOnly: false
imageRegistryCredentials:
- server: azcloudconsoleregistry.azurecr.io
username: azcloudconsoleregistry
instanceView:
events:
- count: 1
firstTimestamp: '2017-10-08T00:19:10Z'
lastTimestamp: '2017-10-08T00:19:10Z'
message: 'Output: mount error(2): Permission denied'
name: FailedMount
type: Normal
state: Pending
ipAddress:
ip: 10.0.0.1
ports:
- port: 80
protocol: TCP
type: Public
osType: Linux
provisioningState: Failed
volumes:
- azureFile:
readOnly: false
shareName: share1
storageAccountName: storage1
name: volume1
type: Microsoft.ContainerInstance/containerGroups
ContainerGroupsGet_Succeeded:
parameters:
api-version: '2018-10-01'
containerGroupName: demo1
resourceGroupName: demo
subscriptionId: subid
responses:
'200':
body:
id: /subscriptions/subid/resourceGroups/demo/providers/Microsoft.ContainerInstance/containerGroups/demo1
location: WestUs
name: demo1
properties:
containers:
- name: demo1
properties:
command: []
environmentVariables: []
image: nginx
ports:
- port: 80
resources:
requests:
cpu: 1
memoryInGB: 1.5
volumeMounts:
- mountPath: /mnt/volume1
name: volume1
readOnly: false
imageRegistryCredentials:
- server: azcloudconsoleregistry.azurecr.io
username: azcloudconsoleregistry
ipAddress:
ip: 10.0.0.1
ports:
- port: 80
protocol: TCP
type: Public
osType: Linux
provisioningState: Succeeded
volumes:
- azureFile:
readOnly: false
shareName: share1
storageAccountName: storage1
name: volume1
type: Microsoft.ContainerInstance/containerGroups
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
tags:
- Subscriptions
patch:
description: Updates container group tags with specified values.
operationId: ContainerGroups_Update
parameters:
- $ref: '#/parameters/SubscriptionIdParameter'
- $ref: '#/parameters/ApiVersionParameter'
- $ref: '#/parameters/ResourceGroupNameParameter'
- $ref: '#/parameters/ContainerGroupNameParameter'
- description: The container group resource with just the tags to be updated.
in: body
name: Resource
required: true
schema:
$ref: '#/definitions/Resource'
example: example-value
responses:
'200':
description: OK
schema:
$ref: '#/definitions/ContainerGroup'
default:
description: Error response describing why the operation failed.
schema:
$ref: '#/definitions/CloudError'
summary: Azure Container Instances Update Container Groups.
x-ms-examples:
ContainerGroupsUpdate:
parameters:
Resource:
tags:
tag1key: tag1Value
tag2key: tag2Value
api-version: '2018-10-01'
containerGroupName: demo1
resourceGroupName: demoResource
subscriptionId: subid
responses:
'200':
body:
id: /subscriptions/subid/resourceGroups/demoResource/providers/Microsoft.ContainerInstance/containerGroups/demo1
location: WestUs
name: demo1
properties:
containers:
- name: demo1
properties:
command: []
environmentVariables: []
image: nginx
ports:
- port: 80
resources:
requests:
cpu: 1
memoryInGB: 1.5
volumeMounts:
- mountPath: /mnt/volume1
name: volume1
readOnly: false
- mountPath: /mnt/volume2
name: volume2
readOnly: false
- mountPath: /mnt/volume3
name: volume3
readOnly: true
imageRegistryCredentials: []
ipAddress:
dnsNameLabel: dnsnamelabel1
fqdn: dnsnamelabel1.azure-container.io
ip: 10.0.0.1
ports:
- port: 80
protocol: TCP
type: Public
osType: Linux
provisioningState: Succeeded
volumes:
- azureFile:
shareName: shareName
storageAccountName: accountName
name: volume1
- emptyDir: {}
name: volume2
- name: volume3
secret: {}
tags:
tag1key: tag1Value
tag2key: tag2Value
type: Microsoft.ContainerInstance/containerGroups
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
tags:
- Subscriptions
put:
description: Create or update container groups with specified configurations.
operationId: ContainerGroups_CreateOrUpdate
parameters:
- $ref: '#/parameters/SubscriptionIdParameter'
- $ref: '#/parameters/ApiVersionParameter'
- $ref: '#/parameters/ResourceGroupNameParameter'
- $ref: '#/parameters/ContainerGroupNameParameter'
- description: The properties of the container group to be created or updated.
in: body
name: containerGroup
required: true
schema:
$ref: '#/definitions/ContainerGroup'
example: my-resource-group
responses:
'200':
description: OK
schema:
$ref: '#/definitions/ContainerGroup'
'201':
description: Created - the container group is created.
schema:
$ref: '#/definitions/ContainerGroup'
default:
description: Error response describing why the operation failed.
schema:
$ref: '#/definitions/CloudError'
summary: Azure Container Instances Create or Update Container Groups.
x-ms-examples:
ContainerGroupsCreateOrUpdate:
parameters:
api-version: '2018-10-01'
containerGroup:
id: /subscriptions/subid/resourceGroups/demo/providers/Microsoft.ContainerInstance/containerGroups/demo1
identity:
type: SystemAssigned, UserAssigned
userAssignedIdentities:
? /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity-name
: {}
location: west us
name: demo1
properties:
containers:
- name: demo1
properties:
command: []
environmentVariables: []
image: nginx
ports:
- port: 80
resources:
requests:
cpu: 1
gpu:
count: 1
sku: K80
memoryInGB: 1.5
volumeMounts:
- mountPath: /mnt/volume1
name: volume1
readOnly: false
- mountPath: /mnt/volume2
name: volume2
readOnly: false
- mountPath: /mnt/volume3
name: volume3
readOnly: true
diagnostics:
logAnalytics:
logType: ContainerInsights
metadata:
test-key: test-metadata-value
workspaceId: workspaceid
workspaceKey: workspaceKey
dnsConfig:
nameServers:
- 1.1.1.1
options: ndots:2
searchDomains: cluster.local svc.cluster.local
imageRegistryCredentials: []
ipAddress:
dnsNameLabel: dnsnamelabel1
ports:
- port: 80
protocol: TCP
type: Public
networkProfile:
id: test-network-profile-id
osType: Linux
volumes:
- azureFile:
shareName: shareName
storageAccountKey: accountKey
storageAccountName: accountName
name: volume1
- emptyDir: {}
name: volume2
- name: volume3
secret:
secretKey1: SecretValue1InBase64
secretKey2: SecretValue2InBase64
type: Microsoft.ContainerInstance/containerGroups
containerGroupName: demo1
resourceGroupName: demo
subscriptionId: subid
responses:
'200':
body:
id: /subscriptions/subid/resourceGroups/demo/providers/Microsoft.ContainerInstance/containerGroups/demo1
location: WestUs
name: demo1
properties:
containers:
- name: demo1
properties:
command: []
environmentVariables: []
image: nginx
ports:
- port: 80
resources:
requests:
cpu: 1
gpu:
count: 1
sku: K80
memoryInGB: 1.5
volumeMounts:
- mountPath: /mnt/volume1
name: volume1
readOnly: false
- mountPath: /mnt/volume2
name: volume2
readOnly: false
- mountPath: /mnt/volume3
name: volume3
readOnly: true
diagnostics:
logAnalytics:
workspaceId: workspaceid
workspaceKey: ''
dnsConfig:
nameServers:
- 1.1.1.1
options: ndots:2
searchDomains: cluster.local svc.cluster.local
imageRegistryCredentials: []
ipAddress:
dnsNameLabel: dnsnamelabel1
fqdn: dnsnamelabel1.azure-container.io
ip: 10.0.0.1
ports:
- port: 80
protocol: TCP
type: Public
osType: Linux
provisioningState: Succeeded
volumes:
- azureFile:
shareName: shareName
storageAccountName: accountName
name: volume1
- emptyDir: {}
name: volume2
- name: volume3
secret: {}
type: Microsoft.ContainerInstance/containerGroups
'201':
body:
id: /subscriptions/subid/resourceGroups/demo/providers/Microsoft.ContainerInstance/containerGroups/demo1
location: WestUs
name: demo1
properties:
containers:
- name: demo1
properties:
command: []
environmentVariables: []
image: nginx
ports:
- port: 80
resources:
requests:
cpu: 1
gpu:
count: 1
sku: K80
memoryInGB: 1.5
volumeMounts:
- mountPath: /mnt/volume1
name: volume1
readOnly: false
- mountPath: /mnt/volume2
name: volume2
readOnly: false
- mountPath: /mnt/volume3
name: volume3
readOnly: true
dnsConfig:
nameServers:
- 1.1.1.1
imageRegistryCredentials: []
ipAddress:
dnsNameLabel: dnsnamelabel1
fqdn: dnsnamelabel1.azure-container.io
ip: 10.0.0.1
ports:
- port: 80
protocol: TCP
type: Public
osType: Linux
provisioningState: Succeeded
volumes:
- azureFile:
shareName: shareName
storageAccountName: accountName
name: volume1
- emptyDir: {}
name: volume2
- name: volume3
secret: {}
type: Microsoft.ContainerInstance/containerGroups
x-ms-long-running-operation: true
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
tags:
- Subscriptions
? /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}/containers/{containerName}/exec
: post:
description: Executes a command for a specific container instance in a specified resource group and container group.
operationId: Container_ExecuteCommand
parameters:
- $ref: '#/parameters/SubscriptionIdParameter'
- $ref: '#/parameters/ApiVersionParameter'
- $ref: '#/parameters/ResourceGroupNameParameter'
- $ref: '#/parameters/ContainerGroupNameParameter'
- description: The name of the container instance.
in: path
name: containerName
required: true
type: string
example: example-value
- description: The request for the exec command.
in: body
name: containerExecRequest
required: true
schema:
$ref: '#/definitions/ContainerExecRequest'
example: example-value
responses:
'200':
description: OK
schema:
$ref: '#/definitions/ContainerExecResponse'
default:
description: Error response describing why the operation failed.
schema:
$ref: '#/definitions/CloudError'
summary: Azure Container Instances Executes a Command in a Specific Container Instance.
x-ms-examples:
ContainerExec:
parameters:
api-version: '2018-10-01'
containerExecRequest:
command: /bin/bash
terminalSize:
column: 12
row: 12
containerGroupName: demo1
containerName: container1
resourceGroupName: demo
# --- truncated at 32 KB (66 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/azure-container-instances/refs/heads/main/openapi/azure-container-instances-subscriptions-api-openapi.yml