Skip to main content

container_groups

Creates, updates, deletes, gets or lists a container_groups resource.

Overview

Namecontainer_groups
TypeResource
Idazure.container_instances.container_groups

Fields

NameDatatypeDescription
idstringThe resource id.
namestringThe resource name.
identityobjectIdentity for the container group.
locationstringThe resource location.
propertiesobjectThe container group properties
tagsobjectThe resource tags.
typestringThe resource type.
zonesarrayThe zones for the container group.

Methods

NameAccessible byRequired ParamsDescription
getSELECTcontainerGroupName, resourceGroupName, subscriptionIdGets 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.
listSELECTsubscriptionIdGet 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.
list_by_resource_groupSELECTresourceGroupName, subscriptionIdGet 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.
create_or_updateINSERTcontainerGroupName, resourceGroupName, subscriptionIdCreate or update container groups with specified configurations.
deleteDELETEcontainerGroupName, resourceGroupName, subscriptionIdDelete 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.
updateUPDATEcontainerGroupName, resourceGroupName, subscriptionIdUpdates container group tags with specified values.
restartEXECcontainerGroupName, resourceGroupName, subscriptionIdRestarts all containers in a container group in place. If container image has updates, new image will be downloaded.
startEXECcontainerGroupName, resourceGroupName, subscriptionIdStarts all containers in a container group. Compute resources will be allocated and billing will start.
stopEXECcontainerGroupName, resourceGroupName, subscriptionIdStops all containers in a container group. Compute resources will be deallocated and billing will stop.

SELECT examples

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 }}';

INSERT example

Use the following StackQL query and manifest file to create a new container_groups resource.

/*+ create */
INSERT INTO azure.container_instances.container_groups (
containerGroupName,
resourceGroupName,
subscriptionId,
location,
tags,
zones,
identity,
properties
)
SELECT
'{{ containerGroupName }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ location }}',
'{{ tags }}',
'{{ zones }}',
'{{ identity }}',
'{{ properties }}'
;

UPDATE example

Updates a container_groups resource.

/*+ update */
UPDATE azure.container_instances.container_groups
SET
location = '{{ location }}',
tags = '{{ tags }}',
zones = '{{ zones }}'
WHERE
containerGroupName = '{{ containerGroupName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';

DELETE example

Deletes the specified container_groups resource.

/*+ delete */
DELETE FROM azure.container_instances.container_groups
WHERE containerGroupName = '{{ containerGroupName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';