listShareInvitations method

Future<ListShareInvitationsOutput> listShareInvitations({
  1. String? lensNamePrefix,
  2. int? maxResults,
  3. String? nextToken,
  4. String? profileNamePrefix,
  5. ShareResourceType? shareResourceType,
  6. String? templateNamePrefix,
  7. String? workloadNamePrefix,
})

List the share invitations.

WorkloadNamePrefix, LensNamePrefix, ProfileNamePrefix, and TemplateNamePrefix are mutually exclusive. Use the parameter that matches your ShareResourceType.

May throw AccessDeniedException. May throw InternalServerException. May throw ThrottlingException. May throw ValidationException.

Parameter lensNamePrefix : An optional string added to the beginning of each lens name returned in the results.

Parameter maxResults : The maximum number of results to return for this request.

Parameter profileNamePrefix : An optional string added to the beginning of each profile name returned in the results.

Parameter shareResourceType : The type of share invitations to be returned.

Parameter templateNamePrefix : An optional string added to the beginning of each review template name returned in the results.

Implementation

Future<ListShareInvitationsOutput> listShareInvitations({
  String? lensNamePrefix,
  int? maxResults,
  String? nextToken,
  String? profileNamePrefix,
  ShareResourceType? shareResourceType,
  String? templateNamePrefix,
  String? workloadNamePrefix,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    50,
  );
  final $query = <String, List<String>>{
    if (lensNamePrefix != null) 'LensNamePrefix': [lensNamePrefix],
    if (maxResults != null) 'MaxResults': [maxResults.toString()],
    if (nextToken != null) 'NextToken': [nextToken],
    if (profileNamePrefix != null) 'ProfileNamePrefix': [profileNamePrefix],
    if (shareResourceType != null)
      'ShareResourceType': [shareResourceType.value],
    if (templateNamePrefix != null)
      'TemplateNamePrefix': [templateNamePrefix],
    if (workloadNamePrefix != null)
      'WorkloadNamePrefix': [workloadNamePrefix],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri: '/shareInvitations',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListShareInvitationsOutput.fromJson(response);
}