aws-sdk-iam 1.0.0.rc1 → 1.0.0.rc2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/aws-sdk-iam.rb +1 -1
- data/lib/aws-sdk-iam/access_key.rb +150 -152
- data/lib/aws-sdk-iam/access_key_pair.rb +160 -162
- data/lib/aws-sdk-iam/account_password_policy.rb +208 -207
- data/lib/aws-sdk-iam/account_summary.rb +55 -57
- data/lib/aws-sdk-iam/assume_role_policy.rb +101 -101
- data/lib/aws-sdk-iam/client.rb +7849 -6742
- data/lib/aws-sdk-iam/client_api.rb +2896 -2784
- data/lib/aws-sdk-iam/current_user.rb +231 -230
- data/lib/aws-sdk-iam/errors.rb +4 -13
- data/lib/aws-sdk-iam/group.rb +422 -418
- data/lib/aws-sdk-iam/group_policy.rb +153 -153
- data/lib/aws-sdk-iam/instance_profile.rb +223 -223
- data/lib/aws-sdk-iam/login_profile.rb +171 -172
- data/lib/aws-sdk-iam/mfa_device.rb +163 -165
- data/lib/aws-sdk-iam/policy.rb +508 -502
- data/lib/aws-sdk-iam/policy_version.rb +149 -151
- data/lib/aws-sdk-iam/resource.rb +986 -969
- data/lib/aws-sdk-iam/role.rb +262 -264
- data/lib/aws-sdk-iam/role_policy.rb +153 -153
- data/lib/aws-sdk-iam/saml_provider.rb +120 -122
- data/lib/aws-sdk-iam/server_certificate.rb +144 -145
- data/lib/aws-sdk-iam/signing_certificate.rb +155 -157
- data/lib/aws-sdk-iam/types.rb +8333 -7476
- data/lib/aws-sdk-iam/user.rb +677 -672
- data/lib/aws-sdk-iam/user_policy.rb +153 -153
- data/lib/aws-sdk-iam/virtual_mfa_device.rb +117 -119
- data/lib/aws-sdk-iam/waiters.rb +76 -77
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 37d63f61645ebc8ac3dff2cd7b64bfaa24a61b5c
|
4
|
+
data.tar.gz: b7b32cf50737bcaa622e7041a550d4260e47d715
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f105f833a06659c490131c3c5bb450f9f6380167f51c5d27c5e0588e75f842aa83d4eb419988c0fa6ccca0f2eb67859630827e8f5f20f971a97335027b3532ec
|
7
|
+
data.tar.gz: fe7c0f2c7664cf24eb48049f9308e83609f202c4d9935b0f3909d97e9c7f1c7c9717d93d004d0c200243c1716b5423e7c1514d8697c0551011df6ede9e66504d
|
data/lib/aws-sdk-iam.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# WARNING ABOUT GENERATED CODE
|
2
2
|
#
|
3
|
-
# This file is generated. See the contributing for
|
3
|
+
# This file is generated. See the contributing guide for more information:
|
4
4
|
# https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
|
5
5
|
#
|
6
6
|
# WARNING ABOUT GENERATED CODE
|
@@ -1,179 +1,177 @@
|
|
1
1
|
# WARNING ABOUT GENERATED CODE
|
2
2
|
#
|
3
|
-
# This file is generated. See the contributing for
|
3
|
+
# This file is generated. See the contributing guide for more information:
|
4
4
|
# https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
|
5
5
|
#
|
6
6
|
# WARNING ABOUT GENERATED CODE
|
7
7
|
|
8
|
-
module Aws
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
end
|
8
|
+
module Aws::IAM
|
9
|
+
class AccessKey
|
10
|
+
|
11
|
+
extend Aws::Deprecations
|
12
|
+
|
13
|
+
# @overload def initialize(user_name, id, options = {})
|
14
|
+
# @param [String] user_name
|
15
|
+
# @param [String] id
|
16
|
+
# @option options [Client] :client
|
17
|
+
# @overload def initialize(options = {})
|
18
|
+
# @option options [required, String] :user_name
|
19
|
+
# @option options [required, String] :id
|
20
|
+
# @option options [Client] :client
|
21
|
+
def initialize(*args)
|
22
|
+
options = Hash === args.last ? args.pop.dup : {}
|
23
|
+
@user_name = extract_user_name(args, options)
|
24
|
+
@id = extract_id(args, options)
|
25
|
+
@data = options.delete(:data)
|
26
|
+
@client = options.delete(:client) || Client.new(options)
|
27
|
+
end
|
29
28
|
|
30
|
-
|
29
|
+
# @!group Read-Only Attributes
|
31
30
|
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
31
|
+
# @return [String]
|
32
|
+
def user_name
|
33
|
+
@user_name
|
34
|
+
end
|
36
35
|
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
36
|
+
# @return [String]
|
37
|
+
def id
|
38
|
+
@id
|
39
|
+
end
|
40
|
+
alias :access_key_id :id
|
42
41
|
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
42
|
+
# The status of the access key. `Active` means the key is valid for API
|
43
|
+
# calls; `Inactive` means it is not.
|
44
|
+
# @return [String]
|
45
|
+
def status
|
46
|
+
data.status
|
47
|
+
end
|
49
48
|
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
49
|
+
# The date when the access key was created.
|
50
|
+
# @return [Time]
|
51
|
+
def create_date
|
52
|
+
data.create_date
|
53
|
+
end
|
55
54
|
|
56
|
-
|
55
|
+
# @!endgroup
|
57
56
|
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
57
|
+
# @return [Client]
|
58
|
+
def client
|
59
|
+
@client
|
60
|
+
end
|
62
61
|
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
62
|
+
# @raise [NotImplementedError]
|
63
|
+
# @api private
|
64
|
+
def load
|
65
|
+
msg = "#load is not implemented, data only available via enumeration"
|
66
|
+
raise NotImplementedError, msg
|
67
|
+
end
|
68
|
+
alias :reload :load
|
69
|
+
|
70
|
+
# @raise [NotImplementedError] Raises when {#data_loaded?} is `false`.
|
71
|
+
# @return [Types::AccessKeyMetadata]
|
72
|
+
# Returns the data for this {AccessKey}.
|
73
|
+
def data
|
74
|
+
load unless @data
|
75
|
+
@data
|
76
|
+
end
|
78
77
|
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
78
|
+
# @return [Boolean]
|
79
|
+
# Returns `true` if this resource is loaded. Accessing attributes or
|
80
|
+
# {#data} on an unloaded resource will trigger a call to {#load}.
|
81
|
+
def data_loaded?
|
82
|
+
!!@data
|
83
|
+
end
|
85
84
|
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
85
|
+
# @!group Actions
|
86
|
+
|
87
|
+
# @example Request syntax with placeholder values
|
88
|
+
#
|
89
|
+
# access_key.activate()
|
90
|
+
# @param [Hash] options ({})
|
91
|
+
# @return [EmptyStructure]
|
92
|
+
def activate(options = {})
|
93
|
+
options = options.merge(
|
94
|
+
user_name: @user_name,
|
95
|
+
access_key_id: @id,
|
96
|
+
status: "Active"
|
97
|
+
)
|
98
|
+
resp = @client.update_access_key(options)
|
99
|
+
resp.data
|
100
|
+
end
|
102
101
|
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
102
|
+
# @example Request syntax with placeholder values
|
103
|
+
#
|
104
|
+
# access_key.deactivate()
|
105
|
+
# @param [Hash] options ({})
|
106
|
+
# @return [EmptyStructure]
|
107
|
+
def deactivate(options = {})
|
108
|
+
options = options.merge(
|
109
|
+
user_name: @user_name,
|
110
|
+
access_key_id: @id,
|
111
|
+
status: "Inactive"
|
112
|
+
)
|
113
|
+
resp = @client.update_access_key(options)
|
114
|
+
resp.data
|
115
|
+
end
|
117
116
|
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
117
|
+
# @example Request syntax with placeholder values
|
118
|
+
#
|
119
|
+
# access_key.delete()
|
120
|
+
# @param [Hash] options ({})
|
121
|
+
# @return [EmptyStructure]
|
122
|
+
def delete(options = {})
|
123
|
+
options = options.merge(
|
124
|
+
user_name: @user_name,
|
125
|
+
access_key_id: @id
|
126
|
+
)
|
127
|
+
resp = @client.delete_access_key(options)
|
128
|
+
resp.data
|
129
|
+
end
|
131
130
|
|
132
|
-
|
131
|
+
# @!group Associations
|
133
132
|
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
133
|
+
# @return [User]
|
134
|
+
def user
|
135
|
+
User.new(
|
136
|
+
name: @user_name,
|
137
|
+
client: @client
|
138
|
+
)
|
139
|
+
end
|
141
140
|
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
private
|
153
|
-
|
154
|
-
def extract_user_name(args, options)
|
155
|
-
value = args[0] || options.delete(:user_name)
|
156
|
-
case value
|
157
|
-
when String then value
|
158
|
-
when nil then raise ArgumentError, "missing required option :user_name"
|
159
|
-
else
|
160
|
-
msg = "expected :user_name to be a String, got #{value.class}"
|
161
|
-
raise ArgumentError, msg
|
162
|
-
end
|
163
|
-
end
|
141
|
+
# @deprecated
|
142
|
+
# @api private
|
143
|
+
def identifiers
|
144
|
+
{
|
145
|
+
user_name: @user_name,
|
146
|
+
id: @id
|
147
|
+
}
|
148
|
+
end
|
149
|
+
deprecated(:identifiers)
|
164
150
|
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
151
|
+
private
|
152
|
+
|
153
|
+
def extract_user_name(args, options)
|
154
|
+
value = args[0] || options.delete(:user_name)
|
155
|
+
case value
|
156
|
+
when String then value
|
157
|
+
when nil then raise ArgumentError, "missing required option :user_name"
|
158
|
+
else
|
159
|
+
msg = "expected :user_name to be a String, got #{value.class}"
|
160
|
+
raise ArgumentError, msg
|
174
161
|
end
|
162
|
+
end
|
175
163
|
|
176
|
-
|
164
|
+
def extract_id(args, options)
|
165
|
+
value = args[1] || options.delete(:id)
|
166
|
+
case value
|
167
|
+
when String then value
|
168
|
+
when nil then raise ArgumentError, "missing required option :id"
|
169
|
+
else
|
170
|
+
msg = "expected :id to be a String, got #{value.class}"
|
171
|
+
raise ArgumentError, msg
|
172
|
+
end
|
177
173
|
end
|
174
|
+
|
175
|
+
class Collection < Aws::Resources::Collection; end
|
178
176
|
end
|
179
177
|
end
|
@@ -1,190 +1,188 @@
|
|
1
1
|
# WARNING ABOUT GENERATED CODE
|
2
2
|
#
|
3
|
-
# This file is generated. See the contributing for
|
3
|
+
# This file is generated. See the contributing guide for more information:
|
4
4
|
# https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
|
5
5
|
#
|
6
6
|
# WARNING ABOUT GENERATED CODE
|
7
7
|
|
8
|
-
module Aws
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
end
|
8
|
+
module Aws::IAM
|
9
|
+
class AccessKeyPair
|
10
|
+
|
11
|
+
extend Aws::Deprecations
|
12
|
+
|
13
|
+
# @overload def initialize(user_name, id, secret, options = {})
|
14
|
+
# @param [String] user_name
|
15
|
+
# @param [String] id
|
16
|
+
# @param [String] secret
|
17
|
+
# @option options [Client] :client
|
18
|
+
# @overload def initialize(options = {})
|
19
|
+
# @option options [required, String] :user_name
|
20
|
+
# @option options [required, String] :id
|
21
|
+
# @option options [required, String] :secret
|
22
|
+
# @option options [Client] :client
|
23
|
+
def initialize(*args)
|
24
|
+
options = Hash === args.last ? args.pop.dup : {}
|
25
|
+
@user_name = extract_user_name(args, options)
|
26
|
+
@id = extract_id(args, options)
|
27
|
+
@secret = extract_secret(args, options)
|
28
|
+
@data = options.delete(:data)
|
29
|
+
@client = options.delete(:client) || Client.new(options)
|
30
|
+
end
|
32
31
|
|
33
|
-
|
32
|
+
# @!group Read-Only Attributes
|
34
33
|
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
34
|
+
# @return [String]
|
35
|
+
def user_name
|
36
|
+
@user_name
|
37
|
+
end
|
39
38
|
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
39
|
+
# @return [String]
|
40
|
+
def id
|
41
|
+
@id
|
42
|
+
end
|
43
|
+
alias :access_key_id :id
|
45
44
|
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
45
|
+
# @return [String]
|
46
|
+
def secret
|
47
|
+
@secret
|
48
|
+
end
|
49
|
+
alias :secret_access_key :secret
|
51
50
|
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
51
|
+
# The status of the access key. `Active` means the key is valid for API
|
52
|
+
# calls, while `Inactive` means it is not.
|
53
|
+
# @return [String]
|
54
|
+
def status
|
55
|
+
data.status
|
56
|
+
end
|
58
57
|
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
58
|
+
# The date when the access key was created.
|
59
|
+
# @return [Time]
|
60
|
+
def create_date
|
61
|
+
data.create_date
|
62
|
+
end
|
64
63
|
|
65
|
-
|
64
|
+
# @!endgroup
|
66
65
|
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
66
|
+
# @return [Client]
|
67
|
+
def client
|
68
|
+
@client
|
69
|
+
end
|
71
70
|
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
71
|
+
# @raise [NotImplementedError]
|
72
|
+
# @api private
|
73
|
+
def load
|
74
|
+
msg = "#load is not implemented, data only available via enumeration"
|
75
|
+
raise NotImplementedError, msg
|
76
|
+
end
|
77
|
+
alias :reload :load
|
78
|
+
|
79
|
+
# @raise [NotImplementedError] Raises when {#data_loaded?} is `false`.
|
80
|
+
# @return [Types::AccessKey]
|
81
|
+
# Returns the data for this {AccessKeyPair}.
|
82
|
+
def data
|
83
|
+
load unless @data
|
84
|
+
@data
|
85
|
+
end
|
87
86
|
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
87
|
+
# @return [Boolean]
|
88
|
+
# Returns `true` if this resource is loaded. Accessing attributes or
|
89
|
+
# {#data} on an unloaded resource will trigger a call to {#load}.
|
90
|
+
def data_loaded?
|
91
|
+
!!@data
|
92
|
+
end
|
94
93
|
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
94
|
+
# @!group Actions
|
95
|
+
|
96
|
+
# @example Request syntax with placeholder values
|
97
|
+
#
|
98
|
+
# access_key_pair.activate()
|
99
|
+
# @param [Hash] options ({})
|
100
|
+
# @return [EmptyStructure]
|
101
|
+
def activate(options = {})
|
102
|
+
options = options.merge(
|
103
|
+
user_name: @user_name,
|
104
|
+
access_key_id: @id,
|
105
|
+
status: "Active"
|
106
|
+
)
|
107
|
+
resp = @client.update_access_key(options)
|
108
|
+
resp.data
|
109
|
+
end
|
111
110
|
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
111
|
+
# @example Request syntax with placeholder values
|
112
|
+
#
|
113
|
+
# access_key_pair.deactivate()
|
114
|
+
# @param [Hash] options ({})
|
115
|
+
# @return [EmptyStructure]
|
116
|
+
def deactivate(options = {})
|
117
|
+
options = options.merge(
|
118
|
+
user_name: @user_name,
|
119
|
+
access_key_id: @id,
|
120
|
+
status: "Inactive"
|
121
|
+
)
|
122
|
+
resp = @client.update_access_key(options)
|
123
|
+
resp.data
|
124
|
+
end
|
126
125
|
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
126
|
+
# @example Request syntax with placeholder values
|
127
|
+
#
|
128
|
+
# access_key_pair.delete()
|
129
|
+
# @param [Hash] options ({})
|
130
|
+
# @return [EmptyStructure]
|
131
|
+
def delete(options = {})
|
132
|
+
options = options.merge(
|
133
|
+
user_name: @user_name,
|
134
|
+
access_key_id: @id
|
135
|
+
)
|
136
|
+
resp = @client.delete_access_key(options)
|
137
|
+
resp.data
|
138
|
+
end
|
140
139
|
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
def extract_user_name(args, options)
|
155
|
-
value = args[0] || options.delete(:user_name)
|
156
|
-
case value
|
157
|
-
when String then value
|
158
|
-
when nil then raise ArgumentError, "missing required option :user_name"
|
159
|
-
else
|
160
|
-
msg = "expected :user_name to be a String, got #{value.class}"
|
161
|
-
raise ArgumentError, msg
|
162
|
-
end
|
163
|
-
end
|
140
|
+
# @deprecated
|
141
|
+
# @api private
|
142
|
+
def identifiers
|
143
|
+
{
|
144
|
+
user_name: @user_name,
|
145
|
+
id: @id,
|
146
|
+
secret: @secret
|
147
|
+
}
|
148
|
+
end
|
149
|
+
deprecated(:identifiers)
|
150
|
+
|
151
|
+
private
|
164
152
|
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
end
|
153
|
+
def extract_user_name(args, options)
|
154
|
+
value = args[0] || options.delete(:user_name)
|
155
|
+
case value
|
156
|
+
when String then value
|
157
|
+
when nil then raise ArgumentError, "missing required option :user_name"
|
158
|
+
else
|
159
|
+
msg = "expected :user_name to be a String, got #{value.class}"
|
160
|
+
raise ArgumentError, msg
|
174
161
|
end
|
162
|
+
end
|
175
163
|
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
end
|
164
|
+
def extract_id(args, options)
|
165
|
+
value = args[1] || options.delete(:id)
|
166
|
+
case value
|
167
|
+
when String then value
|
168
|
+
when nil then raise ArgumentError, "missing required option :id"
|
169
|
+
else
|
170
|
+
msg = "expected :id to be a String, got #{value.class}"
|
171
|
+
raise ArgumentError, msg
|
185
172
|
end
|
173
|
+
end
|
186
174
|
|
187
|
-
|
175
|
+
def extract_secret(args, options)
|
176
|
+
value = args[2] || options.delete(:secret)
|
177
|
+
case value
|
178
|
+
when String then value
|
179
|
+
when nil then raise ArgumentError, "missing required option :secret"
|
180
|
+
else
|
181
|
+
msg = "expected :secret to be a String, got #{value.class}"
|
182
|
+
raise ArgumentError, msg
|
183
|
+
end
|
188
184
|
end
|
185
|
+
|
186
|
+
class Collection < Aws::Resources::Collection; end
|
189
187
|
end
|
190
188
|
end
|