| 1 | package App::EFS; | ||
| 2 | |||
| 3 | use strict; | ||
| 4 | use warnings; | ||
| 5 | |||
| 6 | use Carp; | ||
| 7 | use Data::Dumper; | ||
| 8 | use English qw(-no_match_vars); | ||
| 9 | |||
| 10 | use Role::Tiny::With; | ||
| 11 | with 'App::AWS'; | ||
| 12 | |||
| 13 | use parent qw(App::Command); | ||
| 14 | |||
| 15 | __PACKAGE__->follow_best_practice; | ||
| 16 | __PACKAGE__->mk_accessors(qw(profile region)); | ||
| 17 | |||
| 18 | ######################################################################## | ||
| 19 | sub describe_file_systems { | ||
| 20 | ######################################################################## | ||
| 21 | my ( $self, $file_system_id, $query ) = @_; | ||
| 22 | |||
| 23 | return $self->command( | ||
| 24 | 'describe-file-systems' => [ | ||
| 25 | $file_system_id ? ( '--file-system-id' => $file_system_id ) : (), | ||
| 26 | $query ? ( '--query' => $query ) : () | ||
| 27 | ] | ||
| 28 | ); | ||
| 29 | } | ||
| 30 | |||
| 31 | ######################################################################## | ||
| 32 | sub describe_mount_targets { | ||
| 33 | ######################################################################## | ||
| 34 | my ( $self, $efs_id, $query ) = @_; | ||
| 35 | |||
| 36 | return $self->command( | ||
| 37 | 'describe-mount-targets' => [ | ||
| 38 | '--file-system-id' => $efs_id, | ||
| 39 | $query ? ( '--query' => $query ) : () | ||
| 40 | ] | ||
| 41 | ); | ||
| 42 | |||
| 43 | } | ||
| 44 | |||
| 45 | 1; |