@pulumi/azuredevops
Version:
A Pulumi package for creating and managing Azure DevOps.
146 lines (145 loc) • 6.78 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* Manages a user entitlement within Azure DevOps.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as azuredevops from "@pulumi/azuredevops";
*
* const example = new azuredevops.User("example", {principalName: "foo@contoso.com"});
* ```
*
* ## Relevant Links
*
* - [Azure DevOps Service REST API 7.0 - User Entitlements - Add](https://docs.microsoft.com/en-us/rest/api/azure/devops/memberentitlementmanagement/user-entitlements/add?view=azure-devops-rest-7.0)
* - [Programmatic mapping of access levels](https://docs.microsoft.com/en-us/azure/devops/organizations/security/access-levels?view=azure-devops#programmatic-mapping-of-access-levels)
*
* ## PAT Permissions Required
*
* - **Member Entitlement Management**: Read & Write
*
* ## Import
*
* This resource allows importing by the UUID of a user entitlement or by using the principal name of a user who owns the entitlement.
*
* ```sh
* $ pulumi import azuredevops:index/user:User example "00000000-0000-0000-0000-000000000000"
* ```
*
* or
*
* ```sh
* $ pulumi import azuredevops:index/user:User example "example@example.com"
* ```
*/
export declare class User extends pulumi.CustomResource {
/**
* Get an existing User 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?: UserState, opts?: pulumi.CustomResourceOptions): User;
/**
* Returns true if the given object is an instance of User. 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 User;
/**
* Type of Account License. Valid values: `advanced`, `earlyAdopter`, `express`, `none`, `professional`, or `stakeholder`. Defaults to `express`. In addition the value `basic` is allowed which is an alias for `express` and reflects the name of the `express` license used in the Azure DevOps web interface.
*/
readonly accountLicenseType: pulumi.Output<string | undefined>;
/**
* The descriptor is the primary way to reference the graph subject while the system is running. This field will uniquely identify the user graph subject.
*/
readonly descriptor: pulumi.Output<string>;
/**
* The source of the licensing (e.g. Account. MSDN etc.) Valid values: `account` (Default), `auto`, `msdn`, `none`, `profile`, `trial`
*
* > **NOTE:** A user can only be referenced by it's `principalName` or by the combination of `originId` and `origin`.
*/
readonly licensingSource: pulumi.Output<string | undefined>;
/**
* The type of source provider for the origin identifier.
*/
readonly origin: pulumi.Output<string>;
/**
* The unique identifier from the system of origin. Typically a sid, object id or Guid. e.g. Used for member of other tenant on Azure Active Directory.
*/
readonly originId: pulumi.Output<string>;
/**
* The principal name is the PrincipalName of a graph member from the source provider. Usually, e-mail address.
*/
readonly principalName: pulumi.Output<string>;
/**
* Create a User 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?: UserArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering User resources.
*/
export interface UserState {
/**
* Type of Account License. Valid values: `advanced`, `earlyAdopter`, `express`, `none`, `professional`, or `stakeholder`. Defaults to `express`. In addition the value `basic` is allowed which is an alias for `express` and reflects the name of the `express` license used in the Azure DevOps web interface.
*/
accountLicenseType?: pulumi.Input<string>;
/**
* The descriptor is the primary way to reference the graph subject while the system is running. This field will uniquely identify the user graph subject.
*/
descriptor?: pulumi.Input<string>;
/**
* The source of the licensing (e.g. Account. MSDN etc.) Valid values: `account` (Default), `auto`, `msdn`, `none`, `profile`, `trial`
*
* > **NOTE:** A user can only be referenced by it's `principalName` or by the combination of `originId` and `origin`.
*/
licensingSource?: pulumi.Input<string>;
/**
* The type of source provider for the origin identifier.
*/
origin?: pulumi.Input<string>;
/**
* The unique identifier from the system of origin. Typically a sid, object id or Guid. e.g. Used for member of other tenant on Azure Active Directory.
*/
originId?: pulumi.Input<string>;
/**
* The principal name is the PrincipalName of a graph member from the source provider. Usually, e-mail address.
*/
principalName?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a User resource.
*/
export interface UserArgs {
/**
* Type of Account License. Valid values: `advanced`, `earlyAdopter`, `express`, `none`, `professional`, or `stakeholder`. Defaults to `express`. In addition the value `basic` is allowed which is an alias for `express` and reflects the name of the `express` license used in the Azure DevOps web interface.
*/
accountLicenseType?: pulumi.Input<string>;
/**
* The source of the licensing (e.g. Account. MSDN etc.) Valid values: `account` (Default), `auto`, `msdn`, `none`, `profile`, `trial`
*
* > **NOTE:** A user can only be referenced by it's `principalName` or by the combination of `originId` and `origin`.
*/
licensingSource?: pulumi.Input<string>;
/**
* The type of source provider for the origin identifier.
*/
origin?: pulumi.Input<string>;
/**
* The unique identifier from the system of origin. Typically a sid, object id or Guid. e.g. Used for member of other tenant on Azure Active Directory.
*/
originId?: pulumi.Input<string>;
/**
* The principal name is the PrincipalName of a graph member from the source provider. Usually, e-mail address.
*/
principalName?: pulumi.Input<string>;
}