getGroupId method

Future<GetGroupIdResponse> getGroupId({
  1. required AlternateIdentifier alternateIdentifier,
  2. required String identityStoreId,
})

Retrieves GroupId in an identity store.

May throw ResourceNotFoundException. May throw ValidationException.

Parameter 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.

Parameter identityStoreId : The globally unique identifier for the identity store.

Implementation

Future<GetGroupIdResponse> getGroupId({
  required AlternateIdentifier alternateIdentifier,
  required String identityStoreId,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AWSIdentityStore.GetGroupId'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'AlternateIdentifier': alternateIdentifier,
      'IdentityStoreId': identityStoreId,
    },
  );

  return GetGroupIdResponse.fromJson(jsonResponse.body);
}