Skip to main content

cg_profile

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

Overview

Namecg_profile
TypeResource
Idazure.container_instance.cg_profile

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
namestringThe name of the resource.
confidentialComputePropertiesobjectThe properties for confidential container group.
containersarrayThe containers within the container group. Required.
diagnosticsobjectThe diagnostic information for a container group.
encryptionPropertiesobjectThe encryption properties for a container group.
extensionsarrayextensions used by virtual kubelet.
imageRegistryCredentialsarrayThe image registry credentials by which the container group is created from.
initContainersarrayThe init containers for a container group.
ipAddressobjectThe IP address type of the container group.
locationstringThe geo-location where the resource lives.
osTypestringThe operating system type required by the containers in the container group. Required. Known values are: "Windows" and "Linux". (Windows, Linux)
prioritystringThe priority of the container group. Known values are: "Regular" and "Spot". (Regular, Spot)
registeredRevisionsarrayRegistered revisions are calculated at request time based off the records in the table logs.
restartPolicystringRestart policy for all containers within the container group. * Always Always restart * OnFailure Restart on failure * Never Never restart. Known values are: "Always", "OnFailure", and "Never". (Always, OnFailure, Never)
revisionintegerContainer group profile current revision number.
securityContextobjectThe container security properties.
shutdownGracePeriodstring (date-time)Shutdown grace period for containers in a container group.
skustringThe SKU for a container group. Known values are: "NotSpecified", "Standard", "Dedicated", and "Confidential". (NotSpecified, Standard, Dedicated, Confidential)
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
tagsobjectResource tags.
timeToLivestring (date-time)Post completion time to live for containers of a CG.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".
useKryptonbooleanGets or sets Krypton use property.
volumesarrayThe list of volumes that can be mounted by containers in this container group.
zonesarrayThe availability zones.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_by_revision_numberselectresource_group_name, container_group_profile_name, revision_number, subscription_idGet the properties of the specified revision of the container group profile. Gets the properties of the specified revision of the container group profile in the given subscription and resource group. The operation returns the properties of container group profile including containers, image registry credentials, restart policy, IP address type, OS type, volumes, current revision number, etc.
getselectresource_group_name, container_group_profile_name, subscription_idDisplay information about a specified ContainerGroupProfile. Get the properties of the specified container group profile.
create_or_updateinsertresource_group_name, container_group_profile_name, subscription_idCreate or Update a ContainerGroupProfile. Create a CGProfile if it doesn't exist or update an existing CGProfile.
updateupdateresource_group_name, container_group_profile_name, subscription_idContainer group profile PATCH REST API. Update a specified container group profile.
create_or_updatereplaceresource_group_name, container_group_profile_name, subscription_idCreate or Update a ContainerGroupProfile. Create a CGProfile if it doesn't exist or update an existing CGProfile.
deletedeleteresource_group_name, container_group_profile_name, subscription_idContainer group profile DELETE REST API. Deletes a container group profile.
list_all_revisionsexecresource_group_name, container_group_profile_name, subscription_idGet a list of all the revisions of the specified container group profile in the given subscription and resource group. Get a list of all the revisions of the specified container group profile in the given subscription and resource group. This operation returns properties of each revision of the specified container group profile including containers, image registry credentials, restart policy, IP address type, OS type volumes, revision number, etc.

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.

NameDatatypeDescription
container_group_profile_namestringContainerGroupProfile name. Required.
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
revision_numberstringThe revision number of the container group profile. Required.
subscription_idstring

SELECT examples

Get the properties of the specified revision of the container group profile. Gets the properties of the specified revision of the container group profile in the given subscription and resource group. The operation returns the properties of container group profile including containers, image registry credentials, restart policy, IP address type, OS type, volumes, current revision number, etc.

SELECT
id,
name,
confidentialComputeProperties,
containers,
diagnostics,
encryptionProperties,
extensions,
imageRegistryCredentials,
initContainers,
ipAddress,
location,
osType,
priority,
registeredRevisions,
restartPolicy,
revision,
securityContext,
shutdownGracePeriod,
sku,
systemData,
tags,
timeToLive,
type,
useKrypton,
volumes,
zones
FROM azure.container_instance.cg_profile
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND container_group_profile_name = '{{ container_group_profile_name }}' -- required
AND revision_number = '{{ revision_number }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

INSERT examples

Create or Update a ContainerGroupProfile. Create a CGProfile if it doesn't exist or update an existing CGProfile.

INSERT INTO azure.container_instance.cg_profile (
properties,
tags,
location,
zones,
resource_group_name,
container_group_profile_name,
subscription_id
)
SELECT
'{{ properties }}',
'{{ tags }}',
'{{ location }}',
'{{ zones }}',
'{{ resource_group_name }}',
'{{ container_group_profile_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
location,
properties,
systemData,
tags,
type,
zones
;

UPDATE examples

Container group profile PATCH REST API. Update a specified container group profile.

UPDATE azure.container_instance.cg_profile
SET
tags = '{{ tags }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND container_group_profile_name = '{{ container_group_profile_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
location,
properties,
systemData,
tags,
type,
zones;

REPLACE examples

Create or Update a ContainerGroupProfile. Create a CGProfile if it doesn't exist or update an existing CGProfile.

REPLACE azure.container_instance.cg_profile
SET
properties = '{{ properties }}',
tags = '{{ tags }}',
location = '{{ location }}',
zones = '{{ zones }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND container_group_profile_name = '{{ container_group_profile_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
location,
properties,
systemData,
tags,
type,
zones;

DELETE examples

Container group profile DELETE REST API. Deletes a container group profile.

DELETE FROM azure.container_instance.cg_profile
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND container_group_profile_name = '{{ container_group_profile_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;

Lifecycle Methods

Get a list of all the revisions of the specified container group profile in the given subscription and resource group. Get a list of all the revisions of the specified container group profile in the given subscription and resource group. This operation returns properties of each revision of the specified container group profile including containers, image registry credentials, restart policy, IP address type, OS type volumes, revision number, etc.

EXEC azure.container_instance.cg_profile.list_all_revisions 
@resource_group_name='{{ resource_group_name }}' --required,
@container_group_profile_name='{{ container_group_profile_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;