Class: Azure::ARM::Compute::Models::SshPublicKey
- Inherits:
-
Object
- Object
- Azure::ARM::Compute::Models::SshPublicKey
- Includes:
- MsRestAzure
- Defined in:
- lib/azure_mgmt_compute/Models/ssh_public_key.rb
Overview
Contains information about SSH certificate public key and the path on the Linux VM where the public key is placed.
Instance Attribute Summary collapse
-
#key_data ⇒ String
authenticate with VM through SSH.The certificate must be in Pem format with or without headers.
-
#path ⇒ String
SSH public key is stored.
Class Method Summary collapse
-
.deserialize_object(object) ⇒ SshPublicKey
Deserializes given Ruby Hash into Model object.
-
.serialize_object(object) ⇒ Hash
Serializes given Model object into Ruby Hash.
Instance Method Summary collapse
-
#validate ⇒ Object
Validate the object.
Instance Attribute Details
#key_data ⇒ String
authenticate with VM through SSH.The certificate must be in Pem format with or without headers.
24 25 26 |
# File 'lib/azure_mgmt_compute/Models/ssh_public_key.rb', line 24 def key_data @key_data end |
#path ⇒ String
SSH public key is stored. If the file already exists, the specified key is appended to the file.
19 20 21 |
# File 'lib/azure_mgmt_compute/Models/ssh_public_key.rb', line 19 def path @path end |
Class Method Details
.deserialize_object(object) ⇒ SshPublicKey
Deserializes given Ruby Hash into Model object.
56 57 58 59 60 61 62 63 64 65 66 67 68 69 |
# File 'lib/azure_mgmt_compute/Models/ssh_public_key.rb', line 56 def self.deserialize_object(object) return if object.nil? output_object = SshPublicKey.new deserialized_property = object['path'] output_object.path = deserialized_property deserialized_property = object['keyData'] output_object.key_data = deserialized_property output_object.validate output_object end |
.serialize_object(object) ⇒ Hash
Serializes given Model object into Ruby Hash.
38 39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/azure_mgmt_compute/Models/ssh_public_key.rb', line 38 def self.serialize_object(object) object.validate output_object = {} serialized_property = object.path output_object['path'] = serialized_property unless serialized_property.nil? serialized_property = object.key_data output_object['keyData'] = serialized_property unless serialized_property.nil? output_object end |
Instance Method Details
#validate ⇒ Object
Validate the object. Throws ValidationError if validation fails.
29 30 31 |
# File 'lib/azure_mgmt_compute/Models/ssh_public_key.rb', line 29 def validate # Nothing to validate end |