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

aws.identitystore.getGroup

Explore with Pulumi AI

aws logo
AWS v6.60.0 published on Tuesday, Nov 19, 2024 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);
    
    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)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: aws:identitystore/getGroup:getGroup
      arguments:
        # arguments dictionary

    The following arguments are supported:

    IdentityStoreId 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: Use the alternate_identifier attribute 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 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: Use the alternate_identifier attribute 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 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: Use the alternate_identifier attribute 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 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: Use the alternate_identifier attribute 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 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: Use the alternate_identifier attribute 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 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: Use the alternate_identifier attribute 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: Use the alternate_identifier attribute 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: Use the alternate_identifier attribute 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: Use the alternate_identifier attribute 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: Use the alternate_identifier attribute 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: Use the alternate_identifier attribute 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: Use the alternate_identifier attribute 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 string
    The identifier issued to this resource by an external identity provider.
    Issuer string
    The issuer for an external identifier.
    Id string
    The identifier issued to this resource by an external identity provider.
    Issuer string
    The issuer for an external identifier.
    id String
    The identifier issued to this resource by an external identity provider.
    issuer String
    The issuer for an external identifier.
    id string
    The identifier issued to this resource by an external identity provider.
    issuer string
    The issuer for an external identifier.
    id str
    The identifier issued to this resource by an external identity provider.
    issuer str
    The issuer for an external identifier.
    id String
    The identifier issued to this resource by an external identity provider.
    issuer String
    The issuer for an external identifier.

    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

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

    GetGroupFilter

    AttributePath string
    Attribute path that is used to specify which attribute name to search. Currently, DisplayName is 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, DisplayName is 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, DisplayName is 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, DisplayName is 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, DisplayName is 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, DisplayName is 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 aws Terraform Provider.
    aws logo
    AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi