Class: IBM::Cloud::SDK::VPC::Instances
- Inherits:
-
VPCCollection
- Object
- IBM::Cloud::SDKHTTP::BaseCollection
- VPCCollection
- IBM::Cloud::SDK::VPC::Instances
- Defined in:
- lib/ibm/cloud/sdk/vpc/instances.rb
Overview
Work with multiple VM instances.
Instance Attribute Summary
Attributes included from IBM::Cloud::SDKHTTP::BaseHTTPMixin
Attributes inherited from IBM::Cloud::SDKHTTP::BaseCollection
#connection, #endpoint, #logger, #token
Instance Method Summary collapse
-
#initialize(parent) ⇒ Instances
constructor
A new instance of Instances.
-
#params(start: nil, limit: nil, name: nil, vpc_id: nil, vpc_crn: nil, vpc_name: nil) ⇒ BaseCollection
A chainable method to set query filters on the collection.
Methods inherited from VPCCollection
Methods included from VpcHTTP
Methods included from IBM::Cloud::SDKHTTP::BaseHTTPMixin
#adhoc, #delete, #get, #metadata, #patch, #post, #put, #unchecked_response, #url
Methods inherited from IBM::Cloud::SDKHTTP::BaseCollection
#all, #create, #data, #fetch, #reset_params
Constructor Details
#initialize(parent) ⇒ Instances
Returns a new instance of Instances.
15 16 17 |
# File 'lib/ibm/cloud/sdk/vpc/instances.rb', line 15 def initialize(parent) super(parent, 'instances', child_class: Instance) end |
Instance Method Details
#params(start: nil, limit: nil, name: nil, vpc_id: nil, vpc_crn: nil, vpc_name: nil) ⇒ BaseCollection
A chainable method to set query filters on the collection.
29 30 31 32 33 34 35 36 |
# File 'lib/ibm/cloud/sdk/vpc/instances.rb', line 29 def params(start: nil, limit: nil, name: nil, vpc_id: nil, vpc_crn: nil, vpc_name: nil) super(start: start, limit: limit) @params['name'] = name if name @params['vpc.id'] = vpc_id if vpc_id @params['vpc.crn'] = vpc_crn if vpc_crn @params['vpc.name'] = vpc_name if vpc_name self end |