listPrivacyBudgets method

Future<ListPrivacyBudgetsOutput> listPrivacyBudgets({
  1. required String membershipIdentifier,
  2. required PrivacyBudgetType privacyBudgetType,
  3. String? accessBudgetResourceArn,
  4. int? maxResults,
  5. String? nextToken,
})

Returns detailed information about the privacy budgets in a specified membership.

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

Parameter membershipIdentifier : A unique identifier for one of your memberships for a collaboration. The privacy budget is retrieved from the collaboration that this membership belongs to. Accepts a membership ID.

Parameter privacyBudgetType : The privacy budget type.

Parameter accessBudgetResourceArn : The Amazon Resource Name (ARN) of the access budget resource to filter privacy budgets by.

Parameter maxResults : The maximum number of results that are returned for an API request call. The service chooses a default number if you don't set one. The service might return a nextToken even if the maxResults value has not been met.

Parameter nextToken : The pagination token that's used to fetch the next set of results.

Implementation

Future<ListPrivacyBudgetsOutput> listPrivacyBudgets({
  required String membershipIdentifier,
  required PrivacyBudgetType privacyBudgetType,
  String? accessBudgetResourceArn,
  int? maxResults,
  String? nextToken,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    100,
  );
  final $query = <String, List<String>>{
    'privacyBudgetType': [privacyBudgetType.value],
    if (accessBudgetResourceArn != null)
      'accessBudgetResourceArn': [accessBudgetResourceArn],
    if (maxResults != null) 'maxResults': [maxResults.toString()],
    if (nextToken != null) 'nextToken': [nextToken],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri:
        '/memberships/${Uri.encodeComponent(membershipIdentifier)}/privacybudgets',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListPrivacyBudgetsOutput.fromJson(response);
}