AWS v7.10.0 published on Friday, Oct 24, 2025 by Pulumi
aws.cognito.getUserGroup
Data source for managing an AWS Cognito IDP (Identity Provider) User Group.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = aws.cognito.getUserGroup({
userPoolId: "us-west-2_aaaaaaaaa",
name: "example",
});
import pulumi
import pulumi_aws as aws
example = aws.cognito.get_user_group(user_pool_id="us-west-2_aaaaaaaaa",
name="example")
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/cognito"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := cognito.LookupUserGroup(ctx, &cognito.LookupUserGroupArgs{
UserPoolId: "us-west-2_aaaaaaaaa",
Name: "example",
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = Aws.Cognito.GetUserGroup.Invoke(new()
{
UserPoolId = "us-west-2_aaaaaaaaa",
Name = "example",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.cognito.CognitoFunctions;
import com.pulumi.aws.cognito.inputs.GetUserGroupArgs;
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 = CognitoFunctions.getUserGroup(GetUserGroupArgs.builder()
.userPoolId("us-west-2_aaaaaaaaa")
.name("example")
.build());
}
}
variables:
example:
fn::invoke:
function: aws:cognito:getUserGroup
arguments:
userPoolId: us-west-2_aaaaaaaaa
name: example
Using getUserGroup
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 getUserGroup(args: GetUserGroupArgs, opts?: InvokeOptions): Promise<GetUserGroupResult>
function getUserGroupOutput(args: GetUserGroupOutputArgs, opts?: InvokeOptions): Output<GetUserGroupResult>def get_user_group(name: Optional[str] = None,
region: Optional[str] = None,
user_pool_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetUserGroupResult
def get_user_group_output(name: Optional[pulumi.Input[str]] = None,
region: Optional[pulumi.Input[str]] = None,
user_pool_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetUserGroupResult]func LookupUserGroup(ctx *Context, args *LookupUserGroupArgs, opts ...InvokeOption) (*LookupUserGroupResult, error)
func LookupUserGroupOutput(ctx *Context, args *LookupUserGroupOutputArgs, opts ...InvokeOption) LookupUserGroupResultOutput> Note: This function is named LookupUserGroup in the Go SDK.
public static class GetUserGroup
{
public static Task<GetUserGroupResult> InvokeAsync(GetUserGroupArgs args, InvokeOptions? opts = null)
public static Output<GetUserGroupResult> Invoke(GetUserGroupInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetUserGroupResult> getUserGroup(GetUserGroupArgs args, InvokeOptions options)
public static Output<GetUserGroupResult> getUserGroup(GetUserGroupArgs args, InvokeOptions options)
fn::invoke:
function: aws:cognito/getUserGroup:getUserGroup
arguments:
# arguments dictionaryThe following arguments are supported:
- Name string
- Name of the user group.
- User
Pool stringId - User pool the client belongs to.
- Region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- Name string
- Name of the user group.
- User
Pool stringId - User pool the client belongs to.
- Region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- name String
- Name of the user group.
- user
Pool StringId - User pool the client belongs to.
- region String
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- name string
- Name of the user group.
- user
Pool stringId - User pool the client belongs to.
- region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- name str
- Name of the user group.
- user_
pool_ strid - User pool the client belongs to.
- region str
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- name String
- Name of the user group.
- user
Pool StringId - User pool the client belongs to.
- region String
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
getUserGroup Result
The following output properties are available:
- Description string
- Description of the user group.
- Id string
- A comma-delimited string concatenating
nameanduser_pool_id. - Name string
- Precedence int
- Precedence of the user group.
- Region string
- Role
Arn string - ARN of the IAM role to be associated with the user group.
- User
Pool stringId
- Description string
- Description of the user group.
- Id string
- A comma-delimited string concatenating
nameanduser_pool_id. - Name string
- Precedence int
- Precedence of the user group.
- Region string
- Role
Arn string - ARN of the IAM role to be associated with the user group.
- User
Pool stringId
- description String
- Description of the user group.
- id String
- A comma-delimited string concatenating
nameanduser_pool_id. - name String
- precedence Integer
- Precedence of the user group.
- region String
- role
Arn String - ARN of the IAM role to be associated with the user group.
- user
Pool StringId
- description string
- Description of the user group.
- id string
- A comma-delimited string concatenating
nameanduser_pool_id. - name string
- precedence number
- Precedence of the user group.
- region string
- role
Arn string - ARN of the IAM role to be associated with the user group.
- user
Pool stringId
- description str
- Description of the user group.
- id str
- A comma-delimited string concatenating
nameanduser_pool_id. - name str
- precedence int
- Precedence of the user group.
- region str
- role_
arn str - ARN of the IAM role to be associated with the user group.
- user_
pool_ strid
- description String
- Description of the user group.
- id String
- A comma-delimited string concatenating
nameanduser_pool_id. - name String
- precedence Number
- Precedence of the user group.
- region String
- role
Arn String - ARN of the IAM role to be associated with the user group.
- user
Pool StringId
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
awsTerraform Provider.
