Class: Azure::ARM::Compute::Models::SshPublicKey

Inherits:
Object
  • Object
show all
Includes:
MsRest::JSONable, MsRestAzure
Defined in:
lib/generated/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

Class Method Summary collapse

Instance Attribute Details

#key_dataString

the VM through ssh. The key needs to be at least 2048-bit and in ssh-rsa format.
For creating ssh keys, see [Create SSH keys on Linux and Mac for Linux VMs in Azure](docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-mac-create-ssh-keys?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json).

Returns:

  • (String)

    SSH public key certificate used to authenticate with



27
28
29
# File 'lib/generated/azure_mgmt_compute/models/ssh_public_key.rb', line 27

def key_data
  @key_data
end

#pathString

public key is stored. If the file already exists, the specified key is appended to the file. Example: /home/user/.ssh/authorized_keys

Returns:

  • (String)

    Specifies the full path on the created VM where ssh



20
21
22
# File 'lib/generated/azure_mgmt_compute/models/ssh_public_key.rb', line 20

def path
  @path
end

Class Method Details

.mapperObject

Mapper for SshPublicKey class as Ruby Hash. This will be used for serialization/deserialization.



34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# File 'lib/generated/azure_mgmt_compute/models/ssh_public_key.rb', line 34

def self.mapper()
  {
    required: false,
    serialized_name: 'SshPublicKey',
    type: {
      name: 'Composite',
      class_name: 'SshPublicKey',
      model_properties: {
        path: {
          required: false,
          serialized_name: 'path',
          type: {
            name: 'String'
          }
        },
        key_data: {
          required: false,
          serialized_name: 'keyData',
          type: {
            name: 'String'
          }
        }
      }
    }
  }
end