createIntermediateTableAnalysisRule method

Future<CreateIntermediateTableAnalysisRuleOutput> createIntermediateTableAnalysisRule({
  1. required IntermediateTableAnalysisRulePolicy analysisRulePolicy,
  2. required IntermediateTableAnalysisRuleType analysisRuleType,
  3. required String intermediateTableIdentifier,
  4. required String membershipIdentifier,
})

Creates an analysis rule for an intermediate table. Only the CUSTOM analysis rule type is supported. The service automatically determines whether the rule is first-party or multi-party restricted based on the intermediate table's inherited constraints. Only the intermediate table owner can call this operation.

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

Parameter analysisRulePolicy : The analysis rule policy to apply to the intermediate table.

Parameter analysisRuleType : The type of analysis rule to create. Currently, only CUSTOM is supported.

Parameter intermediateTableIdentifier : The unique identifier of the intermediate table for which to create the analysis rule.

Parameter membershipIdentifier : The unique identifier of the membership that contains the intermediate table.

Implementation

Future<CreateIntermediateTableAnalysisRuleOutput>
    createIntermediateTableAnalysisRule({
  required IntermediateTableAnalysisRulePolicy analysisRulePolicy,
  required IntermediateTableAnalysisRuleType analysisRuleType,
  required String intermediateTableIdentifier,
  required String membershipIdentifier,
}) async {
  final $payload = <String, dynamic>{
    'analysisRulePolicy': analysisRulePolicy,
    'analysisRuleType': analysisRuleType.value,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri:
        '/memberships/${Uri.encodeComponent(membershipIdentifier)}/intermediateTables/${Uri.encodeComponent(intermediateTableIdentifier)}/analysisRule',
    exceptionFnMap: _exceptionFns,
  );
  return CreateIntermediateTableAnalysisRuleOutput.fromJson(response);
}