1. Packages
  2. AWS
  3. API Docs
  4. cognito
  5. getUserGroup
AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi

aws.cognito.getUserGroup

Explore with Pulumi AI

aws logo
AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi

    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/v6/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,
                       user_pool_id: Optional[str] = None,
                       opts: Optional[InvokeOptions] = None) -> GetUserGroupResult
    def get_user_group_output(name: 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)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: aws:cognito/getUserGroup:getUserGroup
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name string
    Name of the user group.
    UserPoolId string
    User pool the client belongs to.
    Name string
    Name of the user group.
    UserPoolId string
    User pool the client belongs to.
    name String
    Name of the user group.
    userPoolId String
    User pool the client belongs to.
    name string
    Name of the user group.
    userPoolId string
    User pool the client belongs to.
    name str
    Name of the user group.
    user_pool_id str
    User pool the client belongs to.
    name String
    Name of the user group.
    userPoolId String
    User pool the client belongs to.

    getUserGroup Result

    The following output properties are available:

    Description string
    Description of the user group.
    Id string
    A comma-delimited string concatenating name and user_pool_id.
    Name string
    Precedence int
    Precedence of the user group.
    RoleArn string
    ARN of the IAM role to be associated with the user group.
    UserPoolId string
    Description string
    Description of the user group.
    Id string
    A comma-delimited string concatenating name and user_pool_id.
    Name string
    Precedence int
    Precedence of the user group.
    RoleArn string
    ARN of the IAM role to be associated with the user group.
    UserPoolId string
    description String
    Description of the user group.
    id String
    A comma-delimited string concatenating name and user_pool_id.
    name String
    precedence Integer
    Precedence of the user group.
    roleArn String
    ARN of the IAM role to be associated with the user group.
    userPoolId String
    description string
    Description of the user group.
    id string
    A comma-delimited string concatenating name and user_pool_id.
    name string
    precedence number
    Precedence of the user group.
    roleArn string
    ARN of the IAM role to be associated with the user group.
    userPoolId string
    description str
    Description of the user group.
    id str
    A comma-delimited string concatenating name and user_pool_id.
    name str
    precedence int
    Precedence of the user group.
    role_arn str
    ARN of the IAM role to be associated with the user group.
    user_pool_id str
    description String
    Description of the user group.
    id String
    A comma-delimited string concatenating name and user_pool_id.
    name String
    precedence Number
    Precedence of the user group.
    roleArn String
    ARN of the IAM role to be associated with the user group.
    userPoolId String

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo
    AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi