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,167 +1,166 @@
|
|
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 ServerCertificate
|
10
|
+
|
11
|
+
extend Aws::Deprecations
|
12
|
+
|
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
|
-
|
28
|
+
# @return [String]
|
29
|
+
def name
|
30
|
+
@name
|
31
|
+
end
|
33
32
|
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
33
|
+
# The meta information of the server certificate, such as its name,
|
34
|
+
# path, ID, and ARN.
|
35
|
+
# @return [Types::ServerCertificateMetadata]
|
36
|
+
def server_certificate_metadata
|
37
|
+
data.server_certificate_metadata
|
38
|
+
end
|
40
39
|
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
40
|
+
# The contents of the public key certificate.
|
41
|
+
# @return [String]
|
42
|
+
def certificate_body
|
43
|
+
data.certificate_body
|
44
|
+
end
|
46
45
|
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
46
|
+
# The contents of the public key certificate chain.
|
47
|
+
# @return [String]
|
48
|
+
def certificate_chain
|
49
|
+
data.certificate_chain
|
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 {ServerCertificate}.
|
60
|
+
# Returns `self` making it possible to chain methods.
|
61
|
+
#
|
62
|
+
# server_certificate.reload.data
|
63
|
+
#
|
64
|
+
# @return [self]
|
65
|
+
def load
|
66
|
+
resp = @client.get_server_certificate(server_certificate_name: @name)
|
67
|
+
@data = resp.servercertificate
|
68
|
+
self
|
69
|
+
end
|
70
|
+
alias :reload :load
|
71
|
+
|
72
|
+
# @return [Types::ServerCertificate]
|
73
|
+
# Returns the data for this {ServerCertificate}. Calls
|
74
|
+
# {Client#get_server_certificate} 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
|
+
# server_certificate.delete()
|
92
|
+
# @param [Hash] options ({})
|
93
|
+
# @return [EmptyStructure]
|
94
|
+
def delete(options = {})
|
95
|
+
options = options.merge(server_certificate_name: @name)
|
96
|
+
resp = @client.delete_server_certificate(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
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
100
|
+
# @example Request syntax with placeholder values
|
101
|
+
#
|
102
|
+
# servercertificate = server_certificate.update({
|
103
|
+
# new_path: "pathType",
|
104
|
+
# new_server_certificate_name: "serverCertificateNameType",
|
105
|
+
# })
|
106
|
+
# @param [Hash] options ({})
|
107
|
+
# @option options [String] :new_path
|
108
|
+
# The new path for the server certificate. Include this only if you are
|
109
|
+
# updating the server certificate's path.
|
110
|
+
#
|
111
|
+
# This paramater allows (per its [regex pattern][1]) a string of
|
112
|
+
# characters consisting of either a forward slash (/) by itself or a
|
113
|
+
# string that must begin and end with forward slashes, containing any
|
114
|
+
# ASCII character from the ! (\\u0021) thru the DEL character (\\u007F),
|
115
|
+
# including most punctuation characters, digits, and upper and
|
116
|
+
# lowercased letters.
|
117
|
+
#
|
118
|
+
#
|
119
|
+
#
|
120
|
+
# [1]: http://wikipedia.org/wiki/regex
|
121
|
+
# @option options [String] :new_server_certificate_name
|
122
|
+
# The new name for the server certificate. Include this only if you are
|
123
|
+
# updating the server certificate's name. The name of the certificate
|
124
|
+
# cannot contain any spaces.
|
125
|
+
#
|
126
|
+
# This parameter allows (per its [regex pattern][1]) a string of
|
127
|
+
# characters consisting of upper and lowercase alphanumeric characters
|
128
|
+
# with no spaces. You can also include any of the following characters:
|
129
|
+
# =,.@-
|
130
|
+
#
|
131
|
+
#
|
132
|
+
#
|
133
|
+
# [1]: http://wikipedia.org/wiki/regex
|
134
|
+
# @return [ServerCertificate]
|
135
|
+
def update(options = {})
|
136
|
+
options = options.merge(server_certificate_name: @name)
|
137
|
+
resp = @client.update_server_certificate(options)
|
138
|
+
ServerCertificate.new(
|
139
|
+
name: options[:new_server_certificate_name],
|
140
|
+
client: @client
|
141
|
+
)
|
142
|
+
end
|
143
143
|
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
end
|
144
|
+
# @deprecated
|
145
|
+
# @api private
|
146
|
+
def identifiers
|
147
|
+
{ name: @name }
|
148
|
+
end
|
149
|
+
deprecated(:identifiers)
|
150
|
+
|
151
|
+
private
|
152
|
+
|
153
|
+
def extract_name(args, options)
|
154
|
+
value = args[0] || options.delete(:name)
|
155
|
+
case value
|
156
|
+
when String then value
|
157
|
+
when nil then raise ArgumentError, "missing required option :name"
|
158
|
+
else
|
159
|
+
msg = "expected :name to be a String, got #{value.class}"
|
160
|
+
raise ArgumentError, msg
|
162
161
|
end
|
163
|
-
|
164
|
-
class Collection < Aws::Resources::Collection; end
|
165
162
|
end
|
163
|
+
|
164
|
+
class Collection < Aws::Resources::Collection; end
|
166
165
|
end
|
167
166
|
end
|
@@ -1,185 +1,183 @@
|
|
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 SigningCertificate
|
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 :certificate_id :id
|
42
41
|
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
42
|
+
# The contents of the signing certificate.
|
43
|
+
# @return [String]
|
44
|
+
def certificate_body
|
45
|
+
data.certificate_body
|
46
|
+
end
|
48
47
|
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
48
|
+
# The status of the signing certificate. `Active` means the key is valid
|
49
|
+
# for API calls, while `Inactive` means it is not.
|
50
|
+
# @return [String]
|
51
|
+
def status
|
52
|
+
data.status
|
53
|
+
end
|
55
54
|
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
55
|
+
# The date when the signing certificate was uploaded.
|
56
|
+
# @return [Time]
|
57
|
+
def upload_date
|
58
|
+
data.upload_date
|
59
|
+
end
|
61
60
|
|
62
|
-
|
61
|
+
# @!endgroup
|
63
62
|
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
63
|
+
# @return [Client]
|
64
|
+
def client
|
65
|
+
@client
|
66
|
+
end
|
68
67
|
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
68
|
+
# @raise [NotImplementedError]
|
69
|
+
# @api private
|
70
|
+
def load
|
71
|
+
msg = "#load is not implemented, data only available via enumeration"
|
72
|
+
raise NotImplementedError, msg
|
73
|
+
end
|
74
|
+
alias :reload :load
|
75
|
+
|
76
|
+
# @raise [NotImplementedError] Raises when {#data_loaded?} is `false`.
|
77
|
+
# @return [Types::SigningCertificate]
|
78
|
+
# Returns the data for this {SigningCertificate}.
|
79
|
+
def data
|
80
|
+
load unless @data
|
81
|
+
@data
|
82
|
+
end
|
84
83
|
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
84
|
+
# @return [Boolean]
|
85
|
+
# Returns `true` if this resource is loaded. Accessing attributes or
|
86
|
+
# {#data} on an unloaded resource will trigger a call to {#load}.
|
87
|
+
def data_loaded?
|
88
|
+
!!@data
|
89
|
+
end
|
91
90
|
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
91
|
+
# @!group Actions
|
92
|
+
|
93
|
+
# @example Request syntax with placeholder values
|
94
|
+
#
|
95
|
+
# signing_certificate.activate()
|
96
|
+
# @param [Hash] options ({})
|
97
|
+
# @return [EmptyStructure]
|
98
|
+
def activate(options = {})
|
99
|
+
options = options.merge(
|
100
|
+
user_name: @user_name,
|
101
|
+
certificate_id: @id,
|
102
|
+
status: "Active"
|
103
|
+
)
|
104
|
+
resp = @client.update_signing_certificate(options)
|
105
|
+
resp.data
|
106
|
+
end
|
108
107
|
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
108
|
+
# @example Request syntax with placeholder values
|
109
|
+
#
|
110
|
+
# signing_certificate.deactivate()
|
111
|
+
# @param [Hash] options ({})
|
112
|
+
# @return [EmptyStructure]
|
113
|
+
def deactivate(options = {})
|
114
|
+
options = options.merge(
|
115
|
+
user_name: @user_name,
|
116
|
+
certificate_id: @id,
|
117
|
+
status: "Inactive"
|
118
|
+
)
|
119
|
+
resp = @client.update_signing_certificate(options)
|
120
|
+
resp.data
|
121
|
+
end
|
123
122
|
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
123
|
+
# @example Request syntax with placeholder values
|
124
|
+
#
|
125
|
+
# signing_certificate.delete()
|
126
|
+
# @param [Hash] options ({})
|
127
|
+
# @return [EmptyStructure]
|
128
|
+
def delete(options = {})
|
129
|
+
options = options.merge(
|
130
|
+
user_name: @user_name,
|
131
|
+
certificate_id: @id
|
132
|
+
)
|
133
|
+
resp = @client.delete_signing_certificate(options)
|
134
|
+
resp.data
|
135
|
+
end
|
137
136
|
|
138
|
-
|
137
|
+
# @!group Associations
|
139
138
|
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
139
|
+
# @return [User]
|
140
|
+
def user
|
141
|
+
User.new(
|
142
|
+
name: @user_name,
|
143
|
+
client: @client
|
144
|
+
)
|
145
|
+
end
|
147
146
|
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
private
|
159
|
-
|
160
|
-
def extract_user_name(args, options)
|
161
|
-
value = args[0] || options.delete(:user_name)
|
162
|
-
case value
|
163
|
-
when String then value
|
164
|
-
when nil then raise ArgumentError, "missing required option :user_name"
|
165
|
-
else
|
166
|
-
msg = "expected :user_name to be a String, got #{value.class}"
|
167
|
-
raise ArgumentError, msg
|
168
|
-
end
|
169
|
-
end
|
147
|
+
# @deprecated
|
148
|
+
# @api private
|
149
|
+
def identifiers
|
150
|
+
{
|
151
|
+
user_name: @user_name,
|
152
|
+
id: @id
|
153
|
+
}
|
154
|
+
end
|
155
|
+
deprecated(:identifiers)
|
170
156
|
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
157
|
+
private
|
158
|
+
|
159
|
+
def extract_user_name(args, options)
|
160
|
+
value = args[0] || options.delete(:user_name)
|
161
|
+
case value
|
162
|
+
when String then value
|
163
|
+
when nil then raise ArgumentError, "missing required option :user_name"
|
164
|
+
else
|
165
|
+
msg = "expected :user_name to be a String, got #{value.class}"
|
166
|
+
raise ArgumentError, msg
|
180
167
|
end
|
168
|
+
end
|
181
169
|
|
182
|
-
|
170
|
+
def extract_id(args, options)
|
171
|
+
value = args[1] || options.delete(:id)
|
172
|
+
case value
|
173
|
+
when String then value
|
174
|
+
when nil then raise ArgumentError, "missing required option :id"
|
175
|
+
else
|
176
|
+
msg = "expected :id to be a String, got #{value.class}"
|
177
|
+
raise ArgumentError, msg
|
178
|
+
end
|
183
179
|
end
|
180
|
+
|
181
|
+
class Collection < Aws::Resources::Collection; end
|
184
182
|
end
|
185
183
|
end
|