createPrivacyBudgetTemplate method

Future<CreatePrivacyBudgetTemplateOutput> createPrivacyBudgetTemplate({
  1. required String membershipIdentifier,
  2. required PrivacyBudgetTemplateParametersInput parameters,
  3. required PrivacyBudgetType privacyBudgetType,
  4. PrivacyBudgetTemplateAutoRefresh? autoRefresh,
  5. Map<String, String>? tags,
})

Creates a privacy budget template for a specified collaboration. Each collaboration can have only one privacy budget template. If you need to change the privacy budget template, use the UpdatePrivacyBudgetTemplate operation.

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

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

Parameter parameters : Specifies your parameters for the privacy budget template.

Parameter privacyBudgetType : Specifies the type of the privacy budget template.

Parameter autoRefresh : How often the privacy budget refreshes.

Parameter tags : An optional label that you can assign to a resource when you create it. Each tag consists of a key and an optional value, both of which you define. When you use tagging, you can also use tag-based access control in IAM policies to control access to this resource.

Implementation

Future<CreatePrivacyBudgetTemplateOutput> createPrivacyBudgetTemplate({
  required String membershipIdentifier,
  required PrivacyBudgetTemplateParametersInput parameters,
  required PrivacyBudgetType privacyBudgetType,
  PrivacyBudgetTemplateAutoRefresh? autoRefresh,
  Map<String, String>? tags,
}) async {
  final $payload = <String, dynamic>{
    'parameters': parameters,
    'privacyBudgetType': privacyBudgetType.value,
    if (autoRefresh != null) 'autoRefresh': autoRefresh.value,
    if (tags != null) 'tags': tags,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri:
        '/memberships/${Uri.encodeComponent(membershipIdentifier)}/privacybudgettemplates',
    exceptionFnMap: _exceptionFns,
  );
  return CreatePrivacyBudgetTemplateOutput.fromJson(response);
}