- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
UpdateContributorInsightsCommand
Updates the status for contributor insights for a specific table or index. CloudWatch Contributor Insights for DynamoDB graphs display the partition key and (if applicable) sort key of frequently accessed items and frequently throttled items in plaintext. If you require the use of Amazon Web Services Key Management Service (KMS) to encrypt this table’s partition key and sort key data with an Amazon Web Services managed key or customer managed key, you should not enable CloudWatch Contributor Insights for DynamoDB for this table.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { DynamoDBClient, UpdateContributorInsightsCommand } from "@aws-sdk/client-dynamodb"; // ES Modules import
// const { DynamoDBClient, UpdateContributorInsightsCommand } = require("@aws-sdk/client-dynamodb"); // CommonJS import
const client = new DynamoDBClient(config);
const input = { // UpdateContributorInsightsInput
TableName: "STRING_VALUE", // required
IndexName: "STRING_VALUE",
ContributorInsightsAction: "ENABLE" || "DISABLE", // required
};
const command = new UpdateContributorInsightsCommand(input);
const response = await client.send(command);
// { // UpdateContributorInsightsOutput
// TableName: "STRING_VALUE",
// IndexName: "STRING_VALUE",
// ContributorInsightsStatus: "ENABLING" || "ENABLED" || "DISABLING" || "DISABLED" || "FAILED",
// };
UpdateContributorInsightsCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
ContributorInsightsAction Required | ContributorInsightsAction | undefined | Represents the contributor insights action. |
TableName Required | string | undefined | The name of the table. You can also provide the Amazon Resource Name (ARN) of the table in this parameter. |
IndexName | string | undefined | The global secondary index name, if applicable. |
UpdateContributorInsightsCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
ContributorInsightsStatus | ContributorInsightsStatus | undefined | The status of contributor insights |
IndexName | string | undefined | The name of the global secondary index, if applicable. |
TableName | string | undefined | The name of the table. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
InternalServerError | server | An error occurred on the server side. |
ResourceNotFoundException | client | The operation tried to access a nonexistent table or index. The resource might not be specified correctly, or its status might not be |
DynamoDBServiceException | Base exception class for all service exceptions from DynamoDB service. |