com.amazonaws.services.cloudwatch.model.GetMetricStatisticsRequest.setDimensions()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(3.8k)|赞(0)|评价(0)|浏览(106)

本文整理了Java中com.amazonaws.services.cloudwatch.model.GetMetricStatisticsRequest.setDimensions()方法的一些代码示例,展示了GetMetricStatisticsRequest.setDimensions()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。GetMetricStatisticsRequest.setDimensions()方法的具体详情如下:
包路径:com.amazonaws.services.cloudwatch.model.GetMetricStatisticsRequest
类名称:GetMetricStatisticsRequest
方法名:setDimensions

GetMetricStatisticsRequest.setDimensions介绍

[英]The dimensions. If the metric contains multiple dimensions, you must include a value for each dimension. CloudWatch treats each unique combination of dimensions as a separate metric. If a specific combination of dimensions was not published, you can't retrieve statistics for it. You must specify the same dimensions that were used when the metrics were created. For an example, see Dimension Combinations in the Amazon CloudWatch User Guide. For more information about specifying dimensions, see Publishing Metrics in the Amazon CloudWatch User Guide.
[中]尺寸。如果度量包含多个维度,则必须为每个维度包含一个值。CloudWatch将每个维度的独特组合视为一个单独的度量。如果未发布特定的维度组合,则无法检索该维度的统计信息。您必须指定创建度量时使用的相同维度。例如,请参阅《Amazon CloudWatch用户指南》中的Dimension Combinations。有关指定维度的更多信息,请参阅《Amazon CloudWatch用户指南》中的Publishing Metrics

代码示例

代码示例来源:origin: aws/aws-sdk-java

/**
 * <p>
 * The dimensions. If the metric contains multiple dimensions, you must include a value for each dimension.
 * CloudWatch treats each unique combination of dimensions as a separate metric. If a specific combination of
 * dimensions was not published, you can't retrieve statistics for it. You must specify the same dimensions that
 * were used when the metrics were created. For an example, see <a href=
 * "http://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/cloudwatch_concepts.html#dimension-combinations"
 * >Dimension Combinations</a> in the <i>Amazon CloudWatch User Guide</i>. For more information about specifying
 * dimensions, see <a
 * href="http://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/publishingMetrics.html">Publishing
 * Metrics</a> in the <i>Amazon CloudWatch User Guide</i>.
 * </p>
 * 
 * @param dimensions
 *        The dimensions. If the metric contains multiple dimensions, you must include a value for each dimension.
 *        CloudWatch treats each unique combination of dimensions as a separate metric. If a specific combination of
 *        dimensions was not published, you can't retrieve statistics for it. You must specify the same dimensions
 *        that were used when the metrics were created. For an example, see <a href=
 *        "http://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/cloudwatch_concepts.html#dimension-combinations"
 *        >Dimension Combinations</a> in the <i>Amazon CloudWatch User Guide</i>. For more information about
 *        specifying dimensions, see <a
 *        href="http://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/publishingMetrics.html">Publishing
 *        Metrics</a> in the <i>Amazon CloudWatch User Guide</i>.
 * @return Returns a reference to this object so that method calls can be chained together.
 */
public GetMetricStatisticsRequest withDimensions(java.util.Collection<Dimension> dimensions) {
  setDimensions(dimensions);
  return this;
}

代码示例来源:origin: aws/aws-sdk-java

setDimensions(new com.amazonaws.internal.SdkInternalList<Dimension>(dimensions.length));

代码示例来源:origin: aws-amplify/aws-sdk-android

/**
 * <p>
 * A list of dimensions describing qualities of the metric.
 * </p>
 * <p>
 * Returns a reference to this object so that method calls can be chained
 * together.
 *
 * @param dimensions <p>
 *            A list of dimensions describing qualities of the metric.
 *            </p>
 * @return A reference to this updated object so that method calls can be
 *         chained together.
 */
public GetMetricStatisticsRequest withDimensions(java.util.Collection<Dimension> dimensions) {
  setDimensions(dimensions);
  return this;
}

代码示例来源:origin: petezybrick/awscwxls

getMetricRequest.setDimensions(dimensions);

代码示例来源:origin: prometheus/cloudwatch_exporter

request.setDimensions(dimensions);

相关文章

微信公众号

最新文章

更多