/*
* 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.Net;
using Amazon.PI.Model;
using Amazon.PI.Model.Internal.MarshallTransformations;
using Amazon.PI.Internal;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Auth;
using Amazon.Runtime.Internal.Transform;
namespace Amazon.PI
{
///
/// Implementation for accessing PI
///
/// Amazon RDS Performance Insights
///
/// Amazon RDS Performance Insights enables you to monitor and explore different dimensions
/// of database load based on data captured from a running DB instance. The guide provides
/// detailed information about Performance Insights data types, parameters and errors.
///
///
///
/// When Performance Insights is enabled, the Amazon RDS Performance Insights API provides
/// visibility into the performance of your DB instance. Amazon CloudWatch provides the
/// authoritative source for Amazon Web Services service-vended monitoring metrics. Performance
/// Insights offers a domain-specific view of DB load.
///
///
///
/// DB load is measured as average active sessions. Performance Insights provides the
/// data to API consumers as a two-dimensional time-series dataset. The time dimension
/// provides DB load data for each time point in the queried time range. Each time point
/// decomposes overall load in relation to the requested dimensions, measured at that
/// time point. Examples include SQL, Wait event, User, and Host.
///
///
///
public partial class AmazonPIClient : AmazonServiceClient, IAmazonPI
{
private static IServiceMetadata serviceMetadata = new AmazonPIMetadata();
#if BCL45 || AWS_ASYNC_ENUMERABLES_API
private IPIPaginatorFactory _paginators;
///
/// Paginators for the service
///
public IPIPaginatorFactory Paginators
{
get
{
if (this._paginators == null)
{
this._paginators = new PIPaginatorFactory(this);
}
return this._paginators;
}
}
#endif
#region Constructors
///
/// Constructs AmazonPIClient with the credentials loaded from the application's
/// default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance.
///
/// Example App.config with credentials set.
///
/// <?xml version="1.0" encoding="utf-8" ?>
/// <configuration>
/// <appSettings>
/// <add key="AWSProfileName" value="AWS Default"/>
/// </appSettings>
/// </configuration>
///
///
///
public AmazonPIClient()
: base(FallbackCredentialsFactory.GetCredentials(), new AmazonPIConfig()) { }
///
/// Constructs AmazonPIClient with the credentials loaded from the application's
/// default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance.
///
/// Example App.config with credentials set.
///
/// <?xml version="1.0" encoding="utf-8" ?>
/// <configuration>
/// <appSettings>
/// <add key="AWSProfileName" value="AWS Default"/>
/// </appSettings>
/// </configuration>
///
///
///
/// The region to connect.
public AmazonPIClient(RegionEndpoint region)
: base(FallbackCredentialsFactory.GetCredentials(), new AmazonPIConfig{RegionEndpoint = region}) { }
///
/// Constructs AmazonPIClient with the credentials loaded from the application's
/// default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance.
///
/// Example App.config with credentials set.
///
/// <?xml version="1.0" encoding="utf-8" ?>
/// <configuration>
/// <appSettings>
/// <add key="AWSProfileName" value="AWS Default"/>
/// </appSettings>
/// </configuration>
///
///
///
/// The AmazonPIClient Configuration Object
public AmazonPIClient(AmazonPIConfig config)
: base(FallbackCredentialsFactory.GetCredentials(config), config){}
///
/// Constructs AmazonPIClient with AWS Credentials
///
/// AWS Credentials
public AmazonPIClient(AWSCredentials credentials)
: this(credentials, new AmazonPIConfig())
{
}
///
/// Constructs AmazonPIClient with AWS Credentials
///
/// AWS Credentials
/// The region to connect.
public AmazonPIClient(AWSCredentials credentials, RegionEndpoint region)
: this(credentials, new AmazonPIConfig{RegionEndpoint = region})
{
}
///
/// Constructs AmazonPIClient with AWS Credentials and an
/// AmazonPIClient Configuration object.
///
/// AWS Credentials
/// The AmazonPIClient Configuration Object
public AmazonPIClient(AWSCredentials credentials, AmazonPIConfig clientConfig)
: base(credentials, clientConfig)
{
}
///
/// Constructs AmazonPIClient with AWS Access Key ID and AWS Secret Key
///
/// AWS Access Key ID
/// AWS Secret Access Key
public AmazonPIClient(string awsAccessKeyId, string awsSecretAccessKey)
: this(awsAccessKeyId, awsSecretAccessKey, new AmazonPIConfig())
{
}
///
/// Constructs AmazonPIClient with AWS Access Key ID and AWS Secret Key
///
/// AWS Access Key ID
/// AWS Secret Access Key
/// The region to connect.
public AmazonPIClient(string awsAccessKeyId, string awsSecretAccessKey, RegionEndpoint region)
: this(awsAccessKeyId, awsSecretAccessKey, new AmazonPIConfig() {RegionEndpoint=region})
{
}
///
/// Constructs AmazonPIClient with AWS Access Key ID, AWS Secret Key and an
/// AmazonPIClient Configuration object.
///
/// AWS Access Key ID
/// AWS Secret Access Key
/// The AmazonPIClient Configuration Object
public AmazonPIClient(string awsAccessKeyId, string awsSecretAccessKey, AmazonPIConfig clientConfig)
: base(awsAccessKeyId, awsSecretAccessKey, clientConfig)
{
}
///
/// Constructs AmazonPIClient with AWS Access Key ID and AWS Secret Key
///
/// AWS Access Key ID
/// AWS Secret Access Key
/// AWS Session Token
public AmazonPIClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken)
: this(awsAccessKeyId, awsSecretAccessKey, awsSessionToken, new AmazonPIConfig())
{
}
///
/// Constructs AmazonPIClient with AWS Access Key ID and AWS Secret Key
///
/// AWS Access Key ID
/// AWS Secret Access Key
/// AWS Session Token
/// The region to connect.
public AmazonPIClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken, RegionEndpoint region)
: this(awsAccessKeyId, awsSecretAccessKey, awsSessionToken, new AmazonPIConfig{RegionEndpoint = region})
{
}
///
/// Constructs AmazonPIClient with AWS Access Key ID, AWS Secret Key and an
/// AmazonPIClient Configuration object.
///
/// AWS Access Key ID
/// AWS Secret Access Key
/// AWS Session Token
/// The AmazonPIClient Configuration Object
public AmazonPIClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken, AmazonPIConfig clientConfig)
: base(awsAccessKeyId, awsSecretAccessKey, awsSessionToken, clientConfig)
{
}
#endregion
#region Overrides
///
/// Creates the signer for the service.
///
protected override AbstractAWSSigner CreateSigner()
{
return new AWS4Signer();
}
///
/// Customize the pipeline
///
///
protected override void CustomizeRuntimePipeline(RuntimePipeline pipeline)
{
pipeline.RemoveHandler();
pipeline.AddHandlerAfter(new AmazonPIEndpointResolver());
}
///
/// Capture metadata for the service.
///
protected override IServiceMetadata ServiceMetadata
{
get
{
return serviceMetadata;
}
}
#endregion
#region Dispose
///
/// Disposes the service client.
///
protected override void Dispose(bool disposing)
{
base.Dispose(disposing);
}
#endregion
#region DescribeDimensionKeys
///
/// For a specific time period, retrieve the top N
dimension keys for a metric.
///
///
///
///
/// Each response element returns a maximum of 500 bytes. For larger elements, such as
/// SQL statements, only the first 500 bytes are returned.
///
///
///
/// Container for the necessary parameters to execute the DescribeDimensionKeys service method.
///
/// The response from the DescribeDimensionKeys service method, as returned by PI.
///
/// The request failed due to an unknown error.
///
///
/// One of the arguments provided is invalid for this request.
///
///
/// The user is not authorized to perform this request.
///
/// REST API Reference for DescribeDimensionKeys Operation
public virtual DescribeDimensionKeysResponse DescribeDimensionKeys(DescribeDimensionKeysRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeDimensionKeysRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeDimensionKeysResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// Initiates the asynchronous execution of the DescribeDimensionKeys operation.
///
///
/// Container for the necessary parameters to execute the DescribeDimensionKeys operation on AmazonPIClient.
/// An AsyncCallback delegate that is invoked when the operation completes.
/// A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.
///
/// An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndDescribeDimensionKeys
/// operation.
/// REST API Reference for DescribeDimensionKeys Operation
public virtual IAsyncResult BeginDescribeDimensionKeys(DescribeDimensionKeysRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeDimensionKeysRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeDimensionKeysResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
///
/// Finishes the asynchronous execution of the DescribeDimensionKeys operation.
///
///
/// The IAsyncResult returned by the call to BeginDescribeDimensionKeys.
///
/// Returns a DescribeDimensionKeysResult from PI.
/// REST API Reference for DescribeDimensionKeys Operation
public virtual DescribeDimensionKeysResponse EndDescribeDimensionKeys(IAsyncResult asyncResult)
{
return EndInvoke(asyncResult);
}
#endregion
#region GetDimensionKeyDetails
///
/// Get the attributes of the specified dimension group for a DB instance or data source.
/// For example, if you specify a SQL ID, GetDimensionKeyDetails
retrieves
/// the full text of the dimension db.sql.statement
associated with this
/// ID. This operation is useful because GetResourceMetrics
and DescribeDimensionKeys
/// don't support retrieval of large SQL statement text.
///
/// Container for the necessary parameters to execute the GetDimensionKeyDetails service method.
///
/// The response from the GetDimensionKeyDetails service method, as returned by PI.
///
/// The request failed due to an unknown error.
///
///
/// One of the arguments provided is invalid for this request.
///
///
/// The user is not authorized to perform this request.
///
/// REST API Reference for GetDimensionKeyDetails Operation
public virtual GetDimensionKeyDetailsResponse GetDimensionKeyDetails(GetDimensionKeyDetailsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = GetDimensionKeyDetailsRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetDimensionKeyDetailsResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// Initiates the asynchronous execution of the GetDimensionKeyDetails operation.
///
///
/// Container for the necessary parameters to execute the GetDimensionKeyDetails operation on AmazonPIClient.
/// An AsyncCallback delegate that is invoked when the operation completes.
/// A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.
///
/// An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndGetDimensionKeyDetails
/// operation.
/// REST API Reference for GetDimensionKeyDetails Operation
public virtual IAsyncResult BeginGetDimensionKeyDetails(GetDimensionKeyDetailsRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = GetDimensionKeyDetailsRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetDimensionKeyDetailsResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
///
/// Finishes the asynchronous execution of the GetDimensionKeyDetails operation.
///
///
/// The IAsyncResult returned by the call to BeginGetDimensionKeyDetails.
///
/// Returns a GetDimensionKeyDetailsResult from PI.
/// REST API Reference for GetDimensionKeyDetails Operation
public virtual GetDimensionKeyDetailsResponse EndGetDimensionKeyDetails(IAsyncResult asyncResult)
{
return EndInvoke(asyncResult);
}
#endregion
#region GetResourceMetadata
///
/// Retrieve the metadata for different features. For example, the metadata might indicate
/// that a feature is turned on or off on a specific DB instance.
///
/// Container for the necessary parameters to execute the GetResourceMetadata service method.
///
/// The response from the GetResourceMetadata service method, as returned by PI.
///
/// The request failed due to an unknown error.
///
///
/// One of the arguments provided is invalid for this request.
///
///
/// The user is not authorized to perform this request.
///
/// REST API Reference for GetResourceMetadata Operation
public virtual GetResourceMetadataResponse GetResourceMetadata(GetResourceMetadataRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = GetResourceMetadataRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetResourceMetadataResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// Initiates the asynchronous execution of the GetResourceMetadata operation.
///
///
/// Container for the necessary parameters to execute the GetResourceMetadata operation on AmazonPIClient.
/// An AsyncCallback delegate that is invoked when the operation completes.
/// A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.
///
/// An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndGetResourceMetadata
/// operation.
/// REST API Reference for GetResourceMetadata Operation
public virtual IAsyncResult BeginGetResourceMetadata(GetResourceMetadataRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = GetResourceMetadataRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetResourceMetadataResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
///
/// Finishes the asynchronous execution of the GetResourceMetadata operation.
///
///
/// The IAsyncResult returned by the call to BeginGetResourceMetadata.
///
/// Returns a GetResourceMetadataResult from PI.
/// REST API Reference for GetResourceMetadata Operation
public virtual GetResourceMetadataResponse EndGetResourceMetadata(IAsyncResult asyncResult)
{
return EndInvoke(asyncResult);
}
#endregion
#region GetResourceMetrics
///
/// 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.
///
///
///
/// Container for the necessary parameters to execute the GetResourceMetrics service method.
///
/// The response from the GetResourceMetrics service method, as returned by PI.
///
/// The request failed due to an unknown error.
///
///
/// One of the arguments provided is invalid for this request.
///
///
/// The user is not authorized to perform this request.
///
/// REST API Reference for GetResourceMetrics Operation
public virtual GetResourceMetricsResponse GetResourceMetrics(GetResourceMetricsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = GetResourceMetricsRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetResourceMetricsResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// Initiates the asynchronous execution of the GetResourceMetrics operation.
///
///
/// Container for the necessary parameters to execute the GetResourceMetrics operation on AmazonPIClient.
/// An AsyncCallback delegate that is invoked when the operation completes.
/// A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.
///
/// An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndGetResourceMetrics
/// operation.
/// REST API Reference for GetResourceMetrics Operation
public virtual IAsyncResult BeginGetResourceMetrics(GetResourceMetricsRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = GetResourceMetricsRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetResourceMetricsResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
///
/// Finishes the asynchronous execution of the GetResourceMetrics operation.
///
///
/// The IAsyncResult returned by the call to BeginGetResourceMetrics.
///
/// Returns a GetResourceMetricsResult from PI.
/// REST API Reference for GetResourceMetrics Operation
public virtual GetResourceMetricsResponse EndGetResourceMetrics(IAsyncResult asyncResult)
{
return EndInvoke(asyncResult);
}
#endregion
#region ListAvailableResourceDimensions
///
/// Retrieve the dimensions that can be queried for each specified metric type on a specified
/// DB instance.
///
/// Container for the necessary parameters to execute the ListAvailableResourceDimensions service method.
///
/// The response from the ListAvailableResourceDimensions service method, as returned by PI.
///
/// The request failed due to an unknown error.
///
///
/// One of the arguments provided is invalid for this request.
///
///
/// The user is not authorized to perform this request.
///
/// REST API Reference for ListAvailableResourceDimensions Operation
public virtual ListAvailableResourceDimensionsResponse ListAvailableResourceDimensions(ListAvailableResourceDimensionsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ListAvailableResourceDimensionsRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListAvailableResourceDimensionsResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// Initiates the asynchronous execution of the ListAvailableResourceDimensions operation.
///
///
/// Container for the necessary parameters to execute the ListAvailableResourceDimensions operation on AmazonPIClient.
/// An AsyncCallback delegate that is invoked when the operation completes.
/// A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.
///
/// An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndListAvailableResourceDimensions
/// operation.
/// REST API Reference for ListAvailableResourceDimensions Operation
public virtual IAsyncResult BeginListAvailableResourceDimensions(ListAvailableResourceDimensionsRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = ListAvailableResourceDimensionsRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListAvailableResourceDimensionsResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
///
/// Finishes the asynchronous execution of the ListAvailableResourceDimensions operation.
///
///
/// The IAsyncResult returned by the call to BeginListAvailableResourceDimensions.
///
/// Returns a ListAvailableResourceDimensionsResult from PI.
/// REST API Reference for ListAvailableResourceDimensions Operation
public virtual ListAvailableResourceDimensionsResponse EndListAvailableResourceDimensions(IAsyncResult asyncResult)
{
return EndInvoke(asyncResult);
}
#endregion
#region ListAvailableResourceMetrics
///
/// Retrieve metrics of the specified types that can be queried for a specified DB instance.
///
/// Container for the necessary parameters to execute the ListAvailableResourceMetrics service method.
///
/// The response from the ListAvailableResourceMetrics service method, as returned by PI.
///
/// The request failed due to an unknown error.
///
///
/// One of the arguments provided is invalid for this request.
///
///
/// The user is not authorized to perform this request.
///
/// REST API Reference for ListAvailableResourceMetrics Operation
public virtual ListAvailableResourceMetricsResponse ListAvailableResourceMetrics(ListAvailableResourceMetricsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ListAvailableResourceMetricsRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListAvailableResourceMetricsResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// Initiates the asynchronous execution of the ListAvailableResourceMetrics operation.
///
///
/// Container for the necessary parameters to execute the ListAvailableResourceMetrics operation on AmazonPIClient.
/// An AsyncCallback delegate that is invoked when the operation completes.
/// A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
/// procedure using the AsyncState property.
///
/// An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndListAvailableResourceMetrics
/// operation.
/// REST API Reference for ListAvailableResourceMetrics Operation
public virtual IAsyncResult BeginListAvailableResourceMetrics(ListAvailableResourceMetricsRequest request, AsyncCallback callback, object state)
{
var options = new InvokeOptions();
options.RequestMarshaller = ListAvailableResourceMetricsRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListAvailableResourceMetricsResponseUnmarshaller.Instance;
return BeginInvoke(request, options, callback, state);
}
///
/// Finishes the asynchronous execution of the ListAvailableResourceMetrics operation.
///
///
/// The IAsyncResult returned by the call to BeginListAvailableResourceMetrics.
///
/// Returns a ListAvailableResourceMetricsResult from PI.
/// REST API Reference for ListAvailableResourceMetrics Operation
public virtual ListAvailableResourceMetricsResponse EndListAvailableResourceMetrics(IAsyncResult asyncResult)
{
return EndInvoke(asyncResult);
}
#endregion
}
}