aws.identitystore.getGroup
Explore with Pulumi AI
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);
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)
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
	})
}
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),
    };
});
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()));
    }
}
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}
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>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]func LookupGroup(ctx *Context, args *LookupGroupArgs, opts ...InvokeOption) (*LookupGroupResult, error)
func LookupGroupOutput(ctx *Context, args *LookupGroupOutputArgs, opts ...InvokeOption) LookupGroupResultOutput> 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)
}public static CompletableFuture<GetGroupResult> getGroup(GetGroupArgs args, InvokeOptions options)
public static Output<GetGroupResult> getGroup(GetGroupArgs args, InvokeOptions options)
fn::invoke:
  function: aws:identitystore/getGroup:getGroup
  arguments:
    # arguments dictionaryThe following arguments are supported:
- IdentityStore stringId 
- Identity Store ID associated with the Single Sign-On Instance. - The following arguments are optional: 
- AlternateIdentifier GetGroup Alternate Identifier 
- A unique identifier for the group that is not the primary identifier. Conflicts with group_idandfilter. Detailed below.
- Filter
GetGroup Filter 
- Configuration block for filtering by a unique attribute of the group. Detailed below.
- GroupId string
- The identifier for a group in the Identity Store. - Exactly one of the above arguments must be provided. Passing both - filterand- group_idis allowed for backwards compatibility.
- IdentityStore stringId 
- Identity Store ID associated with the Single Sign-On Instance. - The following arguments are optional: 
- AlternateIdentifier GetGroup Alternate Identifier 
- A unique identifier for the group that is not the primary identifier. Conflicts with group_idandfilter. Detailed below.
- Filter
GetGroup Filter 
- Configuration block for filtering by a unique attribute of the group. Detailed below.
- GroupId string
- The identifier for a group in the Identity Store. - Exactly one of the above arguments must be provided. Passing both - filterand- group_idis allowed for backwards compatibility.
- identityStore StringId 
- Identity Store ID associated with the Single Sign-On Instance. - The following arguments are optional: 
- alternateIdentifier GetGroup Alternate Identifier 
- A unique identifier for the group that is not the primary identifier. Conflicts with group_idandfilter. Detailed below.
- filter
GetGroup Filter 
- Configuration block for filtering by a unique attribute of the group. Detailed below.
- groupId String
- The identifier for a group in the Identity Store. - Exactly one of the above arguments must be provided. Passing both - filterand- group_idis allowed for backwards compatibility.
- identityStore stringId 
- Identity Store ID associated with the Single Sign-On Instance. - The following arguments are optional: 
- alternateIdentifier GetGroup Alternate Identifier 
- A unique identifier for the group that is not the primary identifier. Conflicts with group_idandfilter. Detailed below.
- filter
GetGroup Filter 
- Configuration block for filtering by a unique attribute of the group. Detailed below.
- groupId string
- The identifier for a group in the Identity Store. - Exactly one of the above arguments must be provided. Passing both - filterand- group_idis allowed for backwards compatibility.
- identity_store_ strid 
- Identity Store ID associated with the Single Sign-On Instance. - The following arguments are optional: 
- alternate_identifier GetGroup Alternate Identifier 
- A unique identifier for the group that is not the primary identifier. Conflicts with group_idandfilter. Detailed below.
- filter
GetGroup Filter 
- Configuration block for filtering by a unique attribute of the group. Detailed below.
- group_id str
- The identifier for a group in the Identity Store. - Exactly one of the above arguments must be provided. Passing both - filterand- group_idis allowed for backwards compatibility.
- identityStore StringId 
- 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_idandfilter. Detailed below.
- filter Property Map
- Configuration block for filtering by a unique attribute of the group. Detailed below.
- groupId String
- The identifier for a group in the Identity Store. - Exactly one of the above arguments must be provided. Passing both - filterand- group_idis 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<GetGroup External Id> 
- 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.
- IdentityStore stringId 
- AlternateIdentifier GetGroup Alternate Identifier 
- Filter
GetGroup Filter 
- Description string
- Description of the specified group.
- DisplayName string
- Group's display name value.
- ExternalIds []GetGroup External Id 
- 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.
- IdentityStore stringId 
- AlternateIdentifier GetGroup Alternate Identifier 
- Filter
GetGroup Filter 
- description String
- Description of the specified group.
- displayName String
- Group's display name value.
- externalIds List<GetGroup External Id> 
- 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.
- identityStore StringId 
- alternateIdentifier GetGroup Alternate Identifier 
- filter
GetGroup Filter 
- description string
- Description of the specified group.
- displayName string
- Group's display name value.
- externalIds GetGroup External Id[] 
- 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.
- identityStore stringId 
- alternateIdentifier GetGroup Alternate Identifier 
- filter
GetGroup Filter 
- description str
- Description of the specified group.
- display_name str
- Group's display name value.
- external_ids Sequence[GetGroup External Id] 
- 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_ strid 
- alternate_identifier GetGroup Alternate Identifier 
- filter
GetGroup Filter 
- 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.
- identityStore StringId 
- alternateIdentifier Property Map
- filter Property Map
Supporting Types
GetGroupAlternateIdentifier   
- ExternalId GetGroup Alternate Identifier External Id 
- Configuration block for filtering by the identifier issued by an external identity provider. Detailed below.
- UniqueAttribute GetGroup Alternate Identifier Unique Attribute 
- An entity attribute that's unique to a specific entity. Detailed below. - Exactly one of the above arguments must be provided. 
- ExternalId GetGroup Alternate Identifier External Id 
- Configuration block for filtering by the identifier issued by an external identity provider. Detailed below.
- UniqueAttribute GetGroup Alternate Identifier Unique Attribute 
- An entity attribute that's unique to a specific entity. Detailed below. - Exactly one of the above arguments must be provided. 
- externalId GetGroup Alternate Identifier External Id 
- Configuration block for filtering by the identifier issued by an external identity provider. Detailed below.
- uniqueAttribute GetGroup Alternate Identifier Unique Attribute 
- An entity attribute that's unique to a specific entity. Detailed below. - Exactly one of the above arguments must be provided. 
- externalId GetGroup Alternate Identifier External Id 
- Configuration block for filtering by the identifier issued by an external identity provider. Detailed below.
- uniqueAttribute GetGroup Alternate Identifier Unique Attribute 
- An entity attribute that's unique to a specific entity. Detailed below. - Exactly one of the above arguments must be provided. 
- external_id GetGroup Alternate Identifier External Id 
- Configuration block for filtering by the identifier issued by an external identity provider. Detailed below.
- unique_attribute GetGroup Alternate Identifier Unique Attribute 
- 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     
GetGroupAlternateIdentifierUniqueAttribute     
- AttributePath string
- Attribute path that is used to specify which attribute name to search. For example: DisplayName. Refer to the Group data type.
- AttributeValue string
- Value for an attribute.
- AttributePath string
- Attribute path that is used to specify which attribute name to search. For example: DisplayName. Refer to the Group data type.
- AttributeValue string
- Value for an attribute.
- attributePath String
- Attribute path that is used to specify which attribute name to search. For example: DisplayName. Refer to the Group data type.
- attributeValue String
- Value for an attribute.
- attributePath string
- Attribute path that is used to specify which attribute name to search. For example: DisplayName. Refer to the Group data type.
- attributeValue string
- Value for an attribute.
- attribute_path str
- Attribute path that is used to specify which attribute name to search. For example: DisplayName. Refer to the Group data type.
- attribute_value str
- Value for an attribute.
- attributePath String
- Attribute path that is used to specify which attribute name to search. For example: DisplayName. Refer to the Group data type.
- attributeValue String
- Value for an attribute.
GetGroupExternalId   
GetGroupFilter  
- AttributePath string
- Attribute path that is used to specify which attribute name to search. Currently, DisplayNameis the only valid attribute path.
- AttributeValue string
- Value for an attribute.
- AttributePath string
- Attribute path that is used to specify which attribute name to search. Currently, DisplayNameis the only valid attribute path.
- AttributeValue string
- Value for an attribute.
- attributePath String
- Attribute path that is used to specify which attribute name to search. Currently, DisplayNameis the only valid attribute path.
- attributeValue String
- Value for an attribute.
- attributePath string
- Attribute path that is used to specify which attribute name to search. Currently, DisplayNameis the only valid attribute path.
- attributeValue string
- Value for an attribute.
- attribute_path str
- Attribute path that is used to specify which attribute name to search. Currently, DisplayNameis the only valid attribute path.
- attribute_value str
- Value for an attribute.
- attributePath String
- Attribute path that is used to specify which attribute name to search. Currently, DisplayNameis the only valid attribute path.
- attributeValue 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 awsTerraform Provider.