public void UpdateTrailMarshallTest() { var request = InstantiateClassGenerator.Execute <UpdateTrailRequest>(); var marshaller = new UpdateTrailRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var jsonRequest = UTF8Encoding.UTF8.GetString(internalRequest.Content); Comparer.CompareObjectToJson <UpdateTrailRequest>(request, jsonRequest); var webResponse = new WebResponseData { Headers = { { "x-amzn-RequestId", Guid.NewGuid().ToString() }, { "x-amz-crc32", "0" } } }; var jsonResponse = new JsonSampleGenerator(service_model, service_model.FindOperation("UpdateTrail").ResponseStructure).Execute(); webResponse.Headers.Add("Content-Length", UTF8Encoding.UTF8.GetBytes(jsonResponse).Length.ToString()); UnmarshallerContext context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(jsonResponse), false, webResponse); var response = UpdateTrailResponseUnmarshaller.Instance.Unmarshall(context) as UpdateTrailResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); }
/// <summary> /// Initiates the asynchronous execution of the UpdateTrail operation. /// <seealso cref="Amazon.CloudTrail.IAmazonCloudTrail.UpdateTrail"/> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the UpdateTrail 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 <UpdateTrailResponse> UpdateTrailAsync(UpdateTrailRequest request, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new UpdateTrailRequestMarshaller(); var unmarshaller = UpdateTrailResponseUnmarshaller.GetInstance(); return(Invoke <IRequest, UpdateTrailRequest, UpdateTrailResponse>(request, marshaller, unmarshaller, signer, cancellationToken)); }
internal UpdateTrailResponse UpdateTrail(UpdateTrailRequest request) { var marshaller = new UpdateTrailRequestMarshaller(); var unmarshaller = UpdateTrailResponseUnmarshaller.Instance; return(Invoke <UpdateTrailRequest, UpdateTrailResponse>(request, marshaller, unmarshaller)); }
/// <summary> /// Initiates the asynchronous execution of the UpdateTrail operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the UpdateTrail 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 <UpdateTrailResponse> UpdateTrailAsync(UpdateTrailRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new UpdateTrailRequestMarshaller(); var unmarshaller = UpdateTrailResponseUnmarshaller.Instance; return(InvokeAsync <UpdateTrailRequest, UpdateTrailResponse>(request, marshaller, unmarshaller, cancellationToken)); }
/// <summary> /// Initiates the asynchronous execution of the UpdateTrail operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the UpdateTrail 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 EndUpdateTrail /// operation.</returns> public IAsyncResult BeginUpdateTrail(UpdateTrailRequest request, AsyncCallback callback, object state) { var marshaller = new UpdateTrailRequestMarshaller(); var unmarshaller = UpdateTrailResponseUnmarshaller.Instance; return(BeginInvoke <UpdateTrailRequest>(request, marshaller, unmarshaller, callback, state)); }
IAsyncResult invokeUpdateTrail(UpdateTrailRequest updateTrailRequest, AsyncCallback callback, object state, bool synchronized) { IRequest irequest = new UpdateTrailRequestMarshaller().Marshall(updateTrailRequest); var unmarshaller = UpdateTrailResponseUnmarshaller.GetInstance(); AsyncResult result = new AsyncResult(irequest, callback, state, synchronized, signer, unmarshaller); Invoke(result); return(result); }
/// <summary> /// Initiates the asynchronous execution of the UpdateTrail operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the UpdateTrail 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 EndUpdateTrail /// operation.</returns> public IAsyncResult BeginUpdateTrail(UpdateTrailRequest request, AsyncCallback callback, object state) { var marshaller = new UpdateTrailRequestMarshaller(); var unmarshaller = UpdateTrailResponseUnmarshaller.Instance; return BeginInvoke<UpdateTrailRequest>(request, marshaller, unmarshaller, callback, state); }
/// <summary> /// Updates the settings that specify delivery of log files. Changes to a trail do not /// require stopping the CloudTrail service. Use this action to designate an existing /// bucket for log delivery. If the existing bucket has previously been a target for CloudTrail /// log files, an IAM policy exists for the bucket. /// </summary> /// <param name="request">Container for the necessary parameters to execute the UpdateTrail service method.</param> /// /// <returns>The response from the UpdateTrail service method, as returned by CloudTrail.</returns> /// <exception cref="Amazon.CloudTrail.Model.CloudWatchLogsDeliveryUnavailableException"> /// Cannot set a CloudWatch Logs delivery for this region. /// </exception> /// <exception cref="Amazon.CloudTrail.Model.InsufficientEncryptionPolicyException"> /// This exception is thrown when the policy on the S3 bucket or KMS key is not sufficient. /// </exception> /// <exception cref="Amazon.CloudTrail.Model.InsufficientS3BucketPolicyException"> /// This exception is thrown when the policy on the S3 bucket is not sufficient. /// </exception> /// <exception cref="Amazon.CloudTrail.Model.InsufficientSnsTopicPolicyException"> /// This exception is thrown when the policy on the SNS topic is not sufficient. /// </exception> /// <exception cref="Amazon.CloudTrail.Model.InvalidCloudWatchLogsLogGroupArnException"> /// This exception is thrown when the provided CloudWatch log group is not valid. /// </exception> /// <exception cref="Amazon.CloudTrail.Model.InvalidCloudWatchLogsRoleArnException"> /// This exception is thrown when the provided role is not valid. /// </exception> /// <exception cref="Amazon.CloudTrail.Model.InvalidKmsKeyIdException"> /// This exception is thrown when the KMS key ARN is invalid. /// </exception> /// <exception cref="Amazon.CloudTrail.Model.InvalidS3BucketNameException"> /// This exception is thrown when the provided S3 bucket name is not valid. /// </exception> /// <exception cref="Amazon.CloudTrail.Model.InvalidS3PrefixException"> /// This exception is thrown when the provided S3 prefix is not valid. /// </exception> /// <exception cref="Amazon.CloudTrail.Model.InvalidSnsTopicNameException"> /// This exception is thrown when the provided SNS topic name is not valid. /// </exception> /// <exception cref="Amazon.CloudTrail.Model.InvalidTrailNameException"> /// This exception is thrown when the provided trail name is not valid. Trail names must /// meet the following requirements: /// /// <ul> <li>Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores /// (_), or dashes (-)</li> <li>Start with a letter or number, and end with a letter or /// number</li> <li>Be between 3 and 128 characters</li> <li>Have no adjacent periods, /// underscores or dashes. Names like <code>my-_namespace</code> and <code>my--namespace</code> /// are invalid.</li> <li>Not be in IP address format (for example, 192.168.5.4)</li> /// </ul> /// </exception> /// <exception cref="Amazon.CloudTrail.Model.KmsKeyDisabledException"> /// This exception is thrown when the KMS key is disabled. /// </exception> /// <exception cref="Amazon.CloudTrail.Model.KmsKeyNotFoundException"> /// This exception is thrown when the KMS key does not exist, or when the S3 bucket and /// the KMS key are not in the same region. /// </exception> /// <exception cref="Amazon.CloudTrail.Model.OperationNotPermittedException"> /// This exception is thrown when the requested operation is not permitted. /// </exception> /// <exception cref="Amazon.CloudTrail.Model.S3BucketDoesNotExistException"> /// This exception is thrown when the specified S3 bucket does not exist. /// </exception> /// <exception cref="Amazon.CloudTrail.Model.TrailNotFoundException"> /// This exception is thrown when the trail with the given name is not found. /// </exception> /// <exception cref="Amazon.CloudTrail.Model.TrailNotProvidedException"> /// This exception is deprecated. /// </exception> /// <exception cref="Amazon.CloudTrail.Model.UnsupportedOperationException"> /// This exception is thrown when the requested operation is not supported. For example, /// this exception will occur if an attempt is made to tag a trail and tagging is not /// supported in the current region. /// </exception> public UpdateTrailResponse UpdateTrail(UpdateTrailRequest request) { var marshaller = new UpdateTrailRequestMarshaller(); var unmarshaller = UpdateTrailResponseUnmarshaller.Instance; return Invoke<UpdateTrailRequest,UpdateTrailResponse>(request, marshaller, unmarshaller); }
/// <summary> /// Initiates the asynchronous execution of the UpdateTrail operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the UpdateTrail 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<UpdateTrailResponse> UpdateTrailAsync(UpdateTrailRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new UpdateTrailRequestMarshaller(); var unmarshaller = UpdateTrailResponseUnmarshaller.Instance; return InvokeAsync<UpdateTrailRequest,UpdateTrailResponse>(request, marshaller, unmarshaller, cancellationToken); }
IAsyncResult invokeUpdateTrail(UpdateTrailRequest updateTrailRequest, AsyncCallback callback, object state, bool synchronized) { IRequest irequest = new UpdateTrailRequestMarshaller().Marshall(updateTrailRequest); var unmarshaller = UpdateTrailResponseUnmarshaller.GetInstance(); AsyncResult result = new AsyncResult(irequest, callback, state, synchronized, signer, unmarshaller); Invoke(result); return result; }
public void UpdateTrailMarshallTest() { var request = InstantiateClassGenerator.Execute<UpdateTrailRequest>(); var marshaller = new UpdateTrailRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var jsonRequest = UTF8Encoding.UTF8.GetString(internalRequest.Content); Comparer.CompareObjectToJson<UpdateTrailRequest>(request,jsonRequest); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"} } }; var jsonResponse = new JsonSampleGenerator(service_model, service_model.FindOperation("UpdateTrail").ResponseStructure).Execute(); webResponse.Headers.Add("Content-Length", UTF8Encoding.UTF8.GetBytes(jsonResponse).Length.ToString()); UnmarshallerContext context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(jsonResponse), false, webResponse); var response = UpdateTrailResponseUnmarshaller.Instance.Unmarshall(context) as UpdateTrailResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); }
/// <summary> /// <para>From the command line, use update-subscription.</para> <para>Updates the settings that specify delivery of log files. Changes to a /// trail do not require stopping the CloudTrail service. You use this action to designate an existing bucket for log delivery. If the existing /// bucket has previously been a target for CloudTrail log files, an IAM policy exists for the bucket. Use a Trail data type to pass updated /// bucket or topic names.</para> /// </summary> /// /// <param name="updateTrailRequest">Container for the necessary parameters to execute the UpdateTrail service method on /// AmazonCloudTrail.</param> /// /// <returns>The response from the UpdateTrail service method, as returned by AmazonCloudTrail.</returns> /// /// <exception cref="T:Amazon.CloudTrail.Model.S3BucketDoesNotExistException" /> /// <exception cref="T:Amazon.CloudTrail.Model.InvalidS3PrefixException" /> /// <exception cref="T:Amazon.CloudTrail.Model.InvalidTrailNameException" /> /// <exception cref="T:Amazon.CloudTrail.Model.InvalidS3BucketNameException" /> /// <exception cref="T:Amazon.CloudTrail.Model.TrailNotProvidedException" /> /// <exception cref="T:Amazon.CloudTrail.Model.InsufficientSnsTopicPolicyException" /> /// <exception cref="T:Amazon.CloudTrail.Model.InvalidSnsTopicNameException" /> /// <exception cref="T:Amazon.CloudTrail.Model.InsufficientS3BucketPolicyException" /> /// <exception cref="T:Amazon.CloudTrail.Model.TrailNotFoundException" /> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> public Task<UpdateTrailResponse> UpdateTrailAsync(UpdateTrailRequest updateTrailRequest, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new UpdateTrailRequestMarshaller(); var unmarshaller = UpdateTrailResponseUnmarshaller.GetInstance(); return Invoke<IRequest, UpdateTrailRequest, UpdateTrailResponse>(updateTrailRequest, marshaller, unmarshaller, signer, cancellationToken); }
/// <summary> /// Initiates the asynchronous execution of the UpdateTrail operation. /// <seealso cref="Amazon.CloudTrail.IAmazonCloudTrail.UpdateTrail"/> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the UpdateTrail 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 async Task<UpdateTrailResponse> UpdateTrailAsync(UpdateTrailRequest request, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new UpdateTrailRequestMarshaller(); var unmarshaller = UpdateTrailResponseUnmarshaller.GetInstance(); var response = await Invoke<IRequest, UpdateTrailRequest, UpdateTrailResponse>(request, marshaller, unmarshaller, signer, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); return response; }