describeContributorInsights method

Future<DescribeContributorInsightsOutput> describeContributorInsights({
  1. required String tableName,
  2. String? indexName,
})

Returns information about contributor insights for a given table or global secondary index.

May throw InternalServerError. May throw ResourceNotFoundException.

Parameter tableName : The name of the table to describe. You can also provide the Amazon Resource Name (ARN) of the table in this parameter.

Parameter indexName : The name of the global secondary index to describe, if applicable.

Implementation

Future<DescribeContributorInsightsOutput> describeContributorInsights({
  required String tableName,
  String? indexName,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.0',
    'X-Amz-Target': 'DynamoDB_20120810.DescribeContributorInsights'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'TableName': tableName,
      if (indexName != null) 'IndexName': indexName,
    },
    endpoint: _resolveEndpoint(
      resourceArn: tableName,
    ),
  );

  return DescribeContributorInsightsOutput.fromJson(jsonResponse.body);
}