Container for the parameters to the UpdateConfigurationSetEventDestination operation. Updates the event destination of a configuration set.

When you create or update an event destination, you must provide one, and only one, destination. The destination can be either Amazon CloudWatch or Amazon Kinesis Firehose.

Event destinations are associated with configuration sets, which enable you to publish email sending events to Amazon CloudWatch or Amazon Kinesis Firehose. For information about using configuration sets, see the Amazon SES Developer Guide.

This action is throttled at one request per second.

Inheritance: AmazonSimpleEmailServiceRequest
コード例 #1
0
        /// <summary>
        /// Initiates the asynchronous execution of the UpdateConfigurationSetEventDestination operation.
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the UpdateConfigurationSetEventDestination 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<UpdateConfigurationSetEventDestinationResponse> UpdateConfigurationSetEventDestinationAsync(UpdateConfigurationSetEventDestinationRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller = new UpdateConfigurationSetEventDestinationRequestMarshaller();
            var unmarshaller = UpdateConfigurationSetEventDestinationResponseUnmarshaller.Instance;

            return InvokeAsync<UpdateConfigurationSetEventDestinationRequest,UpdateConfigurationSetEventDestinationResponse>(request, marshaller, 
                unmarshaller, cancellationToken);
        }
コード例 #2
0
        /// <summary>
        /// Updates the event destination of a configuration set.
        /// 
        ///  <note> 
        /// <para>
        /// When you create or update an event destination, you must provide one, and only one,
        /// destination. The destination can be either Amazon CloudWatch or Amazon Kinesis Firehose.
        /// </para>
        ///  </note> 
        /// <para>
        /// Event destinations are associated with configuration sets, which enable you to publish
        /// email sending events to Amazon CloudWatch or Amazon Kinesis Firehose. For information
        /// about using configuration sets, see the <a href="http://docs.aws.amazon.com/ses/latest/DeveloperGuide/monitor-sending-activity.html">Amazon
        /// SES Developer Guide</a>.
        /// </para>
        ///  
        /// <para>
        /// This action is throttled at one request per second.
        /// </para>
        /// </summary>
        /// <param name="request">Container for the necessary parameters to execute the UpdateConfigurationSetEventDestination service method.</param>
        /// 
        /// <returns>The response from the UpdateConfigurationSetEventDestination service method, as returned by SimpleEmailService.</returns>
        /// <exception cref="Amazon.SimpleEmail.Model.ConfigurationSetDoesNotExistException">
        /// Indicates that the configuration set does not exist.
        /// </exception>
        /// <exception cref="Amazon.SimpleEmail.Model.EventDestinationDoesNotExistException">
        /// Indicates that the event destination does not exist.
        /// </exception>
        /// <exception cref="Amazon.SimpleEmail.Model.InvalidCloudWatchDestinationException">
        /// Indicates that the Amazon CloudWatch destination is invalid. See the error message
        /// for details.
        /// </exception>
        /// <exception cref="Amazon.SimpleEmail.Model.InvalidFirehoseDestinationException">
        /// Indicates that the Amazon Kinesis Firehose destination is invalid. See the error message
        /// for details.
        /// </exception>
        public UpdateConfigurationSetEventDestinationResponse UpdateConfigurationSetEventDestination(UpdateConfigurationSetEventDestinationRequest request)
        {
            var marshaller = new UpdateConfigurationSetEventDestinationRequestMarshaller();
            var unmarshaller = UpdateConfigurationSetEventDestinationResponseUnmarshaller.Instance;

            return Invoke<UpdateConfigurationSetEventDestinationRequest,UpdateConfigurationSetEventDestinationResponse>(request, marshaller, unmarshaller);
        }
 private Amazon.SimpleEmail.Model.UpdateConfigurationSetEventDestinationResponse CallAWSServiceOperation(IAmazonSimpleEmailService client, Amazon.SimpleEmail.Model.UpdateConfigurationSetEventDestinationRequest request)
 {
     Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "Amazon Simple Email Service (SES)", "UpdateConfigurationSetEventDestination");
     try
     {
         #if DESKTOP
         return(client.UpdateConfigurationSetEventDestination(request));
         #elif CORECLR
         return(client.UpdateConfigurationSetEventDestinationAsync(request).GetAwaiter().GetResult());
         #else
                 #error "Unknown build edition"
         #endif
     }
     catch (AmazonServiceException exc)
     {
         var webException = exc.InnerException as System.Net.WebException;
         if (webException != null)
         {
             throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException);
         }
         throw;
     }
 }
        public object Execute(ExecutorContext context)
        {
            var cmdletContext = context as CmdletContext;
            // create request
            var request = new Amazon.SimpleEmail.Model.UpdateConfigurationSetEventDestinationRequest();

            if (cmdletContext.ConfigurationSetName != null)
            {
                request.ConfigurationSetName = cmdletContext.ConfigurationSetName;
            }

            // populate EventDestination
            var requestEventDestinationIsNull = true;

            request.EventDestination = new Amazon.SimpleEmail.Model.EventDestination();
            System.Boolean?requestEventDestination_eventDestination_Enabled = null;
            if (cmdletContext.EventDestination_Enabled != null)
            {
                requestEventDestination_eventDestination_Enabled = cmdletContext.EventDestination_Enabled.Value;
            }
            if (requestEventDestination_eventDestination_Enabled != null)
            {
                request.EventDestination.Enabled = requestEventDestination_eventDestination_Enabled.Value;
                requestEventDestinationIsNull    = false;
            }
            List <System.String> requestEventDestination_eventDestination_MatchingEventType = null;

            if (cmdletContext.EventDestination_MatchingEventType != null)
            {
                requestEventDestination_eventDestination_MatchingEventType = cmdletContext.EventDestination_MatchingEventType;
            }
            if (requestEventDestination_eventDestination_MatchingEventType != null)
            {
                request.EventDestination.MatchingEventTypes = requestEventDestination_eventDestination_MatchingEventType;
                requestEventDestinationIsNull = false;
            }
            System.String requestEventDestination_eventDestination_Name = null;
            if (cmdletContext.EventDestination_Name != null)
            {
                requestEventDestination_eventDestination_Name = cmdletContext.EventDestination_Name;
            }
            if (requestEventDestination_eventDestination_Name != null)
            {
                request.EventDestination.Name = requestEventDestination_eventDestination_Name;
                requestEventDestinationIsNull = false;
            }
            Amazon.SimpleEmail.Model.CloudWatchDestination requestEventDestination_eventDestination_CloudWatchDestination = null;

            // populate CloudWatchDestination
            var requestEventDestination_eventDestination_CloudWatchDestinationIsNull = true;

            requestEventDestination_eventDestination_CloudWatchDestination = new Amazon.SimpleEmail.Model.CloudWatchDestination();
            List <Amazon.SimpleEmail.Model.CloudWatchDimensionConfiguration> requestEventDestination_eventDestination_CloudWatchDestination_cloudWatchDestination_DimensionConfiguration = null;

            if (cmdletContext.CloudWatchDestination_DimensionConfiguration != null)
            {
                requestEventDestination_eventDestination_CloudWatchDestination_cloudWatchDestination_DimensionConfiguration = cmdletContext.CloudWatchDestination_DimensionConfiguration;
            }
            if (requestEventDestination_eventDestination_CloudWatchDestination_cloudWatchDestination_DimensionConfiguration != null)
            {
                requestEventDestination_eventDestination_CloudWatchDestination.DimensionConfigurations = requestEventDestination_eventDestination_CloudWatchDestination_cloudWatchDestination_DimensionConfiguration;
                requestEventDestination_eventDestination_CloudWatchDestinationIsNull = false;
            }
            // determine if requestEventDestination_eventDestination_CloudWatchDestination should be set to null
            if (requestEventDestination_eventDestination_CloudWatchDestinationIsNull)
            {
                requestEventDestination_eventDestination_CloudWatchDestination = null;
            }
            if (requestEventDestination_eventDestination_CloudWatchDestination != null)
            {
                request.EventDestination.CloudWatchDestination = requestEventDestination_eventDestination_CloudWatchDestination;
                requestEventDestinationIsNull = false;
            }
            Amazon.SimpleEmail.Model.SNSDestination requestEventDestination_eventDestination_SNSDestination = null;

            // populate SNSDestination
            var requestEventDestination_eventDestination_SNSDestinationIsNull = true;

            requestEventDestination_eventDestination_SNSDestination = new Amazon.SimpleEmail.Model.SNSDestination();
            System.String requestEventDestination_eventDestination_SNSDestination_sNSDestination_TopicARN = null;
            if (cmdletContext.SNSDestination_TopicARN != null)
            {
                requestEventDestination_eventDestination_SNSDestination_sNSDestination_TopicARN = cmdletContext.SNSDestination_TopicARN;
            }
            if (requestEventDestination_eventDestination_SNSDestination_sNSDestination_TopicARN != null)
            {
                requestEventDestination_eventDestination_SNSDestination.TopicARN = requestEventDestination_eventDestination_SNSDestination_sNSDestination_TopicARN;
                requestEventDestination_eventDestination_SNSDestinationIsNull    = false;
            }
            // determine if requestEventDestination_eventDestination_SNSDestination should be set to null
            if (requestEventDestination_eventDestination_SNSDestinationIsNull)
            {
                requestEventDestination_eventDestination_SNSDestination = null;
            }
            if (requestEventDestination_eventDestination_SNSDestination != null)
            {
                request.EventDestination.SNSDestination = requestEventDestination_eventDestination_SNSDestination;
                requestEventDestinationIsNull           = false;
            }
            Amazon.SimpleEmail.Model.KinesisFirehoseDestination requestEventDestination_eventDestination_KinesisFirehoseDestination = null;

            // populate KinesisFirehoseDestination
            var requestEventDestination_eventDestination_KinesisFirehoseDestinationIsNull = true;

            requestEventDestination_eventDestination_KinesisFirehoseDestination = new Amazon.SimpleEmail.Model.KinesisFirehoseDestination();
            System.String requestEventDestination_eventDestination_KinesisFirehoseDestination_kinesisFirehoseDestination_DeliveryStreamARN = null;
            if (cmdletContext.KinesisFirehoseDestination_DeliveryStreamARN != null)
            {
                requestEventDestination_eventDestination_KinesisFirehoseDestination_kinesisFirehoseDestination_DeliveryStreamARN = cmdletContext.KinesisFirehoseDestination_DeliveryStreamARN;
            }
            if (requestEventDestination_eventDestination_KinesisFirehoseDestination_kinesisFirehoseDestination_DeliveryStreamARN != null)
            {
                requestEventDestination_eventDestination_KinesisFirehoseDestination.DeliveryStreamARN = requestEventDestination_eventDestination_KinesisFirehoseDestination_kinesisFirehoseDestination_DeliveryStreamARN;
                requestEventDestination_eventDestination_KinesisFirehoseDestinationIsNull             = false;
            }
            System.String requestEventDestination_eventDestination_KinesisFirehoseDestination_kinesisFirehoseDestination_IAMRoleARN = null;
            if (cmdletContext.KinesisFirehoseDestination_IAMRoleARN != null)
            {
                requestEventDestination_eventDestination_KinesisFirehoseDestination_kinesisFirehoseDestination_IAMRoleARN = cmdletContext.KinesisFirehoseDestination_IAMRoleARN;
            }
            if (requestEventDestination_eventDestination_KinesisFirehoseDestination_kinesisFirehoseDestination_IAMRoleARN != null)
            {
                requestEventDestination_eventDestination_KinesisFirehoseDestination.IAMRoleARN = requestEventDestination_eventDestination_KinesisFirehoseDestination_kinesisFirehoseDestination_IAMRoleARN;
                requestEventDestination_eventDestination_KinesisFirehoseDestinationIsNull      = false;
            }
            // determine if requestEventDestination_eventDestination_KinesisFirehoseDestination should be set to null
            if (requestEventDestination_eventDestination_KinesisFirehoseDestinationIsNull)
            {
                requestEventDestination_eventDestination_KinesisFirehoseDestination = null;
            }
            if (requestEventDestination_eventDestination_KinesisFirehoseDestination != null)
            {
                request.EventDestination.KinesisFirehoseDestination = requestEventDestination_eventDestination_KinesisFirehoseDestination;
                requestEventDestinationIsNull = false;
            }
            // determine if request.EventDestination should be set to null
            if (requestEventDestinationIsNull)
            {
                request.EventDestination = null;
            }

            CmdletOutput output;

            // issue call
            var client = Client ?? CreateClient(_CurrentCredentials, _RegionEndpoint);

            try
            {
                var    response       = CallAWSServiceOperation(client, request);
                object pipelineOutput = null;
                pipelineOutput = cmdletContext.Select(response, this);
                output         = new CmdletOutput
                {
                    PipelineOutput  = pipelineOutput,
                    ServiceResponse = response
                };
            }
            catch (Exception e)
            {
                output = new CmdletOutput {
                    ErrorResponse = e
                };
            }

            return(output);
        }
コード例 #5
0
        /// <summary>
        /// Initiates the asynchronous execution of the UpdateConfigurationSetEventDestination operation.
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the UpdateConfigurationSetEventDestination operation on AmazonSimpleEmailServiceClient.</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 EndUpdateConfigurationSetEventDestination
        ///         operation.</returns>
        public IAsyncResult BeginUpdateConfigurationSetEventDestination(UpdateConfigurationSetEventDestinationRequest request, AsyncCallback callback, object state)
        {
            var marshaller = new UpdateConfigurationSetEventDestinationRequestMarshaller();
            var unmarshaller = UpdateConfigurationSetEventDestinationResponseUnmarshaller.Instance;

            return BeginInvoke<UpdateConfigurationSetEventDestinationRequest>(request, marshaller, unmarshaller,
                callback, state);
        }
コード例 #6
0
 /// <summary>
 /// Initiates the asynchronous execution of the UpdateConfigurationSetEventDestination operation.
 /// </summary>
 /// 
 /// <param name="request">Container for the necessary parameters to execute the UpdateConfigurationSetEventDestination operation on AmazonSimpleEmailServiceClient.</param>
 /// <param name="callback">An Action delegate that is invoked when the operation completes.</param>
 /// <param name="options">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>
 public void UpdateConfigurationSetEventDestinationAsync(UpdateConfigurationSetEventDestinationRequest request, AmazonServiceCallback<UpdateConfigurationSetEventDestinationRequest, UpdateConfigurationSetEventDestinationResponse> callback, AsyncOptions options = null)
 {
     options = options == null?new AsyncOptions():options;
     var marshaller = new UpdateConfigurationSetEventDestinationRequestMarshaller();
     var unmarshaller = UpdateConfigurationSetEventDestinationResponseUnmarshaller.Instance;
     Action<AmazonWebServiceRequest, AmazonWebServiceResponse, Exception, AsyncOptions> callbackHelper = null;
     if(callback !=null )
         callbackHelper = (AmazonWebServiceRequest req, AmazonWebServiceResponse res, Exception ex, AsyncOptions ao) => { 
             AmazonServiceResult<UpdateConfigurationSetEventDestinationRequest,UpdateConfigurationSetEventDestinationResponse> responseObject 
                     = new AmazonServiceResult<UpdateConfigurationSetEventDestinationRequest,UpdateConfigurationSetEventDestinationResponse>((UpdateConfigurationSetEventDestinationRequest)req, (UpdateConfigurationSetEventDestinationResponse)res, ex , ao.State);    
                 callback(responseObject); 
         };
     BeginInvoke<UpdateConfigurationSetEventDestinationRequest>(request, marshaller, unmarshaller, options, callbackHelper);
 }