Ejemplo n.º 1
0
        internal virtual PutRawMessageContentResponse PutRawMessageContent(PutRawMessageContentRequest request)
        {
            var options = new InvokeOptions();

            options.RequestMarshaller    = PutRawMessageContentRequestMarshaller.Instance;
            options.ResponseUnmarshaller = PutRawMessageContentResponseUnmarshaller.Instance;

            return(Invoke <PutRawMessageContentResponse>(request, options));
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Updates the raw content of an in-transit email message, in MIME format.
        ///
        ///
        /// <para>
        /// This example describes how to update in-transit email message. For more information
        /// and examples for using this API, see <a href="https://docs.aws.amazon.com/workmail/latest/adminguide/update-with-lambda.html">
        /// Updating message content with AWS Lambda</a>.
        /// </para>
        ///  <note>
        /// <para>
        /// Updates to an in-transit message only appear when you call <code>PutRawMessageContent</code>
        /// from an AWS Lambda function configured with a synchronous <a href="https://docs.aws.amazon.com/workmail/latest/adminguide/lambda.html#synchronous-rules">
        /// Run Lambda</a> rule. If you call <code>PutRawMessageContent</code> on a delivered
        /// or sent message, the message remains unchanged, even though <a href="https://docs.aws.amazon.com/workmail/latest/APIReference/API_messageflow_GetRawMessageContent.html">GetRawMessageContent</a>
        /// returns an updated message.
        /// </para>
        ///  </note>
        /// </summary>
        /// <param name="request">Container for the necessary parameters to execute the PutRawMessageContent 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 PutRawMessageContent service method, as returned by WorkMailMessageFlow.</returns>
        /// <exception cref="Amazon.WorkMailMessageFlow.Model.InvalidContentLocationException">
        /// WorkMail could not access the updated email content. Possible reasons:
        ///
        ///  <ul> <li>
        /// <para>
        /// You made the request in a region other than your S3 bucket region.
        /// </para>
        ///  </li> <li>
        /// <para>
        /// The <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-owner-condition.html">S3
        /// bucket owner</a> is not the same as the calling AWS account.
        /// </para>
        ///  </li> <li>
        /// <para>
        /// You have an incomplete or missing S3 bucket policy. For more information about policies,
        /// see <a href="https://docs.aws.amazon.com/workmail/latest/adminguide/update-with-lambda.html">
        /// Updating message content with AWS Lambda </a> in the <i>WorkMail Administrator Guide</i>.
        /// </para>
        ///  </li> </ul>
        /// </exception>
        /// <exception cref="Amazon.WorkMailMessageFlow.Model.MessageFrozenException">
        /// The requested email is not eligible for update. This is usually the case for a redirected
        /// email.
        /// </exception>
        /// <exception cref="Amazon.WorkMailMessageFlow.Model.MessageRejectedException">
        /// The requested email could not be updated due to an error in the MIME content. Check
        /// the error message for more information about what caused the error.
        /// </exception>
        /// <exception cref="Amazon.WorkMailMessageFlow.Model.ResourceNotFoundException">
        /// The requested email message is not found.
        /// </exception>
        /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/workmailmessageflow-2019-05-01/PutRawMessageContent">REST API Reference for PutRawMessageContent Operation</seealso>
        public virtual Task <PutRawMessageContentResponse> PutRawMessageContentAsync(PutRawMessageContentRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var options = new InvokeOptions();

            options.RequestMarshaller    = PutRawMessageContentRequestMarshaller.Instance;
            options.ResponseUnmarshaller = PutRawMessageContentResponseUnmarshaller.Instance;

            return(InvokeAsync <PutRawMessageContentResponse>(request, options, cancellationToken));
        }
        /// <summary>
        /// Initiates the asynchronous execution of the PutRawMessageContent operation.
        /// </summary>
        ///
        /// <param name="request">Container for the necessary parameters to execute the PutRawMessageContent operation on AmazonWorkMailMessageFlowClient.</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 EndPutRawMessageContent
        ///         operation.</returns>
        /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/workmailmessageflow-2019-05-01/PutRawMessageContent">REST API Reference for PutRawMessageContent Operation</seealso>
        public virtual IAsyncResult BeginPutRawMessageContent(PutRawMessageContentRequest request, AsyncCallback callback, object state)
        {
            var options = new InvokeOptions();

            options.RequestMarshaller    = PutRawMessageContentRequestMarshaller.Instance;
            options.ResponseUnmarshaller = PutRawMessageContentResponseUnmarshaller.Instance;

            return(BeginInvoke(request, options, callback, state));
        }