class NgrokAPI::Models::SSHHostCertificate

Attributes

attrs[R]
certificate[R]
client[R]
created_at[R]
description[R]
id[R]
key_type[R]
metadata[R]
principals[R]
public_key[R]
ssh_certificate_authority_id[R]
uri[R]
valid_after[R]
valid_until[R]

Public Class Methods

new(client: nil, attrs: {}) click to toggle source
# File lib/ngrokapi/models/ssh_host_certificate.rb, line 21
def initialize(client: nil, attrs: {})
  @client = client
  @attrs = attrs
  @id = @attrs['id']
  @uri = @attrs['uri']
  @created_at = @attrs['created_at']
  @description = @attrs['description']
  @metadata = @attrs['metadata']
  @public_key = @attrs['public_key']
  @key_type = @attrs['key_type']
  @ssh_certificate_authority_id = @attrs['ssh_certificate_authority_id']
  @principals = @attrs['principals']
  @valid_after = @attrs['valid_after']
  @valid_until = @attrs['valid_until']
  @certificate = @attrs['certificate']
end

Public Instance Methods

==(other) click to toggle source
# File lib/ngrokapi/models/ssh_host_certificate.rb, line 38
def ==(other)
  @attrs == other.attrs
end
delete() click to toggle source

Delete an SSH Host Certificate

ngrok.com/docs/api#api-ssh-host-certificates-delete

# File lib/ngrokapi/models/ssh_host_certificate.rb, line 54
def delete
  @client.delete(
    id: @id
  )
end
to_h() click to toggle source
# File lib/ngrokapi/models/ssh_host_certificate.rb, line 46
def to_h
  @attrs.to_h
end
to_s() click to toggle source
# File lib/ngrokapi/models/ssh_host_certificate.rb, line 42
def to_s
  @attrs.to_s
end
update( description: nil, metadata: nil ) click to toggle source

Update an SSH Host Certificate

ngrok.com/docs/api#api-ssh-host-certificates-update

# File lib/ngrokapi/models/ssh_host_certificate.rb, line 64
def update(
  description: nil,
  metadata: nil
)
  @description = description if description
  @metadata = metadata if metadata
  @client.update(
    id: @id,
    description: description,
    metadata: metadata
  )
end