forked from linode/cli
/
linode-account
executable file
·116 lines (70 loc) · 2.77 KB
/
linode-account
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
#!/usr/bin/env perl
# linode-cli
# Copyright (C) 2015 Linode, LLC
use 5.010;
use strict;
use warnings;
use FindBin;
use lib "$FindBin::RealBin/lib";
use Linode::CLI;
use Linode::CLI::Util ':basic';
my $mode = 'account';
my $cmdargs = Linode::CLI::Util::eat_cmdargs($mode);
my $cli = Linode::CLI->new(
api_key => $cmdargs->{'api-key'},
mode => $mode,
opts => $cmdargs,
output_format => $cmdargs->{output},
wait => $cmdargs->{wait},
);
my $runaction = $cmdargs->{run};
$cli->$runaction;
$cli->response;
__END__
=head1 NAME
linode-account - command-line interface for Linode account information
=head1 SYNOPSIS
B<linode-account> [B<-a> action] [action-options...] [options...]
=over
=item S<-a show, --action show show info about this Linode account>
=item S< --api-key=KEY your user's API key>
=item S<-h, --help display this help and exit>
=item S<-j, --json return output in JSON format>
=item S<-u, --username=USER username for Linode CLI config file>
=back
=head1 OPTIONS
=over 8
=item B<-a>, B<--action>
Read-only operations for Linode account information: B<show>.
=item B<--api-key>
API key to use when communicating with the Linode API. The API key can also be set using an environment variable (LINODE_API_KEY). Alternatively, you can specify the API key in a B<.linodecli> file in the working user's home directory, using the format `api-key foobar`.
=item B<-u>, B<--username>:
Optional. Allows users to specify the username, if using with multiple accounts and configuration files.
=item B<-j>, B<--json>:
Optional. JSON output.
=item B<-h>, B<--help>
Displays help documentation.
=back
=head1 ACTIONS
=head2 SHOW
=over 8
=item Shows information about this Linode account.
=back
=head1 COPYRIGHT/LICENSE
Copyright 2015 Linode, LLC. Linode CLI is made available under the terms
of the Perl Artistic License, or GPLv2 at the recipients discretion.
=head2 Perl Artistic License
Read it at L<http://dev.perl.org/licenses/artistic.html>.
=head2 GNU General Public License (GPL) Version 2
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see http://www.gnu.org/licenses/
See the full license at L<http://www.gnu.org/licenses/>.
=cut