Skip to content

get_group_id

get_group_id(
    identity_store_id: IdentityStoreId,
    alternate_identifier: AlternateIdentifier,
    *,
    config_overrides: Optional[identitystoreClientConfig] = None,
) -> GetGroupIdResponse

Retrieves GroupId in an identity store.

If you have access to a member account, you can use this API operation from the member account. For more information, see Limiting access to the identity store from member accounts in the IAM Identity Center User Guide.

Parameters:

  • identity_store_id (IdentityStoreId) –

    The globally unique identifier for the identity store.

    You can specify the identity store by ID or by Amazon Resource Name (ARN). For example, identity store ID d-1234567890 or identity store ARN arn:aws:identitystore::111122223333:identitystore/d-1234567890.

  • alternate_identifier (AlternateIdentifier) –

    A unique identifier for a user or group that is not the primary identifier. This value can be an identifier from an external identity provider (IdP) that is associated with the user, the group, or a unique attribute. For the unique attribute, the only valid path is displayName.

Raises:

Source code in docs_src/capo_identitystore/_services/identitystore.py
def get_group_id(
    self,
    identity_store_id: "capo_identitystore.types.identity_store_id.IdentityStoreId",
    alternate_identifier: "capo_identitystore.types.alternate_identifier.AlternateIdentifier",
    *,
    config_overrides: Optional[identitystoreClientConfig] = None,
) -> "capo_identitystore.types.get_group_id_response.GetGroupIdResponse":
    """<p>Retrieves <code>GroupId</code> in an identity store.</p> <note> <p>If you have access to a member account, you can use this API operation from the member account. For more information, see <a href="https://docs.aws.amazon.com/singlesignon/latest/userguide/manage-your-accounts.html#limiting-access-from-member-accounts">Limiting access to the identity store from member accounts</a> in the <i> IAM Identity Center User Guide</i>.</p> </note>

    Args:
        identity_store_id: <p>The globally unique identifier for the identity store.</p> <p>You can specify the identity store by ID or by Amazon Resource Name (ARN). For example, identity store ID <code>d-1234567890</code> or identity store ARN <code>arn:aws:identitystore::111122223333:identitystore/d-1234567890</code>.</p>
        alternate_identifier: <p>A unique identifier for a user or group that is not the primary identifier. This value can be an identifier from an external identity provider (IdP) that is associated with the user, the group, or a unique attribute. For the unique attribute, the only valid path is <code> displayName</code>.</p>

    Raises:
        capo_identitystore.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
        capo_identitystore.errors.internal_server_exception.InternalServerException: <p>The request processing has failed because of an unknown error, exception or failure with an internal server.</p>
        capo_identitystore.errors.throttling_exception.ThrottlingException: <p>Indicates that the principal has crossed the throttling limits of the API operations.</p>
        capo_identitystore.errors.resource_not_found_exception.ResourceNotFoundException: <p>Indicates that a requested resource is not found.</p>
        capo_identitystore.errors.validation_exception.ValidationException: <p>The request failed because it contains a syntax error.</p>
        capo_identitystore.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_identitystore.types.get_group_id_request.GetGroupIdRequest]",
    ) -> OperationResponse[
        "capo_identitystore.types.get_group_id_response.GetGroupIdResponse"
    ]:
        import capo_identitystore._operations.aws_identity_store.get_group_id

        output, http_response = (
            capo_identitystore._operations.aws_identity_store.get_group_id.get_group_id(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    def _redact_input(
        input_: "capo_identitystore.types.get_group_id_request.GetGroupIdRequest",
    ) -> dict[str, Any]:
        import capo_identitystore.types.get_group_id_request

        return capo_identitystore.types.get_group_id_request.redact_sensitive(
            input_
        )

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetGroupId", redact_input=_redact_input)
    )
    input_: capo_identitystore.types.get_group_id_request.GetGroupIdRequest = {
        "identity_store_id": identity_store_id,
        "alternate_identifier": alternate_identifier,
    }

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output