1. Packages
  2. Azure Native v2
  3. API Docs
  4. containerregistry
  5. AgentPool
These are the docs for Azure Native v2. We recommenend using the latest version, Azure Native v3.
Azure Native v2 v2.90.0 published on Thursday, Mar 27, 2025 by Pulumi

azure-native-v2.containerregistry.AgentPool

Explore with Pulumi AI

These are the docs for Azure Native v2. We recommenend using the latest version, Azure Native v3.
Azure Native v2 v2.90.0 published on Thursday, Mar 27, 2025 by Pulumi

The agentpool that has the ARM resource and properties. The agentpool will have all information to create an agent pool. Azure REST API version: 2019-06-01-preview. Prior API version in Azure Native 1.x: 2019-06-01-preview.

Example Usage

AgentPools_Create

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;

return await Deployment.RunAsync(() => 
{
    var agentPool = new AzureNative.ContainerRegistry.AgentPool("agentPool", new()
    {
        AgentPoolName = "myAgentPool",
        Count = 1,
        Location = "WESTUS",
        Os = AzureNative.ContainerRegistry.OS.Linux,
        RegistryName = "myRegistry",
        ResourceGroupName = "myResourceGroup",
        Tags = 
        {
            { "key", "value" },
        },
        Tier = "S1",
    });

});
Copy
package main

import (
	containerregistry "github.com/pulumi/pulumi-azure-native-sdk/containerregistry/v2"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := containerregistry.NewAgentPool(ctx, "agentPool", &containerregistry.AgentPoolArgs{
			AgentPoolName:     pulumi.String("myAgentPool"),
			Count:             pulumi.Int(1),
			Location:          pulumi.String("WESTUS"),
			Os:                pulumi.String(containerregistry.OSLinux),
			RegistryName:      pulumi.String("myRegistry"),
			ResourceGroupName: pulumi.String("myResourceGroup"),
			Tags: pulumi.StringMap{
				"key": pulumi.String("value"),
			},
			Tier: pulumi.String("S1"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.containerregistry.AgentPool;
import com.pulumi.azurenative.containerregistry.AgentPoolArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var agentPool = new AgentPool("agentPool", AgentPoolArgs.builder()
            .agentPoolName("myAgentPool")
            .count(1)
            .location("WESTUS")
            .os("Linux")
            .registryName("myRegistry")
            .resourceGroupName("myResourceGroup")
            .tags(Map.of("key", "value"))
            .tier("S1")
            .build());

    }
}
Copy
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";

const agentPool = new azure_native.containerregistry.AgentPool("agentPool", {
    agentPoolName: "myAgentPool",
    count: 1,
    location: "WESTUS",
    os: azure_native.containerregistry.OS.Linux,
    registryName: "myRegistry",
    resourceGroupName: "myResourceGroup",
    tags: {
        key: "value",
    },
    tier: "S1",
});
Copy
import pulumi
import pulumi_azure_native as azure_native

agent_pool = azure_native.containerregistry.AgentPool("agentPool",
    agent_pool_name="myAgentPool",
    count=1,
    location="WESTUS",
    os=azure_native.containerregistry.OS.LINUX,
    registry_name="myRegistry",
    resource_group_name="myResourceGroup",
    tags={
        "key": "value",
    },
    tier="S1")
Copy
resources:
  agentPool:
    type: azure-native:containerregistry:AgentPool
    properties:
      agentPoolName: myAgentPool
      count: 1
      location: WESTUS
      os: Linux
      registryName: myRegistry
      resourceGroupName: myResourceGroup
      tags:
        key: value
      tier: S1
Copy

Create AgentPool Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new AgentPool(name: string, args: AgentPoolArgs, opts?: CustomResourceOptions);
@overload
def AgentPool(resource_name: str,
              args: AgentPoolArgs,
              opts: Optional[ResourceOptions] = None)

@overload
def AgentPool(resource_name: str,
              opts: Optional[ResourceOptions] = None,
              registry_name: Optional[str] = None,
              resource_group_name: Optional[str] = None,
              agent_pool_name: Optional[str] = None,
              count: Optional[int] = None,
              location: Optional[str] = None,
              os: Optional[Union[str, OS]] = None,
              tags: Optional[Mapping[str, str]] = None,
              tier: Optional[str] = None,
              virtual_network_subnet_resource_id: Optional[str] = None)
func NewAgentPool(ctx *Context, name string, args AgentPoolArgs, opts ...ResourceOption) (*AgentPool, error)
public AgentPool(string name, AgentPoolArgs args, CustomResourceOptions? opts = null)
public AgentPool(String name, AgentPoolArgs args)
public AgentPool(String name, AgentPoolArgs args, CustomResourceOptions options)
type: azure-native:containerregistry:AgentPool
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. AgentPoolArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. AgentPoolArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. AgentPoolArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. AgentPoolArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. AgentPoolArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var agentPoolResource = new AzureNative.Containerregistry.AgentPool("agentPoolResource", new()
{
    RegistryName = "string",
    ResourceGroupName = "string",
    AgentPoolName = "string",
    Count = 0,
    Location = "string",
    Os = "string",
    Tags = 
    {
        { "string", "string" },
    },
    Tier = "string",
    VirtualNetworkSubnetResourceId = "string",
});
Copy
example, err := containerregistry.NewAgentPool(ctx, "agentPoolResource", &containerregistry.AgentPoolArgs{
	RegistryName:      "string",
	ResourceGroupName: "string",
	AgentPoolName:     "string",
	Count:             0,
	Location:          "string",
	Os:                "string",
	Tags: map[string]interface{}{
		"string": "string",
	},
	Tier:                           "string",
	VirtualNetworkSubnetResourceId: "string",
})
Copy
var agentPoolResource = new AgentPool("agentPoolResource", AgentPoolArgs.builder()
    .registryName("string")
    .resourceGroupName("string")
    .agentPoolName("string")
    .count(0)
    .location("string")
    .os("string")
    .tags(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
    .tier("string")
    .virtualNetworkSubnetResourceId("string")
    .build());
Copy
agent_pool_resource = azure_native.containerregistry.AgentPool("agentPoolResource",
    registry_name=string,
    resource_group_name=string,
    agent_pool_name=string,
    count=0,
    location=string,
    os=string,
    tags={
        string: string,
    },
    tier=string,
    virtual_network_subnet_resource_id=string)
Copy
const agentPoolResource = new azure_native.containerregistry.AgentPool("agentPoolResource", {
    registryName: "string",
    resourceGroupName: "string",
    agentPoolName: "string",
    count: 0,
    location: "string",
    os: "string",
    tags: {
        string: "string",
    },
    tier: "string",
    virtualNetworkSubnetResourceId: "string",
});
Copy
type: azure-native:containerregistry:AgentPool
properties:
    agentPoolName: string
    count: 0
    location: string
    os: string
    registryName: string
    resourceGroupName: string
    tags:
        string: string
    tier: string
    virtualNetworkSubnetResourceId: string
Copy

AgentPool Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The AgentPool resource accepts the following input properties:

RegistryName
This property is required.
Changes to this property will trigger replacement.
string
The name of the container registry.
ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group to which the container registry belongs.
AgentPoolName Changes to this property will trigger replacement. string
The name of the agent pool.
Count int
The count of agent machine
Location Changes to this property will trigger replacement. string
The location of the resource. This cannot be changed after the resource is created.
Os string | Pulumi.AzureNative.ContainerRegistry.OS
The OS of agent machine
Tags Dictionary<string, string>
The tags of the resource.
Tier string
The Tier of agent machine
VirtualNetworkSubnetResourceId string
The Virtual Network Subnet Resource Id of the agent machine
RegistryName
This property is required.
Changes to this property will trigger replacement.
string
The name of the container registry.
ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group to which the container registry belongs.
AgentPoolName Changes to this property will trigger replacement. string
The name of the agent pool.
Count int
The count of agent machine
Location Changes to this property will trigger replacement. string
The location of the resource. This cannot be changed after the resource is created.
Os string | OS
The OS of agent machine
Tags map[string]string
The tags of the resource.
Tier string
The Tier of agent machine
VirtualNetworkSubnetResourceId string
The Virtual Network Subnet Resource Id of the agent machine
registryName
This property is required.
Changes to this property will trigger replacement.
String
The name of the container registry.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
The name of the resource group to which the container registry belongs.
agentPoolName Changes to this property will trigger replacement. String
The name of the agent pool.
count Integer
The count of agent machine
location Changes to this property will trigger replacement. String
The location of the resource. This cannot be changed after the resource is created.
os String | OS
The OS of agent machine
tags Map<String,String>
The tags of the resource.
tier String
The Tier of agent machine
virtualNetworkSubnetResourceId String
The Virtual Network Subnet Resource Id of the agent machine
registryName
This property is required.
Changes to this property will trigger replacement.
string
The name of the container registry.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group to which the container registry belongs.
agentPoolName Changes to this property will trigger replacement. string
The name of the agent pool.
count number
The count of agent machine
location Changes to this property will trigger replacement. string
The location of the resource. This cannot be changed after the resource is created.
os string | OS
The OS of agent machine
tags {[key: string]: string}
The tags of the resource.
tier string
The Tier of agent machine
virtualNetworkSubnetResourceId string
The Virtual Network Subnet Resource Id of the agent machine
registry_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the container registry.
resource_group_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the resource group to which the container registry belongs.
agent_pool_name Changes to this property will trigger replacement. str
The name of the agent pool.
count int
The count of agent machine
location Changes to this property will trigger replacement. str
The location of the resource. This cannot be changed after the resource is created.
os str | OS
The OS of agent machine
tags Mapping[str, str]
The tags of the resource.
tier str
The Tier of agent machine
virtual_network_subnet_resource_id str
The Virtual Network Subnet Resource Id of the agent machine
registryName
This property is required.
Changes to this property will trigger replacement.
String
The name of the container registry.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
The name of the resource group to which the container registry belongs.
agentPoolName Changes to this property will trigger replacement. String
The name of the agent pool.
count Number
The count of agent machine
location Changes to this property will trigger replacement. String
The location of the resource. This cannot be changed after the resource is created.
os String | "Windows" | "Linux"
The OS of agent machine
tags Map<String>
The tags of the resource.
tier String
The Tier of agent machine
virtualNetworkSubnetResourceId String
The Virtual Network Subnet Resource Id of the agent machine

Outputs

All input properties are implicitly available as output properties. Additionally, the AgentPool resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Name string
The name of the resource.
ProvisioningState string
The provisioning state of this agent pool
SystemData Pulumi.AzureNative.ContainerRegistry.Outputs.SystemDataResponse
Metadata pertaining to creation and last modification of the resource.
Type string
The type of the resource.
Id string
The provider-assigned unique ID for this managed resource.
Name string
The name of the resource.
ProvisioningState string
The provisioning state of this agent pool
SystemData SystemDataResponse
Metadata pertaining to creation and last modification of the resource.
Type string
The type of the resource.
id String
The provider-assigned unique ID for this managed resource.
name String
The name of the resource.
provisioningState String
The provisioning state of this agent pool
systemData SystemDataResponse
Metadata pertaining to creation and last modification of the resource.
type String
The type of the resource.
id string
The provider-assigned unique ID for this managed resource.
name string
The name of the resource.
provisioningState string
The provisioning state of this agent pool
systemData SystemDataResponse
Metadata pertaining to creation and last modification of the resource.
type string
The type of the resource.
id str
The provider-assigned unique ID for this managed resource.
name str
The name of the resource.
provisioning_state str
The provisioning state of this agent pool
system_data SystemDataResponse
Metadata pertaining to creation and last modification of the resource.
type str
The type of the resource.
id String
The provider-assigned unique ID for this managed resource.
name String
The name of the resource.
provisioningState String
The provisioning state of this agent pool
systemData Property Map
Metadata pertaining to creation and last modification of the resource.
type String
The type of the resource.

Supporting Types

OS
, OSArgs

Windows
Windows
Linux
Linux
OSWindows
Windows
OSLinux
Linux
Windows
Windows
Linux
Linux
Windows
Windows
Linux
Linux
WINDOWS
Windows
LINUX
Linux
"Windows"
Windows
"Linux"
Linux

SystemDataResponse
, SystemDataResponseArgs

CreatedAt string
The timestamp of resource creation (UTC).
CreatedBy string
The identity that created the resource.
CreatedByType string
The type of identity that created the resource.
LastModifiedAt string
The timestamp of resource modification (UTC).
LastModifiedBy string
The identity that last modified the resource.
LastModifiedByType string
The type of identity that last modified the resource.
CreatedAt string
The timestamp of resource creation (UTC).
CreatedBy string
The identity that created the resource.
CreatedByType string
The type of identity that created the resource.
LastModifiedAt string
The timestamp of resource modification (UTC).
LastModifiedBy string
The identity that last modified the resource.
LastModifiedByType string
The type of identity that last modified the resource.
createdAt String
The timestamp of resource creation (UTC).
createdBy String
The identity that created the resource.
createdByType String
The type of identity that created the resource.
lastModifiedAt String
The timestamp of resource modification (UTC).
lastModifiedBy String
The identity that last modified the resource.
lastModifiedByType String
The type of identity that last modified the resource.
createdAt string
The timestamp of resource creation (UTC).
createdBy string
The identity that created the resource.
createdByType string
The type of identity that created the resource.
lastModifiedAt string
The timestamp of resource modification (UTC).
lastModifiedBy string
The identity that last modified the resource.
lastModifiedByType string
The type of identity that last modified the resource.
created_at str
The timestamp of resource creation (UTC).
created_by str
The identity that created the resource.
created_by_type str
The type of identity that created the resource.
last_modified_at str
The timestamp of resource modification (UTC).
last_modified_by str
The identity that last modified the resource.
last_modified_by_type str
The type of identity that last modified the resource.
createdAt String
The timestamp of resource creation (UTC).
createdBy String
The identity that created the resource.
createdByType String
The type of identity that created the resource.
lastModifiedAt String
The timestamp of resource modification (UTC).
lastModifiedBy String
The identity that last modified the resource.
lastModifiedByType String
The type of identity that last modified the resource.

Import

An existing resource can be imported using its type token, name, and identifier, e.g.

$ pulumi import azure-native:containerregistry:AgentPool myAgentPool /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/agentPools/{agentPoolName} 
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
azure-native-v2 pulumi/pulumi-azure-native
License
Apache-2.0
These are the docs for Azure Native v2. We recommenend using the latest version, Azure Native v3.
Azure Native v2 v2.90.0 published on Thursday, Mar 27, 2025 by Pulumi