@pulumi/azuredevops
Version:
A Pulumi package for creating and managing Azure DevOps.
194 lines (193 loc) • 6.79 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* Manages permissions for a Variable Group
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as azuredevops from "@pulumi/azuredevops";
*
* const project = new azuredevops.Project("project", {
* name: "Testing",
* description: "Testing-description",
* visibility: "private",
* versionControl: "Git",
* workItemTemplate: "Agile",
* });
* const example = new azuredevops.VariableGroup("example", {
* projectId: project.id,
* name: "test",
* description: "Test Description",
* allowAccess: true,
* variables: [{
* name: "key1",
* value: "val1",
* }],
* });
* const tf_project_readers = azuredevops.getGroupOutput({
* projectId: project.id,
* name: "Readers",
* });
* const permissions = new azuredevops.VariableGroupPermissions("permissions", {
* projectId: project.id,
* variableGroupId: example.id,
* principal: tf_project_readers.apply(tf_project_readers => tf_project_readers.id),
* permissions: {
* View: "allow",
* Administer: "allow",
* Use: "allow",
* },
* });
* ```
*
* ## Roles
*
* The Azure DevOps UI uses roles to assign permissions for variable groups.
*
* | Role | Allow Permissions |
* |---------------|-----------------------|
* | Reader | View |
* | User | View, Use |
* | Administrator | View, Use, Administer |
*
* ## Relevant Links
*
* * [Azure DevOps Service REST API 7.1 - Security](https://docs.microsoft.com/en-us/rest/api/azure/devops/security/?view=azure-devops-rest-7.1)
*
* ## PAT Permissions Required
*
* - **Project & Team**: vso.security_manage - Grants the ability to read, write, and manage security permissions.
*
* ## Import
*
* The resource does not support import.
*/
export declare class VariableGroupPermissions extends pulumi.CustomResource {
/**
* Get an existing VariableGroupPermissions 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?: VariableGroupPermissionsState, opts?: pulumi.CustomResourceOptions): VariableGroupPermissions;
/**
* Returns true if the given object is an instance of VariableGroupPermissions. 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 VariableGroupPermissions;
/**
* the permissions to assign. The following permissions are available.
*
* | Permission | Description |
* |-------------|---------------------------|
* | View | View library item |
* | Administer | Administer library item |
* | Create | Create library item |
* | ViewSecrets | View library item secrets |
* | Use | Use library item |
* | Owner | Owner library item |
*/
readonly permissions: pulumi.Output<{
[key: string]: string;
}>;
/**
* The **group** principal to assign the permissions.
*/
readonly principal: pulumi.Output<string>;
/**
* The ID of the project.
*/
readonly projectId: pulumi.Output<string>;
/**
* Replace (`true`) or merge (`false`) the permissions. Default: `true`
*/
readonly replace: pulumi.Output<boolean | undefined>;
/**
* The id of the variable group to assign the permissions.
*/
readonly variableGroupId: pulumi.Output<string>;
/**
* Create a VariableGroupPermissions 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: VariableGroupPermissionsArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering VariableGroupPermissions resources.
*/
export interface VariableGroupPermissionsState {
/**
* the permissions to assign. The following permissions are available.
*
* | Permission | Description |
* |-------------|---------------------------|
* | View | View library item |
* | Administer | Administer library item |
* | Create | Create library item |
* | ViewSecrets | View library item secrets |
* | Use | Use library item |
* | Owner | Owner library item |
*/
permissions?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* The **group** principal to assign the permissions.
*/
principal?: pulumi.Input<string>;
/**
* The ID of the project.
*/
projectId?: pulumi.Input<string>;
/**
* Replace (`true`) or merge (`false`) the permissions. Default: `true`
*/
replace?: pulumi.Input<boolean>;
/**
* The id of the variable group to assign the permissions.
*/
variableGroupId?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a VariableGroupPermissions resource.
*/
export interface VariableGroupPermissionsArgs {
/**
* the permissions to assign. The following permissions are available.
*
* | Permission | Description |
* |-------------|---------------------------|
* | View | View library item |
* | Administer | Administer library item |
* | Create | Create library item |
* | ViewSecrets | View library item secrets |
* | Use | Use library item |
* | Owner | Owner library item |
*/
permissions: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* The **group** principal to assign the permissions.
*/
principal: pulumi.Input<string>;
/**
* The ID of the project.
*/
projectId: pulumi.Input<string>;
/**
* Replace (`true`) or merge (`false`) the permissions. Default: `true`
*/
replace?: pulumi.Input<boolean>;
/**
* The id of the variable group to assign the permissions.
*/
variableGroupId: pulumi.Input<string>;
}