createMembership method

Future<CreateMembershipOutput> createMembership({
  1. required String collaborationIdentifier,
  2. required MembershipQueryLogStatus queryLogStatus,
  3. MembershipProtectedJobResultConfiguration? defaultJobResultConfiguration,
  4. MembershipProtectedQueryResultConfiguration? defaultResultConfiguration,
  5. bool? isMetricsEnabled,
  6. MembershipJobLogStatus? jobLogStatus,
  7. MembershipPaymentConfiguration? paymentConfiguration,
  8. Map<String, String>? tags,
})

Creates a membership for a specific collaboration identifier and joins the collaboration.

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

Parameter collaborationIdentifier : The unique ID for the associated collaboration.

Parameter queryLogStatus : An indicator as to whether query logging has been enabled or disabled for the membership.

When ENABLED, Clean Rooms logs details about queries run within this collaboration and those logs can be viewed in Amazon CloudWatch Logs. The default value is DISABLED.

Parameter defaultJobResultConfiguration : The default job result configuration that determines how job results are protected and managed within this membership. This configuration applies to all jobs.

Parameter defaultResultConfiguration : The default protected query result configuration as specified by the member who can receive results.

Parameter isMetricsEnabled : An indicator as to whether Amazon CloudWatch metrics have been enabled or disabled for the membership.

Amazon CloudWatch metrics are only available when the collaboration has metrics enabled. This option can be set by collaboration members who have the ability to run queries (analysis runners) or by members who are configured as payers.

When true, metrics about query execution are collected in Amazon CloudWatch. The default value is false.

Parameter jobLogStatus : An indicator as to whether job logging has been enabled or disabled for the collaboration.

When ENABLED, Clean Rooms logs details about jobs run within this collaboration and those logs can be viewed in Amazon CloudWatch Logs. The default value is DISABLED.

Parameter paymentConfiguration : The payment responsibilities accepted by the collaboration member.

Not required if the collaboration member has the member ability to run queries.

Required if the collaboration member doesn't have the member ability to run queries but is configured as a payer by the collaboration creator.

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<CreateMembershipOutput> createMembership({
  required String collaborationIdentifier,
  required MembershipQueryLogStatus queryLogStatus,
  MembershipProtectedJobResultConfiguration? defaultJobResultConfiguration,
  MembershipProtectedQueryResultConfiguration? defaultResultConfiguration,
  bool? isMetricsEnabled,
  MembershipJobLogStatus? jobLogStatus,
  MembershipPaymentConfiguration? paymentConfiguration,
  Map<String, String>? tags,
}) async {
  final $payload = <String, dynamic>{
    'collaborationIdentifier': collaborationIdentifier,
    'queryLogStatus': queryLogStatus.value,
    if (defaultJobResultConfiguration != null)
      'defaultJobResultConfiguration': defaultJobResultConfiguration,
    if (defaultResultConfiguration != null)
      'defaultResultConfiguration': defaultResultConfiguration,
    if (isMetricsEnabled != null) 'isMetricsEnabled': isMetricsEnabled,
    if (jobLogStatus != null) 'jobLogStatus': jobLogStatus.value,
    if (paymentConfiguration != null)
      'paymentConfiguration': paymentConfiguration,
    if (tags != null) 'tags': tags,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/memberships',
    exceptionFnMap: _exceptionFns,
  );
  return CreateMembershipOutput.fromJson(response);
}