Class: Azure::Certificates

Inherits:
Object
  • Object
show all
Defined in:
lib/azure/service_management/certificate.rb

Instance Method Summary collapse

Constructor Details

#initialize(connection) ⇒ Certificates

Returns a new instance of Certificates.



21
22
23
# File 'lib/azure/service_management/certificate.rb', line 21

def initialize(connection)
  @connection = connection
end

Instance Method Details

#add(certificate_data, certificate_password, certificate_format, dns_name) ⇒ Object



30
31
32
33
# File 'lib/azure/service_management/certificate.rb', line 30

def add(certificate_data, certificate_password, certificate_format, dns_name)
  certificate = Certificate.new(@connection)
  certificate.add_certificate certificate_data, certificate_password, certificate_format, dns_name
end

#create(params) ⇒ Object



25
26
27
28
# File 'lib/azure/service_management/certificate.rb', line 25

def create(params)
  certificate = Certificate.new(@connection)
  certificate.create(params)
end

#create_ssl_certificate(azure_dns_name) ⇒ Object



35
36
37
38
39
40
# File 'lib/azure/service_management/certificate.rb', line 35

def create_ssl_certificate(azure_dns_name)
  cert_params = { output_file: "winrm", key_length: 2048, cert_validity: 24,
                  azure_dns_name: azure_dns_name }
  certificate = Certificate.new(@connection)
  thumbprint = certificate.create_ssl_certificate(cert_params)
end

#get_certificate(dns_name, fingerprint) ⇒ Object



42
43
44
45
# File 'lib/azure/service_management/certificate.rb', line 42

def get_certificate(dns_name, fingerprint)
  certificate = Certificate.new(@connection)
  certificate.get_certificate(dns_name, fingerprint)
end