/*
* Copyright 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.
*/
/*
* Do not modify this file. This file is generated from the pi-2018-02-27.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using System.Text;
using System.IO;
using System.Net;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
namespace Amazon.PI.Model
{
///
/// Container for the parameters to the GetResourceMetrics operation.
/// Retrieve Performance Insights metrics for a set of data sources over a time period.
/// You can provide specific dimension groups and dimensions, and provide aggregation
/// and filtering criteria for each group.
///
///
///
/// Each response element returns a maximum of 500 bytes. For larger elements, such as
/// SQL statements, only the first 500 bytes are returned.
///
///
///
public partial class GetResourceMetricsRequest : AmazonPIRequest
{
private DateTime? _endTime;
private string _identifier;
private int? _maxResults;
private List _metricQueries = new List();
private string _nextToken;
private PeriodAlignment _periodAlignment;
private int? _periodInSeconds;
private ServiceType _serviceType;
private DateTime? _startTime;
///
/// Gets and sets the property EndTime.
///
/// The date and time specifying the end of the requested time series query range. The
/// value specified is exclusive. Thus, the command returns data points less than
/// (but not equal to) EndTime
.
///
///
///
/// The value for EndTime
must be later than the value for StartTime
.
///
///
[AWSProperty(Required=true)]
public DateTime EndTime
{
get { return this._endTime.GetValueOrDefault(); }
set { this._endTime = value; }
}
// Check to see if EndTime property is set
internal bool IsSetEndTime()
{
return this._endTime.HasValue;
}
///
/// Gets and sets the property Identifier.
///
/// An immutable identifier for a data source that is unique for an Amazon Web Services
/// Region. Performance Insights gathers metrics from this data source. In the console,
/// the identifier is shown as ResourceID. When you call DescribeDBInstances
,
/// the identifier is returned as DbiResourceId
.
///
///
///
/// To use a DB instance as a data source, specify its DbiResourceId
value.
/// For example, specify db-ABCDEFGHIJKLMNOPQRSTU1VW2X
.
///
///
[AWSProperty(Required=true, Min=0, Max=256)]
public string Identifier
{
get { return this._identifier; }
set { this._identifier = value; }
}
// Check to see if Identifier property is set
internal bool IsSetIdentifier()
{
return this._identifier != null;
}
///
/// Gets and sets the property MaxResults.
///
/// The maximum number of items to return in the response. If more items exist than the
/// specified MaxRecords
value, a pagination token is included in the response
/// so that the remaining results can be retrieved.
///
///
[AWSProperty(Min=0, Max=25)]
public int MaxResults
{
get { return this._maxResults.GetValueOrDefault(); }
set { this._maxResults = value; }
}
// Check to see if MaxResults property is set
internal bool IsSetMaxResults()
{
return this._maxResults.HasValue;
}
///
/// Gets and sets the property MetricQueries.
///
/// An array of one or more queries to perform. Each query must specify a Performance
/// Insights metric, and can optionally specify aggregation and filtering criteria.
///
///
[AWSProperty(Required=true, Min=1, Max=15)]
public List MetricQueries
{
get { return this._metricQueries; }
set { this._metricQueries = value; }
}
// Check to see if MetricQueries property is set
internal bool IsSetMetricQueries()
{
return this._metricQueries != null && this._metricQueries.Count > 0;
}
///
/// Gets and sets the property NextToken.
///
/// An optional pagination token provided by a previous request. If this parameter is
/// specified, the response includes only records beyond the token, up to the value specified
/// by MaxRecords
.
///
///
[AWSProperty(Min=1, Max=8192)]
public string NextToken
{
get { return this._nextToken; }
set { this._nextToken = value; }
}
// Check to see if NextToken property is set
internal bool IsSetNextToken()
{
return this._nextToken != null;
}
///
/// Gets and sets the property PeriodAlignment.
///
/// The returned timestamp which is the start or end time of the time periods. The default
/// value is END_TIME
.
///
///
public PeriodAlignment PeriodAlignment
{
get { return this._periodAlignment; }
set { this._periodAlignment = value; }
}
// Check to see if PeriodAlignment property is set
internal bool IsSetPeriodAlignment()
{
return this._periodAlignment != null;
}
///
/// Gets and sets the property PeriodInSeconds.
///
/// The granularity, in seconds, of the data points returned from Performance Insights.
/// A period can be as short as one second, or as long as one day (86400 seconds). Valid
/// values are:
///
/// -
///
///
1
(one second)
///
/// -
///
///
60
(one minute)
///
/// -
///
///
300
(five minutes)
///
/// -
///
///
3600
(one hour)
///
/// -
///
///
86400
(twenty-four hours)
///
///
///
/// If you don't specify PeriodInSeconds
, then Performance Insights will
/// choose a value for you, with a goal of returning roughly 100-200 data points in the
/// response.
///
///
public int PeriodInSeconds
{
get { return this._periodInSeconds.GetValueOrDefault(); }
set { this._periodInSeconds = value; }
}
// Check to see if PeriodInSeconds property is set
internal bool IsSetPeriodInSeconds()
{
return this._periodInSeconds.HasValue;
}
///
/// Gets and sets the property ServiceType.
///
/// The Amazon Web Services service for which Performance Insights returns metrics. Valid
/// values are as follows:
///
/// -
///
///
RDS
///
/// -
///
///
DOCDB
///
///
///
[AWSProperty(Required=true)]
public ServiceType ServiceType
{
get { return this._serviceType; }
set { this._serviceType = value; }
}
// Check to see if ServiceType property is set
internal bool IsSetServiceType()
{
return this._serviceType != null;
}
///
/// Gets and sets the property StartTime.
///
/// The date and time specifying the beginning of the requested time series query range.
/// You can't specify a StartTime
that is earlier than 7 days ago. By default,
/// Performance Insights has 7 days of retention, but you can extend this range up to
/// 2 years. The value specified is inclusive. Thus, the command returns data points
/// equal to or greater than StartTime
.
///
///
///
/// The value for StartTime
must be earlier than the value for EndTime
.
///
///
[AWSProperty(Required=true)]
public DateTime StartTime
{
get { return this._startTime.GetValueOrDefault(); }
set { this._startTime = value; }
}
// Check to see if StartTime property is set
internal bool IsSetStartTime()
{
return this._startTime.HasValue;
}
}
}