Class: Fog::Compute::Google::SslCertificate

Inherits:
Model
  • Object
show all
Defined in:
lib/fog/compute/google/models/ssl_certificate.rb

Overview

Represents a SslCertificate resource

Instance Method Summary collapse

Instance Method Details

#destroy(async = true) ⇒ Object



31
32
33
34
35
36
37
38
# File 'lib/fog/compute/google/models/ssl_certificate.rb', line 31

def destroy(async = true)
  requires :identity
  data = service.delete_ssl_certificate(identity)
  operation = Fog::Compute::Google::Operations.new(:service => service)
                                              .get(data.name)
  operation.wait_for { ready? } unless async
  operation
end

#saveObject



19
20
21
22
23
24
25
26
27
28
29
# File 'lib/fog/compute/google/models/ssl_certificate.rb', line 19

def save
  requires :identity, :certificate, :private_key
  data = service.insert_ssl_certificate(
    identity, certificate, private_key,
    :description => description
  )
  operation = Fog::Compute::Google::Operations.new(:service => service)
                                              .get(data.name)
  operation.wait_for { ready? }
  reload
end