createIntermediateTable method

Future<CreateIntermediateTableOutput> createIntermediateTable({
  1. required String membershipIdentifier,
  2. required String name,
  3. required PopulationAnalysisConfiguration populationAnalysisConfiguration,
  4. String? description,
  5. String? kmsKeyArn,
  6. int? retentionInDays,
  7. Map<String, String>? tags,
})

Creates an intermediate table in a membership. An intermediate table stores a query definition that you can execute later using PopulateIntermediateTable to materialize cached results. The intermediate table is owned by the member with the CAN_QUERY ability. This operation does not execute the stored query.

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

Parameter membershipIdentifier : The unique identifier of the membership where the intermediate table is created.

Parameter name : The display name for the intermediate table.

Parameter populationAnalysisConfiguration : The configuration that defines the analysis used to populate the intermediate table. This configuration contains the SQL query or analysis template reference.

Parameter description : A description of the intermediate table.

Parameter kmsKeyArn : The Amazon Resource Name (ARN) of the customer-managed KMS key used to encrypt the intermediate table data.

Parameter retentionInDays : The number of days to retain populated data versions. Minimum value of 1, maximum value of 365.

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<CreateIntermediateTableOutput> createIntermediateTable({
  required String membershipIdentifier,
  required String name,
  required PopulationAnalysisConfiguration populationAnalysisConfiguration,
  String? description,
  String? kmsKeyArn,
  int? retentionInDays,
  Map<String, String>? tags,
}) async {
  final $payload = <String, dynamic>{
    'name': name,
    'populationAnalysisConfiguration': populationAnalysisConfiguration,
    if (description != null) 'description': description,
    if (kmsKeyArn != null) 'kmsKeyArn': kmsKeyArn,
    if (retentionInDays != null) 'retentionInDays': retentionInDays,
    if (tags != null) 'tags': tags,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri:
        '/memberships/${Uri.encodeComponent(membershipIdentifier)}/intermediateTables',
    exceptionFnMap: _exceptionFns,
  );
  return CreateIntermediateTableOutput.fromJson(response);
}