    # File lib/fog/aws/requests/cdn/post_distribution.rb, line 94
            def post_distribution(options = {})
              if self.data[:distributions].values.any? { |d| (d['CNAME'] & (options['CNAME']||[])).empty? }
                Fog::CDN::AWS::Mock.error(:invalid_argument, 'CNAME is already in use')
              end

              response = Excon::Response.new

              response.status = 201
              options['CallerReference'] = Time.now.to_i.to_s

              dist_id = Fog::CDN::AWS::Mock.distribution_id

              distribution = {
                'DomainName' => Fog::CDN::AWS::Mock.domain_name,
                'Id' => dist_id,
                'Status' => 'InProgress',
                'LastModifiedTime' => Time.now.utc.iso8601,
                'InProgressInvalidationBatches' => 0,
                'DistributionConfig' => {
                  'CallerReference' => options['CallerReference'],
                  'CNAME' => options['CNAME'] || [],
                  'Comment' => options['Comment'],
                  'Enabled' => options['Enabled'],
                  'Logging' => {
                    'Bucket' => options['Bucket'],
                    'Prefix' => options['Prefix']
                  },
                  'S3Origin' => options['S3Origin'],
                  'CustomOrigin' => options['CustomOrigin'],
                  'TrustedSigners' => options['TrustedSigners'] || []
                }
              }

              self.data[:distributions][dist_id] = distribution

              response.body = distribution
              response
            end