Пример #1
0
        /// <summary>
        /// Initiates the asynchronous execution of the DeleteMetricFilter operation.
        /// <seealso cref="Amazon.CloudWatchLogs.IAmazonCloudWatchLogs"/>
        /// </summary>
        ///
        /// <param name="request">Container for the necessary parameters to execute the DeleteMetricFilter 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>
        public Task <DeleteMetricFilterResponse> DeleteMetricFilterAsync(DeleteMetricFilterRequest request, CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller   = new DeleteMetricFilterRequestMarshaller();
            var unmarshaller = DeleteMetricFilterResponseUnmarshaller.Instance;

            return(Invoke <IRequest, DeleteMetricFilterRequest, DeleteMetricFilterResponse>(request, marshaller, unmarshaller, signer, cancellationToken));
        }
        internal DeleteMetricFilterResponse DeleteMetricFilter(DeleteMetricFilterRequest request)
        {
            var marshaller   = new DeleteMetricFilterRequestMarshaller();
            var unmarshaller = DeleteMetricFilterResponseUnmarshaller.Instance;

            return(Invoke <DeleteMetricFilterRequest, DeleteMetricFilterResponse>(request, marshaller, unmarshaller));
        }
Пример #3
0
        internal DeleteMetricFilterResponse DeleteMetricFilter(DeleteMetricFilterRequest request)
        {
            var task = DeleteMetricFilterAsync(request);

            try
            {
                return(task.Result);
            }
            catch (AggregateException e)
            {
                ExceptionDispatchInfo.Capture(e.InnerException).Throw();
                return(null);
            }
        }