예제 #1
0
        /// <summary>
        /// Retrieves a forecast for how much Amazon Web Services predicts that you will spend
        /// over the forecast time period that you select, based on your past costs.
        /// </summary>
        /// <param name="request">Container for the necessary parameters to execute the GetCostForecast service method.</param>
        ///
        /// <returns>The response from the GetCostForecast service method, as returned by CostExplorer.</returns>
        /// <exception cref="Amazon.CostExplorer.Model.DataUnavailableException">
        /// The requested data is unavailable.
        /// </exception>
        /// <exception cref="Amazon.CostExplorer.Model.LimitExceededException">
        /// You made too many calls in a short period of time. Try again later.
        /// </exception>
        /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ce-2017-10-25/GetCostForecast">REST API Reference for GetCostForecast Operation</seealso>
        public virtual GetCostForecastResponse GetCostForecast(GetCostForecastRequest request)
        {
            var marshaller   = GetCostForecastRequestMarshaller.Instance;
            var unmarshaller = GetCostForecastResponseUnmarshaller.Instance;

            return(Invoke <GetCostForecastRequest, GetCostForecastResponse>(request, marshaller, unmarshaller));
        }
예제 #2
0
        /// <summary>
        /// Initiates the asynchronous execution of the GetCostForecast operation.
        /// </summary>
        ///
        /// <param name="request">Container for the necessary parameters to execute the GetCostForecast operation.</param>
        /// <param name="cancellationToken">
        ///     A cancellation token that can be used by other objects or threads to receive notice of cancellation.
        /// </param>
        /// <returns>The task object representing the asynchronous operation.</returns>
        /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ce-2017-10-25/GetCostForecast">REST API Reference for GetCostForecast Operation</seealso>
        public virtual Task <GetCostForecastResponse> GetCostForecastAsync(GetCostForecastRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller   = GetCostForecastRequestMarshaller.Instance;
            var unmarshaller = GetCostForecastResponseUnmarshaller.Instance;

            return(InvokeAsync <GetCostForecastRequest, GetCostForecastResponse>(request, marshaller,
                                                                                 unmarshaller, cancellationToken));
        }
예제 #3
0
        /// <summary>
        /// Initiates the asynchronous execution of the GetCostForecast operation.
        /// </summary>
        ///
        /// <param name="request">Container for the necessary parameters to execute the GetCostForecast operation on AmazonCostExplorerClient.</param>
        /// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
        /// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
        ///          procedure using the AsyncState property.</param>
        ///
        /// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndGetCostForecast
        ///         operation.</returns>
        /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ce-2017-10-25/GetCostForecast">REST API Reference for GetCostForecast Operation</seealso>
        public virtual IAsyncResult BeginGetCostForecast(GetCostForecastRequest request, AsyncCallback callback, object state)
        {
            var marshaller   = GetCostForecastRequestMarshaller.Instance;
            var unmarshaller = GetCostForecastResponseUnmarshaller.Instance;

            return(BeginInvoke <GetCostForecastRequest>(request, marshaller, unmarshaller,
                                                        callback, state));
        }
예제 #4
0
        /// <summary>
        /// Retrieves a forecast for how much Amazon Web Services predicts that you will spend
        /// over the forecast time period that you select, based on your past costs.
        /// </summary>
        /// <param name="request">Container for the necessary parameters to execute the GetCostForecast service method.</param>
        /// <param name="cancellationToken">
        ///     A cancellation token that can be used by other objects or threads to receive notice of cancellation.
        /// </param>
        ///
        /// <returns>The response from the GetCostForecast service method, as returned by CostExplorer.</returns>
        /// <exception cref="Amazon.CostExplorer.Model.DataUnavailableException">
        /// The requested data is unavailable.
        /// </exception>
        /// <exception cref="Amazon.CostExplorer.Model.LimitExceededException">
        /// You made too many calls in a short period of time. Try again later.
        /// </exception>
        /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ce-2017-10-25/GetCostForecast">REST API Reference for GetCostForecast Operation</seealso>
        public virtual Task <GetCostForecastResponse> GetCostForecastAsync(GetCostForecastRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var options = new InvokeOptions();

            options.RequestMarshaller    = GetCostForecastRequestMarshaller.Instance;
            options.ResponseUnmarshaller = GetCostForecastResponseUnmarshaller.Instance;

            return(InvokeAsync <GetCostForecastResponse>(request, options, cancellationToken));
        }
예제 #5
0
        internal virtual GetCostForecastResponse GetCostForecast(GetCostForecastRequest request)
        {
            var options = new InvokeOptions();

            options.RequestMarshaller    = GetCostForecastRequestMarshaller.Instance;
            options.ResponseUnmarshaller = GetCostForecastResponseUnmarshaller.Instance;

            return(Invoke <GetCostForecastResponse>(request, options));
        }
예제 #6
0
        /// <summary>
        /// Initiates the asynchronous execution of the GetCostForecast operation.
        /// </summary>
        ///
        /// <param name="request">Container for the necessary parameters to execute the GetCostForecast operation on AmazonCostExplorerClient.</param>
        /// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
        /// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
        ///          procedure using the AsyncState property.</param>
        ///
        /// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndGetCostForecast
        ///         operation.</returns>
        /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/ce-2017-10-25/GetCostForecast">REST API Reference for GetCostForecast Operation</seealso>
        public virtual IAsyncResult BeginGetCostForecast(GetCostForecastRequest request, AsyncCallback callback, object state)
        {
            var options = new InvokeOptions();

            options.RequestMarshaller    = GetCostForecastRequestMarshaller.Instance;
            options.ResponseUnmarshaller = GetCostForecastResponseUnmarshaller.Instance;

            return(BeginInvoke(request, options, callback, state));
        }
예제 #7
0
        public async Task <GetCostForecastResponse> GetCostForecast(GetCostForecastRequest costForecastRequest)
        {
            using (var amazonCostExplorerClient = new AmazonCostExplorerClient(awsCredentials, RegionEndpoint.GetBySystemName("us-east-1")))
            {
                var response = await amazonCostExplorerClient.GetCostForecastAsync(costForecastRequest);

                return(response);
            }
        }