DynamoDB AWS 的利用率数据

Utilization data for DynmoDB AWS

我正在尝试提取 dynamoDB 的利用率数据。

response = client.get_metric_statistics(
        Namespace = 'AWS/DynamoDB',
        Period = period,
        StartTime = start_time ,
        EndTime = end_time,
        MetricName = 'ConsumedWriteCapacityUnits',
        Statistics=['Average'],
        Dimensions = [
            {
                'Name': 'DEVINT_Job_Status',
                
                'Value': ''
            }   
        ])  

我应该把什么放在价值之下?

我认为维度名称应该是 TableName,值应该是您感兴趣的 table 的名称。

文档:https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/metrics-dimensions.html

因此,例如:

response = client.get_metric_statistics(
        Namespace = 'AWS/DynamoDB',
        Period = period,
        StartTime = start_time ,
        EndTime = end_time,
        MetricName = 'ConsumedWriteCapacityUnits',
        Statistics=['Average'],
        Dimensions = [
            {
                'Name': 'TableName',
                'Value': 'DEVINT_Job_Status'
            }   
        ]) ```