All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.rds.model.PerformanceInsightsMetricQuery Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Amazon RDS module holds the client classes that are used for communicating with Amazon Relational Database Service

There is a newer version: 1.12.780
Show newest version
/*
 * Copyright 2019-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
 * the License. A copy of the License is located at
 * 
 * http://aws.amazon.com/apache2.0
 * 
 * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
 * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
 * and limitations under the License.
 */
package com.amazonaws.services.rds.model;

import java.io.Serializable;
import javax.annotation.Generated;

/**
 * 

* A single Performance Insights metric query to process. You must provide the metric to the query. If other parameters * aren't specified, Performance Insights returns all data points for the specified metric. Optionally, you can request * the data points to be aggregated by dimension group (GroupBy) and return only those data points that * match your criteria (Filter). *

*

* Constraints: *

*
    *
  • *

    * Must be a valid Performance Insights query. *

    *
  • *
* * @see AWS * API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class PerformanceInsightsMetricQuery implements Serializable, Cloneable { /** *

* A specification for how to aggregate the data points from a query result. You must specify a valid dimension * group. Performance Insights will return all of the dimensions within that group, unless you provide the names of * specific dimensions within that group. You can also request that Performance Insights return a limited number of * values for a dimension. *

*/ private PerformanceInsightsMetricDimensionGroup groupBy; /** *

* The name of a Performance Insights metric to be measured. *

*

* Valid Values: *

*
    *
  • *

    * db.load.avg - A scaled representation of the number of active sessions for the database engine. *

    *
  • *
  • *

    * db.sampledload.avg - The raw number of active sessions for the database engine. *

    *
  • *
  • *

    * The counter metrics listed in Performance Insights operating system counters in the Amazon Aurora User Guide. *

    *
  • *
*

* If the number of active sessions is less than an internal Performance Insights threshold, * db.load.avg and db.sampledload.avg are the same value. If the number of active sessions * is greater than the internal threshold, Performance Insights samples the active sessions, with * db.load.avg showing the scaled values, db.sampledload.avg showing the raw values, and * db.sampledload.avg less than db.load.avg. For most use cases, you can query * db.load.avg only. *

*/ private String metric; /** *

* A specification for how to aggregate the data points from a query result. You must specify a valid dimension * group. Performance Insights will return all of the dimensions within that group, unless you provide the names of * specific dimensions within that group. You can also request that Performance Insights return a limited number of * values for a dimension. *

* * @param groupBy * A specification for how to aggregate the data points from a query result. You must specify a valid * dimension group. Performance Insights will return all of the dimensions within that group, unless you * provide the names of specific dimensions within that group. You can also request that Performance Insights * return a limited number of values for a dimension. */ public void setGroupBy(PerformanceInsightsMetricDimensionGroup groupBy) { this.groupBy = groupBy; } /** *

* A specification for how to aggregate the data points from a query result. You must specify a valid dimension * group. Performance Insights will return all of the dimensions within that group, unless you provide the names of * specific dimensions within that group. You can also request that Performance Insights return a limited number of * values for a dimension. *

* * @return A specification for how to aggregate the data points from a query result. You must specify a valid * dimension group. Performance Insights will return all of the dimensions within that group, unless you * provide the names of specific dimensions within that group. You can also request that Performance * Insights return a limited number of values for a dimension. */ public PerformanceInsightsMetricDimensionGroup getGroupBy() { return this.groupBy; } /** *

* A specification for how to aggregate the data points from a query result. You must specify a valid dimension * group. Performance Insights will return all of the dimensions within that group, unless you provide the names of * specific dimensions within that group. You can also request that Performance Insights return a limited number of * values for a dimension. *

* * @param groupBy * A specification for how to aggregate the data points from a query result. You must specify a valid * dimension group. Performance Insights will return all of the dimensions within that group, unless you * provide the names of specific dimensions within that group. You can also request that Performance Insights * return a limited number of values for a dimension. * @return Returns a reference to this object so that method calls can be chained together. */ public PerformanceInsightsMetricQuery withGroupBy(PerformanceInsightsMetricDimensionGroup groupBy) { setGroupBy(groupBy); return this; } /** *

* The name of a Performance Insights metric to be measured. *

*

* Valid Values: *

*
    *
  • *

    * db.load.avg - A scaled representation of the number of active sessions for the database engine. *

    *
  • *
  • *

    * db.sampledload.avg - The raw number of active sessions for the database engine. *

    *
  • *
  • *

    * The counter metrics listed in Performance Insights operating system counters in the Amazon Aurora User Guide. *

    *
  • *
*

* If the number of active sessions is less than an internal Performance Insights threshold, * db.load.avg and db.sampledload.avg are the same value. If the number of active sessions * is greater than the internal threshold, Performance Insights samples the active sessions, with * db.load.avg showing the scaled values, db.sampledload.avg showing the raw values, and * db.sampledload.avg less than db.load.avg. For most use cases, you can query * db.load.avg only. *

* * @param metric * The name of a Performance Insights metric to be measured.

*

* Valid Values: *

*
    *
  • *

    * db.load.avg - A scaled representation of the number of active sessions for the database * engine. *

    *
  • *
  • *

    * db.sampledload.avg - The raw number of active sessions for the database engine. *

    *
  • *
  • *

    * The counter metrics listed in Performance Insights operating system counters in the Amazon Aurora User Guide. *

    *
  • *
*

* If the number of active sessions is less than an internal Performance Insights threshold, * db.load.avg and db.sampledload.avg are the same value. If the number of active * sessions is greater than the internal threshold, Performance Insights samples the active sessions, with * db.load.avg showing the scaled values, db.sampledload.avg showing the raw * values, and db.sampledload.avg less than db.load.avg. For most use cases, you * can query db.load.avg only. */ public void setMetric(String metric) { this.metric = metric; } /** *

* The name of a Performance Insights metric to be measured. *

*

* Valid Values: *

*
    *
  • *

    * db.load.avg - A scaled representation of the number of active sessions for the database engine. *

    *
  • *
  • *

    * db.sampledload.avg - The raw number of active sessions for the database engine. *

    *
  • *
  • *

    * The counter metrics listed in Performance Insights operating system counters in the Amazon Aurora User Guide. *

    *
  • *
*

* If the number of active sessions is less than an internal Performance Insights threshold, * db.load.avg and db.sampledload.avg are the same value. If the number of active sessions * is greater than the internal threshold, Performance Insights samples the active sessions, with * db.load.avg showing the scaled values, db.sampledload.avg showing the raw values, and * db.sampledload.avg less than db.load.avg. For most use cases, you can query * db.load.avg only. *

* * @return The name of a Performance Insights metric to be measured.

*

* Valid Values: *

*
    *
  • *

    * db.load.avg - A scaled representation of the number of active sessions for the database * engine. *

    *
  • *
  • *

    * db.sampledload.avg - The raw number of active sessions for the database engine. *

    *
  • *
  • *

    * The counter metrics listed in Performance Insights operating system counters in the Amazon Aurora User Guide. *

    *
  • *
*

* If the number of active sessions is less than an internal Performance Insights threshold, * db.load.avg and db.sampledload.avg are the same value. If the number of active * sessions is greater than the internal threshold, Performance Insights samples the active sessions, with * db.load.avg showing the scaled values, db.sampledload.avg showing the raw * values, and db.sampledload.avg less than db.load.avg. For most use cases, you * can query db.load.avg only. */ public String getMetric() { return this.metric; } /** *

* The name of a Performance Insights metric to be measured. *

*

* Valid Values: *

*
    *
  • *

    * db.load.avg - A scaled representation of the number of active sessions for the database engine. *

    *
  • *
  • *

    * db.sampledload.avg - The raw number of active sessions for the database engine. *

    *
  • *
  • *

    * The counter metrics listed in Performance Insights operating system counters in the Amazon Aurora User Guide. *

    *
  • *
*

* If the number of active sessions is less than an internal Performance Insights threshold, * db.load.avg and db.sampledload.avg are the same value. If the number of active sessions * is greater than the internal threshold, Performance Insights samples the active sessions, with * db.load.avg showing the scaled values, db.sampledload.avg showing the raw values, and * db.sampledload.avg less than db.load.avg. For most use cases, you can query * db.load.avg only. *

* * @param metric * The name of a Performance Insights metric to be measured.

*

* Valid Values: *

*
    *
  • *

    * db.load.avg - A scaled representation of the number of active sessions for the database * engine. *

    *
  • *
  • *

    * db.sampledload.avg - The raw number of active sessions for the database engine. *

    *
  • *
  • *

    * The counter metrics listed in Performance Insights operating system counters in the Amazon Aurora User Guide. *

    *
  • *
*

* If the number of active sessions is less than an internal Performance Insights threshold, * db.load.avg and db.sampledload.avg are the same value. If the number of active * sessions is greater than the internal threshold, Performance Insights samples the active sessions, with * db.load.avg showing the scaled values, db.sampledload.avg showing the raw * values, and db.sampledload.avg less than db.load.avg. For most use cases, you * can query db.load.avg only. * @return Returns a reference to this object so that method calls can be chained together. */ public PerformanceInsightsMetricQuery withMetric(String metric) { setMetric(metric); return this; } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getGroupBy() != null) sb.append("GroupBy: ").append(getGroupBy()).append(","); if (getMetric() != null) sb.append("Metric: ").append(getMetric()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof PerformanceInsightsMetricQuery == false) return false; PerformanceInsightsMetricQuery other = (PerformanceInsightsMetricQuery) obj; if (other.getGroupBy() == null ^ this.getGroupBy() == null) return false; if (other.getGroupBy() != null && other.getGroupBy().equals(this.getGroupBy()) == false) return false; if (other.getMetric() == null ^ this.getMetric() == null) return false; if (other.getMetric() != null && other.getMetric().equals(this.getMetric()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getGroupBy() == null) ? 0 : getGroupBy().hashCode()); hashCode = prime * hashCode + ((getMetric() == null) ? 0 : getMetric().hashCode()); return hashCode; } @Override public PerformanceInsightsMetricQuery clone() { try { return (PerformanceInsightsMetricQuery) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy