cg_profile
Creates, updates, deletes, gets or lists a cg_profile resource.
Overview
| Name | cg_profile |
| Type | Resource |
| Id | azure.container_instance.cg_profile |
Fields
The following fields are returned by SELECT queries:
- get_by_revision_number
- get
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
confidentialComputeProperties | object | The properties for confidential container group. |
containers | array | The containers within the container group. Required. |
diagnostics | object | The diagnostic information for a container group. |
encryptionProperties | object | The encryption properties for a container group. |
extensions | array | extensions used by virtual kubelet. |
imageRegistryCredentials | array | The image registry credentials by which the container group is created from. |
initContainers | array | The init containers for a container group. |
ipAddress | object | The IP address type of the container group. |
location | string | The geo-location where the resource lives. |
osType | string | The operating system type required by the containers in the container group. Required. Known values are: "Windows" and "Linux". (Windows, Linux) |
priority | string | The priority of the container group. Known values are: "Regular" and "Spot". (Regular, Spot) |
registeredRevisions | array | Registered revisions are calculated at request time based off the records in the table logs. |
restartPolicy | string | Restart 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) |
revision | integer | Container group profile current revision number. |
securityContext | object | The container security properties. |
shutdownGracePeriod | string (date-time) | Shutdown grace period for containers in a container group. |
sku | string | The SKU for a container group. Known values are: "NotSpecified", "Standard", "Dedicated", and "Confidential". (NotSpecified, Standard, Dedicated, Confidential) |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
tags | object | Resource tags. |
timeToLive | string (date-time) | Post completion time to live for containers of a CG. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
useKrypton | boolean | Gets or sets Krypton use property. |
volumes | array | The list of volumes that can be mounted by containers in this container group. |
zones | array | The availability zones. |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
confidentialComputeProperties | object | The properties for confidential container group. |
containers | array | The containers within the container group. Required. |
diagnostics | object | The diagnostic information for a container group. |
encryptionProperties | object | The encryption properties for a container group. |
extensions | array | extensions used by virtual kubelet. |
imageRegistryCredentials | array | The image registry credentials by which the container group is created from. |
initContainers | array | The init containers for a container group. |
ipAddress | object | The IP address type of the container group. |
location | string | The geo-location where the resource lives. |
osType | string | The operating system type required by the containers in the container group. Required. Known values are: "Windows" and "Linux". (Windows, Linux) |
priority | string | The priority of the container group. Known values are: "Regular" and "Spot". (Regular, Spot) |
registeredRevisions | array | Registered revisions are calculated at request time based off the records in the table logs. |
restartPolicy | string | Restart 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) |
revision | integer | Container group profile current revision number. |
securityContext | object | The container security properties. |
shutdownGracePeriod | string (date-time) | Shutdown grace period for containers in a container group. |
sku | string | The SKU for a container group. Known values are: "NotSpecified", "Standard", "Dedicated", and "Confidential". (NotSpecified, Standard, Dedicated, Confidential) |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
tags | object | Resource tags. |
timeToLive | string (date-time) | Post completion time to live for containers of a CG. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
useKrypton | boolean | Gets or sets Krypton use property. |
volumes | array | The list of volumes that can be mounted by containers in this container group. |
zones | array | The availability zones. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_by_revision_number | select | resource_group_name, container_group_profile_name, revision_number, subscription_id | 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. | |
get | select | resource_group_name, container_group_profile_name, subscription_id | Display information about a specified ContainerGroupProfile. Get the properties of the specified container group profile. | |
create_or_update | insert | resource_group_name, container_group_profile_name, subscription_id | Create or Update a ContainerGroupProfile. Create a CGProfile if it doesn't exist or update an existing CGProfile. | |
update | update | resource_group_name, container_group_profile_name, subscription_id | Container group profile PATCH REST API. Update a specified container group profile. | |
create_or_update | replace | resource_group_name, container_group_profile_name, subscription_id | Create or Update a ContainerGroupProfile. Create a CGProfile if it doesn't exist or update an existing CGProfile. | |
delete | delete | resource_group_name, container_group_profile_name, subscription_id | Container group profile DELETE REST API. Deletes a container group profile. | |
list_all_revisions | exec | resource_group_name, container_group_profile_name, subscription_id | 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. |
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 |
|---|---|---|
container_group_profile_name | string | ContainerGroupProfile name. Required. |
resource_group_name | string | The name of the resource group. The name is case insensitive. Required. |
revision_number | string | The revision number of the container group profile. Required. |
subscription_id | string |
SELECT examples
- get_by_revision_number
- get
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
;
Display information about a specified ContainerGroupProfile. Get the properties of the specified container group profile.
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 subscription_id = '{{ subscription_id }}' -- required
;
INSERT examples
- create_or_update
- Manifest
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
;
# Description fields are for documentation purposes
- name: cg_profile
props:
- name: resource_group_name
value: "{{ resource_group_name }}"
description: Required parameter for the cg_profile resource.
- name: container_group_profile_name
value: "{{ container_group_profile_name }}"
description: Required parameter for the cg_profile resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the cg_profile resource.
- name: properties
description: |
The container group profile properties.
value:
sku: "{{ sku }}"
encryptionProperties:
vaultBaseUrl: "{{ vaultBaseUrl }}"
keyName: "{{ keyName }}"
keyVersion: "{{ keyVersion }}"
identity: "{{ identity }}"
containers:
- name: "{{ name }}"
properties:
image: "{{ image }}"
command:
- "{{ command }}"
ports:
- protocol: "{{ protocol }}"
port: {{ port }}
environmentVariables:
- name: "{{ name }}"
value: "{{ value }}"
secureValue: "{{ secureValue }}"
secureValueReference: "{{ secureValueReference }}"
instanceView:
restartCount: {{ restartCount }}
currentState:
state: "{{ state }}"
startTime: "{{ startTime }}"
exitCode: {{ exitCode }}
finishTime: "{{ finishTime }}"
detailStatus: "{{ detailStatus }}"
previousState:
state: "{{ state }}"
startTime: "{{ startTime }}"
exitCode: {{ exitCode }}
finishTime: "{{ finishTime }}"
detailStatus: "{{ detailStatus }}"
events:
- count: {{ count }}
firstTimestamp: "{{ firstTimestamp }}"
lastTimestamp: "{{ lastTimestamp }}"
name: "{{ name }}"
message: "{{ message }}"
type: "{{ type }}"
resources:
requests:
memoryInGB: {{ memoryInGB }}
cpu: {{ cpu }}
gpu: "{{ gpu }}"
limits:
memoryInGB: {{ memoryInGB }}
cpu: {{ cpu }}
gpu: "{{ gpu }}"
volumeMounts:
- name: "{{ name }}"
mountPath: "{{ mountPath }}"
readOnly: {{ readOnly }}
livenessProbe:
exec:
command: "{{ command }}"
httpGet:
path: "{{ path }}"
port: {{ port }}
scheme: "{{ scheme }}"
httpHeaders: "{{ httpHeaders }}"
initialDelaySeconds: {{ initialDelaySeconds }}
periodSeconds: {{ periodSeconds }}
failureThreshold: {{ failureThreshold }}
successThreshold: {{ successThreshold }}
timeoutSeconds: {{ timeoutSeconds }}
readinessProbe:
exec:
command: "{{ command }}"
httpGet:
path: "{{ path }}"
port: {{ port }}
scheme: "{{ scheme }}"
httpHeaders: "{{ httpHeaders }}"
initialDelaySeconds: {{ initialDelaySeconds }}
periodSeconds: {{ periodSeconds }}
failureThreshold: {{ failureThreshold }}
successThreshold: {{ successThreshold }}
timeoutSeconds: {{ timeoutSeconds }}
securityContext:
privileged: {{ privileged }}
allowPrivilegeEscalation: {{ allowPrivilegeEscalation }}
capabilities:
add: "{{ add }}"
drop: "{{ drop }}"
runAsGroup: {{ runAsGroup }}
runAsUser: {{ runAsUser }}
seccompProfile: "{{ seccompProfile }}"
configMap:
keyValuePairs: "{{ keyValuePairs }}"
initContainers:
- name: "{{ name }}"
properties:
image: "{{ image }}"
command:
- "{{ command }}"
environmentVariables:
- name: "{{ name }}"
value: "{{ value }}"
secureValue: "{{ secureValue }}"
secureValueReference: "{{ secureValueReference }}"
instanceView:
restartCount: {{ restartCount }}
currentState:
state: "{{ state }}"
startTime: "{{ startTime }}"
exitCode: {{ exitCode }}
finishTime: "{{ finishTime }}"
detailStatus: "{{ detailStatus }}"
previousState:
state: "{{ state }}"
startTime: "{{ startTime }}"
exitCode: {{ exitCode }}
finishTime: "{{ finishTime }}"
detailStatus: "{{ detailStatus }}"
events:
- count: {{ count }}
firstTimestamp: "{{ firstTimestamp }}"
lastTimestamp: "{{ lastTimestamp }}"
name: "{{ name }}"
message: "{{ message }}"
type: "{{ type }}"
volumeMounts:
- name: "{{ name }}"
mountPath: "{{ mountPath }}"
readOnly: {{ readOnly }}
securityContext:
privileged: {{ privileged }}
allowPrivilegeEscalation: {{ allowPrivilegeEscalation }}
capabilities:
add: "{{ add }}"
drop: "{{ drop }}"
runAsGroup: {{ runAsGroup }}
runAsUser: {{ runAsUser }}
seccompProfile: "{{ seccompProfile }}"
extensions:
- name: "{{ name }}"
properties:
extensionType: "{{ extensionType }}"
version: "{{ version }}"
settings: "{{ settings }}"
protectedSettings: "{{ protectedSettings }}"
imageRegistryCredentials:
- server: "{{ server }}"
username: "{{ username }}"
password: "{{ password }}"
passwordReference: "{{ passwordReference }}"
identity: "{{ identity }}"
identityUrl: "{{ identityUrl }}"
restartPolicy: "{{ restartPolicy }}"
shutdownGracePeriod: "{{ shutdownGracePeriod }}"
ipAddress:
ports:
- protocol: "{{ protocol }}"
port: {{ port }}
type: "{{ type }}"
ip: "{{ ip }}"
dnsNameLabel: "{{ dnsNameLabel }}"
autoGeneratedDomainNameLabelScope: "{{ autoGeneratedDomainNameLabelScope }}"
fqdn: "{{ fqdn }}"
timeToLive: "{{ timeToLive }}"
osType: "{{ osType }}"
volumes:
- name: "{{ name }}"
azureFile:
shareName: "{{ shareName }}"
readOnly: {{ readOnly }}
storageAccountName: "{{ storageAccountName }}"
storageAccountKey: "{{ storageAccountKey }}"
storageAccountKeyReference: "{{ storageAccountKeyReference }}"
emptyDir: "{{ emptyDir }}"
secret: "{{ secret }}"
secretReference: "{{ secretReference }}"
gitRepo:
directory: "{{ directory }}"
repository: "{{ repository }}"
revision: "{{ revision }}"
diagnostics:
logAnalytics:
workspaceId: "{{ workspaceId }}"
workspaceKey: "{{ workspaceKey }}"
logType: "{{ logType }}"
metadata: "{{ metadata }}"
workspaceResourceId: "{{ workspaceResourceId }}"
priority: "{{ priority }}"
confidentialComputeProperties:
ccePolicy: "{{ ccePolicy }}"
securityContext:
privileged: {{ privileged }}
allowPrivilegeEscalation: {{ allowPrivilegeEscalation }}
capabilities:
add:
- "{{ add }}"
drop:
- "{{ drop }}"
runAsGroup: {{ runAsGroup }}
runAsUser: {{ runAsUser }}
seccompProfile: "{{ seccompProfile }}"
revision: {{ revision }}
registeredRevisions:
- {{ registeredRevisions }}
useKrypton: {{ useKrypton }}
- name: tags
value: "{{ tags }}"
description: |
Resource tags.
- name: location
value: "{{ location }}"
description: |
The geo-location where the resource lives.
- name: zones
value:
- "{{ zones }}"
description: |
The availability zones.
UPDATE examples
- update
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
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
- delete
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
- list_all_revisions
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
;