1. Packages
  2. Azuredevops Provider
  3. API Docs
  4. getGroups
Azure DevOps v3.3.0 published on Wednesday, Sep 4, 2024 by Pulumi

azuredevops.getGroups

Explore with Pulumi AI

azuredevops logo
Azure DevOps v3.3.0 published on Wednesday, Sep 4, 2024 by Pulumi

    Use this data source to access information about existing Groups within Azure DevOps

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as azuredevops from "@pulumi/azuredevops";
    
    const example = azuredevops.getProject({
        name: "Example Project",
    });
    // load all existing groups inside an organization
    const example-all-groups = azuredevops.getGroups({});
    // load all existing groups inside a specific project
    const example-project-groups = example.then(example => azuredevops.getGroups({
        projectId: example.id,
    }));
    
    import pulumi
    import pulumi_azuredevops as azuredevops
    
    example = azuredevops.get_project(name="Example Project")
    # load all existing groups inside an organization
    example_all_groups = azuredevops.get_groups()
    # load all existing groups inside a specific project
    example_project_groups = azuredevops.get_groups(project_id=example.id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azuredevops/sdk/v3/go/azuredevops"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := azuredevops.LookupProject(ctx, &azuredevops.LookupProjectArgs{
    			Name: pulumi.StringRef("Example Project"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		// load all existing groups inside an organization
    		_, err = azuredevops.GetGroups(ctx, nil, nil)
    		if err != nil {
    			return err
    		}
    		// load all existing groups inside a specific project
    		_, err = azuredevops.GetGroups(ctx, &azuredevops.GetGroupsArgs{
    			ProjectId: pulumi.StringRef(example.Id),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AzureDevOps = Pulumi.AzureDevOps;
    
    return await Deployment.RunAsync(() => 
    {
        var example = AzureDevOps.GetProject.Invoke(new()
        {
            Name = "Example Project",
        });
    
        // load all existing groups inside an organization
        var example_all_groups = AzureDevOps.GetGroups.Invoke();
    
        // load all existing groups inside a specific project
        var example_project_groups = AzureDevOps.GetGroups.Invoke(new()
        {
            ProjectId = example.Apply(getProjectResult => getProjectResult.Id),
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azuredevops.AzuredevopsFunctions;
    import com.pulumi.azuredevops.inputs.GetProjectArgs;
    import com.pulumi.azuredevops.inputs.GetGroupsArgs;
    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) {
            final var example = AzuredevopsFunctions.getProject(GetProjectArgs.builder()
                .name("Example Project")
                .build());
    
            // load all existing groups inside an organization
            final var example-all-groups = AzuredevopsFunctions.getGroups();
    
            // load all existing groups inside a specific project
            final var example-project-groups = AzuredevopsFunctions.getGroups(GetGroupsArgs.builder()
                .projectId(example.applyValue(getProjectResult -> getProjectResult.id()))
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          Function: azuredevops:getProject
          Arguments:
            name: Example Project
      # load all existing groups inside an organization
      example-all-groups:
        fn::invoke:
          Function: azuredevops:getGroups
          Arguments: {}
      # load all existing groups inside a specific project
      example-project-groups:
        fn::invoke:
          Function: azuredevops:getGroups
          Arguments:
            projectId: ${example.id}
    

    Using getGroups

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getGroups(args: GetGroupsArgs, opts?: InvokeOptions): Promise<GetGroupsResult>
    function getGroupsOutput(args: GetGroupsOutputArgs, opts?: InvokeOptions): Output<GetGroupsResult>
    def get_groups(project_id: Optional[str] = None,
                   opts: Optional[InvokeOptions] = None) -> GetGroupsResult
    def get_groups_output(project_id: Optional[pulumi.Input[str]] = None,
                   opts: Optional[InvokeOptions] = None) -> Output[GetGroupsResult]
    func GetGroups(ctx *Context, args *GetGroupsArgs, opts ...InvokeOption) (*GetGroupsResult, error)
    func GetGroupsOutput(ctx *Context, args *GetGroupsOutputArgs, opts ...InvokeOption) GetGroupsResultOutput

    > Note: This function is named GetGroups in the Go SDK.

    public static class GetGroups 
    {
        public static Task<GetGroupsResult> InvokeAsync(GetGroupsArgs args, InvokeOptions? opts = null)
        public static Output<GetGroupsResult> Invoke(GetGroupsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetGroupsResult> getGroups(GetGroupsArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: azuredevops:index/getGroups:getGroups
      arguments:
        # arguments dictionary

    The following arguments are supported:

    ProjectId string
    The Project ID. If no project ID is specified all groups of an organization will be returned
    ProjectId string
    The Project ID. If no project ID is specified all groups of an organization will be returned
    projectId String
    The Project ID. If no project ID is specified all groups of an organization will be returned
    projectId string
    The Project ID. If no project ID is specified all groups of an organization will be returned
    project_id str
    The Project ID. If no project ID is specified all groups of an organization will be returned
    projectId String
    The Project ID. If no project ID is specified all groups of an organization will be returned

    getGroups Result

    The following output properties are available:

    Groups List<Pulumi.AzureDevOps.Outputs.GetGroupsGroup>
    A set of existing groups in your Azure DevOps Organization or project with details about every single group which includes:
    Id string
    The provider-assigned unique ID for this managed resource.
    ProjectId string
    Groups []GetGroupsGroup
    A set of existing groups in your Azure DevOps Organization or project with details about every single group which includes:
    Id string
    The provider-assigned unique ID for this managed resource.
    ProjectId string
    groups List<GetGroupsGroup>
    A set of existing groups in your Azure DevOps Organization or project with details about every single group which includes:
    id String
    The provider-assigned unique ID for this managed resource.
    projectId String
    groups GetGroupsGroup[]
    A set of existing groups in your Azure DevOps Organization or project with details about every single group which includes:
    id string
    The provider-assigned unique ID for this managed resource.
    projectId string
    groups Sequence[GetGroupsGroup]
    A set of existing groups in your Azure DevOps Organization or project with details about every single group which includes:
    id str
    The provider-assigned unique ID for this managed resource.
    project_id str
    groups List<Property Map>
    A set of existing groups in your Azure DevOps Organization or project with details about every single group which includes:
    id String
    The provider-assigned unique ID for this managed resource.
    projectId String

    Supporting Types

    GetGroupsGroup

    Descriptor string
    The descriptor is the primary way to reference the graph subject while the system is running. This field will uniquely identify the same graph subject across both Accounts and Organizations.
    Domain string
    This represents the name of the container of origin for a graph member. (For MSA this is "Windows Live ID", for AD the name of the domain, for AAD the tenantID of the directory, for VSTS groups the ScopeId, etc)
    Id string
    The group ID.
    Origin string
    The type of source provider for the origin identifier (ex:AD, AAD, MSA)
    PrincipalName string
    This is the PrincipalName of this graph member from the source provider. The source provider may change this field over time and it is not guaranteed to be immutable for the life of the graph member by VSTS.
    Url string
    This url is the full route to the source resource of this graph subject.
    Description string
    A short phrase to help human readers disambiguate groups with similar names
    DisplayName string
    This is the non-unique display name of the graph subject. To change this field, you must alter its value in the source provider.
    MailAddress string
    The email address of record for a given graph member. This may be different than the principal name.
    OriginId string
    The unique identifier from the system of origin. Typically a sid, object id or Guid. Linking and unlinking operations can cause this value to change for a user because the user is not backed by a different provider and has a different unique id in the new provider.
    Descriptor string
    The descriptor is the primary way to reference the graph subject while the system is running. This field will uniquely identify the same graph subject across both Accounts and Organizations.
    Domain string
    This represents the name of the container of origin for a graph member. (For MSA this is "Windows Live ID", for AD the name of the domain, for AAD the tenantID of the directory, for VSTS groups the ScopeId, etc)
    Id string
    The group ID.
    Origin string
    The type of source provider for the origin identifier (ex:AD, AAD, MSA)
    PrincipalName string
    This is the PrincipalName of this graph member from the source provider. The source provider may change this field over time and it is not guaranteed to be immutable for the life of the graph member by VSTS.
    Url string
    This url is the full route to the source resource of this graph subject.
    Description string
    A short phrase to help human readers disambiguate groups with similar names
    DisplayName string
    This is the non-unique display name of the graph subject. To change this field, you must alter its value in the source provider.
    MailAddress string
    The email address of record for a given graph member. This may be different than the principal name.
    OriginId string
    The unique identifier from the system of origin. Typically a sid, object id or Guid. Linking and unlinking operations can cause this value to change for a user because the user is not backed by a different provider and has a different unique id in the new provider.
    descriptor String
    The descriptor is the primary way to reference the graph subject while the system is running. This field will uniquely identify the same graph subject across both Accounts and Organizations.
    domain String
    This represents the name of the container of origin for a graph member. (For MSA this is "Windows Live ID", for AD the name of the domain, for AAD the tenantID of the directory, for VSTS groups the ScopeId, etc)
    id String
    The group ID.
    origin String
    The type of source provider for the origin identifier (ex:AD, AAD, MSA)
    principalName String
    This is the PrincipalName of this graph member from the source provider. The source provider may change this field over time and it is not guaranteed to be immutable for the life of the graph member by VSTS.
    url String
    This url is the full route to the source resource of this graph subject.
    description String
    A short phrase to help human readers disambiguate groups with similar names
    displayName String
    This is the non-unique display name of the graph subject. To change this field, you must alter its value in the source provider.
    mailAddress String
    The email address of record for a given graph member. This may be different than the principal name.
    originId String
    The unique identifier from the system of origin. Typically a sid, object id or Guid. Linking and unlinking operations can cause this value to change for a user because the user is not backed by a different provider and has a different unique id in the new provider.
    descriptor string
    The descriptor is the primary way to reference the graph subject while the system is running. This field will uniquely identify the same graph subject across both Accounts and Organizations.
    domain string
    This represents the name of the container of origin for a graph member. (For MSA this is "Windows Live ID", for AD the name of the domain, for AAD the tenantID of the directory, for VSTS groups the ScopeId, etc)
    id string
    The group ID.
    origin string
    The type of source provider for the origin identifier (ex:AD, AAD, MSA)
    principalName string
    This is the PrincipalName of this graph member from the source provider. The source provider may change this field over time and it is not guaranteed to be immutable for the life of the graph member by VSTS.
    url string
    This url is the full route to the source resource of this graph subject.
    description string
    A short phrase to help human readers disambiguate groups with similar names
    displayName string
    This is the non-unique display name of the graph subject. To change this field, you must alter its value in the source provider.
    mailAddress string
    The email address of record for a given graph member. This may be different than the principal name.
    originId string
    The unique identifier from the system of origin. Typically a sid, object id or Guid. Linking and unlinking operations can cause this value to change for a user because the user is not backed by a different provider and has a different unique id in the new provider.
    descriptor str
    The descriptor is the primary way to reference the graph subject while the system is running. This field will uniquely identify the same graph subject across both Accounts and Organizations.
    domain str
    This represents the name of the container of origin for a graph member. (For MSA this is "Windows Live ID", for AD the name of the domain, for AAD the tenantID of the directory, for VSTS groups the ScopeId, etc)
    id str
    The group ID.
    origin str
    The type of source provider for the origin identifier (ex:AD, AAD, MSA)
    principal_name str
    This is the PrincipalName of this graph member from the source provider. The source provider may change this field over time and it is not guaranteed to be immutable for the life of the graph member by VSTS.
    url str
    This url is the full route to the source resource of this graph subject.
    description str
    A short phrase to help human readers disambiguate groups with similar names
    display_name str
    This is the non-unique display name of the graph subject. To change this field, you must alter its value in the source provider.
    mail_address str
    The email address of record for a given graph member. This may be different than the principal name.
    origin_id str
    The unique identifier from the system of origin. Typically a sid, object id or Guid. Linking and unlinking operations can cause this value to change for a user because the user is not backed by a different provider and has a different unique id in the new provider.
    descriptor String
    The descriptor is the primary way to reference the graph subject while the system is running. This field will uniquely identify the same graph subject across both Accounts and Organizations.
    domain String
    This represents the name of the container of origin for a graph member. (For MSA this is "Windows Live ID", for AD the name of the domain, for AAD the tenantID of the directory, for VSTS groups the ScopeId, etc)
    id String
    The group ID.
    origin String
    The type of source provider for the origin identifier (ex:AD, AAD, MSA)
    principalName String
    This is the PrincipalName of this graph member from the source provider. The source provider may change this field over time and it is not guaranteed to be immutable for the life of the graph member by VSTS.
    url String
    This url is the full route to the source resource of this graph subject.
    description String
    A short phrase to help human readers disambiguate groups with similar names
    displayName String
    This is the non-unique display name of the graph subject. To change this field, you must alter its value in the source provider.
    mailAddress String
    The email address of record for a given graph member. This may be different than the principal name.
    originId String
    The unique identifier from the system of origin. Typically a sid, object id or Guid. Linking and unlinking operations can cause this value to change for a user because the user is not backed by a different provider and has a different unique id in the new provider.

    Package Details

    Repository
    Azure DevOps pulumi/pulumi-azuredevops
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the azuredevops Terraform Provider.
    azuredevops logo
    Azure DevOps v3.3.0 published on Wednesday, Sep 4, 2024 by Pulumi