GetGroup
Use this data source to access information about an existing Group within Azure DevOps
Relevant Links
Example Usage
using Pulumi;
using AzureDevOps = Pulumi.AzureDevOps;
class MyStack : Stack
{
public MyStack()
{
var project = Output.Create(AzureDevOps.Core.GetProject.InvokeAsync(new AzureDevOps.Core.GetProjectArgs
{
ProjectName = "contoso-project",
}));
var test = project.Apply(project => Output.Create(AzureDevOps.Identities.GetGroup.InvokeAsync(new AzureDevOps.Identities.GetGroupArgs
{
ProjectId = project.Id,
Name = "Test Group",
})));
this.GroupId = test.Apply(test => test.Id);
this.GroupDescriptor = test.Apply(test => test.Descriptor);
}
[Output("groupId")]
public Output<string> GroupId { get; set; }
[Output("groupDescriptor")]
public Output<string> GroupDescriptor { get; set; }
}
package main
import (
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
project, err := Core.LookupProject(ctx, &Core.LookupProjectArgs{
ProjectName: "contoso-project",
}, nil)
if err != nil {
return err
}
test, err := Identities.LookupGroup(ctx, &Identities.LookupGroupArgs{
ProjectId: project.Id,
Name: "Test Group",
}, nil)
if err != nil {
return err
}
ctx.Export("groupId", test.Id)
ctx.Export("groupDescriptor", test.Descriptor)
return nil
})
}import pulumi
import pulumi_azuredevops as azuredevops
project = azuredevops.Core.get_project(project_name="contoso-project")
test = azuredevops.Identities.get_group(project_id=project.id,
name="Test Group")
pulumi.export("groupId", test.id)
pulumi.export("groupDescriptor", test.descriptor)import * as pulumi from "@pulumi/pulumi";
import * as azuredevops from "@pulumi/azuredevops";
const project = azuredevops.Core.getProject({
projectName: "contoso-project",
});
const test = project.then(project => azuredevops.Identities.getGroup({
projectId: project.id,
name: "Test Group",
}));
export const groupId = test.then(test => test.id);
export const groupDescriptor = test.then(test => test.descriptor);Using GetGroup
function getGroup(args: GetGroupArgs, opts?: InvokeOptions): Promise<GetGroupResult>function get_group(name=None, project_id=None, opts=None)func LookupGroup(ctx *Context, args *LookupGroupArgs, opts ...InvokeOption) (*LookupGroupResult, error)Note: This function is named
LookupGroupin the Go SDK.
public static class GetGroup {
public static Task<GetGroupResult> InvokeAsync(GetGroupArgs args, InvokeOptions? opts = null)
}The following arguments are supported:
- name str
The Group Name.
- project_
id str The Project Id.
GetGroup Result
The following output properties are available:
- descriptor str
The Descriptor is the primary way to reference the graph subject. This field will uniquely identify the same graph subject across both Accounts and Organizations.
- id str
The provider-assigned unique ID for this managed resource.
- name str
- project_
id str
Package Details
- Repository
- https://github.com/pulumi/pulumi-azuredevops
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azuredevopsTerraform Provider.