Azure DevOps v3.3.0 published on Wednesday, Sep 4, 2024 by Pulumi
azuredevops.getGroups
Explore with Pulumi AI
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}
Relevant Links
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:
- Project
Id string - The Project ID. If no project ID is specified all groups of an organization will be returned
- Project
Id string - The Project ID. If no project ID is specified all groups of an organization will be returned
- project
Id String - The Project ID. If no project ID is specified all groups of an organization will be returned
- project
Id 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
- project
Id 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.
Azure Dev Ops. Outputs. Get Groups Group> - 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.
- Project
Id string
- Groups
[]Get
Groups Group - 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.
- Project
Id string
- groups
List<Get
Groups Group> - 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.
- project
Id String
- groups
Get
Groups Group[] - 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.
- project
Id string
- groups
Sequence[Get
Groups Group] - 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.
- project
Id 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)
- Principal
Name 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
- Display
Name 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.
- Mail
Address string - The email address of record for a given graph member. This may be different than the principal name.
- Origin
Id 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)
- Principal
Name 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
- Display
Name 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.
- Mail
Address string - The email address of record for a given graph member. This may be different than the principal name.
- Origin
Id 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)
- principal
Name 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
- display
Name 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.
- mail
Address String - The email address of record for a given graph member. This may be different than the principal name.
- origin
Id 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)
- principal
Name 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
- display
Name 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.
- mail
Address string - The email address of record for a given graph member. This may be different than the principal name.
- origin
Id 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)
- principal
Name 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
- display
Name 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.
- mail
Address String - The email address of record for a given graph member. This may be different than the principal name.
- origin
Id 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.