Skip to main content

agent_pools

Creates, updates, deletes, gets or lists an agent_pools resource.

Overview

Nameagent_pools
TypeResource
Idazure.container_registry_tasks.agent_pools

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.
countintegerThe count of agent machine.
locationstringThe geo-location where the resource lives. Required.
osstringThe OS of agent machine. Known values are: "Windows" and "Linux". (Windows, Linux)
provisioningStatestringThe provisioning state of this agent pool. Known values are: "Creating", "Updating", "Deleting", "Succeeded", "Failed", and "Canceled". (Creating, Updating, Deleting, Succeeded, Failed, Canceled)
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
tagsobjectResource tags.
tierstringThe Tier of agent machine.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".
virtualNetworkSubnetResourceIdstringThe Virtual Network Subnet Resource Id of the agent machine.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresource_group_name, registry_name, agent_pool_name, subscription_idGets the detailed information for a given agent pool.
listselectresource_group_name, registry_name, subscription_idLists all the agent pools for a specified container registry.
createinsertresource_group_name, registry_name, agent_pool_name, subscription_id, locationCreates an agent pool for a container registry with the specified parameters.
updateupdateresource_group_name, registry_name, agent_pool_name, subscription_idUpdates an agent pool with the specified parameters.
deletedeleteresource_group_name, registry_name, agent_pool_name, subscription_idDeletes a specified agent pool resource.
get_queue_statusexecresource_group_name, registry_name, agent_pool_name, subscription_idGets the count of queued runs for a given agent pool.

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
agent_pool_namestringThe name of the agent pool. Required.
registry_namestringThe name of the Registry. Required.
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
subscription_idstring

SELECT examples

Gets the detailed information for a given agent pool.

SELECT
id,
name,
count,
location,
os,
provisioningState,
systemData,
tags,
tier,
type,
virtualNetworkSubnetResourceId
FROM azure.container_registry_tasks.agent_pools
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND registry_name = '{{ registry_name }}' -- required
AND agent_pool_name = '{{ agent_pool_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

INSERT examples

Creates an agent pool for a container registry with the specified parameters.

INSERT INTO azure.container_registry_tasks.agent_pools (
tags,
location,
properties,
resource_group_name,
registry_name,
agent_pool_name,
subscription_id
)
SELECT
'{{ tags }}',
'{{ location }}' /* required */,
'{{ properties }}',
'{{ resource_group_name }}',
'{{ registry_name }}',
'{{ agent_pool_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
location,
properties,
systemData,
tags,
type
;

UPDATE examples

Updates an agent pool with the specified parameters.

UPDATE azure.container_registry_tasks.agent_pools
SET
properties = '{{ properties }}',
tags = '{{ tags }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND registry_name = '{{ registry_name }}' --required
AND agent_pool_name = '{{ agent_pool_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
location,
properties,
systemData,
tags,
type;

DELETE examples

Deletes a specified agent pool resource.

DELETE FROM azure.container_registry_tasks.agent_pools
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND registry_name = '{{ registry_name }}' --required
AND agent_pool_name = '{{ agent_pool_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;

Lifecycle Methods

Gets the count of queued runs for a given agent pool.

EXEC azure.container_registry_tasks.agent_pools.get_queue_status 
@resource_group_name='{{ resource_group_name }}' --required,
@registry_name='{{ registry_name }}' --required,
@agent_pool_name='{{ agent_pool_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;