aws_account_number 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +11 -1
- data/lib/aws_account_number/cli.rb +10 -0
- data/lib/aws_account_number/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 77215ee6455664b43383cdbff6283bfb3c2b9dee
|
4
|
+
data.tar.gz: e30f96bec9d55f6b73a4ff4368ecd2fcc05fb76d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e4bc6da94c0549263463b11c01b91fdb05548bfe41776cf3c4f65ee72220cccc5fc2c016154ed290dd7d7ffbc23ff902e5a732a57d0e1eff34d44ea230a82df6
|
7
|
+
data.tar.gz: db3d40ce810e67cb9d0c4250478bcf72b6c0e0161b6ce90f1503e4a0e984468a6bc7c82be147ca89056f2b4724a24190eab472426bfffe9f6e303238c9bedc40
|
data/README.md
CHANGED
@@ -11,7 +11,17 @@ gem install aws_account_number
|
|
11
11
|
## Usage
|
12
12
|
|
13
13
|
```
|
14
|
-
|
14
|
+
# default by security group
|
15
|
+
$ aws_account_number
|
16
|
+
|
17
|
+
# by CloudFormation
|
18
|
+
$ aws_account_number cfn
|
19
|
+
|
20
|
+
# by IAM User (use current credentials)
|
21
|
+
$ aws_account_number iamuser
|
22
|
+
|
23
|
+
# use profile
|
24
|
+
$ aws_account_number --profile foo
|
15
25
|
```
|
16
26
|
|
17
27
|
## Development
|
@@ -49,5 +49,15 @@ module AwsAccountNumber
|
|
49
49
|
exit 1
|
50
50
|
end
|
51
51
|
end
|
52
|
+
|
53
|
+
desc :iamuser, "get AWS Account Number from current IAM User", alias: :i
|
54
|
+
def iamuser
|
55
|
+
begin
|
56
|
+
puts iam.current_user.arn.split(':')[4]
|
57
|
+
rescue RuntimeError => e
|
58
|
+
$stderr.puts e
|
59
|
+
exit 1
|
60
|
+
end
|
61
|
+
end
|
52
62
|
end
|
53
63
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aws_account_number
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ISOBE Kazuhiko
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-05-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -99,3 +99,4 @@ signing_key:
|
|
99
99
|
specification_version: 4
|
100
100
|
summary: Get AWS Account Number
|
101
101
|
test_files: []
|
102
|
+
has_rdoc:
|