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

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

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

GetMetricStatisticsRequest.getDimensions介绍

[英]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

if (getMetricName() != null)
  sb.append("MetricName: ").append(getMetricName()).append(",");
if (getDimensions() != null)
  sb.append("Dimensions: ").append(getDimensions()).append(",");
if (getStartTime() != null)
  sb.append("StartTime: ").append(getStartTime()).append(",");

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

@Override
public int hashCode() {
  final int prime = 31;
  int hashCode = 1;
  hashCode = prime * hashCode + ((getNamespace() == null) ? 0 : getNamespace().hashCode());
  hashCode = prime * hashCode + ((getMetricName() == null) ? 0 : getMetricName().hashCode());
  hashCode = prime * hashCode + ((getDimensions() == null) ? 0 : getDimensions().hashCode());
  hashCode = prime * hashCode + ((getStartTime() == null) ? 0 : getStartTime().hashCode());
  hashCode = prime * hashCode + ((getEndTime() == null) ? 0 : getEndTime().hashCode());
  hashCode = prime * hashCode + ((getPeriod() == null) ? 0 : getPeriod().hashCode());
  hashCode = prime * hashCode + ((getStatistics() == null) ? 0 : getStatistics().hashCode());
  hashCode = prime * hashCode + ((getExtendedStatistics() == null) ? 0 : getExtendedStatistics().hashCode());
  hashCode = prime * hashCode + ((getUnit() == null) ? 0 : getUnit().hashCode());
  return hashCode;
}

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

if (other.getMetricName() != null && other.getMetricName().equals(this.getMetricName()) == false)
  return false;
if (other.getDimensions() == null ^ this.getDimensions() == null)
  return false;
if (other.getDimensions() != null && other.getDimensions().equals(this.getDimensions()) == false)
  return false;
if (other.getStartTime() == null ^ this.getStartTime() == null)

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

if (!getMetricStatisticsRequest.getDimensions().isEmpty()
    || !((com.amazonaws.internal.SdkInternalList<Dimension>) getMetricStatisticsRequest.getDimensions()).isAutoConstruct()) {
  com.amazonaws.internal.SdkInternalList<Dimension> dimensionsList = (com.amazonaws.internal.SdkInternalList<Dimension>) getMetricStatisticsRequest
      .getDimensions();
  int dimensionsListIndex = 1;

代码示例来源: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(Dimension... dimensions) {
  if (getDimensions() == null) {
    this.dimensions = new java.util.ArrayList<Dimension>(dimensions.length);
  }
  for (Dimension value : dimensions) {
    this.dimensions.add(value);
  }
  return this;
}

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

@Override
public int hashCode() {
  final int prime = 31;
  int hashCode = 1;
  hashCode = prime * hashCode + ((getNamespace() == null) ? 0 : getNamespace().hashCode());
  hashCode = prime * hashCode + ((getMetricName() == null) ? 0 : getMetricName().hashCode());
  hashCode = prime * hashCode + ((getDimensions() == null) ? 0 : getDimensions().hashCode());
  hashCode = prime * hashCode + ((getStartTime() == null) ? 0 : getStartTime().hashCode());
  hashCode = prime * hashCode + ((getEndTime() == null) ? 0 : getEndTime().hashCode());
  hashCode = prime * hashCode + ((getPeriod() == null) ? 0 : getPeriod().hashCode());
  hashCode = prime * hashCode + ((getStatistics() == null) ? 0 : getStatistics().hashCode());
  hashCode = prime * hashCode + ((getUnit() == null) ? 0 : getUnit().hashCode());
  return hashCode;
}

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

/**
 * Returns a string representation of this object; useful for testing and
 * debugging.
 *
 * @return A string representation of this object.
 * @see java.lang.Object#toString()
 */
@Override
public String toString() {
  StringBuilder sb = new StringBuilder();
  sb.append("{");
  if (getNamespace() != null)
    sb.append("Namespace: " + getNamespace() + ",");
  if (getMetricName() != null)
    sb.append("MetricName: " + getMetricName() + ",");
  if (getDimensions() != null)
    sb.append("Dimensions: " + getDimensions() + ",");
  if (getStartTime() != null)
    sb.append("StartTime: " + getStartTime() + ",");
  if (getEndTime() != null)
    sb.append("EndTime: " + getEndTime() + ",");
  if (getPeriod() != null)
    sb.append("Period: " + getPeriod() + ",");
  if (getStatistics() != null)
    sb.append("Statistics: " + getStatistics() + ",");
  if (getUnit() != null)
    sb.append("Unit: " + getUnit());
  sb.append("}");
  return sb.toString();
}

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

&& other.getMetricName().equals(this.getMetricName()) == false)
  return false;
if (other.getDimensions() == null ^ this.getDimensions() == null)
  return false;
if (other.getDimensions() != null
    && other.getDimensions().equals(this.getDimensions()) == false)
  return false;
if (other.getStartTime() == null ^ this.getStartTime() == null)

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

request.addParameter(prefix, StringUtils.fromString(metricName));
if (getMetricStatisticsRequest.getDimensions() != null) {
  prefix = "Dimensions";
  java.util.List<Dimension> dimensions = getMetricStatisticsRequest.getDimensions();
  int dimensionsIndex = 1;
  String dimensionsPrefix = prefix;

相关文章

微信公众号

最新文章

更多