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/v2/go/aws/iam"
"github.com/pulumi/pulumi/sdk/v2/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>function get_group(group_name=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:
- 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.
- Group
Id string The stable and unique string identifying the group.
- Group
Name string - Id string
The provider-assigned unique ID for this managed resource.
- Path string
The path to the iam user.
- Users
List<Get
Group User> List of objects containing group member information. See supported fields below.
- Arn string
The Amazon Resource Name (ARN) specifying the iam user.
- Group
Id string The stable and unique string identifying the group.
- Group
Name string - Id string
The provider-assigned unique ID for this managed resource.
- Path string
The path to the iam user.
- Users
[]Get
Group User List of objects containing group member information. See supported fields below.
- arn string
The Amazon Resource Name (ARN) specifying the iam user.
- group
Id string The stable and unique string identifying the group.
- group
Name string - id string
The provider-assigned unique ID for this managed resource.
- path string
The path to the iam user.
- users
Get
Group User[] 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
List[Get
Group User] List of objects containing group member information. See supported fields below.
Supporting Types
GetGroupUser
See the output API doc for this type.
See the output API doc for this type.
See the output API doc for this type.
Package Details
- Repository
- https://github.com/pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
awsTerraform Provider.