getGroup

This data source can be used to fetch information about a specific IAM group. By using this data source, you can reference IAM group properties without having to hard code ARNs as input.

Example Usage

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var example = Output.Create(Aws.Iam.GetGroup.InvokeAsync(new Aws.Iam.GetGroupArgs
        {
            GroupName = "an_example_group_name",
        }));
    }

}
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v4/go/aws/iam"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := iam.LookupGroup(ctx, &iam.LookupGroupArgs{
			GroupName: "an_example_group_name",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
import pulumi
import pulumi_aws as aws

example = aws.iam.get_group(group_name="an_example_group_name")
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = pulumi.output(aws.iam.getGroup({
    groupName: "an_example_group_name",
}, { async: true }));

Using getGroup

function getGroup(args: GetGroupArgs, opts?: InvokeOptions): Promise<GetGroupResult>
def get_group(group_name: Optional[str] = None,
              opts: Optional[InvokeOptions] = None) -> GetGroupResult
func LookupGroup(ctx *Context, args *LookupGroupArgs, opts ...InvokeOption) (*LookupGroupResult, error)

Note: This function is named LookupGroup in the Go SDK.

public static class GetGroup {
    public static Task<GetGroupResult> InvokeAsync(GetGroupArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

GroupName string
The friendly IAM group name to match.
GroupName string
The friendly IAM group name to match.
groupName string
The friendly IAM group name to match.
group_name str
The friendly IAM group name to match.

getGroup Result

The following output properties are available:

Arn string
The Amazon Resource Name (ARN) specifying the iam user.
GroupId string
The stable and unique string identifying the group.
GroupName string
Id string
The provider-assigned unique ID for this managed resource.
Path string
The path to the iam user.
Users List<GetGroupUser>
List of objects containing group member information. See supported fields below.
Arn string
The Amazon Resource Name (ARN) specifying the iam user.
GroupId string
The stable and unique string identifying the group.
GroupName string
Id string
The provider-assigned unique ID for this managed resource.
Path string
The path to the iam user.
Users []GetGroupUser
List of objects containing group member information. See supported fields below.
arn string
The Amazon Resource Name (ARN) specifying the iam user.
groupId string
The stable and unique string identifying the group.
groupName string
id string
The provider-assigned unique ID for this managed resource.
path string
The path to the iam user.
users GetGroupUser[]
List of objects containing group member information. See supported fields below.
arn str
The Amazon Resource Name (ARN) specifying the iam user.
group_id str
The stable and unique string identifying the group.
group_name str
id str
The provider-assigned unique ID for this managed resource.
path str
The path to the iam user.
users Sequence[GetGroupUser]
List of objects containing group member information. See supported fields below.

Supporting Types

GetGroupUser

Arn string
The Amazon Resource Name (ARN) specifying the iam user.
Path string
The path to the iam user.
UserId string
The stable and unique string identifying the iam user.
UserName string
The name of the iam user.
Arn string
The Amazon Resource Name (ARN) specifying the iam user.
Path string
The path to the iam user.
UserId string
The stable and unique string identifying the iam user.
UserName string
The name of the iam user.
arn string
The Amazon Resource Name (ARN) specifying the iam user.
path string
The path to the iam user.
userId string
The stable and unique string identifying the iam user.
userName string
The name of the iam user.
arn str
The Amazon Resource Name (ARN) specifying the iam user.
path str
The path to the iam user.
user_id str
The stable and unique string identifying the iam user.
user_name str
The name of the iam user.

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.