Class: ReactorSDK::Resources::Host
- Inherits:
-
BaseResource
- Object
- BaseResource
- ReactorSDK::Resources::Host
- Defined in:
- lib/reactor_sdk/resources/host.rb
Instance Attribute Summary
Attributes inherited from BaseResource
#attributes, #id, #meta, #relationships, #type
Instance Method Summary collapse
-
#akamai? ⇒ Boolean
Returns true if the host is an Adobe-managed Akamai host.
-
#created_at ⇒ String
ISO8601 timestamp when the host was created.
-
#inspect ⇒ String
Human-readable representation.
-
#name ⇒ String
Display name of the host.
-
#ready? ⇒ Boolean
Returns true if the host is ready for use.
-
#status ⇒ String
Host status — “succeeded”, “failed”, “pending”.
-
#type_of ⇒ String
Host type — typically “akamai” for Adobe-managed hosts.
-
#updated_at ⇒ String
ISO8601 timestamp when the host was last updated.
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.
43 44 45 |
# File 'lib/reactor_sdk/resources/host.rb', line 43 def akamai? type_of == 'akamai' end |
#created_at ⇒ String
Returns ISO8601 timestamp when the host was created.
32 |
# File 'lib/reactor_sdk/resources/host.rb', line 32 attribute :created_at |
#inspect ⇒ String
Returns 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 |
#name ⇒ String
Returns 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.
52 53 54 |
# File 'lib/reactor_sdk/resources/host.rb', line 52 def ready? status == 'succeeded' end |
#status ⇒ String
Returns Host status — “succeeded”, “failed”, “pending”.
29 |
# File 'lib/reactor_sdk/resources/host.rb', line 29 attribute :status |
#type_of ⇒ String
Returns Host type — typically “akamai” for Adobe-managed hosts.
26 |
# File 'lib/reactor_sdk/resources/host.rb', line 26 attribute :type_of |
#updated_at ⇒ String
Returns ISO8601 timestamp when the host was last updated.
35 |
# File 'lib/reactor_sdk/resources/host.rb', line 35 attribute :updated_at |