internal StartLoggingResponse StartLogging(StartLoggingRequest request) { var marshaller = new StartLoggingRequestMarshaller(); var unmarshaller = StartLoggingResponseUnmarshaller.Instance; return(Invoke <StartLoggingRequest, StartLoggingResponse>(request, marshaller, unmarshaller)); }
/// <summary> /// Initiates the asynchronous execution of the StartLogging operation. /// <seealso cref="Amazon.CloudTrail.IAmazonCloudTrail.StartLogging"/> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the StartLogging 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 <StartLoggingResponse> StartLoggingAsync(StartLoggingRequest request, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new StartLoggingRequestMarshaller(); var unmarshaller = StartLoggingResponseUnmarshaller.GetInstance(); return(Invoke <IRequest, StartLoggingRequest, StartLoggingResponse>(request, marshaller, unmarshaller, signer, cancellationToken)); }
/// <summary> /// Initiates the asynchronous execution of the StartLogging operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the StartLogging 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 <StartLoggingResponse> StartLoggingAsync(StartLoggingRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new StartLoggingRequestMarshaller(); var unmarshaller = StartLoggingResponseUnmarshaller.Instance; return(InvokeAsync <StartLoggingRequest, StartLoggingResponse>(request, marshaller, unmarshaller, cancellationToken)); }
/// <summary> /// Initiates the asynchronous execution of the StartLogging operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the StartLogging 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 EndStartLogging /// operation.</returns> public IAsyncResult BeginStartLogging(StartLoggingRequest request, AsyncCallback callback, object state) { var marshaller = new StartLoggingRequestMarshaller(); var unmarshaller = StartLoggingResponseUnmarshaller.Instance; return(BeginInvoke <StartLoggingRequest>(request, marshaller, unmarshaller, callback, state)); }
IAsyncResult invokeStartLogging(StartLoggingRequest startLoggingRequest, AsyncCallback callback, object state, bool synchronized) { IRequest irequest = new StartLoggingRequestMarshaller().Marshall(startLoggingRequest); var unmarshaller = StartLoggingResponseUnmarshaller.GetInstance(); AsyncResult result = new AsyncResult(irequest, callback, state, synchronized, signer, unmarshaller); Invoke(result); return(result); }
/// <summary> /// Initiates the asynchronous execution of the StartLogging operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the StartLogging 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/StartLogging">REST API Reference for StartLogging Operation</seealso> public virtual Task <StartLoggingResponse> StartLoggingAsync(StartLoggingRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = StartLoggingRequestMarshaller.Instance; options.ResponseUnmarshaller = StartLoggingResponseUnmarshaller.Instance; return(InvokeAsync <StartLoggingResponse>(request, options, cancellationToken)); }
internal virtual StartLoggingResponse StartLogging(StartLoggingRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = StartLoggingRequestMarshaller.Instance; options.ResponseUnmarshaller = StartLoggingResponseUnmarshaller.Instance; return(Invoke <StartLoggingResponse>(request, options)); }
/// <summary> /// <para>Starts the recording of AWS API calls and log file delivery for a trail.</para> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the StartLogging service method on /// AmazonCloudTrail.</param> /// /// <returns>The response from the StartLogging service method, as returned by AmazonCloudTrail.</returns> /// /// <exception cref="T:Amazon.CloudTrail.Model.InvalidTrailNameException" /> /// <exception cref="T:Amazon.CloudTrail.Model.TrailNotFoundException" /> public StartLoggingResponse StartLogging(StartLoggingRequest request) { var task = StartLoggingAsync(request); try { return(task.Result); } catch (AggregateException e) { ExceptionDispatchInfo.Capture(e.InnerException).Throw(); return(null); } }
/// <summary> /// 开启跟踪集 /// </summary> /// <param name="req"><see cref="StartLoggingRequest"/></param> /// <returns><see cref="StartLoggingResponse"/></returns> public StartLoggingResponse StartLoggingSync(StartLoggingRequest req) { JsonResponseModel <StartLoggingResponse> rsp = null; try { var strResp = this.InternalRequestSync(req, "StartLogging"); rsp = JsonConvert.DeserializeObject <JsonResponseModel <StartLoggingResponse> >(strResp); } catch (JsonSerializationException e) { throw new TencentCloudSDKException(e.Message); } return(rsp.Response); }
/// <summary> /// Initiates the asynchronous execution of the StartLogging operation. /// <seealso cref="Amazon.CloudTrail.IAmazonCloudTrail.StartLogging"/> /// </summary> /// /// <param name="startLoggingRequest">Container for the necessary parameters to execute the StartLogging 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 EndStartLogging /// operation.</returns> public IAsyncResult BeginStartLogging(StartLoggingRequest startLoggingRequest, AsyncCallback callback, object state) { return(invokeStartLogging(startLoggingRequest, callback, state, false)); }
/// <summary> /// <para>Starts the recording of AWS API calls and log file delivery for a trail.</para> /// </summary> /// /// <param name="startLoggingRequest">Container for the necessary parameters to execute the StartLogging service method on /// AmazonCloudTrail.</param> /// /// <returns>The response from the StartLogging service method, as returned by AmazonCloudTrail.</returns> /// /// <exception cref="InvalidTrailNameException"/> /// <exception cref="TrailNotFoundException"/> public StartLoggingResponse StartLogging(StartLoggingRequest startLoggingRequest) { IAsyncResult asyncResult = invokeStartLogging(startLoggingRequest, null, null, true); return(EndStartLogging(asyncResult)); }