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 ResourceNotFoundException. May throw InternalServerError.

Parameter tableName : The name of the table to describe.

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

Implementation

Future<DescribeContributorInsightsOutput> describeContributorInsights({
  required String tableName,
  String? indexName,
}) async {
  ArgumentError.checkNotNull(tableName, 'tableName');
  _s.validateStringLength(
    'tableName',
    tableName,
    3,
    255,
    isRequired: true,
  );
  _s.validateStringLength(
    'indexName',
    indexName,
    3,
    255,
  );
  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,
    },
  );

  return DescribeContributorInsightsOutput.fromJson(jsonResponse.body);
}