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
@@ -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 RolePolicy
|
10
|
+
|
11
|
+
extend Aws::Deprecations
|
12
|
+
|
13
|
+
# @overload def initialize(role_name, name, options = {})
|
14
|
+
# @param [String] role_name
|
15
|
+
# @param [String] name
|
16
|
+
# @option options [Client] :client
|
17
|
+
# @overload def initialize(options = {})
|
18
|
+
# @option options [required, String] :role_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
|
+
@role_name = extract_role_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 role_name
|
33
|
+
@role_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 {RolePolicy}.
|
56
|
+
# Returns `self` making it possible to chain methods.
|
57
|
+
#
|
58
|
+
# role_policy.reload.data
|
59
|
+
#
|
60
|
+
# @return [self]
|
61
|
+
def load
|
62
|
+
resp = @client.get_role_policy(
|
63
|
+
role_name: @role_name,
|
64
|
+
policy_name: @name
|
65
|
+
)
|
66
|
+
@data = resp.data
|
67
|
+
self
|
68
|
+
end
|
69
|
+
alias :reload :load
|
70
|
+
|
71
|
+
# @return [Types::GetRolePolicyResponse]
|
72
|
+
# Returns the data for this {RolePolicy}. Calls
|
73
|
+
# {Client#get_role_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
|
+
# role_policy.delete()
|
91
|
+
# @param [Hash] options ({})
|
92
|
+
# @return [EmptyStructure]
|
93
|
+
def delete(options = {})
|
94
|
+
options = options.merge(
|
95
|
+
role_name: @role_name,
|
96
|
+
policy_name: @name
|
97
|
+
)
|
98
|
+
resp = @client.delete_role_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
|
+
# role_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
|
+
role_name: @role_name,
|
126
|
+
policy_name: @name
|
127
|
+
)
|
128
|
+
resp = @client.put_role_policy(options)
|
129
|
+
resp.data
|
130
|
+
end
|
130
131
|
|
131
|
-
|
132
|
+
# @!group Associations
|
132
133
|
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
134
|
+
# @return [Role]
|
135
|
+
def role
|
136
|
+
Role.new(
|
137
|
+
name: @role_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
|
+
role_name: @role_name,
|
147
|
+
name: @name
|
148
|
+
}
|
149
|
+
end
|
150
|
+
deprecated(:identifiers)
|
151
|
+
|
152
|
+
private
|
153
|
+
|
154
|
+
def extract_role_name(args, options)
|
155
|
+
value = args[0] || options.delete(:role_name)
|
156
|
+
case value
|
157
|
+
when String then value
|
158
|
+
when nil then raise ArgumentError, "missing required option :role_name"
|
159
|
+
else
|
160
|
+
msg = "expected :role_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,144 +1,142 @@
|
|
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
|
-
end
|
8
|
+
module Aws::IAM
|
9
|
+
class SamlProvider
|
10
|
+
|
11
|
+
extend Aws::Deprecations
|
12
|
+
|
13
|
+
# @overload def initialize(arn, options = {})
|
14
|
+
# @param [String] arn
|
15
|
+
# @option options [Client] :client
|
16
|
+
# @overload def initialize(options = {})
|
17
|
+
# @option options [required, String] :arn
|
18
|
+
# @option options [Client] :client
|
19
|
+
def initialize(*args)
|
20
|
+
options = Hash === args.last ? args.pop.dup : {}
|
21
|
+
@arn = extract_arn(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
|
-
|
28
|
+
# @return [String]
|
29
|
+
def arn
|
30
|
+
@arn
|
31
|
+
end
|
33
32
|
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
33
|
+
# The XML metadata document that includes information about an identity
|
34
|
+
# provider.
|
35
|
+
# @return [String]
|
36
|
+
def saml_metadata_document
|
37
|
+
data.saml_metadata_document
|
38
|
+
end
|
40
39
|
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
40
|
+
# The date and time when the SAML provider was created.
|
41
|
+
# @return [Time]
|
42
|
+
def create_date
|
43
|
+
data.create_date
|
44
|
+
end
|
46
45
|
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
46
|
+
# The expiration date and time for the SAML provider.
|
47
|
+
# @return [Time]
|
48
|
+
def valid_until
|
49
|
+
data.valid_until
|
50
|
+
end
|
52
51
|
|
53
|
-
|
52
|
+
# @!endgroup
|
54
53
|
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
54
|
+
# @return [Client]
|
55
|
+
def client
|
56
|
+
@client
|
57
|
+
end
|
59
58
|
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
59
|
+
# Loads, or reloads {#data} for the current {SamlProvider}.
|
60
|
+
# Returns `self` making it possible to chain methods.
|
61
|
+
#
|
62
|
+
# saml_provider.reload.data
|
63
|
+
#
|
64
|
+
# @return [self]
|
65
|
+
def load
|
66
|
+
resp = @client.get_saml_provider(saml_provider_arn: @arn)
|
67
|
+
@data = resp.data
|
68
|
+
self
|
69
|
+
end
|
70
|
+
alias :reload :load
|
71
|
+
|
72
|
+
# @return [Types::GetSAMLProviderResponse]
|
73
|
+
# Returns the data for this {SamlProvider}. Calls
|
74
|
+
# {Client#get_saml_provider} if {#data_loaded?} is `false`.
|
75
|
+
def data
|
76
|
+
load unless @data
|
77
|
+
@data
|
78
|
+
end
|
80
79
|
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
80
|
+
# @return [Boolean]
|
81
|
+
# Returns `true` if this resource is loaded. Accessing attributes or
|
82
|
+
# {#data} on an unloaded resource will trigger a call to {#load}.
|
83
|
+
def data_loaded?
|
84
|
+
!!@data
|
85
|
+
end
|
87
86
|
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
87
|
+
# @!group Actions
|
88
|
+
|
89
|
+
# @example Request syntax with placeholder values
|
90
|
+
#
|
91
|
+
# saml_provider.delete()
|
92
|
+
# @param [Hash] options ({})
|
93
|
+
# @return [EmptyStructure]
|
94
|
+
def delete(options = {})
|
95
|
+
options = options.merge(saml_provider_arn: @arn)
|
96
|
+
resp = @client.delete_saml_provider(options)
|
97
|
+
resp.data
|
98
|
+
end
|
100
99
|
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
100
|
+
# @example Request syntax with placeholder values
|
101
|
+
#
|
102
|
+
# saml_provider.update({
|
103
|
+
# saml_metadata_document: "SAMLMetadataDocumentType", # required
|
104
|
+
# })
|
105
|
+
# @param [Hash] options ({})
|
106
|
+
# @option options [required, String] :saml_metadata_document
|
107
|
+
# An XML document generated by an identity provider (IdP) that supports
|
108
|
+
# SAML 2.0. The document includes the issuer's name, expiration
|
109
|
+
# information, and keys that can be used to validate the SAML
|
110
|
+
# authentication response (assertions) that are received from the IdP.
|
111
|
+
# You must generate the metadata document using the identity management
|
112
|
+
# software that is used as your organization's IdP.
|
113
|
+
# @return [Types::UpdateSAMLProviderResponse]
|
114
|
+
def update(options = {})
|
115
|
+
options = options.merge(saml_provider_arn: @arn)
|
116
|
+
resp = @client.update_saml_provider(options)
|
117
|
+
resp.data
|
118
|
+
end
|
120
119
|
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
end
|
120
|
+
# @deprecated
|
121
|
+
# @api private
|
122
|
+
def identifiers
|
123
|
+
{ arn: @arn }
|
124
|
+
end
|
125
|
+
deprecated(:identifiers)
|
126
|
+
|
127
|
+
private
|
128
|
+
|
129
|
+
def extract_arn(args, options)
|
130
|
+
value = args[0] || options.delete(:arn)
|
131
|
+
case value
|
132
|
+
when String then value
|
133
|
+
when nil then raise ArgumentError, "missing required option :arn"
|
134
|
+
else
|
135
|
+
msg = "expected :arn to be a String, got #{value.class}"
|
136
|
+
raise ArgumentError, msg
|
139
137
|
end
|
140
|
-
|
141
|
-
class Collection < Aws::Resources::Collection; end
|
142
138
|
end
|
139
|
+
|
140
|
+
class Collection < Aws::Resources::Collection; end
|
143
141
|
end
|
144
142
|
end
|