@pulumi/azuredevops
Version:
A Pulumi package for creating and managing Azure DevOps.
232 lines (231 loc) • 8.3 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* Manages Elastic pool within Azure DevOps.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as azuredevops from "@pulumi/azuredevops";
*
* const example = new azuredevops.Project("example", {
* name: "Example Project",
* visibility: "private",
* versionControl: "Git",
* workItemTemplate: "Agile",
* description: "Managed by Pulumi",
* });
* const exampleServiceEndpointAzureRM = new azuredevops.ServiceEndpointAzureRM("example", {
* projectId: example.id,
* serviceEndpointName: "Example Azure Connection",
* description: "Managed by Pulumi",
* serviceEndpointAuthenticationScheme: "ServicePrincipal",
* credentials: {
* serviceprincipalid: "00000000-0000-0000-0000-000000000000",
* serviceprincipalkey: "00000000-0000-0000-0000-000000000000",
* },
* azurermSpnTenantid: "00000000-0000-0000-0000-000000000000",
* azurermSubscriptionId: "00000000-0000-0000-0000-000000000000",
* azurermSubscriptionName: "Subscription Name",
* });
* const exampleElasticPool = new azuredevops.ElasticPool("example", {
* name: "Example Elastic Pool",
* serviceEndpointId: exampleServiceEndpointAzureRM.id,
* serviceEndpointScope: example.id,
* desiredIdle: 2,
* maxCapacity: 3,
* azureResourceId: "/subscriptions/<Subscription Id>/resourceGroups/<Resource Name>/providers/Microsoft.Compute/virtualMachineScaleSets/<VMSS Name>",
* });
* ```
*
* ## Relevant Links
*
* - [Azure DevOps Service REST API 7.0 - Elastic Pools](https://learn.microsoft.com/en-us/rest/api/azure/devops/distributedtask/elasticpools/create?view=azure-devops-rest-7.0)
*
* ## Import
*
* Azure DevOps Agent Pools can be imported using the Elastic pool ID, e.g.
*
* ```sh
* $ pulumi import azuredevops:index/elasticPool:ElasticPool example 0
* ```
*/
export declare class ElasticPool extends pulumi.CustomResource {
/**
* Get an existing ElasticPool resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: ElasticPoolState, opts?: pulumi.CustomResourceOptions): ElasticPool;
/**
* Returns true if the given object is an instance of ElasticPool. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj: any): obj is ElasticPool;
/**
* Set whether agents should be configured to run with interactive UI. Defaults to `false`.
*/
readonly agentInteractiveUi: pulumi.Output<boolean | undefined>;
/**
* Specifies whether a queue should be automatically provisioned for each project collection. Defaults to `false`.
*/
readonly autoProvision: pulumi.Output<boolean | undefined>;
/**
* Specifies whether or not agents within the pool should be automatically updated. Defaults to `true`.
*/
readonly autoUpdate: pulumi.Output<boolean | undefined>;
/**
* The ID of the Azure resource.
*/
readonly azureResourceId: pulumi.Output<string>;
/**
* Number of agents to keep on standby.
*/
readonly desiredIdle: pulumi.Output<number>;
/**
* Maximum number of virtual machines in the scale set.
*/
readonly maxCapacity: pulumi.Output<number>;
/**
* The name of the Elastic pool.
*/
readonly name: pulumi.Output<string>;
/**
* The ID of the project where a new Elastic Pool will be created.
*/
readonly projectId: pulumi.Output<string | undefined>;
/**
* Tear down virtual machines after every use. Defaults to `false`.
*/
readonly recycleAfterEachUse: pulumi.Output<boolean | undefined>;
/**
* The ID of Service Endpoint used to connect to Azure.
*/
readonly serviceEndpointId: pulumi.Output<string>;
/**
* The Project ID of Service Endpoint belongs to.
*/
readonly serviceEndpointScope: pulumi.Output<string>;
/**
* Delay in minutes before deleting excess idle agents. Defaults to `30`.
*/
readonly timeToLiveMinutes: pulumi.Output<number | undefined>;
/**
* Create a ElasticPool resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args: ElasticPoolArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering ElasticPool resources.
*/
export interface ElasticPoolState {
/**
* Set whether agents should be configured to run with interactive UI. Defaults to `false`.
*/
agentInteractiveUi?: pulumi.Input<boolean>;
/**
* Specifies whether a queue should be automatically provisioned for each project collection. Defaults to `false`.
*/
autoProvision?: pulumi.Input<boolean>;
/**
* Specifies whether or not agents within the pool should be automatically updated. Defaults to `true`.
*/
autoUpdate?: pulumi.Input<boolean>;
/**
* The ID of the Azure resource.
*/
azureResourceId?: pulumi.Input<string>;
/**
* Number of agents to keep on standby.
*/
desiredIdle?: pulumi.Input<number>;
/**
* Maximum number of virtual machines in the scale set.
*/
maxCapacity?: pulumi.Input<number>;
/**
* The name of the Elastic pool.
*/
name?: pulumi.Input<string>;
/**
* The ID of the project where a new Elastic Pool will be created.
*/
projectId?: pulumi.Input<string>;
/**
* Tear down virtual machines after every use. Defaults to `false`.
*/
recycleAfterEachUse?: pulumi.Input<boolean>;
/**
* The ID of Service Endpoint used to connect to Azure.
*/
serviceEndpointId?: pulumi.Input<string>;
/**
* The Project ID of Service Endpoint belongs to.
*/
serviceEndpointScope?: pulumi.Input<string>;
/**
* Delay in minutes before deleting excess idle agents. Defaults to `30`.
*/
timeToLiveMinutes?: pulumi.Input<number>;
}
/**
* The set of arguments for constructing a ElasticPool resource.
*/
export interface ElasticPoolArgs {
/**
* Set whether agents should be configured to run with interactive UI. Defaults to `false`.
*/
agentInteractiveUi?: pulumi.Input<boolean>;
/**
* Specifies whether a queue should be automatically provisioned for each project collection. Defaults to `false`.
*/
autoProvision?: pulumi.Input<boolean>;
/**
* Specifies whether or not agents within the pool should be automatically updated. Defaults to `true`.
*/
autoUpdate?: pulumi.Input<boolean>;
/**
* The ID of the Azure resource.
*/
azureResourceId: pulumi.Input<string>;
/**
* Number of agents to keep on standby.
*/
desiredIdle: pulumi.Input<number>;
/**
* Maximum number of virtual machines in the scale set.
*/
maxCapacity: pulumi.Input<number>;
/**
* The name of the Elastic pool.
*/
name?: pulumi.Input<string>;
/**
* The ID of the project where a new Elastic Pool will be created.
*/
projectId?: pulumi.Input<string>;
/**
* Tear down virtual machines after every use. Defaults to `false`.
*/
recycleAfterEachUse?: pulumi.Input<boolean>;
/**
* The ID of Service Endpoint used to connect to Azure.
*/
serviceEndpointId: pulumi.Input<string>;
/**
* The Project ID of Service Endpoint belongs to.
*/
serviceEndpointScope: pulumi.Input<string>;
/**
* Delay in minutes before deleting excess idle agents. Defaults to `30`.
*/
timeToLiveMinutes?: pulumi.Input<number>;
}