Class: Fog::AWS::EFS::MountTarget
- Inherits:
-
Model
- Object
- Model
- Fog::AWS::EFS::MountTarget
- Defined in:
- lib/fog/aws/models/efs/mount_target.rb
Instance Method Summary collapse
- #destroy ⇒ Object
- #file_system ⇒ Object
- #ready? ⇒ Boolean
- #save ⇒ Object
- #security_groups ⇒ Object
- #security_groups=(security_groups) ⇒ Object
Instance Method Details
#destroy ⇒ Object
18 19 20 21 22 |
# File 'lib/fog/aws/models/efs/mount_target.rb', line 18 def destroy requires :identity service.delete_mount_target(self.identity) true end |
#file_system ⇒ Object
24 25 26 27 |
# File 'lib/fog/aws/models/efs/mount_target.rb', line 24 def file_system requires :file_system_id service.file_systems.get(self.file_system_id) end |
#ready? ⇒ Boolean
14 15 16 |
# File 'lib/fog/aws/models/efs/mount_target.rb', line 14 def ready? state == 'available' end |
#save ⇒ Object
48 49 50 51 52 53 54 55 |
# File 'lib/fog/aws/models/efs/mount_target.rb', line 48 def save requires :file_system_id, :subnet_id params = {} params.merge!('IpAddress' => self.ip_address) if self.ip_address params.merge!('SecurityGroups' => @security_groups) if @security_groups merge_attributes(service.create_mount_target(self.file_system_id, self.subnet_id, params).body) end |
#security_groups ⇒ Object
29 30 31 32 33 34 35 36 |
# File 'lib/fog/aws/models/efs/mount_target.rb', line 29 def security_groups if persisted? requires :identity service.describe_mount_target_security_groups(self.identity).body["SecurityGroups"] else @security_groups || [] end end |
#security_groups=(security_groups) ⇒ Object
38 39 40 41 42 43 44 45 46 |
# File 'lib/fog/aws/models/efs/mount_target.rb', line 38 def security_groups=(security_groups) if persisted? requires :identity service.modify_mount_target_security_groups(self.identity, security_groups) else @security_groups = security_groups end security_groups end |