AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi
aws.cognito.getUserGroups
Explore with Pulumi AI
Data source for managing AWS Cognito IDP (Identity Provider) User Groups.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = aws.cognito.getUserGroups({
userPoolId: "us-west-2_aaaaaaaaa",
});
import pulumi
import pulumi_aws as aws
example = aws.cognito.get_user_groups(user_pool_id="us-west-2_aaaaaaaaa")
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/cognito"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := cognito.GetUserGroups(ctx, &cognito.GetUserGroupsArgs{
UserPoolId: "us-west-2_aaaaaaaaa",
}, 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.GetUserGroups.Invoke(new()
{
UserPoolId = "us-west-2_aaaaaaaaa",
});
});
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.GetUserGroupsArgs;
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.getUserGroups(GetUserGroupsArgs.builder()
.userPoolId("us-west-2_aaaaaaaaa")
.build());
}
}
variables:
example:
fn::invoke:
Function: aws:cognito:getUserGroups
Arguments:
userPoolId: us-west-2_aaaaaaaaa
Using getUserGroups
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 getUserGroups(args: GetUserGroupsArgs, opts?: InvokeOptions): Promise<GetUserGroupsResult>
function getUserGroupsOutput(args: GetUserGroupsOutputArgs, opts?: InvokeOptions): Output<GetUserGroupsResult>
def get_user_groups(user_pool_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetUserGroupsResult
def get_user_groups_output(user_pool_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetUserGroupsResult]
func GetUserGroups(ctx *Context, args *GetUserGroupsArgs, opts ...InvokeOption) (*GetUserGroupsResult, error)
func GetUserGroupsOutput(ctx *Context, args *GetUserGroupsOutputArgs, opts ...InvokeOption) GetUserGroupsResultOutput
> Note: This function is named GetUserGroups
in the Go SDK.
public static class GetUserGroups
{
public static Task<GetUserGroupsResult> InvokeAsync(GetUserGroupsArgs args, InvokeOptions? opts = null)
public static Output<GetUserGroupsResult> Invoke(GetUserGroupsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetUserGroupsResult> getUserGroups(GetUserGroupsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: aws:cognito/getUserGroups:getUserGroups
arguments:
# arguments dictionary
The following arguments are supported:
- User
Pool stringId - User pool the client belongs to.
- User
Pool stringId - User pool the client belongs to.
- user
Pool StringId - User pool the client belongs to.
- user
Pool stringId - User pool the client belongs to.
- user_
pool_ strid - User pool the client belongs to.
- user
Pool StringId - User pool the client belongs to.
getUserGroups Result
The following output properties are available:
- Groups
List<Get
User Groups Group> - List of groups. See
groups
below. - Id string
- User pool identifier.
- User
Pool stringId
- Groups
[]Get
User Groups Group - List of groups. See
groups
below. - Id string
- User pool identifier.
- User
Pool stringId
- groups
List<Get
User Groups Group> - List of groups. See
groups
below. - id String
- User pool identifier.
- user
Pool StringId
- groups
Get
User Groups Group[] - List of groups. See
groups
below. - id string
- User pool identifier.
- user
Pool stringId
- groups
Sequence[Get
User Groups Group] - List of groups. See
groups
below. - id str
- User pool identifier.
- user_
pool_ strid
- groups List<Property Map>
- List of groups. See
groups
below. - id String
- User pool identifier.
- user
Pool StringId
Supporting Types
GetUserGroupsGroup
- Description string
- Description of the user group.
- Group
Name string - Name of the user group.
- Precedence int
- Precedence of the user group.
- Role
Arn string - ARN of the IAM role to be associated with the user group.
- Description string
- Description of the user group.
- Group
Name string - Name of the user group.
- Precedence int
- Precedence of the user group.
- Role
Arn string - ARN of the IAM role to be associated with the user group.
- description String
- Description of the user group.
- group
Name String - Name of the user group.
- precedence Integer
- Precedence of the user group.
- role
Arn String - ARN of the IAM role to be associated with the user group.
- description string
- Description of the user group.
- group
Name string - Name of the user group.
- precedence number
- Precedence of the user group.
- role
Arn string - ARN of the IAM role to be associated with the user group.
- description str
- Description of the user group.
- group_
name str - Name of the user group.
- precedence int
- Precedence of the user group.
- role_
arn str - ARN of the IAM role to be associated with the user group.
- description String
- Description of the user group.
- group
Name String - Name of the user group.
- precedence Number
- Precedence of the user group.
- role
Arn String - ARN of the IAM role to be associated with the user group.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
aws
Terraform Provider.