Class: BatchlyApi::VpcDetails
- Inherits:
-
Object
- Object
- BatchlyApi::VpcDetails
- Defined in:
- lib/batchly_api/models/vpc_details.rb
Instance Attribute Summary collapse
-
#region ⇒ String
Cloud Region in which the VPC is setup.
-
#subnet_ids ⇒ Array<String>
List of subnets within VPC which are assigned for batchly usage.
-
#vpc_id ⇒ String
Identifier information of the VPC from cloud service.
Instance Method Summary collapse
-
#key_map ⇒ Object
Defines the key map for json serialization.
- #method_missing(method_name) ⇒ Object
-
#to_json ⇒ Object
Creates JSON of the curent object.
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method_name) ⇒ Object
20 21 22 |
# File 'lib/batchly_api/models/vpc_details.rb', line 20 def method_missing (method_name) puts "there's no method called '#{method_name}'" end |
Instance Attribute Details
#region ⇒ String
Cloud Region in which the VPC is setup
17 18 19 |
# File 'lib/batchly_api/models/vpc_details.rb', line 17 def region @region end |
#subnet_ids ⇒ Array<String>
List of subnets within VPC which are assigned for batchly usage.
Minimum Subnets required for High Availability: 2
13 14 15 |
# File 'lib/batchly_api/models/vpc_details.rb', line 13 def subnet_ids @subnet_ids end |
#vpc_id ⇒ String
Identifier information of the VPC from cloud service
8 9 10 |
# File 'lib/batchly_api/models/vpc_details.rb', line 8 def vpc_id @vpc_id end |
Instance Method Details
#key_map ⇒ Object
Defines the key map for json serialization
31 32 33 34 35 36 37 |
# File 'lib/batchly_api/models/vpc_details.rb', line 31 def key_map hash = {} hash['VpcId'] = self.vpc_id hash['SubnetIds'] = self.subnet_ids hash['Region'] = self.region hash end |
#to_json ⇒ Object
Creates JSON of the curent object
25 26 27 28 |
# File 'lib/batchly_api/models/vpc_details.rb', line 25 def to_json hash = self.key_map() hash.to_json end |