Method: Cfdef::Driver#delete_distribution

Defined in:
lib/cfdef/driver.rb

#delete_distribution(dist_id) ⇒ Object



28
29
30
31
32
33
34
35
36
37
38
39
40
41
# File 'lib/cfdef/driver.rb', line 28

def delete_distribution(dist_id)
  log(:info, "Delete Distribution `#{dist_id}`", color: :red)

  unless @options[:dry_run]
    etag = @client.get_distribution(id: dist_id).etag

    params = {
      id: dist_id,
      if_match: etag,
    }

    @client.delete_distribution(params)
  end
end