internal virtual MeterUsageResponse MeterUsage(MeterUsageRequest request)
        {
            var marshaller   = new MeterUsageRequestMarshaller();
            var unmarshaller = MeterUsageResponseUnmarshaller.Instance;

            return(Invoke <MeterUsageRequest, MeterUsageResponse>(request, marshaller, unmarshaller));
        }
        /// <summary>
        /// Initiates the asynchronous execution of the MeterUsage operation.
        /// </summary>
        ///
        /// <param name="request">Container for the necessary parameters to execute the MeterUsage 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/meteringmarketplace-2016-01-14/MeterUsage">REST API Reference for MeterUsage Operation</seealso>
        public virtual Task <MeterUsageResponse> MeterUsageAsync(MeterUsageRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller   = new MeterUsageRequestMarshaller();
            var unmarshaller = MeterUsageResponseUnmarshaller.Instance;

            return(InvokeAsync <MeterUsageRequest, MeterUsageResponse>(request, marshaller,
                                                                       unmarshaller, cancellationToken));
        }
Beispiel #3
0
        /// <summary>
        /// Initiates the asynchronous execution of the MeterUsage operation.
        /// </summary>
        ///
        /// <param name="request">Container for the necessary parameters to execute the MeterUsage operation on AmazonAWSMarketplaceMeteringClient.</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 EndMeterUsage
        ///         operation.</returns>
        /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/meteringmarketplace-2016-01-14/MeterUsage">REST API Reference for MeterUsage Operation</seealso>
        public virtual IAsyncResult BeginMeterUsage(MeterUsageRequest request, AsyncCallback callback, object state)
        {
            var marshaller   = new MeterUsageRequestMarshaller();
            var unmarshaller = MeterUsageResponseUnmarshaller.Instance;

            return(BeginInvoke <MeterUsageRequest>(request, marshaller, unmarshaller,
                                                   callback, state));
        }
        /// <summary>
        /// API to emit metering records. For identical requests, the API is idempotent. It simply
        /// returns the metering record ID.
        /// 
        ///  
        /// <para>
        /// MeterUsage is authenticated on the buyer's AWS account using credentials from the
        /// EC2 instance, ECS task, or EKS pod.
        /// </para>
        /// </summary>
        /// <param name="request">Container for the necessary parameters to execute the MeterUsage 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 MeterUsage service method, as returned by AWSMarketplaceMetering.</returns>
        /// <exception cref="Amazon.AWSMarketplaceMetering.Model.CustomerNotEntitledException">
        /// Exception thrown when the customer does not have a valid subscription for the product.
        /// </exception>
        /// <exception cref="Amazon.AWSMarketplaceMetering.Model.DuplicateRequestException">
        /// A metering record has already been emitted by the same EC2 instance, ECS task, or
        /// EKS pod for the given {usageDimension, timestamp} with a different usageQuantity.
        /// </exception>
        /// <exception cref="Amazon.AWSMarketplaceMetering.Model.InternalServiceErrorException">
        /// An internal error has occurred. Retry your request. If the problem persists, post
        /// a message with details on the AWS forums.
        /// </exception>
        /// <exception cref="Amazon.AWSMarketplaceMetering.Model.InvalidEndpointRegionException">
        /// The endpoint being called is in a AWS Region different from your EC2 instance, ECS
        /// task, or EKS pod. The Region of the Metering Service endpoint and the AWS Region of
        /// the resource must match.
        /// </exception>
        /// <exception cref="Amazon.AWSMarketplaceMetering.Model.InvalidProductCodeException">
        /// The product code passed does not match the product code used for publishing the product.
        /// </exception>
        /// <exception cref="Amazon.AWSMarketplaceMetering.Model.InvalidUsageDimensionException">
        /// The usage dimension does not match one of the UsageDimensions associated with products.
        /// </exception>
        /// <exception cref="Amazon.AWSMarketplaceMetering.Model.ThrottlingException">
        /// The calls to the API are throttled.
        /// </exception>
        /// <exception cref="Amazon.AWSMarketplaceMetering.Model.TimestampOutOfBoundsException">
        /// The timestamp value passed in the meterUsage() is out of allowed range.
        /// </exception>
        /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/meteringmarketplace-2016-01-14/MeterUsage">REST API Reference for MeterUsage Operation</seealso>
        public virtual Task<MeterUsageResponse> MeterUsageAsync(MeterUsageRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var options = new InvokeOptions();
            options.RequestMarshaller = MeterUsageRequestMarshaller.Instance;
            options.ResponseUnmarshaller = MeterUsageResponseUnmarshaller.Instance;

            return InvokeAsync<MeterUsageResponse>(request, options, cancellationToken);
        }
        internal virtual MeterUsageResponse MeterUsage(MeterUsageRequest request)
        {
            var options = new InvokeOptions();
            options.RequestMarshaller = MeterUsageRequestMarshaller.Instance;
            options.ResponseUnmarshaller = MeterUsageResponseUnmarshaller.Instance;

            return Invoke<MeterUsageResponse>(request, options);
        }
        /// <summary>
        /// Initiates the asynchronous execution of the MeterUsage operation.
        /// </summary>
        ///
        /// <param name="request">Container for the necessary parameters to execute the MeterUsage operation on AmazonAWSMarketplaceMeteringClient.</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 EndMeterUsage
        ///         operation.</returns>
        /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/meteringmarketplace-2016-01-14/MeterUsage">REST API Reference for MeterUsage Operation</seealso>
        public virtual IAsyncResult BeginMeterUsage(MeterUsageRequest request, AsyncCallback callback, object state)
        {
            var options = new InvokeOptions();

            options.RequestMarshaller    = MeterUsageRequestMarshaller.Instance;
            options.ResponseUnmarshaller = MeterUsageResponseUnmarshaller.Instance;

            return(BeginInvoke(request, options, callback, state));
        }