Class: IbmCloudRest::Instance
- Defined in:
- lib/ibm_cloud_rest/core/instance.rb
Constant Summary collapse
- STATUS =
%w[NEW PROVISIONING FAILED REMOVED REJECTED ACTIVE UNKNOWN DEPROVISIONING RESTARTING STARTING STOPPING STOPPED ]
Instance Attribute Summary collapse
-
#available_instances ⇒ Object
Returns the value of attribute available_instances.
-
#uri ⇒ Object
Returns the value of attribute uri.
-
#uuid_batch_count ⇒ Object
Returns the value of attribute uuid_batch_count.
Instance Method Summary collapse
- #get(id) ⇒ Object
-
#initialize(server = 'https://www.ibm.com', base_path = '/cloud/developer/api/rest/20090403/instances/', uuid_batch_count = 1000) ⇒ Instance
constructor
A new instance of Instance.
Constructor Details
#initialize(server = 'https://www.ibm.com', base_path = '/cloud/developer/api/rest/20090403/instances/', uuid_batch_count = 1000) ⇒ Instance
Returns a new instance of Instance.
17 18 19 20 |
# File 'lib/ibm_cloud_rest/core/instance.rb', line 17 def initialize(server = 'https://www.ibm.com', base_path= '/cloud/developer/api/rest/20090403/instances/', uuid_batch_count = 1000) @uri = server+base_path @uuid_batch_count = uuid_batch_count end |
Instance Attribute Details
#available_instances ⇒ Object
Returns the value of attribute available_instances.
16 17 18 |
# File 'lib/ibm_cloud_rest/core/instance.rb', line 16 def available_instances @available_instances end |
#uri ⇒ Object
Returns the value of attribute uri.
16 17 18 |
# File 'lib/ibm_cloud_rest/core/instance.rb', line 16 def uri @uri end |
#uuid_batch_count ⇒ Object
Returns the value of attribute uuid_batch_count.
16 17 18 |
# File 'lib/ibm_cloud_rest/core/instance.rb', line 16 def uuid_batch_count @uuid_batch_count end |
Instance Method Details
#get(id) ⇒ Object
21 22 23 |
# File 'lib/ibm_cloud_rest/core/instance.rb', line 21 def get(id) IbmCloudRest.get @uri+id.to_s end |