container_groups
Creates, updates, deletes, gets or lists a container_groups
resource.
Overview
Name | container_groups |
Type | Resource |
Id | azure.container_instances.container_groups |
Fields
The following fields are returned by SELECT
queries:
- get
- list_by_resource_group
- list
Name | Datatype | Description |
---|---|---|
id | string | The resource id. |
name | string | The resource name. |
identity | object | The identity of the container group, if configured. |
location | string | The resource location. |
properties | object | The container group properties |
tags | object | The resource tags. |
type | string | The resource type. |
zones | array | The zones for the container group. |
Name | Datatype | Description |
---|---|---|
id | string | The resource id. |
name | string | The resource name. |
identity | object | The identity of the container group, if configured. |
location | string | The resource location. |
properties | object | The container group properties |
tags | object | The resource tags. |
type | string | The resource type. |
zones | array | The zones for the container group. |
Name | Datatype | Description |
---|---|---|
id | string | The resource id. |
name | string | The resource name. |
identity | object | The identity of the container group, if configured. |
location | string | The resource location. |
properties | object | The container group properties |
tags | object | The resource tags. |
type | string | The resource type. |
zones | array | The zones for the container group. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | subscriptionId , resourceGroupName , containerGroupName | 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. | |
list_by_resource_group | select | subscriptionId , resourceGroupName | 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. | |
list | select | subscriptionId | 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. | |
create_or_update | insert | subscriptionId , resourceGroupName , containerGroupName | Create or update container groups with specified configurations. | |
update | update | subscriptionId , resourceGroupName , containerGroupName | Updates container group tags with specified values. | |
delete | delete | subscriptionId , resourceGroupName , containerGroupName | 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. | |
restart | exec | subscriptionId , resourceGroupName , containerGroupName | Restarts all containers in a container group in place. If container image has updates, new image will be downloaded. | |
stop | exec | subscriptionId , resourceGroupName , containerGroupName | Stops all containers in a container group. Compute resources will be deallocated and billing will stop. | |
start | exec | subscriptionId , resourceGroupName , containerGroupName | Starts all containers in a container group. Compute resources will be allocated and billing will start. |
Parameters
Parameters can be passed in the WHERE
clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
Name | Datatype | Description |
---|---|---|
containerGroupName | string | The name of the container group. |
resourceGroupName | string | The name of the resource group. |
subscriptionId | string | Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. |
SELECT
examples
- get
- list_by_resource_group
- list
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.
SELECT
id,
name,
identity,
location,
properties,
tags,
type,
zones
FROM azure.container_instances.container_groups
WHERE subscriptionId = '{{ subscriptionId }}' -- required
AND resourceGroupName = '{{ resourceGroupName }}' -- required
AND containerGroupName = '{{ containerGroupName }}' -- required
;
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.
SELECT
id,
name,
identity,
location,
properties,
tags,
type,
zones
FROM azure.container_instances.container_groups
WHERE subscriptionId = '{{ subscriptionId }}' -- required
AND resourceGroupName = '{{ resourceGroupName }}' -- required
;
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.
SELECT
id,
name,
identity,
location,
properties,
tags,
type,
zones
FROM azure.container_instances.container_groups
WHERE subscriptionId = '{{ subscriptionId }}' -- required
;
INSERT
examples
- create_or_update
- Manifest
Create or update container groups with specified configurations.
INSERT INTO azure.container_instances.container_groups (
data__location,
data__tags,
data__zones,
data__identity,
data__properties,
subscriptionId,
resourceGroupName,
containerGroupName
)
SELECT
'{{ location }}',
'{{ tags }}',
'{{ zones }}',
'{{ identity }}',
'{{ properties }}',
'{{ subscriptionId }}',
'{{ resourceGroupName }}',
'{{ containerGroupName }}'
RETURNING
id,
name,
identity,
location,
properties,
tags,
type,
zones
;
# Description fields are for documentation purposes
- name: container_groups
props:
- name: subscriptionId
value: string
description: Required parameter for the container_groups resource.
- name: resourceGroupName
value: string
description: Required parameter for the container_groups resource.
- name: containerGroupName
value: string
description: Required parameter for the container_groups resource.
- name: location
value: string
description: |
The resource location.
- name: tags
value: object
description: |
The resource tags.
- name: zones
value: array
description: |
The zones for the container group.
- name: identity
value: object
description: |
The identity of the container group, if configured.
- name: properties
value: object
description: |
The container group properties
UPDATE
examples
- update
Updates container group tags with specified values.
UPDATE azure.container_instances.container_groups
SET
data__location = '{{ location }}',
data__tags = '{{ tags }}',
data__zones = '{{ zones }}'
WHERE
subscriptionId = '{{ subscriptionId }}' --required
AND resourceGroupName = '{{ resourceGroupName }}' --required
AND containerGroupName = '{{ containerGroupName }}' --required
RETURNING
id,
name,
identity,
location,
properties,
tags,
type,
zones;
DELETE
examples
- delete
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.
DELETE FROM azure.container_instances.container_groups
WHERE subscriptionId = '{{ subscriptionId }}' --required
AND resourceGroupName = '{{ resourceGroupName }}' --required
AND containerGroupName = '{{ containerGroupName }}' --required
;
Lifecycle Methods
- restart
- stop
- start
Restarts all containers in a container group in place. If container image has updates, new image will be downloaded.
EXEC azure.container_instances.container_groups.restart
@subscriptionId='{{ subscriptionId }}' --required,
@resourceGroupName='{{ resourceGroupName }}' --required,
@containerGroupName='{{ containerGroupName }}' --required
;
Stops all containers in a container group. Compute resources will be deallocated and billing will stop.
EXEC azure.container_instances.container_groups.stop
@subscriptionId='{{ subscriptionId }}' --required,
@resourceGroupName='{{ resourceGroupName }}' --required,
@containerGroupName='{{ containerGroupName }}' --required
;
Starts all containers in a container group. Compute resources will be allocated and billing will start.
EXEC azure.container_instances.container_groups.start
@subscriptionId='{{ subscriptionId }}' --required,
@resourceGroupName='{{ resourceGroupName }}' --required,
@containerGroupName='{{ containerGroupName }}' --required
;