PutDestinationRequestMarshaller

We found 10 examples in language CSharp for this search. You will see 20 fragments of code.

Other methods


        internal static PutDestinationRequestMarshaller GetInstance()
        {
            return _instance;
        }


        internal static PutDestinationRequestMarshaller GetInstance()
        {
            return _instance;
        }


        internal static PutDestinationRequestMarshaller GetInstance()
        {
            return _instance;
        }


        internal static PutDestinationRequestMarshaller GetInstance()
        {
            return _instance;
        }


        internal static PutDestinationRequestMarshaller GetInstance()
        {
            return _instance;
        }


        internal static PutDestinationRequestMarshaller GetInstance()
        {
            return _instance;
        }


        #endregion
        
        #region  PutDestination

        internal PutDestinationResponse PutDestination(PutDestinationRequest request)
        {
            var marshaller = new PutDestinationRequestMarshaller();
            var unmarshaller = PutDestinationResponseUnmarshaller.Instance;

            return Invoke<PutDestinationRequest,PutDestinationResponse>(request, marshaller, unmarshaller);
        }


        #endregion
        
        #region  PutDestination

        internal virtual PutDestinationResponse PutDestination(PutDestinationRequest request)
        {
            var options = new InvokeOptions();
            options.RequestMarshaller = PutDestinationRequestMarshaller.Instance;
            options.ResponseUnmarshaller = PutDestinationResponseUnmarshaller.Instance;

            return Invoke<PutDestinationResponse>(request, options);
        }


        #endregion
#if AWS_ASYNC_ENUMERABLES_API
        private ICloudWatchLogsPaginatorFactory _paginators;

        /// <summary>
        /// Paginators for the service
        /// </summary>
        public ICloudWatchLogsPaginatorFactory Paginators 
        {
            get 
            {
                if (this._paginators == null) 
                {
                    this._paginators = new CloudWatchLogsPaginatorFactory(this);
                }
                return this._paginators;
            }
        }
#endif

        #region Overrides

        /// <summary>
        /// Creates the signer for the service.
        /// </summary>
        protected override AbstractAWSSigner CreateSigner()
        {
            return new AWS4Signer();
        } 

        #endregion

        #region Dispose

        /// <summary>
        /// Disposes the service client.
        /// </summary>
        protected override void Dispose(bool disposing)
        {
            base.Dispose(disposing);
        }

        #endregion


        #region  AssociateKmsKey

        internal virtual AssociateKmsKeyResponse AssociateKmsKey(AssociateKmsKeyRequest request)
        {
            var options = new InvokeOptions();
            options.RequestMarshaller = AssociateKmsKeyRequestMarshaller.Instance;
            options.ResponseUnmarshaller = AssociateKmsKeyResponseUnmarshaller.Instance;

            return Invoke<AssociateKmsKeyResponse>(request, options);
        }



        /// <summary>
        /// Associates the specified Key Management Service customer master key (CMK) with the
        /// specified log group.
        /// 
        ///  
        /// <para>
        /// Associating an KMS CMK with a log group overrides any existing associations between
        /// the log group and a CMK. After a CMK is associated with a log group, all newly ingested
        /// data for the log group is encrypted using the CMK. This association is stored as long
        /// as the data encrypted with the CMK is still within CloudWatch Logs. This enables CloudWatch
        /// Logs to decrypt this data whenever it is requested.
        /// </para>
        ///  <important> 
        /// <para>
        /// CloudWatch Logs supports only symmetric CMKs. Do not use an associate an asymmetric
        /// CMK with your log group. For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html">Using
        /// Symmetric and Asymmetric Keys</a>.
        /// </para>
        ///  </important> 
        /// <para>
        /// It can take up to 5 minutes for this operation to take effect.
        /// </para>
        ///  
        /// <para>
        /// If you attempt to associate a CMK with a log group but the CMK does not exist or the
        /// CMK is disabled, you receive an <code>InvalidParameterException</code> error. 
        /// </para>
        /// </summary>
        /// <param name="request">Container for the necessary parameters to execute the AssociateKmsKey service method.</param>
        /// <param name="cancellationToken">
        ///     A cancellation token that can be used by other objects or threads to receive notice of cancellation.
        /// </param>
        /// 
        /// <returns>The response from the AssociateKmsKey service method, as returned by CloudWatchLogs.</returns>
        /// <exception cref="Amazon.CloudWatchLogs.Model.InvalidParameterException">
        /// A parameter is specified incorrectly.
        /// </exception>
        /// <exception cref="Amazon.CloudWatchLogs.Model.OperationAbortedException">
        /// Multiple requests to update the same resource were in conflict.
        /// </exception>
        /// <exception cref="Amazon.CloudWatchLogs.Model.ResourceNotFoundException">
        /// The specified resource does not exist.
        /// </exception>
        /// <exception cref="Amazon.CloudWatchLogs.Model.ServiceUnavailableException">
        /// The service cannot complete the request.
        /// </exception>
        /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/AssociateKmsKey">REST API Reference for AssociateKmsKey Operation</seealso>
        public virtual Task<AssociateKmsKeyResponse> AssociateKmsKeyAsync(AssociateKmsKeyRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var options = new InvokeOptions();
            options.RequestMarshaller = AssociateKmsKeyRequestMarshaller.Instance;
            options.ResponseUnmarshaller = AssociateKmsKeyResponseUnmarshaller.Instance;

            return InvokeAsync<AssociateKmsKeyResponse>(request, options, cancellationToken);
        }

        #endregion
        
        #region  CancelExportTask

        internal virtual CancelExportTaskResponse CancelExportTask(CancelExportTaskRequest request)
        {
            var options = new InvokeOptions();
            options.RequestMarshaller = CancelExportTaskRequestMarshaller.Instance;
            options.ResponseUnmarshaller = CancelExportTaskResponseUnmarshaller.Instance;

            return Invoke<CancelExportTaskResponse>(request, options);
        }



        /// <summary>
        /// Cancels the specified export task.
        /// 
        ///  
        /// <para>
        /// The task must be in the <code>PENDING</code> or <code>RUNNING</code> state.
        /// </para>
        /// </summary>
        /// <param name="request">Container for the necessary parameters to execute the CancelExportTask service method.</param>
        /// <param name="cancellationToken">
        ///     A cancellation token that can be used by other objects or threads to receive notice of cancellation.
        /// </param>
        /// 
        /// <returns>The response from the CancelExportTask service method, as returned by CloudWatchLogs.</returns>
        /// <exception cref="Amazon.CloudWatchLogs.Model.InvalidOperationException">
        /// The operation is not valid on the specified resource.
        /// </exception>
        /// <exception cref="Amazon.CloudWatchLogs.Model.InvalidParameterException">
        /// A parameter is specified incorrectly.
        /// </exception>
        /// <exception cref="Amazon.CloudWatchLogs.Model.ResourceNotFoundException">
        /// The specified resource does not exist.
        /// </exception>
        /// <exception cref="Amazon.CloudWatchLogs.Model.ServiceUnavailableException">
        /// The service cannot complete the request.
        /// </exception>
        /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/CancelExportTask">REST API Reference for CancelExportTask Operation</seealso>
        public virtual Task<CancelExportTaskResponse> CancelExportTaskAsync(CancelExportTaskRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var options = new InvokeOptions();
            options.RequestMarshaller = CancelExportTaskRequestMarshaller.Instance;
            options.ResponseUnmarshaller = CancelExportTaskResponseUnmarshaller.Instance;

            return InvokeAsync<CancelExportTaskResponse>(request, options, cancellationToken);
        }

        
        [TestMethod]
        [TestCategory("UnitTest")]
        [TestCategory("Json")]
        [TestCategory("CloudWatchLogs")]
        public void AssociateKmsKeyMarshallTest()
        {
            var request = InstantiateClassGenerator.Execute<AssociateKmsKeyRequest>();
            var marshaller = new AssociateKmsKeyRequestMarshaller();

            var internalRequest = marshaller.Marshall(request);
            var jsonRequest = UTF8Encoding.UTF8.GetString(internalRequest.Content);                        
            Comparer.CompareObjectToJson<AssociateKmsKeyRequest>(request,jsonRequest);

        }

        [TestMethod]
        [TestCategory("UnitTest")]
        [TestCategory("Json")]
        [TestCategory("CloudWatchLogs")]
        public void AssociateKmsKey_InvalidParameterExceptionMarshallTest()
        {
            var operation =  service_model.FindOperation("AssociateKmsKey");

            var request = InstantiateClassGenerator.Execute<AssociateKmsKeyRequest>();
            var marshaller = new AssociateKmsKeyRequestMarshaller();
            var internalRequest = marshaller.Marshall(request);
            var jsonRequest = UTF8Encoding.UTF8.GetString(internalRequest.Content);

            Comparer.CompareObjectToJson<AssociateKmsKeyRequest>(request,jsonRequest);

            var exception = operation.Exceptions.First(e => e.Name.Equals("InvalidParameterException"));
            var jsonResponse = new JsonSampleGenerator(service_model, exception).Execute();
            var webResponse = new WebResponseData
            {
                Headers = {
                    {"x-amzn-RequestId", Guid.NewGuid().ToString()},
                    {"x-amz-crc32","0"},
                    {"x-amzn-ErrorType","InvalidParameterException"},
                    {"Content-Length", UTF8Encoding.UTF8.GetBytes(jsonResponse).Length.ToString()}
                }
            };
            var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(jsonResponse), true, webResponse, true);
            var response = AssociateKmsKeyResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK);

            InstantiateClassGenerator.ValidateObjectFullyInstantiated(response);
        }

        [TestMethod]
        [TestCategory("UnitTest")]
        [TestCategory("Json")]
        [TestCategory("CloudWatchLogs")]
        public void AssociateKmsKey_OperationAbortedExceptionMarshallTest()
        {
            var operation =  service_model.FindOperation("AssociateKmsKey");

            var request = InstantiateClassGenerator.Execute<AssociateKmsKeyRequest>();
            var marshaller = new AssociateKmsKeyRequestMarshaller();
            var internalRequest = marshaller.Marshall(request);
            var jsonRequest = UTF8Encoding.UTF8.GetString(internalRequest.Content);

            Comparer.CompareObjectToJson<AssociateKmsKeyRequest>(request,jsonRequest);

            var exception = operation.Exceptions.First(e => e.Name.Equals("OperationAbortedException"));
            var jsonResponse = new JsonSampleGenerator(service_model, exception).Execute();
            var webResponse = new WebResponseData
            {
                Headers = {
                    {"x-amzn-RequestId", Guid.NewGuid().ToString()},
                    {"x-amz-crc32","0"},
                    {"x-amzn-ErrorType","OperationAbortedException"},
                    {"Content-Length", UTF8Encoding.UTF8.GetBytes(jsonResponse).Length.ToString()}
                }
            };
            var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(jsonResponse), true, webResponse, true);
            var response = AssociateKmsKeyResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK);

            InstantiateClassGenerator.ValidateObjectFullyInstantiated(response);
        }

        [TestMethod]
        [TestCategory("UnitTest")]
        [TestCategory("Json")]
        [TestCategory("CloudWatchLogs")]
        public void AssociateKmsKey_ResourceNotFoundExceptionMarshallTest()
        {
            var operation =  service_model.FindOperation("AssociateKmsKey");

            var request = InstantiateClassGenerator.Execute<AssociateKmsKeyRequest>();
            var marshaller = new AssociateKmsKeyRequestMarshaller();
            var internalRequest = marshaller.Marshall(request);
            var jsonRequest = UTF8Encoding.UTF8.GetString(internalRequest.Content);

            Comparer.CompareObjectToJson<AssociateKmsKeyRequest>(request,jsonRequest);

            var exception = operation.Exceptions.First(e => e.Name.Equals("ResourceNotFoundException"));
            var jsonResponse = new JsonSampleGenerator(service_model, exception).Execute();
            var webResponse = new WebResponseData
            {
                Headers = {
                    {"x-amzn-RequestId", Guid.NewGuid().ToString()},
                    {"x-amz-crc32","0"},
                    {"x-amzn-ErrorType","ResourceNotFoundException"},
                    {"Content-Length", UTF8Encoding.UTF8.GetBytes(jsonResponse).Length.ToString()}
                }
            };
            var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(jsonResponse), true, webResponse, true);
            var response = AssociateKmsKeyResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK);

            InstantiateClassGenerator.ValidateObjectFullyInstantiated(response);
        }

        [TestMethod]
        [TestCategory("UnitTest")]
        [TestCategory("Json")]
        [TestCategory("CloudWatchLogs")]
        public void AssociateKmsKey_ServiceUnavailableExceptionMarshallTest()
        {
            var operation =  service_model.FindOperation("AssociateKmsKey");

            var request = InstantiateClassGenerator.Execute<AssociateKmsKeyRequest>();
            var marshaller = new AssociateKmsKeyRequestMarshaller();
            var internalRequest = marshaller.Marshall(request);
            var jsonRequest = UTF8Encoding.UTF8.GetString(internalRequest.Content);

            Comparer.CompareObjectToJson<AssociateKmsKeyRequest>(request,jsonRequest);

            var exception = operation.Exceptions.First(e => e.Name.Equals("ServiceUnavailableException"));
            var jsonResponse = new JsonSampleGenerator(service_model, exception).Execute();
            var webResponse = new WebResponseData
            {
                Headers = {
                    {"x-amzn-RequestId", Guid.NewGuid().ToString()},
                    {"x-amz-crc32","0"},
                    {"x-amzn-ErrorType","ServiceUnavailableException"},
                    {"Content-Length", UTF8Encoding.UTF8.GetBytes(jsonResponse).Length.ToString()}
                }
            };
            var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(jsonResponse), true, webResponse, true);
            var response = AssociateKmsKeyResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK);

            InstantiateClassGenerator.ValidateObjectFullyInstantiated(response);
        }

        [TestMethod]
        [TestCategory("UnitTest")]
        [TestCategory("Json")]
        [TestCategory("CloudWatchLogs")]
        public void CancelExportTaskMarshallTest()
        {
            var request = InstantiateClassGenerator.Execute<CancelExportTaskRequest>();
            var marshaller = new CancelExportTaskRequestMarshaller();

            var internalRequest = marshaller.Marshall(request);
            var jsonRequest = UTF8Encoding.UTF8.GetString(internalRequest.Content);                        
            Comparer.CompareObjectToJson<CancelExportTaskRequest>(request,jsonRequest);

        }

Amazon.CloudWatchLogs.Model.Internal.MarshallTransformations.PutDestinationRequestMarshaller : IMarshaller

Constructors :

public PutDestinationRequestMarshaller()

Methods :

public IRequest Marshall(AmazonWebServiceRequest input = )
public IRequest Marshall(PutDestinationRequest publicRequest = )
public static PutDestinationRequestMarshaller get_Instance()
public Type GetType()
public String ToString()
public Boolean Equals(Object obj = )
public Int32 GetHashCode()