Module Agent

This page documents the language specification for the azuredevops package. If you're looking for help working with the inputs, outputs, or functions of azuredevops resources in a Pulumi program, please see the resource documentation for examples and API reference.

Resources

Functions

Others

Resources

Resource Pool

class Pool extends CustomResource

Manages an agent pool within Azure DevOps.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as azuredevops from "@pulumi/azuredevops";

const pool = new azuredevops.Agent.Pool("pool", {
    autoProvision: false,
});

constructor

new Pool(name: string, args?: PoolArgs, opts?: pulumi.CustomResourceOptions)

Create a Pool resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: PoolState, opts?: pulumi.CustomResourceOptions): Pool

Get an existing Pool resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is Pool

Returns true if the given object is an instance of Pool. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property autoProvision

public autoProvision: pulumi.Output<boolean | undefined>;

Specifies whether or not a queue should be automatically provisioned for each project collection. Defaults to false.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property name

public name: pulumi.Output<string>;

The name of the agent pool.

property poolType

public poolType: pulumi.Output<string | undefined>;

Specifies whether the agent pool type is Automation or Deployment. Defaults to automation.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

Resource Queue

class Queue extends CustomResource

Manages an agent queue within Azure DevOps. In the UI, this is equivelant to adding an Organization defined pool to a project.

The created queue is not authorized for use by all pipeliens in the project. However, the azuredevops.Security.ResourceAuthorization resource can be used to grant authorization.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as azuredevops from "@pulumi/azuredevops";

const project = new azuredevops.Core.Project("project", {projectName: "Sample Project"});
const pool = azuredevops.Agent.getPool({
    name: "contoso-pool",
});
const queue = new azuredevops.Agent.Queue("queue", {
    projectId: project.id,
    agentPoolId: pool.then(pool => pool.id),
});
// Grant acccess to queue to all pipelines in the project
const auth = new azuredevops.Security.ResourceAuthorization("auth", {
    projectId: project.id,
    resourceId: queue.id,
    type: "queue",
    authorized: true,
});

constructor

new Queue(name: string, args: QueueArgs, opts?: pulumi.CustomResourceOptions)

Create a Queue resource with the given unique name, arguments, and options.

  • name The unique name of the resource.
  • args The arguments to use to populate this resource's properties.
  • opts A bag of options that control this resource's behavior.

method get

public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: QueueState, opts?: pulumi.CustomResourceOptions): Queue

Get an existing Queue resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

public static isInstance(obj: any): obj is Queue

Returns true if the given object is an instance of Queue. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.

property agentPoolId

public agentPoolId: pulumi.Output<number>;

The ID of the organization agent pool.

property id

id: Output<ID>;

id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.

property projectId

public projectId: pulumi.Output<string>;

The ID of the project in which to create the resource.

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

Functions

Function getPool

getPool(args: GetPoolArgs, opts?: pulumi.InvokeOptions): Promise<GetPoolResult>

Use this data source to access information about an existing Agent Pool within Azure DevOps.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as azuredevops from "@pulumi/azuredevops";

const pool = azuredevops.Agent.getPool({
    name: "Sample Agent Pool",
});
export const name = pool.then(pool => pool.name);
export const poolType = pool.then(pool => pool.poolType);
export const autoProvision = pool.then(pool => pool.autoProvision);

Function getPools

getPools(opts?: pulumi.InvokeOptions): Promise<GetPoolsResult>

Use this data source to access information about existing Agent Pools within Azure DevOps.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as azuredevops from "@pulumi/azuredevops";

const pools = azuredevops.Agent.getPools({});
export const agentPoolName = pools.then(pools => pools.agentPools.map(__item => __item.name));
export const autoProvision = pools.then(pools => pools.agentPools.map(__item => __item.autoProvision));
export const poolType = pools.then(pools => pools.agentPools.map(__item => __item.poolType));

Others

interface GetPoolArgs

interface GetPoolArgs

A collection of arguments for invoking getPool.

property name

name: string;

interface GetPoolResult

interface GetPoolResult

A collection of values returned by getPool.

property autoProvision

autoProvision: boolean;

property id

id: string;

The provider-assigned unique ID for this managed resource.

property name

name: string;

property poolType

poolType: string;

interface GetPoolsResult

interface GetPoolsResult

A collection of values returned by getPools.

property agentPools

agentPools: GetPoolsAgentPool[];

property id

id: string;

The provider-assigned unique ID for this managed resource.

interface PoolArgs

interface PoolArgs

The set of arguments for constructing a Pool resource.

property autoProvision

autoProvision?: pulumi.Input<boolean>;

Specifies whether or not a queue should be automatically provisioned for each project collection. Defaults to false.

property name

name?: pulumi.Input<string>;

The name of the agent pool.

property poolType

poolType?: pulumi.Input<string>;

Specifies whether the agent pool type is Automation or Deployment. Defaults to automation.

interface PoolState

interface PoolState

Input properties used for looking up and filtering Pool resources.

property autoProvision

autoProvision?: pulumi.Input<boolean>;

Specifies whether or not a queue should be automatically provisioned for each project collection. Defaults to false.

property name

name?: pulumi.Input<string>;

The name of the agent pool.

property poolType

poolType?: pulumi.Input<string>;

Specifies whether the agent pool type is Automation or Deployment. Defaults to automation.

interface QueueArgs

interface QueueArgs

The set of arguments for constructing a Queue resource.

property agentPoolId

agentPoolId: pulumi.Input<number>;

The ID of the organization agent pool.

property projectId

projectId: pulumi.Input<string>;

The ID of the project in which to create the resource.

interface QueueState

interface QueueState

Input properties used for looking up and filtering Queue resources.

property agentPoolId

agentPoolId?: pulumi.Input<number>;

The ID of the organization agent pool.

property projectId

projectId?: pulumi.Input<string>;

The ID of the project in which to create the resource.