aws-sdk-iam 1.0.0.rc1 → 1.0.0.rc2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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
@@ -1,178 +1,178 @@
|
|
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 GroupPolicy
|
10
|
+
|
11
|
+
extend Aws::Deprecations
|
12
|
+
|
13
|
+
# @overload def initialize(group_name, name, options = {})
|
14
|
+
# @param [String] group_name
|
15
|
+
# @param [String] name
|
16
|
+
# @option options [Client] :client
|
17
|
+
# @overload def initialize(options = {})
|
18
|
+
# @option options [required, String] :group_name
|
19
|
+
# @option options [required, String] :name
|
20
|
+
# @option options [Client] :client
|
21
|
+
def initialize(*args)
|
22
|
+
options = Hash === args.last ? args.pop.dup : {}
|
23
|
+
@group_name = extract_group_name(args, options)
|
24
|
+
@name = extract_name(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 group_name
|
33
|
+
@group_name
|
34
|
+
end
|
36
35
|
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
36
|
+
# @return [String]
|
37
|
+
def name
|
38
|
+
@name
|
39
|
+
end
|
40
|
+
alias :policy_name :name
|
42
41
|
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
42
|
+
# The policy document.
|
43
|
+
# @return [String]
|
44
|
+
def policy_document
|
45
|
+
data.policy_document
|
46
|
+
end
|
48
47
|
|
49
|
-
|
48
|
+
# @!endgroup
|
50
49
|
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
50
|
+
# @return [Client]
|
51
|
+
def client
|
52
|
+
@client
|
53
|
+
end
|
55
54
|
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
55
|
+
# Loads, or reloads {#data} for the current {GroupPolicy}.
|
56
|
+
# Returns `self` making it possible to chain methods.
|
57
|
+
#
|
58
|
+
# group_policy.reload.data
|
59
|
+
#
|
60
|
+
# @return [self]
|
61
|
+
def load
|
62
|
+
resp = @client.get_group_policy(
|
63
|
+
group_name: @group_name,
|
64
|
+
policy_name: @name
|
65
|
+
)
|
66
|
+
@data = resp.data
|
67
|
+
self
|
68
|
+
end
|
69
|
+
alias :reload :load
|
70
|
+
|
71
|
+
# @return [Types::GetGroupPolicyResponse]
|
72
|
+
# Returns the data for this {GroupPolicy}. Calls
|
73
|
+
# {Client#get_group_policy} if {#data_loaded?} is `false`.
|
74
|
+
def data
|
75
|
+
load unless @data
|
76
|
+
@data
|
77
|
+
end
|
79
78
|
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
79
|
+
# @return [Boolean]
|
80
|
+
# Returns `true` if this resource is loaded. Accessing attributes or
|
81
|
+
# {#data} on an unloaded resource will trigger a call to {#load}.
|
82
|
+
def data_loaded?
|
83
|
+
!!@data
|
84
|
+
end
|
86
85
|
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
86
|
+
# @!group Actions
|
87
|
+
|
88
|
+
# @example Request syntax with placeholder values
|
89
|
+
#
|
90
|
+
# group_policy.delete()
|
91
|
+
# @param [Hash] options ({})
|
92
|
+
# @return [EmptyStructure]
|
93
|
+
def delete(options = {})
|
94
|
+
options = options.merge(
|
95
|
+
group_name: @group_name,
|
96
|
+
policy_name: @name
|
97
|
+
)
|
98
|
+
resp = @client.delete_group_policy(options)
|
99
|
+
resp.data
|
100
|
+
end
|
102
101
|
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
102
|
+
# @example Request syntax with placeholder values
|
103
|
+
#
|
104
|
+
# group_policy.put({
|
105
|
+
# policy_document: "policyDocumentType", # required
|
106
|
+
# })
|
107
|
+
# @param [Hash] options ({})
|
108
|
+
# @option options [required, String] :policy_document
|
109
|
+
# The policy document.
|
110
|
+
#
|
111
|
+
# The [regex pattern][1] used to validate this parameter is a string of
|
112
|
+
# characters consisting of any printable ASCII character ranging from
|
113
|
+
# the space character (\\u0020) through end of the ASCII character range
|
114
|
+
# as well as the printable characters in the Basic Latin and Latin-1
|
115
|
+
# Supplement character set (through \\u00FF). It also includes the
|
116
|
+
# special characters tab (\\u0009), line feed (\\u000A), and carriage
|
117
|
+
# return (\\u000D).
|
118
|
+
#
|
119
|
+
#
|
120
|
+
#
|
121
|
+
# [1]: http://wikipedia.org/wiki/regex
|
122
|
+
# @return [EmptyStructure]
|
123
|
+
def put(options = {})
|
124
|
+
options = options.merge(
|
125
|
+
group_name: @group_name,
|
126
|
+
policy_name: @name
|
127
|
+
)
|
128
|
+
resp = @client.put_group_policy(options)
|
129
|
+
resp.data
|
130
|
+
end
|
130
131
|
|
131
|
-
|
132
|
+
# @!group Associations
|
132
133
|
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
134
|
+
# @return [Group]
|
135
|
+
def group
|
136
|
+
Group.new(
|
137
|
+
name: @group_name,
|
138
|
+
client: @client
|
139
|
+
)
|
140
|
+
end
|
140
141
|
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
end
|
142
|
+
# @deprecated
|
143
|
+
# @api private
|
144
|
+
def identifiers
|
145
|
+
{
|
146
|
+
group_name: @group_name,
|
147
|
+
name: @name
|
148
|
+
}
|
149
|
+
end
|
150
|
+
deprecated(:identifiers)
|
151
|
+
|
152
|
+
private
|
153
|
+
|
154
|
+
def extract_group_name(args, options)
|
155
|
+
value = args[0] || options.delete(:group_name)
|
156
|
+
case value
|
157
|
+
when String then value
|
158
|
+
when nil then raise ArgumentError, "missing required option :group_name"
|
159
|
+
else
|
160
|
+
msg = "expected :group_name to be a String, got #{value.class}"
|
161
|
+
raise ArgumentError, msg
|
162
162
|
end
|
163
|
+
end
|
163
164
|
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
end
|
165
|
+
def extract_name(args, options)
|
166
|
+
value = args[1] || options.delete(:name)
|
167
|
+
case value
|
168
|
+
when String then value
|
169
|
+
when nil then raise ArgumentError, "missing required option :name"
|
170
|
+
else
|
171
|
+
msg = "expected :name to be a String, got #{value.class}"
|
172
|
+
raise ArgumentError, msg
|
173
173
|
end
|
174
|
-
|
175
|
-
class Collection < Aws::Resources::Collection; end
|
176
174
|
end
|
175
|
+
|
176
|
+
class Collection < Aws::Resources::Collection; end
|
177
177
|
end
|
178
178
|
end
|
@@ -1,264 +1,264 @@
|
|
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
|
-
class InstanceProfile
|
8
|
+
module Aws::IAM
|
9
|
+
class InstanceProfile
|
11
10
|
|
12
|
-
|
11
|
+
extend Aws::Deprecations
|
13
12
|
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
13
|
+
# @overload def initialize(name, options = {})
|
14
|
+
# @param [String] name
|
15
|
+
# @option options [Client] :client
|
16
|
+
# @overload def initialize(options = {})
|
17
|
+
# @option options [required, String] :name
|
18
|
+
# @option options [Client] :client
|
19
|
+
def initialize(*args)
|
20
|
+
options = Hash === args.last ? args.pop.dup : {}
|
21
|
+
@name = extract_name(args, options)
|
22
|
+
@data = options.delete(:data)
|
23
|
+
@client = options.delete(:client) || Client.new(options)
|
24
|
+
end
|
26
25
|
|
27
|
-
|
26
|
+
# @!group Read-Only Attributes
|
28
27
|
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
28
|
+
# @return [String]
|
29
|
+
def name
|
30
|
+
@name
|
31
|
+
end
|
32
|
+
alias :instance_profile_name :name
|
34
33
|
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
34
|
+
# The path to the instance profile. For more information about paths,
|
35
|
+
# see [IAM Identifiers][1] in the *Using IAM* guide.
|
36
|
+
#
|
37
|
+
#
|
38
|
+
#
|
39
|
+
# [1]: http://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html
|
40
|
+
# @return [String]
|
41
|
+
def path
|
42
|
+
data.path
|
43
|
+
end
|
45
44
|
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
45
|
+
# The stable and unique string identifying the instance profile. For
|
46
|
+
# more information about IDs, see [IAM Identifiers][1] in the *Using
|
47
|
+
# IAM* guide.
|
48
|
+
#
|
49
|
+
#
|
50
|
+
#
|
51
|
+
# [1]: http://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html
|
52
|
+
# @return [String]
|
53
|
+
def instance_profile_id
|
54
|
+
data.instance_profile_id
|
55
|
+
end
|
57
56
|
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
57
|
+
# The Amazon Resource Name (ARN) specifying the instance profile. For
|
58
|
+
# more information about ARNs and how to use them in policies, see [IAM
|
59
|
+
# Identifiers][1] in the *Using IAM* guide.
|
60
|
+
#
|
61
|
+
#
|
62
|
+
#
|
63
|
+
# [1]: http://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html
|
64
|
+
# @return [String]
|
65
|
+
def arn
|
66
|
+
data.arn
|
67
|
+
end
|
69
68
|
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
69
|
+
# The date when the instance profile was created.
|
70
|
+
# @return [Time]
|
71
|
+
def create_date
|
72
|
+
data.create_date
|
73
|
+
end
|
75
74
|
|
76
|
-
|
75
|
+
# @!endgroup
|
77
76
|
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
77
|
+
# @return [Client]
|
78
|
+
def client
|
79
|
+
@client
|
80
|
+
end
|
82
81
|
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
82
|
+
# Loads, or reloads {#data} for the current {InstanceProfile}.
|
83
|
+
# Returns `self` making it possible to chain methods.
|
84
|
+
#
|
85
|
+
# instance_profile.reload.data
|
86
|
+
#
|
87
|
+
# @return [self]
|
88
|
+
def load
|
89
|
+
resp = @client.get_instance_profile(instance_profile_name: @name)
|
90
|
+
@data = resp.instanceprofile
|
91
|
+
self
|
92
|
+
end
|
93
|
+
alias :reload :load
|
95
94
|
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
95
|
+
# @return [Types::InstanceProfile]
|
96
|
+
# Returns the data for this {InstanceProfile}. Calls
|
97
|
+
# {Client#get_instance_profile} if {#data_loaded?} is `false`.
|
98
|
+
def data
|
99
|
+
load unless @data
|
100
|
+
@data
|
101
|
+
end
|
103
102
|
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
103
|
+
# @return [Boolean]
|
104
|
+
# Returns `true` if this resource is loaded. Accessing attributes or
|
105
|
+
# {#data} on an unloaded resource will trigger a call to {#load}.
|
106
|
+
def data_loaded?
|
107
|
+
!!@data
|
108
|
+
end
|
110
109
|
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
end
|
110
|
+
# @param [Hash] options ({})
|
111
|
+
# @return [Boolean]
|
112
|
+
# Returns `true` if the InstanceProfile exists.
|
113
|
+
def exists?(options = {})
|
114
|
+
begin
|
115
|
+
wait_until_exists(options.merge(max_attempts: 1))
|
116
|
+
true
|
117
|
+
rescue Aws::Waiters::Errors::UnexpectedError => e
|
118
|
+
raise e.error
|
119
|
+
rescue Aws::Waiters::Errors::WaiterFailed
|
120
|
+
false
|
123
121
|
end
|
122
|
+
end
|
124
123
|
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
124
|
+
# @param [Hash] options ({})
|
125
|
+
# @option options [Integer] :max_attempts (40)
|
126
|
+
# @option options [Float] :delay (1)
|
127
|
+
# @option options [Proc] :before_attempt
|
128
|
+
# @option options [Proc] :before_wait
|
129
|
+
# @return [InstanceProfile]
|
130
|
+
def wait_until_exists(options = {})
|
131
|
+
options, params = separate_params_and_options(options)
|
132
|
+
waiter = Waiters::InstanceProfileExists.new(options)
|
133
|
+
yield_waiter_and_warn(waiter, &Proc.new) if block_given?
|
134
|
+
waiter.wait(params.merge(instance_profile_name: @name))
|
135
|
+
InstanceProfile.new({
|
136
|
+
name: @name,
|
137
|
+
client: @client
|
138
|
+
})
|
139
|
+
end
|
141
140
|
|
142
|
-
|
141
|
+
# @!group Actions
|
143
142
|
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
143
|
+
# @example Request syntax with placeholder values
|
144
|
+
#
|
145
|
+
# instance_profile.add_role({
|
146
|
+
# role_name: "roleNameType", # required
|
147
|
+
# })
|
148
|
+
# @param [Hash] options ({})
|
149
|
+
# @option options [required, String] :role_name
|
150
|
+
# The name of the role to add.
|
151
|
+
#
|
152
|
+
# This parameter allows (per its [regex pattern][1]) a string of
|
153
|
+
# characters consisting of upper and lowercase alphanumeric characters
|
154
|
+
# with no spaces. You can also include any of the following characters:
|
155
|
+
# =,.@-
|
156
|
+
#
|
157
|
+
#
|
158
|
+
#
|
159
|
+
# [1]: http://wikipedia.org/wiki/regex
|
160
|
+
# @return [EmptyStructure]
|
161
|
+
def add_role(options = {})
|
162
|
+
options = options.merge(instance_profile_name: @name)
|
163
|
+
resp = @client.add_role_to_instance_profile(options)
|
164
|
+
resp.data
|
165
|
+
end
|
166
166
|
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
167
|
+
# @example Request syntax with placeholder values
|
168
|
+
#
|
169
|
+
# instance_profile.delete()
|
170
|
+
# @param [Hash] options ({})
|
171
|
+
# @return [EmptyStructure]
|
172
|
+
def delete(options = {})
|
173
|
+
options = options.merge(instance_profile_name: @name)
|
174
|
+
resp = @client.delete_instance_profile(options)
|
175
|
+
resp.data
|
176
|
+
end
|
177
177
|
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
178
|
+
# @example Request syntax with placeholder values
|
179
|
+
#
|
180
|
+
# instance_profile.remove_role({
|
181
|
+
# role_name: "roleNameType", # required
|
182
|
+
# })
|
183
|
+
# @param [Hash] options ({})
|
184
|
+
# @option options [required, String] :role_name
|
185
|
+
# The name of the role to remove.
|
186
|
+
#
|
187
|
+
# This parameter allows (per its [regex pattern][1]) a string of
|
188
|
+
# characters consisting of upper and lowercase alphanumeric characters
|
189
|
+
# with no spaces. You can also include any of the following characters:
|
190
|
+
# =,.@-
|
191
|
+
#
|
192
|
+
#
|
193
|
+
#
|
194
|
+
# [1]: http://wikipedia.org/wiki/regex
|
195
|
+
# @return [EmptyStructure]
|
196
|
+
def remove_role(options = {})
|
197
|
+
options = options.merge(instance_profile_name: @name)
|
198
|
+
resp = @client.remove_role_from_instance_profile(options)
|
199
|
+
resp.data
|
200
|
+
end
|
200
201
|
|
201
|
-
|
202
|
+
# @!group Associations
|
202
203
|
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
end
|
213
|
-
Role::Collection.new([batch], size: batch.size)
|
204
|
+
# @return [Role::Collection]
|
205
|
+
def roles
|
206
|
+
batch = []
|
207
|
+
data.roles.each do |r|
|
208
|
+
batch << Role.new(
|
209
|
+
name: r.role_name,
|
210
|
+
data: r,
|
211
|
+
client: @client
|
212
|
+
)
|
214
213
|
end
|
214
|
+
Role::Collection.new([batch], size: batch.size)
|
215
|
+
end
|
215
216
|
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
217
|
+
# @deprecated
|
218
|
+
# @api private
|
219
|
+
def identifiers
|
220
|
+
{ name: @name }
|
221
|
+
end
|
222
|
+
deprecated(:identifiers)
|
222
223
|
|
223
|
-
|
224
|
+
private
|
224
225
|
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
end
|
226
|
+
def extract_name(args, options)
|
227
|
+
value = args[0] || options.delete(:name)
|
228
|
+
case value
|
229
|
+
when String then value
|
230
|
+
when nil then raise ArgumentError, "missing required option :name"
|
231
|
+
else
|
232
|
+
msg = "expected :name to be a String, got #{value.class}"
|
233
|
+
raise ArgumentError, msg
|
234
234
|
end
|
235
|
+
end
|
235
236
|
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
end
|
243
|
-
yield(waiter.waiter)
|
237
|
+
def yield_waiter_and_warn(waiter, &block)
|
238
|
+
if !@waiter_block_warned
|
239
|
+
msg = "pass options to configure the waiter; "
|
240
|
+
msg << "yielding the waiter is deprecated"
|
241
|
+
warn(msg)
|
242
|
+
@waiter_block_warned = true
|
244
243
|
end
|
244
|
+
yield(waiter.waiter)
|
245
|
+
end
|
245
246
|
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
end
|
247
|
+
def separate_params_and_options(options)
|
248
|
+
opts = Set.new([:client, :max_attempts, :delay, :before_attempt, :before_wait])
|
249
|
+
waiter_opts = {}
|
250
|
+
waiter_params = {}
|
251
|
+
options.each_pair do |key, value|
|
252
|
+
if opts.include?(key)
|
253
|
+
waiter_opts[key] = value
|
254
|
+
else
|
255
|
+
waiter_params[key] = value
|
256
256
|
end
|
257
|
-
waiter_opts[:client] ||= @client
|
258
|
-
[waiter_opts, waiter_params]
|
259
257
|
end
|
260
|
-
|
261
|
-
|
258
|
+
waiter_opts[:client] ||= @client
|
259
|
+
[waiter_opts, waiter_params]
|
262
260
|
end
|
261
|
+
|
262
|
+
class Collection < Aws::Resources::Collection; end
|
263
263
|
end
|
264
264
|
end
|