Beispiel #1
0
        internal StopLoggingResponse StopLogging(StopLoggingRequest request)
        {
            var marshaller   = new StopLoggingRequestMarshaller();
            var unmarshaller = StopLoggingResponseUnmarshaller.Instance;

            return(Invoke <StopLoggingRequest, StopLoggingResponse>(request, marshaller, unmarshaller));
        }
        /// <summary>
        /// Initiates the asynchronous execution of the StopLogging operation.
        /// <seealso cref="Amazon.CloudTrail.IAmazonCloudTrail.StopLogging"/>
        /// </summary>
        ///
        /// <param name="request">Container for the necessary parameters to execute the StopLogging 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 <StopLoggingResponse> StopLoggingAsync(StopLoggingRequest request, CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller   = new StopLoggingRequestMarshaller();
            var unmarshaller = StopLoggingResponseUnmarshaller.GetInstance();

            return(Invoke <IRequest, StopLoggingRequest, StopLoggingResponse>(request, marshaller, unmarshaller, signer, cancellationToken));
        }
Beispiel #3
0
        /// <summary>
        /// Initiates the asynchronous execution of the StopLogging operation.
        /// </summary>
        ///
        /// <param name="request">Container for the necessary parameters to execute the StopLogging 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 <StopLoggingResponse> StopLoggingAsync(StopLoggingRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller   = new StopLoggingRequestMarshaller();
            var unmarshaller = StopLoggingResponseUnmarshaller.Instance;

            return(InvokeAsync <StopLoggingRequest, StopLoggingResponse>(request, marshaller,
                                                                         unmarshaller, cancellationToken));
        }
        /// <summary>
        /// Initiates the asynchronous execution of the StopLogging operation.
        /// </summary>
        ///
        /// <param name="request">Container for the necessary parameters to execute the StopLogging operation on AmazonCloudTrailClient.</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 EndStopLogging
        ///         operation.</returns>
        public IAsyncResult BeginStopLogging(StopLoggingRequest request, AsyncCallback callback, object state)
        {
            var marshaller   = new StopLoggingRequestMarshaller();
            var unmarshaller = StopLoggingResponseUnmarshaller.Instance;

            return(BeginInvoke <StopLoggingRequest>(request, marshaller, unmarshaller,
                                                    callback, state));
        }
        IAsyncResult invokeStopLogging(StopLoggingRequest stopLoggingRequest, AsyncCallback callback, object state, bool synchronized)
        {
            IRequest    irequest     = new StopLoggingRequestMarshaller().Marshall(stopLoggingRequest);
            var         unmarshaller = StopLoggingResponseUnmarshaller.GetInstance();
            AsyncResult result       = new AsyncResult(irequest, callback, state, synchronized, signer, unmarshaller);

            Invoke(result);
            return(result);
        }
        /// <summary>
        /// Initiates the asynchronous execution of the StopLogging operation.
        /// </summary>
        ///
        /// <param name="request">Container for the necessary parameters to execute the StopLogging 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/cloudtrail-2013-11-01/StopLogging">REST API Reference for StopLogging Operation</seealso>
        public virtual Task <StopLoggingResponse> StopLoggingAsync(StopLoggingRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var options = new InvokeOptions();

            options.RequestMarshaller    = StopLoggingRequestMarshaller.Instance;
            options.ResponseUnmarshaller = StopLoggingResponseUnmarshaller.Instance;

            return(InvokeAsync <StopLoggingResponse>(request, options, cancellationToken));
        }
        internal virtual StopLoggingResponse StopLogging(StopLoggingRequest request)
        {
            var options = new InvokeOptions();

            options.RequestMarshaller    = StopLoggingRequestMarshaller.Instance;
            options.ResponseUnmarshaller = StopLoggingResponseUnmarshaller.Instance;

            return(Invoke <StopLoggingResponse>(request, options));
        }
        /// <summary>
        /// <para>Suspends the recording of AWS API calls and log file delivery for the specified trail. Under most circumstances, there is no need to
        /// use this action. You can update a trail without stopping it first. This action is the only way to stop recording.</para>
        /// </summary>
        ///
        /// <param name="request">Container for the necessary parameters to execute the StopLogging service method on
        /// AmazonCloudTrail.</param>
        ///
        /// <returns>The response from the StopLogging service method, as returned by AmazonCloudTrail.</returns>
        ///
        /// <exception cref="T:Amazon.CloudTrail.Model.InvalidTrailNameException" />
        /// <exception cref="T:Amazon.CloudTrail.Model.TrailNotFoundException" />
        public StopLoggingResponse StopLogging(StopLoggingRequest request)
        {
            var task = StopLoggingAsync(request);

            try
            {
                return(task.Result);
            }
            catch (AggregateException e)
            {
                ExceptionDispatchInfo.Capture(e.InnerException).Throw();
                return(null);
            }
        }
        /// <summary>
        /// 关闭跟踪集
        /// </summary>
        /// <param name="req"><see cref="StopLoggingRequest"/></param>
        /// <returns><see cref="StopLoggingResponse"/></returns>
        public StopLoggingResponse StopLoggingSync(StopLoggingRequest req)
        {
            JsonResponseModel <StopLoggingResponse> rsp = null;

            try
            {
                var strResp = this.InternalRequestSync(req, "StopLogging");
                rsp = JsonConvert.DeserializeObject <JsonResponseModel <StopLoggingResponse> >(strResp);
            }
            catch (JsonSerializationException e)
            {
                throw new TencentCloudSDKException(e.Message);
            }
            return(rsp.Response);
        }
 /// <summary>
 /// Initiates the asynchronous execution of the StopLogging operation.
 /// <seealso cref="Amazon.CloudTrail.IAmazonCloudTrail.StopLogging"/>
 /// </summary>
 ///
 /// <param name="stopLoggingRequest">Container for the necessary parameters to execute the StopLogging operation on AmazonCloudTrail.</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 EndStopLogging
 ///         operation.</returns>
 public IAsyncResult BeginStopLogging(StopLoggingRequest stopLoggingRequest, AsyncCallback callback, object state)
 {
     return(invokeStopLogging(stopLoggingRequest, callback, state, false));
 }
        /// <summary>
        /// <para>Suspends the recording of AWS API calls and log file delivery for the specified trail. Under most circumstances, there is no need to
        /// use this action. You can update a trail without stopping it first. This action is the only way to stop recording.</para>
        /// </summary>
        ///
        /// <param name="stopLoggingRequest">Container for the necessary parameters to execute the StopLogging service method on
        ///          AmazonCloudTrail.</param>
        ///
        /// <returns>The response from the StopLogging service method, as returned by AmazonCloudTrail.</returns>
        ///
        /// <exception cref="InvalidTrailNameException"/>
        /// <exception cref="TrailNotFoundException"/>
        public StopLoggingResponse StopLogging(StopLoggingRequest stopLoggingRequest)
        {
            IAsyncResult asyncResult = invokeStopLogging(stopLoggingRequest, null, null, true);

            return(EndStopLogging(asyncResult));
        }