/* * 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 timestream-query-2018-11-01.normal.json service model. */ using System; using System.Runtime.ExceptionServices; using System.Threading; using System.Threading.Tasks; using System.Collections.Generic; using System.Net; using Amazon.TimestreamQuery.Model; using Amazon.TimestreamQuery.Model.Internal.MarshallTransformations; using Amazon.TimestreamQuery.Internal; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Auth; using Amazon.Runtime.Internal.Transform; namespace Amazon.TimestreamQuery { /// /// Implementation for accessing TimestreamQuery /// /// Amazon Timestream Query /// public partial class AmazonTimestreamQueryClient : AmazonServiceClient, IAmazonTimestreamQuery { private static IServiceMetadata serviceMetadata = new AmazonTimestreamQueryMetadata(); private ITimestreamQueryPaginatorFactory _paginators; /// /// Paginators for the service /// public ITimestreamQueryPaginatorFactory Paginators { get { if (this._paginators == null) { this._paginators = new TimestreamQueryPaginatorFactory(this); } return this._paginators; } } #region Constructors /// /// Constructs AmazonTimestreamQueryClient 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 AmazonTimestreamQueryClient() : base(FallbackCredentialsFactory.GetCredentials(), new AmazonTimestreamQueryConfig()) { } /// /// Constructs AmazonTimestreamQueryClient 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 AmazonTimestreamQueryClient(RegionEndpoint region) : base(FallbackCredentialsFactory.GetCredentials(), new AmazonTimestreamQueryConfig{RegionEndpoint = region}) { } /// /// Constructs AmazonTimestreamQueryClient 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 AmazonTimestreamQueryClient Configuration Object public AmazonTimestreamQueryClient(AmazonTimestreamQueryConfig config) : base(FallbackCredentialsFactory.GetCredentials(config), config){} /// /// Constructs AmazonTimestreamQueryClient with AWS Credentials /// /// AWS Credentials public AmazonTimestreamQueryClient(AWSCredentials credentials) : this(credentials, new AmazonTimestreamQueryConfig()) { } /// /// Constructs AmazonTimestreamQueryClient with AWS Credentials /// /// AWS Credentials /// The region to connect. public AmazonTimestreamQueryClient(AWSCredentials credentials, RegionEndpoint region) : this(credentials, new AmazonTimestreamQueryConfig{RegionEndpoint = region}) { } /// /// Constructs AmazonTimestreamQueryClient with AWS Credentials and an /// AmazonTimestreamQueryClient Configuration object. /// /// AWS Credentials /// The AmazonTimestreamQueryClient Configuration Object public AmazonTimestreamQueryClient(AWSCredentials credentials, AmazonTimestreamQueryConfig clientConfig) : base(credentials, clientConfig) { } /// /// Constructs AmazonTimestreamQueryClient with AWS Access Key ID and AWS Secret Key /// /// AWS Access Key ID /// AWS Secret Access Key public AmazonTimestreamQueryClient(string awsAccessKeyId, string awsSecretAccessKey) : this(awsAccessKeyId, awsSecretAccessKey, new AmazonTimestreamQueryConfig()) { } /// /// Constructs AmazonTimestreamQueryClient with AWS Access Key ID and AWS Secret Key /// /// AWS Access Key ID /// AWS Secret Access Key /// The region to connect. public AmazonTimestreamQueryClient(string awsAccessKeyId, string awsSecretAccessKey, RegionEndpoint region) : this(awsAccessKeyId, awsSecretAccessKey, new AmazonTimestreamQueryConfig() {RegionEndpoint=region}) { } /// /// Constructs AmazonTimestreamQueryClient with AWS Access Key ID, AWS Secret Key and an /// AmazonTimestreamQueryClient Configuration object. /// /// AWS Access Key ID /// AWS Secret Access Key /// The AmazonTimestreamQueryClient Configuration Object public AmazonTimestreamQueryClient(string awsAccessKeyId, string awsSecretAccessKey, AmazonTimestreamQueryConfig clientConfig) : base(awsAccessKeyId, awsSecretAccessKey, clientConfig) { } /// /// Constructs AmazonTimestreamQueryClient with AWS Access Key ID and AWS Secret Key /// /// AWS Access Key ID /// AWS Secret Access Key /// AWS Session Token public AmazonTimestreamQueryClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken) : this(awsAccessKeyId, awsSecretAccessKey, awsSessionToken, new AmazonTimestreamQueryConfig()) { } /// /// Constructs AmazonTimestreamQueryClient 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 AmazonTimestreamQueryClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken, RegionEndpoint region) : this(awsAccessKeyId, awsSecretAccessKey, awsSessionToken, new AmazonTimestreamQueryConfig{RegionEndpoint = region}) { } /// /// Constructs AmazonTimestreamQueryClient with AWS Access Key ID, AWS Secret Key and an /// AmazonTimestreamQueryClient Configuration object. /// /// AWS Access Key ID /// AWS Secret Access Key /// AWS Session Token /// The AmazonTimestreamQueryClient Configuration Object public AmazonTimestreamQueryClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken, AmazonTimestreamQueryConfig 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 AmazonTimestreamQueryEndpointResolver()); } /// /// 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 EndpointOperation Override protected override IEnumerable EndpointOperation(EndpointOperationContextBase context) { return EndpointDiscoveryResolver.ResolveEndpoints(context, () => { var request = new DescribeEndpointsRequest { }; var response = DescribeEndpoints(request); if(response.HttpStatusCode != HttpStatusCode.OK || response.Endpoints == null) { return null; } var endpoints = new List(); foreach(var endpoint in response.Endpoints) { endpoints.Add(new DiscoveryEndpoint(endpoint.Address, endpoint.CachePeriodInMinutes)); } return endpoints; }); } #endregion #region CancelQuery /// /// Cancels a query that has been issued. Cancellation is provided only if the query /// has not completed running before the cancellation request was issued. Because cancellation /// is an idempotent operation, subsequent cancellation requests will return a CancellationMessage, /// indicating that the query has already been canceled. See code /// sample for details. /// /// Container for the necessary parameters to execute the CancelQuery service method. /// /// The response from the CancelQuery service method, as returned by TimestreamQuery. /// /// You are not authorized to perform this action. /// /// /// Timestream was unable to fully process this request because of an internal server /// error. /// /// /// The requested endpoint was not valid. /// /// /// The request was denied due to request throttling. /// /// /// Invalid or malformed request. /// /// REST API Reference for CancelQuery Operation public virtual CancelQueryResponse CancelQuery(CancelQueryRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = CancelQueryRequestMarshaller.Instance; options.ResponseUnmarshaller = CancelQueryResponseUnmarshaller.Instance; options.EndpointDiscoveryMarshaller = CancelQueryEndpointDiscoveryMarshaller.Instance; options.EndpointOperation = EndpointOperation; return Invoke(request, options); } /// /// Cancels a query that has been issued. Cancellation is provided only if the query /// has not completed running before the cancellation request was issued. Because cancellation /// is an idempotent operation, subsequent cancellation requests will return a CancellationMessage, /// indicating that the query has already been canceled. See code /// sample for details. /// /// Container for the necessary parameters to execute the CancelQuery service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// The response from the CancelQuery service method, as returned by TimestreamQuery. /// /// You are not authorized to perform this action. /// /// /// Timestream was unable to fully process this request because of an internal server /// error. /// /// /// The requested endpoint was not valid. /// /// /// The request was denied due to request throttling. /// /// /// Invalid or malformed request. /// /// REST API Reference for CancelQuery Operation public virtual Task CancelQueryAsync(CancelQueryRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = CancelQueryRequestMarshaller.Instance; options.ResponseUnmarshaller = CancelQueryResponseUnmarshaller.Instance; options.EndpointDiscoveryMarshaller = CancelQueryEndpointDiscoveryMarshaller.Instance; options.EndpointOperation = EndpointOperation; return InvokeAsync(request, options, cancellationToken); } #endregion #region CreateScheduledQuery /// /// Create a scheduled query that will be run on your behalf at the configured schedule. /// Timestream assumes the execution role provided as part of the ScheduledQueryExecutionRoleArn /// parameter to run the query. You can use the NotificationConfiguration /// parameter to configure notification for your scheduled query operations. /// /// Container for the necessary parameters to execute the CreateScheduledQuery service method. /// /// The response from the CreateScheduledQuery service method, as returned by TimestreamQuery. /// /// You are not authorized to perform this action. /// /// /// Unable to poll results for a cancelled query. /// /// /// Timestream was unable to fully process this request because of an internal server /// error. /// /// /// The requested endpoint was not valid. /// /// /// You have exceeded the service quota. /// /// /// The request was denied due to request throttling. /// /// /// Invalid or malformed request. /// /// REST API Reference for CreateScheduledQuery Operation public virtual CreateScheduledQueryResponse CreateScheduledQuery(CreateScheduledQueryRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = CreateScheduledQueryRequestMarshaller.Instance; options.ResponseUnmarshaller = CreateScheduledQueryResponseUnmarshaller.Instance; options.EndpointDiscoveryMarshaller = CreateScheduledQueryEndpointDiscoveryMarshaller.Instance; options.EndpointOperation = EndpointOperation; return Invoke(request, options); } /// /// Create a scheduled query that will be run on your behalf at the configured schedule. /// Timestream assumes the execution role provided as part of the ScheduledQueryExecutionRoleArn /// parameter to run the query. You can use the NotificationConfiguration /// parameter to configure notification for your scheduled query operations. /// /// Container for the necessary parameters to execute the CreateScheduledQuery service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// The response from the CreateScheduledQuery service method, as returned by TimestreamQuery. /// /// You are not authorized to perform this action. /// /// /// Unable to poll results for a cancelled query. /// /// /// Timestream was unable to fully process this request because of an internal server /// error. /// /// /// The requested endpoint was not valid. /// /// /// You have exceeded the service quota. /// /// /// The request was denied due to request throttling. /// /// /// Invalid or malformed request. /// /// REST API Reference for CreateScheduledQuery Operation public virtual Task CreateScheduledQueryAsync(CreateScheduledQueryRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = CreateScheduledQueryRequestMarshaller.Instance; options.ResponseUnmarshaller = CreateScheduledQueryResponseUnmarshaller.Instance; options.EndpointDiscoveryMarshaller = CreateScheduledQueryEndpointDiscoveryMarshaller.Instance; options.EndpointOperation = EndpointOperation; return InvokeAsync(request, options, cancellationToken); } #endregion #region DeleteScheduledQuery /// /// Deletes a given scheduled query. This is an irreversible operation. /// /// Container for the necessary parameters to execute the DeleteScheduledQuery service method. /// /// The response from the DeleteScheduledQuery service method, as returned by TimestreamQuery. /// /// You are not authorized to perform this action. /// /// /// Timestream was unable to fully process this request because of an internal server /// error. /// /// /// The requested endpoint was not valid. /// /// /// The requested resource could not be found. /// /// /// The request was denied due to request throttling. /// /// /// Invalid or malformed request. /// /// REST API Reference for DeleteScheduledQuery Operation public virtual DeleteScheduledQueryResponse DeleteScheduledQuery(DeleteScheduledQueryRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = DeleteScheduledQueryRequestMarshaller.Instance; options.ResponseUnmarshaller = DeleteScheduledQueryResponseUnmarshaller.Instance; options.EndpointDiscoveryMarshaller = DeleteScheduledQueryEndpointDiscoveryMarshaller.Instance; options.EndpointOperation = EndpointOperation; return Invoke(request, options); } /// /// Deletes a given scheduled query. This is an irreversible operation. /// /// Container for the necessary parameters to execute the DeleteScheduledQuery service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// The response from the DeleteScheduledQuery service method, as returned by TimestreamQuery. /// /// You are not authorized to perform this action. /// /// /// Timestream was unable to fully process this request because of an internal server /// error. /// /// /// The requested endpoint was not valid. /// /// /// The requested resource could not be found. /// /// /// The request was denied due to request throttling. /// /// /// Invalid or malformed request. /// /// REST API Reference for DeleteScheduledQuery Operation public virtual Task DeleteScheduledQueryAsync(DeleteScheduledQueryRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = DeleteScheduledQueryRequestMarshaller.Instance; options.ResponseUnmarshaller = DeleteScheduledQueryResponseUnmarshaller.Instance; options.EndpointDiscoveryMarshaller = DeleteScheduledQueryEndpointDiscoveryMarshaller.Instance; options.EndpointOperation = EndpointOperation; return InvokeAsync(request, options, cancellationToken); } #endregion #region DescribeEndpoints /// /// DescribeEndpoints returns a list of available endpoints to make Timestream API calls /// against. This API is available through both Write and Query. /// /// /// /// Because the Timestream SDKs are designed to transparently work with the service’s /// architecture, including the management and mapping of the service endpoints, it /// is not recommended that you use this API unless: /// /// /// /// For detailed information on how and when to use and implement DescribeEndpoints, see /// The /// Endpoint Discovery Pattern. /// /// /// Container for the necessary parameters to execute the DescribeEndpoints service method. /// /// The response from the DescribeEndpoints service method, as returned by TimestreamQuery. /// /// Timestream was unable to fully process this request because of an internal server /// error. /// /// /// The request was denied due to request throttling. /// /// /// Invalid or malformed request. /// /// REST API Reference for DescribeEndpoints Operation public virtual DescribeEndpointsResponse DescribeEndpoints(DescribeEndpointsRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = DescribeEndpointsRequestMarshaller.Instance; options.ResponseUnmarshaller = DescribeEndpointsResponseUnmarshaller.Instance; return Invoke(request, options); } /// /// DescribeEndpoints returns a list of available endpoints to make Timestream API calls /// against. This API is available through both Write and Query. /// /// /// /// Because the Timestream SDKs are designed to transparently work with the service’s /// architecture, including the management and mapping of the service endpoints, it /// is not recommended that you use this API unless: /// /// /// /// For detailed information on how and when to use and implement DescribeEndpoints, see /// The /// Endpoint Discovery Pattern. /// /// /// Container for the necessary parameters to execute the DescribeEndpoints service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// The response from the DescribeEndpoints service method, as returned by TimestreamQuery. /// /// Timestream was unable to fully process this request because of an internal server /// error. /// /// /// The request was denied due to request throttling. /// /// /// Invalid or malformed request. /// /// REST API Reference for DescribeEndpoints Operation public virtual Task DescribeEndpointsAsync(DescribeEndpointsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = DescribeEndpointsRequestMarshaller.Instance; options.ResponseUnmarshaller = DescribeEndpointsResponseUnmarshaller.Instance; return InvokeAsync(request, options, cancellationToken); } #endregion #region DescribeScheduledQuery /// /// Provides detailed information about a scheduled query. /// /// Container for the necessary parameters to execute the DescribeScheduledQuery service method. /// /// The response from the DescribeScheduledQuery service method, as returned by TimestreamQuery. /// /// You are not authorized to perform this action. /// /// /// Timestream was unable to fully process this request because of an internal server /// error. /// /// /// The requested endpoint was not valid. /// /// /// The requested resource could not be found. /// /// /// The request was denied due to request throttling. /// /// /// Invalid or malformed request. /// /// REST API Reference for DescribeScheduledQuery Operation public virtual DescribeScheduledQueryResponse DescribeScheduledQuery(DescribeScheduledQueryRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = DescribeScheduledQueryRequestMarshaller.Instance; options.ResponseUnmarshaller = DescribeScheduledQueryResponseUnmarshaller.Instance; options.EndpointDiscoveryMarshaller = DescribeScheduledQueryEndpointDiscoveryMarshaller.Instance; options.EndpointOperation = EndpointOperation; return Invoke(request, options); } /// /// Provides detailed information about a scheduled query. /// /// Container for the necessary parameters to execute the DescribeScheduledQuery service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// The response from the DescribeScheduledQuery service method, as returned by TimestreamQuery. /// /// You are not authorized to perform this action. /// /// /// Timestream was unable to fully process this request because of an internal server /// error. /// /// /// The requested endpoint was not valid. /// /// /// The requested resource could not be found. /// /// /// The request was denied due to request throttling. /// /// /// Invalid or malformed request. /// /// REST API Reference for DescribeScheduledQuery Operation public virtual Task DescribeScheduledQueryAsync(DescribeScheduledQueryRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = DescribeScheduledQueryRequestMarshaller.Instance; options.ResponseUnmarshaller = DescribeScheduledQueryResponseUnmarshaller.Instance; options.EndpointDiscoveryMarshaller = DescribeScheduledQueryEndpointDiscoveryMarshaller.Instance; options.EndpointOperation = EndpointOperation; return InvokeAsync(request, options, cancellationToken); } #endregion #region ExecuteScheduledQuery /// /// You can use this API to run a scheduled query manually. /// /// Container for the necessary parameters to execute the ExecuteScheduledQuery service method. /// /// The response from the ExecuteScheduledQuery service method, as returned by TimestreamQuery. /// /// You are not authorized to perform this action. /// /// /// Timestream was unable to fully process this request because of an internal server /// error. /// /// /// The requested endpoint was not valid. /// /// /// The requested resource could not be found. /// /// /// The request was denied due to request throttling. /// /// /// Invalid or malformed request. /// /// REST API Reference for ExecuteScheduledQuery Operation public virtual ExecuteScheduledQueryResponse ExecuteScheduledQuery(ExecuteScheduledQueryRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = ExecuteScheduledQueryRequestMarshaller.Instance; options.ResponseUnmarshaller = ExecuteScheduledQueryResponseUnmarshaller.Instance; options.EndpointDiscoveryMarshaller = ExecuteScheduledQueryEndpointDiscoveryMarshaller.Instance; options.EndpointOperation = EndpointOperation; return Invoke(request, options); } /// /// You can use this API to run a scheduled query manually. /// /// Container for the necessary parameters to execute the ExecuteScheduledQuery service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// The response from the ExecuteScheduledQuery service method, as returned by TimestreamQuery. /// /// You are not authorized to perform this action. /// /// /// Timestream was unable to fully process this request because of an internal server /// error. /// /// /// The requested endpoint was not valid. /// /// /// The requested resource could not be found. /// /// /// The request was denied due to request throttling. /// /// /// Invalid or malformed request. /// /// REST API Reference for ExecuteScheduledQuery Operation public virtual Task ExecuteScheduledQueryAsync(ExecuteScheduledQueryRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = ExecuteScheduledQueryRequestMarshaller.Instance; options.ResponseUnmarshaller = ExecuteScheduledQueryResponseUnmarshaller.Instance; options.EndpointDiscoveryMarshaller = ExecuteScheduledQueryEndpointDiscoveryMarshaller.Instance; options.EndpointOperation = EndpointOperation; return InvokeAsync(request, options, cancellationToken); } #endregion #region ListScheduledQueries /// /// Gets a list of all scheduled queries in the caller's Amazon account and Region. ListScheduledQueries /// is eventually consistent. /// /// Container for the necessary parameters to execute the ListScheduledQueries service method. /// /// The response from the ListScheduledQueries service method, as returned by TimestreamQuery. /// /// You are not authorized to perform this action. /// /// /// Timestream was unable to fully process this request because of an internal server /// error. /// /// /// The requested endpoint was not valid. /// /// /// The request was denied due to request throttling. /// /// /// Invalid or malformed request. /// /// REST API Reference for ListScheduledQueries Operation public virtual ListScheduledQueriesResponse ListScheduledQueries(ListScheduledQueriesRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = ListScheduledQueriesRequestMarshaller.Instance; options.ResponseUnmarshaller = ListScheduledQueriesResponseUnmarshaller.Instance; options.EndpointDiscoveryMarshaller = ListScheduledQueriesEndpointDiscoveryMarshaller.Instance; options.EndpointOperation = EndpointOperation; return Invoke(request, options); } /// /// Gets a list of all scheduled queries in the caller's Amazon account and Region. ListScheduledQueries /// is eventually consistent. /// /// Container for the necessary parameters to execute the ListScheduledQueries service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// The response from the ListScheduledQueries service method, as returned by TimestreamQuery. /// /// You are not authorized to perform this action. /// /// /// Timestream was unable to fully process this request because of an internal server /// error. /// /// /// The requested endpoint was not valid. /// /// /// The request was denied due to request throttling. /// /// /// Invalid or malformed request. /// /// REST API Reference for ListScheduledQueries Operation public virtual Task ListScheduledQueriesAsync(ListScheduledQueriesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = ListScheduledQueriesRequestMarshaller.Instance; options.ResponseUnmarshaller = ListScheduledQueriesResponseUnmarshaller.Instance; options.EndpointDiscoveryMarshaller = ListScheduledQueriesEndpointDiscoveryMarshaller.Instance; options.EndpointOperation = EndpointOperation; return InvokeAsync(request, options, cancellationToken); } #endregion #region ListTagsForResource /// /// List all tags on a Timestream query resource. /// /// Container for the necessary parameters to execute the ListTagsForResource service method. /// /// The response from the ListTagsForResource service method, as returned by TimestreamQuery. /// /// The requested endpoint was not valid. /// /// /// The requested resource could not be found. /// /// /// The request was denied due to request throttling. /// /// /// Invalid or malformed request. /// /// REST API Reference for ListTagsForResource Operation public virtual ListTagsForResourceResponse ListTagsForResource(ListTagsForResourceRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = ListTagsForResourceRequestMarshaller.Instance; options.ResponseUnmarshaller = ListTagsForResourceResponseUnmarshaller.Instance; options.EndpointDiscoveryMarshaller = ListTagsForResourceEndpointDiscoveryMarshaller.Instance; options.EndpointOperation = EndpointOperation; return Invoke(request, options); } /// /// List all tags on a Timestream query resource. /// /// Container for the necessary parameters to execute the ListTagsForResource service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// The response from the ListTagsForResource service method, as returned by TimestreamQuery. /// /// The requested endpoint was not valid. /// /// /// The requested resource could not be found. /// /// /// The request was denied due to request throttling. /// /// /// Invalid or malformed request. /// /// REST API Reference for ListTagsForResource Operation public virtual Task ListTagsForResourceAsync(ListTagsForResourceRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = ListTagsForResourceRequestMarshaller.Instance; options.ResponseUnmarshaller = ListTagsForResourceResponseUnmarshaller.Instance; options.EndpointDiscoveryMarshaller = ListTagsForResourceEndpointDiscoveryMarshaller.Instance; options.EndpointOperation = EndpointOperation; return InvokeAsync(request, options, cancellationToken); } #endregion #region PrepareQuery /// /// A synchronous operation that allows you to submit a query with parameters to be stored /// by Timestream for later running. Timestream only supports using this operation with /// the PrepareQueryRequest$ValidateOnly set to true. /// /// Container for the necessary parameters to execute the PrepareQuery service method. /// /// The response from the PrepareQuery service method, as returned by TimestreamQuery. /// /// You are not authorized to perform this action. /// /// /// Timestream was unable to fully process this request because of an internal server /// error. /// /// /// The requested endpoint was not valid. /// /// /// The request was denied due to request throttling. /// /// /// Invalid or malformed request. /// /// REST API Reference for PrepareQuery Operation public virtual PrepareQueryResponse PrepareQuery(PrepareQueryRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = PrepareQueryRequestMarshaller.Instance; options.ResponseUnmarshaller = PrepareQueryResponseUnmarshaller.Instance; options.EndpointDiscoveryMarshaller = PrepareQueryEndpointDiscoveryMarshaller.Instance; options.EndpointOperation = EndpointOperation; return Invoke(request, options); } /// /// A synchronous operation that allows you to submit a query with parameters to be stored /// by Timestream for later running. Timestream only supports using this operation with /// the PrepareQueryRequest$ValidateOnly set to true. /// /// Container for the necessary parameters to execute the PrepareQuery service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// The response from the PrepareQuery service method, as returned by TimestreamQuery. /// /// You are not authorized to perform this action. /// /// /// Timestream was unable to fully process this request because of an internal server /// error. /// /// /// The requested endpoint was not valid. /// /// /// The request was denied due to request throttling. /// /// /// Invalid or malformed request. /// /// REST API Reference for PrepareQuery Operation public virtual Task PrepareQueryAsync(PrepareQueryRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = PrepareQueryRequestMarshaller.Instance; options.ResponseUnmarshaller = PrepareQueryResponseUnmarshaller.Instance; options.EndpointDiscoveryMarshaller = PrepareQueryEndpointDiscoveryMarshaller.Instance; options.EndpointOperation = EndpointOperation; return InvokeAsync(request, options, cancellationToken); } #endregion #region Query /// /// Query is a synchronous operation that enables you to run a query against /// your Amazon Timestream data. Query will time out after 60 seconds. You /// must update the default timeout in the SDK to support a timeout of 60 seconds. See /// the code /// sample for details. /// /// /// /// Your query request will fail in the following cases: /// ///
  • /// /// If you submit a Query request with the same client token outside of /// the 5-minute idempotency window. /// ///
  • /// /// If you submit a Query request with the same client token, but change /// other parameters, within the 5-minute idempotency window. /// ///
  • /// /// If the size of the row (including the query metadata) exceeds 1 MB, then the query /// will fail with the following error message: /// /// /// /// Query aborted as max page response size has been exceeded by the output result /// row /// ///
  • /// /// If the IAM principal of the query initiator and the result reader are not the same /// and/or the query initiator and the result reader do not have the same query string /// in the query requests, the query will fail with an Invalid pagination token /// error. /// ///
///
/// Container for the necessary parameters to execute the Query service method. /// /// The response from the Query service method, as returned by TimestreamQuery. /// /// You are not authorized to perform this action. /// /// /// Unable to poll results for a cancelled query. /// /// /// Timestream was unable to fully process this request because of an internal server /// error. /// /// /// The requested endpoint was not valid. /// /// /// Timestream was unable to run the query successfully. /// /// /// The request was denied due to request throttling. /// /// /// Invalid or malformed request. /// /// REST API Reference for Query Operation public virtual QueryResponse Query(QueryRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = QueryRequestMarshaller.Instance; options.ResponseUnmarshaller = QueryResponseUnmarshaller.Instance; options.EndpointDiscoveryMarshaller = QueryEndpointDiscoveryMarshaller.Instance; options.EndpointOperation = EndpointOperation; return Invoke(request, options); } /// /// Query is a synchronous operation that enables you to run a query against /// your Amazon Timestream data. Query will time out after 60 seconds. You /// must update the default timeout in the SDK to support a timeout of 60 seconds. See /// the code /// sample for details. /// /// /// /// Your query request will fail in the following cases: /// ///
  • /// /// If you submit a Query request with the same client token outside of /// the 5-minute idempotency window. /// ///
  • /// /// If you submit a Query request with the same client token, but change /// other parameters, within the 5-minute idempotency window. /// ///
  • /// /// If the size of the row (including the query metadata) exceeds 1 MB, then the query /// will fail with the following error message: /// /// /// /// Query aborted as max page response size has been exceeded by the output result /// row /// ///
  • /// /// If the IAM principal of the query initiator and the result reader are not the same /// and/or the query initiator and the result reader do not have the same query string /// in the query requests, the query will fail with an Invalid pagination token /// error. /// ///
///
/// Container for the necessary parameters to execute the Query service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// The response from the Query service method, as returned by TimestreamQuery. /// /// You are not authorized to perform this action. /// /// /// Unable to poll results for a cancelled query. /// /// /// Timestream was unable to fully process this request because of an internal server /// error. /// /// /// The requested endpoint was not valid. /// /// /// Timestream was unable to run the query successfully. /// /// /// The request was denied due to request throttling. /// /// /// Invalid or malformed request. /// /// REST API Reference for Query Operation public virtual Task QueryAsync(QueryRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = QueryRequestMarshaller.Instance; options.ResponseUnmarshaller = QueryResponseUnmarshaller.Instance; options.EndpointDiscoveryMarshaller = QueryEndpointDiscoveryMarshaller.Instance; options.EndpointOperation = EndpointOperation; return InvokeAsync(request, options, cancellationToken); } #endregion #region TagResource /// /// Associate a set of tags with a Timestream resource. You can then activate these user-defined /// tags so that they appear on the Billing and Cost Management console for cost allocation /// tracking. /// /// Container for the necessary parameters to execute the TagResource service method. /// /// The response from the TagResource service method, as returned by TimestreamQuery. /// /// The requested endpoint was not valid. /// /// /// The requested resource could not be found. /// /// /// You have exceeded the service quota. /// /// /// The request was denied due to request throttling. /// /// /// Invalid or malformed request. /// /// REST API Reference for TagResource Operation public virtual TagResourceResponse TagResource(TagResourceRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = TagResourceRequestMarshaller.Instance; options.ResponseUnmarshaller = TagResourceResponseUnmarshaller.Instance; options.EndpointDiscoveryMarshaller = TagResourceEndpointDiscoveryMarshaller.Instance; options.EndpointOperation = EndpointOperation; return Invoke(request, options); } /// /// Associate a set of tags with a Timestream resource. You can then activate these user-defined /// tags so that they appear on the Billing and Cost Management console for cost allocation /// tracking. /// /// Container for the necessary parameters to execute the TagResource service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// The response from the TagResource service method, as returned by TimestreamQuery. /// /// The requested endpoint was not valid. /// /// /// The requested resource could not be found. /// /// /// You have exceeded the service quota. /// /// /// The request was denied due to request throttling. /// /// /// Invalid or malformed request. /// /// REST API Reference for TagResource Operation public virtual Task TagResourceAsync(TagResourceRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = TagResourceRequestMarshaller.Instance; options.ResponseUnmarshaller = TagResourceResponseUnmarshaller.Instance; options.EndpointDiscoveryMarshaller = TagResourceEndpointDiscoveryMarshaller.Instance; options.EndpointOperation = EndpointOperation; return InvokeAsync(request, options, cancellationToken); } #endregion #region UntagResource /// /// Removes the association of tags from a Timestream query resource. /// /// Container for the necessary parameters to execute the UntagResource service method. /// /// The response from the UntagResource service method, as returned by TimestreamQuery. /// /// The requested endpoint was not valid. /// /// /// The requested resource could not be found. /// /// /// The request was denied due to request throttling. /// /// /// Invalid or malformed request. /// /// REST API Reference for UntagResource Operation public virtual UntagResourceResponse UntagResource(UntagResourceRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = UntagResourceRequestMarshaller.Instance; options.ResponseUnmarshaller = UntagResourceResponseUnmarshaller.Instance; options.EndpointDiscoveryMarshaller = UntagResourceEndpointDiscoveryMarshaller.Instance; options.EndpointOperation = EndpointOperation; return Invoke(request, options); } /// /// Removes the association of tags from a Timestream query resource. /// /// Container for the necessary parameters to execute the UntagResource service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// The response from the UntagResource service method, as returned by TimestreamQuery. /// /// The requested endpoint was not valid. /// /// /// The requested resource could not be found. /// /// /// The request was denied due to request throttling. /// /// /// Invalid or malformed request. /// /// REST API Reference for UntagResource Operation public virtual Task UntagResourceAsync(UntagResourceRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = UntagResourceRequestMarshaller.Instance; options.ResponseUnmarshaller = UntagResourceResponseUnmarshaller.Instance; options.EndpointDiscoveryMarshaller = UntagResourceEndpointDiscoveryMarshaller.Instance; options.EndpointOperation = EndpointOperation; return InvokeAsync(request, options, cancellationToken); } #endregion #region UpdateScheduledQuery /// /// Update a scheduled query. /// /// Container for the necessary parameters to execute the UpdateScheduledQuery service method. /// /// The response from the UpdateScheduledQuery service method, as returned by TimestreamQuery. /// /// You are not authorized to perform this action. /// /// /// Timestream was unable to fully process this request because of an internal server /// error. /// /// /// The requested endpoint was not valid. /// /// /// The requested resource could not be found. /// /// /// The request was denied due to request throttling. /// /// /// Invalid or malformed request. /// /// REST API Reference for UpdateScheduledQuery Operation public virtual UpdateScheduledQueryResponse UpdateScheduledQuery(UpdateScheduledQueryRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = UpdateScheduledQueryRequestMarshaller.Instance; options.ResponseUnmarshaller = UpdateScheduledQueryResponseUnmarshaller.Instance; options.EndpointDiscoveryMarshaller = UpdateScheduledQueryEndpointDiscoveryMarshaller.Instance; options.EndpointOperation = EndpointOperation; return Invoke(request, options); } /// /// Update a scheduled query. /// /// Container for the necessary parameters to execute the UpdateScheduledQuery service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// The response from the UpdateScheduledQuery service method, as returned by TimestreamQuery. /// /// You are not authorized to perform this action. /// /// /// Timestream was unable to fully process this request because of an internal server /// error. /// /// /// The requested endpoint was not valid. /// /// /// The requested resource could not be found. /// /// /// The request was denied due to request throttling. /// /// /// Invalid or malformed request. /// /// REST API Reference for UpdateScheduledQuery Operation public virtual Task UpdateScheduledQueryAsync(UpdateScheduledQueryRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = UpdateScheduledQueryRequestMarshaller.Instance; options.ResponseUnmarshaller = UpdateScheduledQueryResponseUnmarshaller.Instance; options.EndpointDiscoveryMarshaller = UpdateScheduledQueryEndpointDiscoveryMarshaller.Instance; options.EndpointOperation = EndpointOperation; return InvokeAsync(request, options, cancellationToken); } #endregion } }