示例#1
0
        /// <summary>
        /// <para> Publishes metric data points to Amazon CloudWatch. Amazon Cloudwatch associates the data points with the specified metric. If the
        /// specified metric does not exist, Amazon CloudWatch creates the metric. It can take up to fifteen minutes for a new metric to appear in calls
        /// to the ListMetrics action.</para> <para> The size of a PutMetricData request is limited to 8 KB for HTTP GET requests and 40 KB for HTTP
        /// POST requests. </para> <para><b>IMPORTANT:</b> Although the Value parameter accepts numbers of type Double, Amazon CloudWatch truncates
        /// values with very large exponents. Values with base-10 exponents greater than 126 (1 x 10^126) are truncated. Likewise, values with base-10
        /// exponents less than -130 (1 x 10^-130) are also truncated. </para> <para>Data that is timestamped 24 hours or more in the past may take in
        /// excess of 48 hours to become available from submission time using <c>GetMetricStatistics</c> .</para>
        /// </summary>
        ///
        /// <param name="putMetricDataRequest">Container for the necessary parameters to execute the PutMetricData service method on
        /// AmazonCloudWatch.</param>
        ///
        /// <exception cref="T:Amazon.CloudWatch.Model.InvalidParameterValueException" />
        /// <exception cref="T:Amazon.CloudWatch.Model.InternalServiceException" />
        /// <exception cref="T:Amazon.CloudWatch.Model.InvalidParameterCombinationException" />
        /// <exception cref="T:Amazon.CloudWatch.Model.MissingRequiredParameterException" />
        /// <param name="cancellationToken">
        ///     A cancellation token that can be used by other objects or threads to receive notice of cancellation.
        /// </param>
        public Task <PutMetricDataResponse> PutMetricDataAsync(PutMetricDataRequest putMetricDataRequest, CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller   = new PutMetricDataRequestMarshaller();
            var unmarshaller = PutMetricDataResponseUnmarshaller.GetInstance();

            return(Invoke <IRequest, PutMetricDataRequest, PutMetricDataResponse>(putMetricDataRequest, marshaller, unmarshaller, signer, cancellationToken));
        }
示例#2
0
 IAsyncResult invokePutMetricData(PutMetricDataRequest putMetricDataRequest, AsyncCallback callback, object state, bool synchronized)
 {
     IRequest irequest = new PutMetricDataRequestMarshaller().Marshall(putMetricDataRequest);
     var unmarshaller = PutMetricDataResponseUnmarshaller.GetInstance();
     AsyncResult result = new AsyncResult(irequest, callback, state, synchronized, signer, unmarshaller);
     Invoke(result);
     return result;
 }
示例#3
0
 public override PutMetricDataResponse GetResponse(Core.Transform.UnmarshallerContext unmarshallerContext)
 {
     return(PutMetricDataResponseUnmarshaller.Unmarshall(unmarshallerContext));
 }
示例#4
0
        /// <summary>
        /// <para> Publishes metric data points to Amazon CloudWatch. Amazon
        /// Cloudwatch associates the data points with the specified metric. If
        /// the specified metric does not exist, Amazon CloudWatch creates the
        /// metric. </para> <para><b>NOTE:</b> If you create a metric with the
        /// PutMetricData action, allow up to fifteen minutes for the metric to
        /// appear in calls to the ListMetrics action. </para> <para> The size of
        /// a PutMetricData request is limited to 8 KB for HTTP GET requests and
        /// 40 KB for HTTP POST requests. </para> <para><b>IMPORTANT:</b> Although
        /// the Value parameter accepts numbers of type Double, Amazon CloudWatch
        /// truncates values with very large exponents. Values with base-10
        /// exponents greater than 126 (1 x 10^126) are truncated. Likewise,
        /// values with base-10 exponents less than -130 (1 x 10^-130) are also
        /// truncated. </para>
        /// </summary>
        ///
        /// <param name="putMetricDataRequest">Container for the necessary
        ///           parameters to execute the PutMetricData service method on
        ///           AmazonCloudWatch.</param>
        ///
        /// <exception cref="InvalidParameterValueException"/>
        /// <exception cref="InternalServiceException"/>
        /// <exception cref="InvalidParameterCombinationException"/>
        /// <exception cref="MissingRequiredParameterException"/>
        public PutMetricDataResponse PutMetricData(PutMetricDataRequest putMetricDataRequest)
        {
            IRequest <PutMetricDataRequest> request  = new PutMetricDataRequestMarshaller().Marshall(putMetricDataRequest);
            PutMetricDataResponse           response = Invoke <PutMetricDataRequest, PutMetricDataResponse> (request, this.signer, PutMetricDataResponseUnmarshaller.GetInstance());

            return(response);
        }