Provides options for how often AWS Config delivers configuration snapshots to the Amazon S3 bucket in your delivery channel.

If you want to create a rule that triggers evaluations for your resources when AWS Config delivers the configuration snapshot, see the following:

The frequency for a rule that triggers evaluations for your resources when AWS Config delivers the configuration snapshot is set by one of two values, depending on which is less frequent:

  • The value for the deliveryFrequency parameter within the delivery channel configuration, which sets how often AWS Config delivers configuration snapshots. This value also sets how often AWS Config invokes evaluations for Config rules.

  • The value for the MaximumExecutionFrequency parameter, which sets the maximum frequency with which AWS Config invokes evaluations for the rule. For more information, see ConfigRule.

If the deliveryFrequency value is less frequent than the MaximumExecutionFrequency value for a rule, AWS Config invokes the rule only as often as the deliveryFrequency value.

  1. For example, you want your rule to run evaluations when AWS Config delivers the configuration snapshot.

  2. You specify the MaximumExecutionFrequency value for Six_Hours.

  3. You then specify the delivery channel deliveryFrequency value for TwentyFour_Hours.

  4. Because the value for deliveryFrequency is less frequent than MaximumExecutionFrequency, AWS Config invokes evaluations for the rule every 24 hours.

You should set the MaximumExecutionFrequency value to be at least as frequent as the deliveryFrequency value. You can view the deliveryFrequency value by using the DescribeDeliveryChannnels action.

To update the deliveryFrequency with which AWS Config delivers your configuration snapshots, use the PutDeliveryChannel action.

Example #1
0
        public object Execute(ExecutorContext context)
        {
            var cmdletContext = context as CmdletContext;
            // create request
            var request = new Amazon.ConfigService.Model.PutDeliveryChannelRequest();


            // populate DeliveryChannel
            var requestDeliveryChannelIsNull = true;

            request.DeliveryChannel = new Amazon.ConfigService.Model.DeliveryChannel();
            System.String requestDeliveryChannel_deliveryChannelName = null;
            if (cmdletContext.DeliveryChannelName != null)
            {
                requestDeliveryChannel_deliveryChannelName = cmdletContext.DeliveryChannelName;
            }
            if (requestDeliveryChannel_deliveryChannelName != null)
            {
                request.DeliveryChannel.Name = requestDeliveryChannel_deliveryChannelName;
                requestDeliveryChannelIsNull = false;
            }
            System.String requestDeliveryChannel_deliveryChannel_S3BucketName = null;
            if (cmdletContext.DeliveryChannel_S3BucketName != null)
            {
                requestDeliveryChannel_deliveryChannel_S3BucketName = cmdletContext.DeliveryChannel_S3BucketName;
            }
            if (requestDeliveryChannel_deliveryChannel_S3BucketName != null)
            {
                request.DeliveryChannel.S3BucketName = requestDeliveryChannel_deliveryChannel_S3BucketName;
                requestDeliveryChannelIsNull         = false;
            }
            System.String requestDeliveryChannel_deliveryChannel_S3KeyPrefix = null;
            if (cmdletContext.DeliveryChannel_S3KeyPrefix != null)
            {
                requestDeliveryChannel_deliveryChannel_S3KeyPrefix = cmdletContext.DeliveryChannel_S3KeyPrefix;
            }
            if (requestDeliveryChannel_deliveryChannel_S3KeyPrefix != null)
            {
                request.DeliveryChannel.S3KeyPrefix = requestDeliveryChannel_deliveryChannel_S3KeyPrefix;
                requestDeliveryChannelIsNull        = false;
            }
            System.String requestDeliveryChannel_deliveryChannel_S3KmsKeyArn = null;
            if (cmdletContext.DeliveryChannel_S3KmsKeyArn != null)
            {
                requestDeliveryChannel_deliveryChannel_S3KmsKeyArn = cmdletContext.DeliveryChannel_S3KmsKeyArn;
            }
            if (requestDeliveryChannel_deliveryChannel_S3KmsKeyArn != null)
            {
                request.DeliveryChannel.S3KmsKeyArn = requestDeliveryChannel_deliveryChannel_S3KmsKeyArn;
                requestDeliveryChannelIsNull        = false;
            }
            System.String requestDeliveryChannel_deliveryChannel_SnsTopicARN = null;
            if (cmdletContext.DeliveryChannel_SnsTopicARN != null)
            {
                requestDeliveryChannel_deliveryChannel_SnsTopicARN = cmdletContext.DeliveryChannel_SnsTopicARN;
            }
            if (requestDeliveryChannel_deliveryChannel_SnsTopicARN != null)
            {
                request.DeliveryChannel.SnsTopicARN = requestDeliveryChannel_deliveryChannel_SnsTopicARN;
                requestDeliveryChannelIsNull        = false;
            }
            Amazon.ConfigService.Model.ConfigSnapshotDeliveryProperties requestDeliveryChannel_deliveryChannel_ConfigSnapshotDeliveryProperties = null;

            // populate ConfigSnapshotDeliveryProperties
            var requestDeliveryChannel_deliveryChannel_ConfigSnapshotDeliveryPropertiesIsNull = true;

            requestDeliveryChannel_deliveryChannel_ConfigSnapshotDeliveryProperties = new Amazon.ConfigService.Model.ConfigSnapshotDeliveryProperties();
            Amazon.ConfigService.MaximumExecutionFrequency requestDeliveryChannel_deliveryChannel_ConfigSnapshotDeliveryProperties_configSnapshotDeliveryProperties_DeliveryFrequency = null;
            if (cmdletContext.ConfigSnapshotDeliveryProperties_DeliveryFrequency != null)
            {
                requestDeliveryChannel_deliveryChannel_ConfigSnapshotDeliveryProperties_configSnapshotDeliveryProperties_DeliveryFrequency = cmdletContext.ConfigSnapshotDeliveryProperties_DeliveryFrequency;
            }
            if (requestDeliveryChannel_deliveryChannel_ConfigSnapshotDeliveryProperties_configSnapshotDeliveryProperties_DeliveryFrequency != null)
            {
                requestDeliveryChannel_deliveryChannel_ConfigSnapshotDeliveryProperties.DeliveryFrequency = requestDeliveryChannel_deliveryChannel_ConfigSnapshotDeliveryProperties_configSnapshotDeliveryProperties_DeliveryFrequency;
                requestDeliveryChannel_deliveryChannel_ConfigSnapshotDeliveryPropertiesIsNull             = false;
            }
            // determine if requestDeliveryChannel_deliveryChannel_ConfigSnapshotDeliveryProperties should be set to null
            if (requestDeliveryChannel_deliveryChannel_ConfigSnapshotDeliveryPropertiesIsNull)
            {
                requestDeliveryChannel_deliveryChannel_ConfigSnapshotDeliveryProperties = null;
            }
            if (requestDeliveryChannel_deliveryChannel_ConfigSnapshotDeliveryProperties != null)
            {
                request.DeliveryChannel.ConfigSnapshotDeliveryProperties = requestDeliveryChannel_deliveryChannel_ConfigSnapshotDeliveryProperties;
                requestDeliveryChannelIsNull = false;
            }
            // determine if request.DeliveryChannel should be set to null
            if (requestDeliveryChannelIsNull)
            {
                request.DeliveryChannel = 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);
        }