Azure DevOps v3.3.0 published on Wednesday, Sep 4, 2024 by Pulumi
azuredevops.getIdentityGroups
Explore with Pulumi AI
Use this data source to access information about existing Groups within Azure DevOps On-Premise(Azure DevOps Server).
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.getIdentityGroups({});
// load all existing groups inside a specific project
const example-project-groups = example.then(example => azuredevops.getIdentityGroups({
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_identity_groups()
# load all existing groups inside a specific project
example_project_groups = azuredevops.get_identity_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.GetIdentityGroups(ctx, nil, nil)
if err != nil {
return err
}
// load all existing groups inside a specific project
_, err = azuredevops.GetIdentityGroups(ctx, &azuredevops.GetIdentityGroupsArgs{
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.GetIdentityGroups.Invoke();
// load all existing groups inside a specific project
var example_project_groups = AzureDevOps.GetIdentityGroups.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.GetIdentityGroupsArgs;
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.getIdentityGroups();
// load all existing groups inside a specific project
final var example-project-groups = AzuredevopsFunctions.getIdentityGroups(GetIdentityGroupsArgs.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:getIdentityGroups
Arguments: {}
# load all existing groups inside a specific project
example-project-groups:
fn::invoke:
Function: azuredevops:getIdentityGroups
Arguments:
projectId: ${example.id}
Relevant Links
Using getIdentityGroups
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 getIdentityGroups(args: GetIdentityGroupsArgs, opts?: InvokeOptions): Promise<GetIdentityGroupsResult>
function getIdentityGroupsOutput(args: GetIdentityGroupsOutputArgs, opts?: InvokeOptions): Output<GetIdentityGroupsResult>
def get_identity_groups(project_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetIdentityGroupsResult
def get_identity_groups_output(project_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetIdentityGroupsResult]
func GetIdentityGroups(ctx *Context, args *GetIdentityGroupsArgs, opts ...InvokeOption) (*GetIdentityGroupsResult, error)
func GetIdentityGroupsOutput(ctx *Context, args *GetIdentityGroupsOutputArgs, opts ...InvokeOption) GetIdentityGroupsResultOutput
> Note: This function is named GetIdentityGroups
in the Go SDK.
public static class GetIdentityGroups
{
public static Task<GetIdentityGroupsResult> InvokeAsync(GetIdentityGroupsArgs args, InvokeOptions? opts = null)
public static Output<GetIdentityGroupsResult> Invoke(GetIdentityGroupsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetIdentityGroupsResult> getIdentityGroups(GetIdentityGroupsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: azuredevops:index/getIdentityGroups:getIdentityGroups
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
getIdentityGroups Result
The following output properties are available:
- Groups
List<Pulumi.
Azure Dev Ops. Outputs. Get Identity 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
Identity 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
Identity 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
Identity 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
Identity 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
GetIdentityGroupsGroup
Package Details
- Repository
- Azure DevOps pulumi/pulumi-azuredevops
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azuredevops
Terraform Provider.