Class: ReactorSDK::Resources::Host

Inherits:
BaseResource show all
Defined in:
lib/reactor_sdk/resources/host.rb

Instance Attribute Summary

Attributes inherited from BaseResource

#attributes, #id, #meta, #relationships, #type

Instance Method Summary collapse

Methods inherited from BaseResource

#==, #[], attribute, #initialize, #relationship_data, #relationship_id, #relationship_ids, #to_h

Constructor Details

This class inherits a constructor from ReactorSDK::Resources::BaseResource

Instance Method Details

#akamai?Boolean

Returns true if the host is an Adobe-managed Akamai host. Most properties have exactly one Akamai host by default.

Returns:

  • (Boolean)


43
44
45
# File 'lib/reactor_sdk/resources/host.rb', line 43

def akamai?
  type_of == 'akamai'
end

#created_atString

Returns ISO8601 timestamp when the host was created.

Returns:

  • (String)

    ISO8601 timestamp when the host was created



32
# File 'lib/reactor_sdk/resources/host.rb', line 32

attribute :created_at

#inspectString

Returns Human-readable representation.

Returns:

  • (String)

    Human-readable representation



59
60
61
62
63
64
65
# File 'lib/reactor_sdk/resources/host.rb', line 59

def inspect
  '#<ReactorSDK::Resources::Host ' \
    "id=#{id.inspect} " \
    "name=#{name.inspect} " \
    "type_of=#{type_of.inspect} " \
    "status=#{status.inspect}>"
end

#nameString

Returns Display name of the host.

Returns:

  • (String)

    Display name of the host



23
# File 'lib/reactor_sdk/resources/host.rb', line 23

attribute :name

#ready?Boolean

Returns true if the host is ready for use.

Returns:

  • (Boolean)


52
53
54
# File 'lib/reactor_sdk/resources/host.rb', line 52

def ready?
  status == 'succeeded'
end

#statusString

Returns Host status — “succeeded”, “failed”, “pending”.

Returns:

  • (String)

    Host status — “succeeded”, “failed”, “pending”



29
# File 'lib/reactor_sdk/resources/host.rb', line 29

attribute :status

#type_ofString

Returns Host type — typically “akamai” for Adobe-managed hosts.

Returns:

  • (String)

    Host type — typically “akamai” for Adobe-managed hosts



26
# File 'lib/reactor_sdk/resources/host.rb', line 26

attribute :type_of

#updated_atString

Returns ISO8601 timestamp when the host was last updated.

Returns:

  • (String)

    ISO8601 timestamp when the host was last updated



35
# File 'lib/reactor_sdk/resources/host.rb', line 35

attribute :updated_at