1. Packages
  2. AWS
  3. API Docs
  4. identitystore
  5. getGroup
AWS v6.74.0 published on Wednesday, Mar 26, 2025 by Pulumi

aws.identitystore.getGroup

Explore with Pulumi AI

AWS v6.74.0 published on Wednesday, Mar 26, 2025 by Pulumi

Use this data source to get an Identity Store Group.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = aws.ssoadmin.getInstances({});
const exampleGetGroup = example.then(example => aws.identitystore.getGroup({
    identityStoreId: example.identityStoreIds?.[0],
    alternateIdentifier: {
        uniqueAttribute: {
            attributePath: "DisplayName",
            attributeValue: "ExampleGroup",
        },
    },
}));
export const groupId = exampleGetGroup.then(exampleGetGroup => exampleGetGroup.groupId);
Copy
import pulumi
import pulumi_aws as aws

example = aws.ssoadmin.get_instances()
example_get_group = aws.identitystore.get_group(identity_store_id=example.identity_store_ids[0],
    alternate_identifier={
        "unique_attribute": {
            "attribute_path": "DisplayName",
            "attribute_value": "ExampleGroup",
        },
    })
pulumi.export("groupId", example_get_group.group_id)
Copy
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/identitystore"
	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ssoadmin"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		example, err := ssoadmin.GetInstances(ctx, map[string]interface{}{}, nil)
		if err != nil {
			return err
		}
		exampleGetGroup, err := identitystore.LookupGroup(ctx, &identitystore.LookupGroupArgs{
			IdentityStoreId: example.IdentityStoreIds[0],
			AlternateIdentifier: identitystore.GetGroupAlternateIdentifier{
				UniqueAttribute: identitystore.GetGroupAlternateIdentifierUniqueAttribute{
					AttributePath:  "DisplayName",
					AttributeValue: "ExampleGroup",
				},
			},
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("groupId", exampleGetGroup.GroupId)
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var example = Aws.SsoAdmin.GetInstances.Invoke();

    var exampleGetGroup = Aws.IdentityStore.GetGroup.Invoke(new()
    {
        IdentityStoreId = example.Apply(getInstancesResult => getInstancesResult.IdentityStoreIds[0]),
        AlternateIdentifier = new Aws.IdentityStore.Inputs.GetGroupAlternateIdentifierInputArgs
        {
            UniqueAttribute = new Aws.IdentityStore.Inputs.GetGroupAlternateIdentifierUniqueAttributeInputArgs
            {
                AttributePath = "DisplayName",
                AttributeValue = "ExampleGroup",
            },
        },
    });

    return new Dictionary<string, object?>
    {
        ["groupId"] = exampleGetGroup.Apply(getGroupResult => getGroupResult.GroupId),
    };
});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ssoadmin.SsoadminFunctions;
import com.pulumi.aws.identitystore.IdentitystoreFunctions;
import com.pulumi.aws.identitystore.inputs.GetGroupArgs;
import com.pulumi.aws.identitystore.inputs.GetGroupAlternateIdentifierArgs;
import com.pulumi.aws.identitystore.inputs.GetGroupAlternateIdentifierUniqueAttributeArgs;
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 = SsoadminFunctions.getInstances();

        final var exampleGetGroup = IdentitystoreFunctions.getGroup(GetGroupArgs.builder()
            .identityStoreId(example.applyValue(getInstancesResult -> getInstancesResult.identityStoreIds()[0]))
            .alternateIdentifier(GetGroupAlternateIdentifierArgs.builder()
                .uniqueAttribute(GetGroupAlternateIdentifierUniqueAttributeArgs.builder()
                    .attributePath("DisplayName")
                    .attributeValue("ExampleGroup")
                    .build())
                .build())
            .build());

        ctx.export("groupId", exampleGetGroup.applyValue(getGroupResult -> getGroupResult.groupId()));
    }
}
Copy
variables:
  example:
    fn::invoke:
      function: aws:ssoadmin:getInstances
      arguments: {}
  exampleGetGroup:
    fn::invoke:
      function: aws:identitystore:getGroup
      arguments:
        identityStoreId: ${example.identityStoreIds[0]}
        alternateIdentifier:
          uniqueAttribute:
            attributePath: DisplayName
            attributeValue: ExampleGroup
outputs:
  groupId: ${exampleGetGroup.groupId}
Copy

Using getGroup

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 getGroup(args: GetGroupArgs, opts?: InvokeOptions): Promise<GetGroupResult>
function getGroupOutput(args: GetGroupOutputArgs, opts?: InvokeOptions): Output<GetGroupResult>
Copy
def get_group(alternate_identifier: Optional[GetGroupAlternateIdentifier] = None,
              filter: Optional[GetGroupFilter] = None,
              group_id: Optional[str] = None,
              identity_store_id: Optional[str] = None,
              opts: Optional[InvokeOptions] = None) -> GetGroupResult
def get_group_output(alternate_identifier: Optional[pulumi.Input[GetGroupAlternateIdentifierArgs]] = None,
              filter: Optional[pulumi.Input[GetGroupFilterArgs]] = None,
              group_id: Optional[pulumi.Input[str]] = None,
              identity_store_id: Optional[pulumi.Input[str]] = None,
              opts: Optional[InvokeOptions] = None) -> Output[GetGroupResult]
Copy
func LookupGroup(ctx *Context, args *LookupGroupArgs, opts ...InvokeOption) (*LookupGroupResult, error)
func LookupGroupOutput(ctx *Context, args *LookupGroupOutputArgs, opts ...InvokeOption) LookupGroupResultOutput
Copy

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

public static class GetGroup 
{
    public static Task<GetGroupResult> InvokeAsync(GetGroupArgs args, InvokeOptions? opts = null)
    public static Output<GetGroupResult> Invoke(GetGroupInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetGroupResult> getGroup(GetGroupArgs args, InvokeOptions options)
public static Output<GetGroupResult> getGroup(GetGroupArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: aws:identitystore/getGroup:getGroup
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

IdentityStoreId This property is required. string

Identity Store ID associated with the Single Sign-On Instance.

The following arguments are optional:

AlternateIdentifier GetGroupAlternateIdentifier
A unique identifier for the group that is not the primary identifier. Conflicts with group_id and filter. Detailed below.
Filter GetGroupFilter
Configuration block for filtering by a unique attribute of the group. Detailed below.

Deprecated: filter is deprecated. Use alternate_identifier instead.

GroupId string

The identifier for a group in the Identity Store.

Exactly one of the above arguments must be provided. Passing both filter and group_id is allowed for backwards compatibility.

IdentityStoreId This property is required. string

Identity Store ID associated with the Single Sign-On Instance.

The following arguments are optional:

AlternateIdentifier GetGroupAlternateIdentifier
A unique identifier for the group that is not the primary identifier. Conflicts with group_id and filter. Detailed below.
Filter GetGroupFilter
Configuration block for filtering by a unique attribute of the group. Detailed below.

Deprecated: filter is deprecated. Use alternate_identifier instead.

GroupId string

The identifier for a group in the Identity Store.

Exactly one of the above arguments must be provided. Passing both filter and group_id is allowed for backwards compatibility.

identityStoreId This property is required. String

Identity Store ID associated with the Single Sign-On Instance.

The following arguments are optional:

alternateIdentifier GetGroupAlternateIdentifier
A unique identifier for the group that is not the primary identifier. Conflicts with group_id and filter. Detailed below.
filter GetGroupFilter
Configuration block for filtering by a unique attribute of the group. Detailed below.

Deprecated: filter is deprecated. Use alternate_identifier instead.

groupId String

The identifier for a group in the Identity Store.

Exactly one of the above arguments must be provided. Passing both filter and group_id is allowed for backwards compatibility.

identityStoreId This property is required. string

Identity Store ID associated with the Single Sign-On Instance.

The following arguments are optional:

alternateIdentifier GetGroupAlternateIdentifier
A unique identifier for the group that is not the primary identifier. Conflicts with group_id and filter. Detailed below.
filter GetGroupFilter
Configuration block for filtering by a unique attribute of the group. Detailed below.

Deprecated: filter is deprecated. Use alternate_identifier instead.

groupId string

The identifier for a group in the Identity Store.

Exactly one of the above arguments must be provided. Passing both filter and group_id is allowed for backwards compatibility.

identity_store_id This property is required. str

Identity Store ID associated with the Single Sign-On Instance.

The following arguments are optional:

alternate_identifier GetGroupAlternateIdentifier
A unique identifier for the group that is not the primary identifier. Conflicts with group_id and filter. Detailed below.
filter GetGroupFilter
Configuration block for filtering by a unique attribute of the group. Detailed below.

Deprecated: filter is deprecated. Use alternate_identifier instead.

group_id str

The identifier for a group in the Identity Store.

Exactly one of the above arguments must be provided. Passing both filter and group_id is allowed for backwards compatibility.

identityStoreId This property is required. String

Identity Store ID associated with the Single Sign-On Instance.

The following arguments are optional:

alternateIdentifier Property Map
A unique identifier for the group that is not the primary identifier. Conflicts with group_id and filter. Detailed below.
filter Property Map
Configuration block for filtering by a unique attribute of the group. Detailed below.

Deprecated: filter is deprecated. Use alternate_identifier instead.

groupId String

The identifier for a group in the Identity Store.

Exactly one of the above arguments must be provided. Passing both filter and group_id is allowed for backwards compatibility.

getGroup Result

The following output properties are available:

Description string
Description of the specified group.
DisplayName string
Group's display name value.
ExternalIds List<GetGroupExternalId>
List of identifiers issued to this resource by an external identity provider.
GroupId string
Id string
The provider-assigned unique ID for this managed resource.
IdentityStoreId string
AlternateIdentifier GetGroupAlternateIdentifier
Filter GetGroupFilter

Deprecated: filter is deprecated. Use alternate_identifier instead.

Description string
Description of the specified group.
DisplayName string
Group's display name value.
ExternalIds []GetGroupExternalId
List of identifiers issued to this resource by an external identity provider.
GroupId string
Id string
The provider-assigned unique ID for this managed resource.
IdentityStoreId string
AlternateIdentifier GetGroupAlternateIdentifier
Filter GetGroupFilter

Deprecated: filter is deprecated. Use alternate_identifier instead.

description String
Description of the specified group.
displayName String
Group's display name value.
externalIds List<GetGroupExternalId>
List of identifiers issued to this resource by an external identity provider.
groupId String
id String
The provider-assigned unique ID for this managed resource.
identityStoreId String
alternateIdentifier GetGroupAlternateIdentifier
filter GetGroupFilter

Deprecated: filter is deprecated. Use alternate_identifier instead.

description string
Description of the specified group.
displayName string
Group's display name value.
externalIds GetGroupExternalId[]
List of identifiers issued to this resource by an external identity provider.
groupId string
id string
The provider-assigned unique ID for this managed resource.
identityStoreId string
alternateIdentifier GetGroupAlternateIdentifier
filter GetGroupFilter

Deprecated: filter is deprecated. Use alternate_identifier instead.

description str
Description of the specified group.
display_name str
Group's display name value.
external_ids Sequence[GetGroupExternalId]
List of identifiers issued to this resource by an external identity provider.
group_id str
id str
The provider-assigned unique ID for this managed resource.
identity_store_id str
alternate_identifier GetGroupAlternateIdentifier
filter GetGroupFilter

Deprecated: filter is deprecated. Use alternate_identifier instead.

description String
Description of the specified group.
displayName String
Group's display name value.
externalIds List<Property Map>
List of identifiers issued to this resource by an external identity provider.
groupId String
id String
The provider-assigned unique ID for this managed resource.
identityStoreId String
alternateIdentifier Property Map
filter Property Map

Deprecated: filter is deprecated. Use alternate_identifier instead.

Supporting Types

GetGroupAlternateIdentifier

ExternalId GetGroupAlternateIdentifierExternalId
Configuration block for filtering by the identifier issued by an external identity provider. Detailed below.
UniqueAttribute GetGroupAlternateIdentifierUniqueAttribute

An entity attribute that's unique to a specific entity. Detailed below.

Exactly one of the above arguments must be provided.

ExternalId GetGroupAlternateIdentifierExternalId
Configuration block for filtering by the identifier issued by an external identity provider. Detailed below.
UniqueAttribute GetGroupAlternateIdentifierUniqueAttribute

An entity attribute that's unique to a specific entity. Detailed below.

Exactly one of the above arguments must be provided.

externalId GetGroupAlternateIdentifierExternalId
Configuration block for filtering by the identifier issued by an external identity provider. Detailed below.
uniqueAttribute GetGroupAlternateIdentifierUniqueAttribute

An entity attribute that's unique to a specific entity. Detailed below.

Exactly one of the above arguments must be provided.

externalId GetGroupAlternateIdentifierExternalId
Configuration block for filtering by the identifier issued by an external identity provider. Detailed below.
uniqueAttribute GetGroupAlternateIdentifierUniqueAttribute

An entity attribute that's unique to a specific entity. Detailed below.

Exactly one of the above arguments must be provided.

external_id GetGroupAlternateIdentifierExternalId
Configuration block for filtering by the identifier issued by an external identity provider. Detailed below.
unique_attribute GetGroupAlternateIdentifierUniqueAttribute

An entity attribute that's unique to a specific entity. Detailed below.

Exactly one of the above arguments must be provided.

externalId Property Map
Configuration block for filtering by the identifier issued by an external identity provider. Detailed below.
uniqueAttribute Property Map

An entity attribute that's unique to a specific entity. Detailed below.

Exactly one of the above arguments must be provided.

GetGroupAlternateIdentifierExternalId

Id This property is required. string
The identifier issued to this resource by an external identity provider.
Issuer This property is required. string
The issuer for an external identifier.
Id This property is required. string
The identifier issued to this resource by an external identity provider.
Issuer This property is required. string
The issuer for an external identifier.
id This property is required. String
The identifier issued to this resource by an external identity provider.
issuer This property is required. String
The issuer for an external identifier.
id This property is required. string
The identifier issued to this resource by an external identity provider.
issuer This property is required. string
The issuer for an external identifier.
id This property is required. str
The identifier issued to this resource by an external identity provider.
issuer This property is required. str
The issuer for an external identifier.
id This property is required. String
The identifier issued to this resource by an external identity provider.
issuer This property is required. String
The issuer for an external identifier.

GetGroupAlternateIdentifierUniqueAttribute

AttributePath This property is required. string
Attribute path that is used to specify which attribute name to search. For example: DisplayName. Refer to the Group data type.
AttributeValue This property is required. string
Value for an attribute.
AttributePath This property is required. string
Attribute path that is used to specify which attribute name to search. For example: DisplayName. Refer to the Group data type.
AttributeValue This property is required. string
Value for an attribute.
attributePath This property is required. String
Attribute path that is used to specify which attribute name to search. For example: DisplayName. Refer to the Group data type.
attributeValue This property is required. String
Value for an attribute.
attributePath This property is required. string
Attribute path that is used to specify which attribute name to search. For example: DisplayName. Refer to the Group data type.
attributeValue This property is required. string
Value for an attribute.
attribute_path This property is required. str
Attribute path that is used to specify which attribute name to search. For example: DisplayName. Refer to the Group data type.
attribute_value This property is required. str
Value for an attribute.
attributePath This property is required. String
Attribute path that is used to specify which attribute name to search. For example: DisplayName. Refer to the Group data type.
attributeValue This property is required. String
Value for an attribute.

GetGroupExternalId

Id This property is required. string
The identifier issued to this resource by an external identity provider.
Issuer This property is required. string
The issuer for an external identifier.
Id This property is required. string
The identifier issued to this resource by an external identity provider.
Issuer This property is required. string
The issuer for an external identifier.
id This property is required. String
The identifier issued to this resource by an external identity provider.
issuer This property is required. String
The issuer for an external identifier.
id This property is required. string
The identifier issued to this resource by an external identity provider.
issuer This property is required. string
The issuer for an external identifier.
id This property is required. str
The identifier issued to this resource by an external identity provider.
issuer This property is required. str
The issuer for an external identifier.
id This property is required. String
The identifier issued to this resource by an external identity provider.
issuer This property is required. String
The issuer for an external identifier.

GetGroupFilter

AttributePath This property is required. string
Attribute path that is used to specify which attribute name to search. Currently, DisplayName is the only valid attribute path.
AttributeValue This property is required. string
Value for an attribute.
AttributePath This property is required. string
Attribute path that is used to specify which attribute name to search. Currently, DisplayName is the only valid attribute path.
AttributeValue This property is required. string
Value for an attribute.
attributePath This property is required. String
Attribute path that is used to specify which attribute name to search. Currently, DisplayName is the only valid attribute path.
attributeValue This property is required. String
Value for an attribute.
attributePath This property is required. string
Attribute path that is used to specify which attribute name to search. Currently, DisplayName is the only valid attribute path.
attributeValue This property is required. string
Value for an attribute.
attribute_path This property is required. str
Attribute path that is used to specify which attribute name to search. Currently, DisplayName is the only valid attribute path.
attribute_value This property is required. str
Value for an attribute.
attributePath This property is required. String
Attribute path that is used to specify which attribute name to search. Currently, DisplayName is the only valid attribute path.
attributeValue This property is required. String
Value for an attribute.

Package Details

Repository
AWS Classic pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.
AWS v6.74.0 published on Wednesday, Mar 26, 2025 by Pulumi