Contains the delivery stream ARN and the IAM role ARN associated with an Amazon Kinesis Firehose event destination.

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

コード例 #1
0
        public object Execute(ExecutorContext context)
        {
            var cmdletContext = context as CmdletContext;
            // create request
            var request = new Amazon.SimpleEmail.Model.CreateConfigurationSetEventDestinationRequest();

            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);
        }