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,176 +1,174 @@
|
|
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 PolicyVersion
|
10
|
+
|
11
|
+
extend Aws::Deprecations
|
12
|
+
|
13
|
+
# @overload def initialize(arn, version_id, options = {})
|
14
|
+
# @param [String] arn
|
15
|
+
# @param [String] version_id
|
16
|
+
# @option options [Client] :client
|
17
|
+
# @overload def initialize(options = {})
|
18
|
+
# @option options [required, String] :arn
|
19
|
+
# @option options [required, String] :version_id
|
20
|
+
# @option options [Client] :client
|
21
|
+
def initialize(*args)
|
22
|
+
options = Hash === args.last ? args.pop.dup : {}
|
23
|
+
@arn = extract_arn(args, options)
|
24
|
+
@version_id = extract_version_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 arn
|
33
|
+
@arn
|
34
|
+
end
|
36
35
|
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
36
|
+
# @return [String]
|
37
|
+
def version_id
|
38
|
+
@version_id
|
39
|
+
end
|
41
40
|
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
41
|
+
# The policy document.
|
42
|
+
#
|
43
|
+
# The policy document is returned in the response to the
|
44
|
+
# GetPolicyVersion and GetAccountAuthorizationDetails operations. It is
|
45
|
+
# not returned in the response to the CreatePolicyVersion or
|
46
|
+
# ListPolicyVersions operations.
|
47
|
+
# @return [String]
|
48
|
+
def document
|
49
|
+
data.document
|
50
|
+
end
|
52
51
|
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
52
|
+
# Specifies whether the policy version is set as the policy's default
|
53
|
+
# version.
|
54
|
+
# @return [Boolean]
|
55
|
+
def is_default_version
|
56
|
+
data.is_default_version
|
57
|
+
end
|
59
58
|
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
59
|
+
# The date and time, in [ISO 8601 date-time format][1], when the policy
|
60
|
+
# version was created.
|
61
|
+
#
|
62
|
+
#
|
63
|
+
#
|
64
|
+
# [1]: http://www.iso.org/iso/iso8601
|
65
|
+
# @return [Time]
|
66
|
+
def create_date
|
67
|
+
data.create_date
|
68
|
+
end
|
70
69
|
|
71
|
-
|
70
|
+
# @!endgroup
|
72
71
|
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
72
|
+
# @return [Client]
|
73
|
+
def client
|
74
|
+
@client
|
75
|
+
end
|
77
76
|
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
77
|
+
# Loads, or reloads {#data} for the current {PolicyVersion}.
|
78
|
+
# Returns `self` making it possible to chain methods.
|
79
|
+
#
|
80
|
+
# policy_version.reload.data
|
81
|
+
#
|
82
|
+
# @return [self]
|
83
|
+
def load
|
84
|
+
resp = @client.get_policy_version(
|
85
|
+
policy_arn: @arn,
|
86
|
+
version_id: @version_id
|
87
|
+
)
|
88
|
+
@data = resp.policyversion
|
89
|
+
self
|
90
|
+
end
|
91
|
+
alias :reload :load
|
92
|
+
|
93
|
+
# @return [Types::PolicyVersion]
|
94
|
+
# Returns the data for this {PolicyVersion}. Calls
|
95
|
+
# {Client#get_policy_version} if {#data_loaded?} is `false`.
|
96
|
+
def data
|
97
|
+
load unless @data
|
98
|
+
@data
|
99
|
+
end
|
101
100
|
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
101
|
+
# @return [Boolean]
|
102
|
+
# Returns `true` if this resource is loaded. Accessing attributes or
|
103
|
+
# {#data} on an unloaded resource will trigger a call to {#load}.
|
104
|
+
def data_loaded?
|
105
|
+
!!@data
|
106
|
+
end
|
108
107
|
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
108
|
+
# @!group Actions
|
109
|
+
|
110
|
+
# @example Request syntax with placeholder values
|
111
|
+
#
|
112
|
+
# policy_version.delete()
|
113
|
+
# @param [Hash] options ({})
|
114
|
+
# @return [EmptyStructure]
|
115
|
+
def delete(options = {})
|
116
|
+
options = options.merge(
|
117
|
+
policy_arn: @arn,
|
118
|
+
version_id: @version_id
|
119
|
+
)
|
120
|
+
resp = @client.delete_policy_version(options)
|
121
|
+
resp.data
|
122
|
+
end
|
124
123
|
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
124
|
+
# @example Request syntax with placeholder values
|
125
|
+
#
|
126
|
+
# policy_version.set_as_default()
|
127
|
+
# @param [Hash] options ({})
|
128
|
+
# @return [EmptyStructure]
|
129
|
+
def set_as_default(options = {})
|
130
|
+
options = options.merge(
|
131
|
+
policy_arn: @arn,
|
132
|
+
version_id: @version_id
|
133
|
+
)
|
134
|
+
resp = @client.set_default_policy_version(options)
|
135
|
+
resp.data
|
136
|
+
end
|
138
137
|
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
end
|
138
|
+
# @deprecated
|
139
|
+
# @api private
|
140
|
+
def identifiers
|
141
|
+
{
|
142
|
+
arn: @arn,
|
143
|
+
version_id: @version_id
|
144
|
+
}
|
145
|
+
end
|
146
|
+
deprecated(:identifiers)
|
147
|
+
|
148
|
+
private
|
149
|
+
|
150
|
+
def extract_arn(args, options)
|
151
|
+
value = args[0] || options.delete(:arn)
|
152
|
+
case value
|
153
|
+
when String then value
|
154
|
+
when nil then raise ArgumentError, "missing required option :arn"
|
155
|
+
else
|
156
|
+
msg = "expected :arn to be a String, got #{value.class}"
|
157
|
+
raise ArgumentError, msg
|
160
158
|
end
|
159
|
+
end
|
161
160
|
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
end
|
161
|
+
def extract_version_id(args, options)
|
162
|
+
value = args[1] || options.delete(:version_id)
|
163
|
+
case value
|
164
|
+
when String then value
|
165
|
+
when nil then raise ArgumentError, "missing required option :version_id"
|
166
|
+
else
|
167
|
+
msg = "expected :version_id to be a String, got #{value.class}"
|
168
|
+
raise ArgumentError, msg
|
171
169
|
end
|
172
|
-
|
173
|
-
class Collection < Aws::Resources::Collection; end
|
174
170
|
end
|
171
|
+
|
172
|
+
class Collection < Aws::Resources::Collection; end
|
175
173
|
end
|
176
174
|
end
|
data/lib/aws-sdk-iam/resource.rb
CHANGED
@@ -1,1037 +1,1054 @@
|
|
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 Resource
|
8
|
+
module Aws::IAM
|
9
|
+
class Resource
|
11
10
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
11
|
+
# @param options ({})
|
12
|
+
# @option options [Client] :client
|
13
|
+
def initialize(options = {})
|
14
|
+
@client = options[:client] || Client.new(options)
|
15
|
+
end
|
17
16
|
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
17
|
+
# @return [Client]
|
18
|
+
def client
|
19
|
+
@client
|
20
|
+
end
|
22
21
|
|
23
|
-
|
22
|
+
# @!group Actions
|
24
23
|
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
24
|
+
# @example Request syntax with placeholder values
|
25
|
+
#
|
26
|
+
# iam.change_password({
|
27
|
+
# old_password: "passwordType", # required
|
28
|
+
# new_password: "passwordType", # required
|
29
|
+
# })
|
30
|
+
# @param [Hash] options ({})
|
31
|
+
# @option options [required, String] :old_password
|
32
|
+
# The IAM user's current password.
|
33
|
+
# @option options [required, String] :new_password
|
34
|
+
# The new password. The new password must conform to the AWS account's
|
35
|
+
# password policy, if one exists.
|
36
|
+
#
|
37
|
+
# The [regex pattern][1] used to validate this parameter is a string of
|
38
|
+
# characters consisting of almost any printable ASCII character from the
|
39
|
+
# space (\\u0020) through the end of the ASCII character range
|
40
|
+
# (\\u00FF). You can also include the tab (\\u0009), line feed
|
41
|
+
# (\\u000A), and carriage return (\\u000D) characters. Although any of
|
42
|
+
# these characters are valid in a password, note that many tools, such
|
43
|
+
# as the AWS Management Console, might restrict the ability to enter
|
44
|
+
# certain characters because they have special meaning within that tool.
|
45
|
+
#
|
46
|
+
#
|
47
|
+
#
|
48
|
+
# [1]: http://wikipedia.org/wiki/regex
|
49
|
+
# @return [EmptyStructure]
|
50
|
+
def change_password(options = {})
|
51
|
+
resp = @client.change_password(options)
|
52
|
+
resp.data
|
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
|
-
|
55
|
+
# @example Request syntax with placeholder values
|
56
|
+
#
|
57
|
+
# iam.create_account_alias({
|
58
|
+
# account_alias: "accountAliasType", # required
|
59
|
+
# })
|
60
|
+
# @param [Hash] options ({})
|
61
|
+
# @option options [required, String] :account_alias
|
62
|
+
# The account alias to create.
|
63
|
+
#
|
64
|
+
# This parameter allows (per its [regex pattern][1]) a string of
|
65
|
+
# characters consisting of lowercase letters, digits, and dashes. You
|
66
|
+
# cannot start or finish with a dash, nor can you have two dashes in a
|
67
|
+
# row.
|
68
|
+
#
|
69
|
+
#
|
70
|
+
#
|
71
|
+
# [1]: http://wikipedia.org/wiki/regex
|
72
|
+
# @return [EmptyStructure]
|
73
|
+
def create_account_alias(options = {})
|
74
|
+
resp = @client.create_account_alias(options)
|
75
|
+
resp.data
|
76
|
+
end
|
77
77
|
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
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
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
78
|
+
# @example Request syntax with placeholder values
|
79
|
+
#
|
80
|
+
# accountpasswordpolicy = iam.create_account_password_policy({
|
81
|
+
# minimum_password_length: 1,
|
82
|
+
# require_symbols: false,
|
83
|
+
# require_numbers: false,
|
84
|
+
# require_uppercase_characters: false,
|
85
|
+
# require_lowercase_characters: false,
|
86
|
+
# allow_users_to_change_password: false,
|
87
|
+
# max_password_age: 1,
|
88
|
+
# password_reuse_prevention: 1,
|
89
|
+
# hard_expiry: false,
|
90
|
+
# })
|
91
|
+
# @param [Hash] options ({})
|
92
|
+
# @option options [Integer] :minimum_password_length
|
93
|
+
# The minimum number of characters allowed in an IAM user password.
|
94
|
+
#
|
95
|
+
# Default value: 6
|
96
|
+
# @option options [Boolean] :require_symbols
|
97
|
+
# Specifies whether IAM user passwords must contain at least one of the
|
98
|
+
# following non-alphanumeric characters:
|
99
|
+
#
|
100
|
+
# ! @ # $ % ^ &amp; * ( ) \_ + - = \[ \] \\\{ \\} \| '
|
101
|
+
#
|
102
|
+
# Default value: false
|
103
|
+
# @option options [Boolean] :require_numbers
|
104
|
+
# Specifies whether IAM user passwords must contain at least one numeric
|
105
|
+
# character (0 to 9).
|
106
|
+
#
|
107
|
+
# Default value: false
|
108
|
+
# @option options [Boolean] :require_uppercase_characters
|
109
|
+
# Specifies whether IAM user passwords must contain at least one
|
110
|
+
# uppercase character from the ISO basic Latin alphabet (A to Z).
|
111
|
+
#
|
112
|
+
# Default value: false
|
113
|
+
# @option options [Boolean] :require_lowercase_characters
|
114
|
+
# Specifies whether IAM user passwords must contain at least one
|
115
|
+
# lowercase character from the ISO basic Latin alphabet (a to z).
|
116
|
+
#
|
117
|
+
# Default value: false
|
118
|
+
# @option options [Boolean] :allow_users_to_change_password
|
119
|
+
# Allows all IAM users in your account to use the AWS Management Console
|
120
|
+
# to change their own passwords. For more information, see [Letting IAM
|
121
|
+
# Users Change Their Own Passwords][1] in the *IAM User Guide*.
|
122
|
+
#
|
123
|
+
# Default value: false
|
124
|
+
#
|
125
|
+
#
|
126
|
+
#
|
127
|
+
# [1]: http://docs.aws.amazon.com/IAM/latest/UserGuide/HowToPwdIAMUser.html
|
128
|
+
# @option options [Integer] :max_password_age
|
129
|
+
# The number of days that an IAM user password is valid. The default
|
130
|
+
# value of 0 means IAM user passwords never expire.
|
131
|
+
#
|
132
|
+
# Default value: 0
|
133
|
+
# @option options [Integer] :password_reuse_prevention
|
134
|
+
# Specifies the number of previous passwords that IAM users are
|
135
|
+
# prevented from reusing. The default value of 0 means IAM users are not
|
136
|
+
# prevented from reusing previous passwords.
|
137
|
+
#
|
138
|
+
# Default value: 0
|
139
|
+
# @option options [Boolean] :hard_expiry
|
140
|
+
# Prevents IAM users from setting a new password after their password
|
141
|
+
# has expired.
|
142
|
+
#
|
143
|
+
# Default value: false
|
144
|
+
# @return [AccountPasswordPolicy]
|
145
|
+
def create_account_password_policy(options = {})
|
146
|
+
resp = @client.update_account_password_policy(options)
|
147
|
+
AccountPasswordPolicy.new(client: @client)
|
148
|
+
end
|
149
149
|
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
150
|
+
# @example Request syntax with placeholder values
|
151
|
+
#
|
152
|
+
# group = iam.create_group({
|
153
|
+
# path: "pathType",
|
154
|
+
# group_name: "groupNameType", # required
|
155
|
+
# })
|
156
|
+
# @param [Hash] options ({})
|
157
|
+
# @option options [String] :path
|
158
|
+
# The path to the group. For more information about paths, see [IAM
|
159
|
+
# Identifiers][1] in the *IAM User Guide*.
|
160
|
+
#
|
161
|
+
# This parameter is optional. If it is not included, it defaults to a
|
162
|
+
# slash (/).
|
163
|
+
#
|
164
|
+
# This paramater allows (per its [regex pattern][2]) a string of
|
165
|
+
# characters consisting of either a forward slash (/) by itself or a
|
166
|
+
# string that must begin and end with forward slashes, containing any
|
167
|
+
# ASCII character from the ! (\\u0021) thru the DEL character (\\u007F),
|
168
|
+
# including most punctuation characters, digits, and upper and
|
169
|
+
# lowercased letters.
|
170
|
+
#
|
171
|
+
#
|
172
|
+
#
|
173
|
+
# [1]: http://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html
|
174
|
+
# [2]: http://wikipedia.org/wiki/regex
|
175
|
+
# @option options [required, String] :group_name
|
176
|
+
# The name of the group to create. Do not include the path in this
|
177
|
+
# value.
|
178
|
+
#
|
179
|
+
# This parameter allows (per its [regex pattern][1]) a string of
|
180
|
+
# characters consisting of upper and lowercase alphanumeric characters
|
181
|
+
# with no spaces. You can also include any of the following characters:
|
182
|
+
# =,.@-. The group name must be unique within the account. Group names
|
183
|
+
# are not distinguished by case. For example, you cannot create groups
|
184
|
+
# named both "ADMINS" and "admins".
|
185
|
+
#
|
186
|
+
#
|
187
|
+
#
|
188
|
+
# [1]: http://wikipedia.org/wiki/regex
|
189
|
+
# @return [Group]
|
190
|
+
def create_group(options = {})
|
191
|
+
resp = @client.create_group(options)
|
192
|
+
Group.new(
|
193
|
+
name: options[:group_name],
|
194
|
+
data: resp.data.group,
|
195
|
+
client: @client
|
196
|
+
)
|
197
|
+
end
|
198
198
|
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
199
|
+
# @example Request syntax with placeholder values
|
200
|
+
#
|
201
|
+
# instanceprofile = iam.create_instance_profile({
|
202
|
+
# instance_profile_name: "instanceProfileNameType", # required
|
203
|
+
# path: "pathType",
|
204
|
+
# })
|
205
|
+
# @param [Hash] options ({})
|
206
|
+
# @option options [required, String] :instance_profile_name
|
207
|
+
# The name of the instance profile to create.
|
208
|
+
#
|
209
|
+
# This parameter allows (per its [regex pattern][1]) a string of
|
210
|
+
# characters consisting of upper and lowercase alphanumeric characters
|
211
|
+
# with no spaces. You can also include any of the following characters:
|
212
|
+
# =,.@-
|
213
|
+
#
|
214
|
+
#
|
215
|
+
#
|
216
|
+
# [1]: http://wikipedia.org/wiki/regex
|
217
|
+
# @option options [String] :path
|
218
|
+
# The path to the instance profile. For more information about paths,
|
219
|
+
# see [IAM Identifiers][1] in the *IAM User Guide*.
|
220
|
+
#
|
221
|
+
# This parameter is optional. If it is not included, it defaults to a
|
222
|
+
# slash (/).
|
223
|
+
#
|
224
|
+
# This paramater allows (per its [regex pattern][2]) a string of
|
225
|
+
# characters consisting of either a forward slash (/) by itself or a
|
226
|
+
# string that must begin and end with forward slashes, containing any
|
227
|
+
# ASCII character from the ! (\\u0021) thru the DEL character (\\u007F),
|
228
|
+
# including most punctuation characters, digits, and upper and
|
229
|
+
# lowercased letters.
|
230
|
+
#
|
231
|
+
#
|
232
|
+
#
|
233
|
+
# [1]: http://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html
|
234
|
+
# [2]: http://wikipedia.org/wiki/regex
|
235
|
+
# @return [InstanceProfile]
|
236
|
+
def create_instance_profile(options = {})
|
237
|
+
resp = @client.create_instance_profile(options)
|
238
|
+
InstanceProfile.new(
|
239
|
+
name: options[:instance_profile_name],
|
240
|
+
data: resp.data.instance_profile,
|
241
|
+
client: @client
|
242
|
+
)
|
243
|
+
end
|
243
244
|
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
245
|
+
# @example Request syntax with placeholder values
|
246
|
+
#
|
247
|
+
# policy = iam.create_policy({
|
248
|
+
# policy_name: "policyNameType", # required
|
249
|
+
# path: "policyPathType",
|
250
|
+
# policy_document: "policyDocumentType", # required
|
251
|
+
# description: "policyDescriptionType",
|
252
|
+
# })
|
253
|
+
# @param [Hash] options ({})
|
254
|
+
# @option options [required, String] :policy_name
|
255
|
+
# The friendly name of the policy.
|
256
|
+
#
|
257
|
+
# This parameter allows (per its [regex pattern][1]) a string of
|
258
|
+
# characters consisting of upper and lowercase alphanumeric characters
|
259
|
+
# with no spaces. You can also include any of the following characters:
|
260
|
+
# =,.@-
|
261
|
+
#
|
262
|
+
#
|
263
|
+
#
|
264
|
+
# [1]: http://wikipedia.org/wiki/regex
|
265
|
+
# @option options [String] :path
|
266
|
+
# The path for the policy.
|
267
|
+
#
|
268
|
+
# For more information about paths, see [IAM Identifiers][1] in the *IAM
|
269
|
+
# User Guide*.
|
270
|
+
#
|
271
|
+
# This parameter is optional. If it is not included, it defaults to a
|
272
|
+
# slash (/).
|
273
|
+
#
|
274
|
+
# This paramater allows (per its [regex pattern][2]) a string of
|
275
|
+
# characters consisting of either a forward slash (/) by itself or a
|
276
|
+
# string that must begin and end with forward slashes, containing any
|
277
|
+
# ASCII character from the ! (\\u0021) thru the DEL character (\\u007F),
|
278
|
+
# including most punctuation characters, digits, and upper and
|
279
|
+
# lowercased letters.
|
280
|
+
#
|
281
|
+
#
|
282
|
+
#
|
283
|
+
# [1]: http://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html
|
284
|
+
# [2]: http://wikipedia.org/wiki/regex
|
285
|
+
# @option options [required, String] :policy_document
|
286
|
+
# The JSON policy document that you want to use as the content for the
|
287
|
+
# new policy.
|
288
|
+
#
|
289
|
+
# The [regex pattern][1] used to validate this parameter is a string of
|
290
|
+
# characters consisting of any printable ASCII character ranging from
|
291
|
+
# the space character (\\u0020) through end of the ASCII character range
|
292
|
+
# as well as the printable characters in the Basic Latin and Latin-1
|
293
|
+
# Supplement character set (through \\u00FF). It also includes the
|
294
|
+
# special characters tab (\\u0009), line feed (\\u000A), and carriage
|
295
|
+
# return (\\u000D).
|
296
|
+
#
|
297
|
+
#
|
298
|
+
#
|
299
|
+
# [1]: http://wikipedia.org/wiki/regex
|
300
|
+
# @option options [String] :description
|
301
|
+
# A friendly description of the policy.
|
302
|
+
#
|
303
|
+
# Typically used to store information about the permissions defined in
|
304
|
+
# the policy. For example, "Grants access to production DynamoDB
|
305
|
+
# tables."
|
306
|
+
#
|
307
|
+
# The policy description is immutable. After a value is assigned, it
|
308
|
+
# cannot be changed.
|
309
|
+
# @return [Policy]
|
310
|
+
def create_policy(options = {})
|
311
|
+
resp = @client.create_policy(options)
|
312
|
+
Policy.new(
|
313
|
+
arn: resp.data.policy.arn,
|
314
|
+
client: @client
|
315
|
+
)
|
316
|
+
end
|
313
317
|
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
318
|
+
# @example Request syntax with placeholder values
|
319
|
+
#
|
320
|
+
# role = iam.create_role({
|
321
|
+
# path: "pathType",
|
322
|
+
# role_name: "roleNameType", # required
|
323
|
+
# assume_role_policy_document: "policyDocumentType", # required
|
324
|
+
# })
|
325
|
+
# @param [Hash] options ({})
|
326
|
+
# @option options [String] :path
|
327
|
+
# The path to the role. For more information about paths, see [IAM
|
328
|
+
# Identifiers][1] in the *IAM User Guide*.
|
329
|
+
#
|
330
|
+
# This parameter is optional. If it is not included, it defaults to a
|
331
|
+
# slash (/).
|
332
|
+
#
|
333
|
+
# This paramater allows (per its [regex pattern][2]) a string of
|
334
|
+
# characters consisting of either a forward slash (/) by itself or a
|
335
|
+
# string that must begin and end with forward slashes, containing any
|
336
|
+
# ASCII character from the ! (\\u0021) thru the DEL character (\\u007F),
|
337
|
+
# including most punctuation characters, digits, and upper and
|
338
|
+
# lowercased letters.
|
339
|
+
#
|
340
|
+
#
|
341
|
+
#
|
342
|
+
# [1]: http://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html
|
343
|
+
# [2]: http://wikipedia.org/wiki/regex
|
344
|
+
# @option options [required, String] :role_name
|
345
|
+
# The name of the role to create.
|
346
|
+
#
|
347
|
+
# This parameter allows (per its [regex pattern][1]) a string of
|
348
|
+
# characters consisting of upper and lowercase alphanumeric characters
|
349
|
+
# with no spaces. You can also include any of the following characters:
|
350
|
+
# =,.@-. Role names are not distinguished by case. For example, you
|
351
|
+
# cannot create roles named both "PRODROLE" and "prodrole".
|
352
|
+
#
|
353
|
+
#
|
354
|
+
#
|
355
|
+
# [1]: http://wikipedia.org/wiki/regex
|
356
|
+
# @option options [required, String] :assume_role_policy_document
|
357
|
+
# The trust relationship policy document that grants an entity
|
358
|
+
# permission to assume the role.
|
359
|
+
#
|
360
|
+
# The [regex pattern][1] used to validate this parameter is a string of
|
361
|
+
# characters consisting of any printable ASCII character ranging from
|
362
|
+
# the space character (\\u0020) through end of the ASCII character range
|
363
|
+
# as well as the printable characters in the Basic Latin and Latin-1
|
364
|
+
# Supplement character set (through \\u00FF). It also includes the
|
365
|
+
# special characters tab (\\u0009), line feed (\\u000A), and carriage
|
366
|
+
# return (\\u000D).
|
367
|
+
#
|
368
|
+
#
|
369
|
+
#
|
370
|
+
# [1]: http://wikipedia.org/wiki/regex
|
371
|
+
# @return [Role]
|
372
|
+
def create_role(options = {})
|
373
|
+
resp = @client.create_role(options)
|
374
|
+
Role.new(
|
375
|
+
name: options[:role_name],
|
376
|
+
data: resp.data.role,
|
377
|
+
client: @client
|
378
|
+
)
|
379
|
+
end
|
374
380
|
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
381
|
+
# @example Request syntax with placeholder values
|
382
|
+
#
|
383
|
+
# samlprovider = iam.create_saml_provider({
|
384
|
+
# saml_metadata_document: "SAMLMetadataDocumentType", # required
|
385
|
+
# name: "SAMLProviderNameType", # required
|
386
|
+
# })
|
387
|
+
# @param [Hash] options ({})
|
388
|
+
# @option options [required, String] :saml_metadata_document
|
389
|
+
# An XML document generated by an identity provider (IdP) that supports
|
390
|
+
# SAML 2.0. The document includes the issuer's name, expiration
|
391
|
+
# information, and keys that can be used to validate the SAML
|
392
|
+
# authentication response (assertions) that are received from the IdP.
|
393
|
+
# You must generate the metadata document using the identity management
|
394
|
+
# software that is used as your organization's IdP.
|
395
|
+
#
|
396
|
+
# For more information, see [About SAML 2.0-based Federation][1] in the
|
397
|
+
# *IAM User Guide*
|
398
|
+
#
|
399
|
+
#
|
400
|
+
#
|
401
|
+
# [1]: http://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_saml.html
|
402
|
+
# @option options [required, String] :name
|
403
|
+
# The name of the provider to create.
|
404
|
+
#
|
405
|
+
# This parameter allows (per its [regex pattern][1]) a string of
|
406
|
+
# characters consisting of upper and lowercase alphanumeric characters
|
407
|
+
# with no spaces. You can also include any of the following characters:
|
408
|
+
# =,.@-
|
409
|
+
#
|
410
|
+
#
|
411
|
+
#
|
412
|
+
# [1]: http://wikipedia.org/wiki/regex
|
413
|
+
# @return [SamlProvider]
|
414
|
+
def create_saml_provider(options = {})
|
415
|
+
resp = @client.create_saml_provider(options)
|
416
|
+
SamlProvider.new(
|
417
|
+
arn: resp.data.saml_provider_arn,
|
418
|
+
client: @client
|
419
|
+
)
|
420
|
+
end
|
414
421
|
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
446
|
-
|
447
|
-
|
448
|
-
|
449
|
-
|
450
|
-
|
451
|
-
|
452
|
-
|
453
|
-
|
454
|
-
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
|
470
|
-
|
471
|
-
|
472
|
-
|
473
|
-
|
474
|
-
|
475
|
-
|
476
|
-
|
477
|
-
|
478
|
-
|
479
|
-
|
480
|
-
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
-
|
485
|
-
|
486
|
-
|
487
|
-
|
488
|
-
|
489
|
-
|
490
|
-
|
491
|
-
|
492
|
-
|
493
|
-
|
494
|
-
|
495
|
-
|
496
|
-
|
497
|
-
|
498
|
-
|
499
|
-
|
500
|
-
|
501
|
-
|
502
|
-
|
503
|
-
|
422
|
+
# @example Request syntax with placeholder values
|
423
|
+
#
|
424
|
+
# servercertificate = iam.create_server_certificate({
|
425
|
+
# path: "pathType",
|
426
|
+
# server_certificate_name: "serverCertificateNameType", # required
|
427
|
+
# certificate_body: "certificateBodyType", # required
|
428
|
+
# private_key: "privateKeyType", # required
|
429
|
+
# certificate_chain: "certificateChainType",
|
430
|
+
# })
|
431
|
+
# @param [Hash] options ({})
|
432
|
+
# @option options [String] :path
|
433
|
+
# The path for the server certificate. For more information about paths,
|
434
|
+
# see [IAM Identifiers][1] in the *IAM User Guide*.
|
435
|
+
#
|
436
|
+
# This parameter is optional. If it is not included, it defaults to a
|
437
|
+
# slash (/). This paramater allows (per its [regex pattern][2]) a string
|
438
|
+
# of characters consisting of either a forward slash (/) by itself or a
|
439
|
+
# string that must begin and end with forward slashes, containing any
|
440
|
+
# ASCII character from the ! (\\u0021) thru the DEL character (\\u007F),
|
441
|
+
# including most punctuation characters, digits, and upper and
|
442
|
+
# lowercased letters.
|
443
|
+
#
|
444
|
+
# <note markdown="1"> If you are uploading a server certificate specifically for use with
|
445
|
+
# Amazon CloudFront distributions, you must specify a path using the
|
446
|
+
# `--path` option. The path must begin with `/cloudfront` and must
|
447
|
+
# include a trailing slash (for example, `/cloudfront/test/`).
|
448
|
+
#
|
449
|
+
# </note>
|
450
|
+
#
|
451
|
+
#
|
452
|
+
#
|
453
|
+
# [1]: http://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html
|
454
|
+
# [2]: http://wikipedia.org/wiki/regex
|
455
|
+
# @option options [required, String] :server_certificate_name
|
456
|
+
# The name for the server certificate. Do not include the path in this
|
457
|
+
# value. The name of the certificate cannot contain any spaces.
|
458
|
+
#
|
459
|
+
# This parameter allows (per its [regex pattern][1]) a string of
|
460
|
+
# characters consisting of upper and lowercase alphanumeric characters
|
461
|
+
# with no spaces. You can also include any of the following characters:
|
462
|
+
# =,.@-
|
463
|
+
#
|
464
|
+
#
|
465
|
+
#
|
466
|
+
# [1]: http://wikipedia.org/wiki/regex
|
467
|
+
# @option options [required, String] :certificate_body
|
468
|
+
# The contents of the public key certificate in PEM-encoded format.
|
469
|
+
#
|
470
|
+
# The [regex pattern][1] used to validate this parameter is a string of
|
471
|
+
# characters consisting of any printable ASCII character ranging from
|
472
|
+
# the space character (\\u0020) through end of the ASCII character range
|
473
|
+
# as well as the printable characters in the Basic Latin and Latin-1
|
474
|
+
# Supplement character set (through \\u00FF). It also includes the
|
475
|
+
# special characters tab (\\u0009), line feed (\\u000A), and carriage
|
476
|
+
# return (\\u000D).
|
477
|
+
#
|
478
|
+
#
|
479
|
+
#
|
480
|
+
# [1]: http://wikipedia.org/wiki/regex
|
481
|
+
# @option options [required, String] :private_key
|
482
|
+
# The contents of the private key in PEM-encoded format.
|
483
|
+
#
|
484
|
+
# The [regex pattern][1] used to validate this parameter is a string of
|
485
|
+
# characters consisting of any printable ASCII character ranging from
|
486
|
+
# the space character (\\u0020) through end of the ASCII character range
|
487
|
+
# as well as the printable characters in the Basic Latin and Latin-1
|
488
|
+
# Supplement character set (through \\u00FF). It also includes the
|
489
|
+
# special characters tab (\\u0009), line feed (\\u000A), and carriage
|
490
|
+
# return (\\u000D).
|
491
|
+
#
|
492
|
+
#
|
493
|
+
#
|
494
|
+
# [1]: http://wikipedia.org/wiki/regex
|
495
|
+
# @option options [String] :certificate_chain
|
496
|
+
# The contents of the certificate chain. This is typically a
|
497
|
+
# concatenation of the PEM-encoded public key certificates of the chain.
|
498
|
+
#
|
499
|
+
# The [regex pattern][1] used to validate this parameter is a string of
|
500
|
+
# characters consisting of any printable ASCII character ranging from
|
501
|
+
# the space character (\\u0020) through end of the ASCII character range
|
502
|
+
# as well as the printable characters in the Basic Latin and Latin-1
|
503
|
+
# Supplement character set (through \\u00FF). It also includes the
|
504
|
+
# special characters tab (\\u0009), line feed (\\u000A), and carriage
|
505
|
+
# return (\\u000D).
|
506
|
+
#
|
507
|
+
#
|
508
|
+
#
|
509
|
+
# [1]: http://wikipedia.org/wiki/regex
|
510
|
+
# @return [ServerCertificate]
|
511
|
+
def create_server_certificate(options = {})
|
512
|
+
resp = @client.upload_server_certificate(options)
|
513
|
+
ServerCertificate.new(
|
514
|
+
name: options[:server_certificate_name],
|
515
|
+
client: @client
|
516
|
+
)
|
517
|
+
end
|
504
518
|
|
505
|
-
|
506
|
-
|
507
|
-
|
508
|
-
|
509
|
-
|
510
|
-
|
511
|
-
|
512
|
-
|
513
|
-
|
514
|
-
|
515
|
-
|
516
|
-
|
517
|
-
|
518
|
-
|
519
|
-
|
520
|
-
|
521
|
-
|
522
|
-
|
523
|
-
|
524
|
-
|
525
|
-
|
526
|
-
|
527
|
-
|
528
|
-
|
529
|
-
|
530
|
-
|
531
|
-
|
532
|
-
|
533
|
-
|
534
|
-
|
535
|
-
|
536
|
-
|
537
|
-
|
538
|
-
|
539
|
-
|
540
|
-
|
541
|
-
|
542
|
-
|
519
|
+
# @example Request syntax with placeholder values
|
520
|
+
#
|
521
|
+
# signingcertificate = iam.create_signing_certificate({
|
522
|
+
# user_name: "existingUserNameType",
|
523
|
+
# certificate_body: "certificateBodyType", # required
|
524
|
+
# })
|
525
|
+
# @param [Hash] options ({})
|
526
|
+
# @option options [String] :user_name
|
527
|
+
# The name of the user the signing certificate is for.
|
528
|
+
#
|
529
|
+
# This parameter allows (per its [regex pattern][1]) a string of
|
530
|
+
# characters consisting of upper and lowercase alphanumeric characters
|
531
|
+
# with no spaces. You can also include any of the following characters:
|
532
|
+
# =,.@-
|
533
|
+
#
|
534
|
+
#
|
535
|
+
#
|
536
|
+
# [1]: http://wikipedia.org/wiki/regex
|
537
|
+
# @option options [required, String] :certificate_body
|
538
|
+
# The contents of the signing certificate.
|
539
|
+
#
|
540
|
+
# The [regex pattern][1] used to validate this parameter is a string of
|
541
|
+
# characters consisting of any printable ASCII character ranging from
|
542
|
+
# the space character (\\u0020) through end of the ASCII character range
|
543
|
+
# as well as the printable characters in the Basic Latin and Latin-1
|
544
|
+
# Supplement character set (through \\u00FF). It also includes the
|
545
|
+
# special characters tab (\\u0009), line feed (\\u000A), and carriage
|
546
|
+
# return (\\u000D).
|
547
|
+
#
|
548
|
+
#
|
549
|
+
#
|
550
|
+
# [1]: http://wikipedia.org/wiki/regex
|
551
|
+
# @return [SigningCertificate]
|
552
|
+
def create_signing_certificate(options = {})
|
553
|
+
resp = @client.upload_signing_certificate(options)
|
554
|
+
SigningCertificate.new(
|
555
|
+
id: resp.data.certificate.certificate_id,
|
556
|
+
data: resp.data.certificate,
|
557
|
+
client: @client
|
558
|
+
)
|
559
|
+
end
|
543
560
|
|
544
|
-
|
545
|
-
|
546
|
-
|
547
|
-
|
548
|
-
|
549
|
-
|
550
|
-
|
551
|
-
|
552
|
-
|
553
|
-
|
554
|
-
|
555
|
-
|
556
|
-
|
557
|
-
|
558
|
-
|
559
|
-
|
560
|
-
|
561
|
-
|
562
|
-
|
563
|
-
|
564
|
-
|
565
|
-
|
566
|
-
|
567
|
-
|
568
|
-
|
569
|
-
|
570
|
-
|
571
|
-
|
572
|
-
|
573
|
-
|
574
|
-
|
575
|
-
|
576
|
-
|
577
|
-
|
578
|
-
|
579
|
-
|
580
|
-
|
581
|
-
|
582
|
-
|
583
|
-
|
584
|
-
|
585
|
-
|
586
|
-
|
587
|
-
|
588
|
-
|
589
|
-
|
561
|
+
# @example Request syntax with placeholder values
|
562
|
+
#
|
563
|
+
# user = iam.create_user({
|
564
|
+
# path: "pathType",
|
565
|
+
# user_name: "userNameType", # required
|
566
|
+
# })
|
567
|
+
# @param [Hash] options ({})
|
568
|
+
# @option options [String] :path
|
569
|
+
# The path for the user name. For more information about paths, see [IAM
|
570
|
+
# Identifiers][1] in the *IAM User Guide*.
|
571
|
+
#
|
572
|
+
# This parameter is optional. If it is not included, it defaults to a
|
573
|
+
# slash (/).
|
574
|
+
#
|
575
|
+
# This paramater allows (per its [regex pattern][2]) a string of
|
576
|
+
# characters consisting of either a forward slash (/) by itself or a
|
577
|
+
# string that must begin and end with forward slashes, containing any
|
578
|
+
# ASCII character from the ! (\\u0021) thru the DEL character (\\u007F),
|
579
|
+
# including most punctuation characters, digits, and upper and
|
580
|
+
# lowercased letters.
|
581
|
+
#
|
582
|
+
#
|
583
|
+
#
|
584
|
+
# [1]: http://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html
|
585
|
+
# [2]: http://wikipedia.org/wiki/regex
|
586
|
+
# @option options [required, String] :user_name
|
587
|
+
# The name of the user to create.
|
588
|
+
#
|
589
|
+
# This parameter allows (per its [regex pattern][1]) a string of
|
590
|
+
# characters consisting of upper and lowercase alphanumeric characters
|
591
|
+
# with no spaces. You can also include any of the following characters:
|
592
|
+
# =,.@-. User names are not distinguished by case. For example, you
|
593
|
+
# cannot create users named both "TESTUSER" and "testuser".
|
594
|
+
#
|
595
|
+
#
|
596
|
+
#
|
597
|
+
# [1]: http://wikipedia.org/wiki/regex
|
598
|
+
# @return [User]
|
599
|
+
def create_user(options = {})
|
600
|
+
resp = @client.create_user(options)
|
601
|
+
User.new(
|
602
|
+
name: options[:user_name],
|
603
|
+
data: resp.data.user,
|
604
|
+
client: @client
|
605
|
+
)
|
606
|
+
end
|
590
607
|
|
591
|
-
|
592
|
-
|
593
|
-
|
594
|
-
|
595
|
-
|
596
|
-
|
597
|
-
|
598
|
-
|
599
|
-
|
600
|
-
|
601
|
-
|
602
|
-
|
603
|
-
|
604
|
-
|
605
|
-
|
606
|
-
|
607
|
-
|
608
|
-
|
609
|
-
|
610
|
-
|
611
|
-
|
612
|
-
|
613
|
-
|
614
|
-
|
615
|
-
|
616
|
-
|
617
|
-
|
618
|
-
|
619
|
-
|
620
|
-
|
621
|
-
|
622
|
-
|
623
|
-
|
624
|
-
|
625
|
-
|
626
|
-
|
627
|
-
|
628
|
-
|
629
|
-
|
630
|
-
|
631
|
-
|
632
|
-
|
633
|
-
|
634
|
-
|
635
|
-
|
608
|
+
# @example Request syntax with placeholder values
|
609
|
+
#
|
610
|
+
# virtualmfadevice = iam.create_virtual_mfa_device({
|
611
|
+
# path: "pathType",
|
612
|
+
# virtual_mfa_device_name: "virtualMFADeviceName", # required
|
613
|
+
# })
|
614
|
+
# @param [Hash] options ({})
|
615
|
+
# @option options [String] :path
|
616
|
+
# The path for the virtual MFA device. For more information about paths,
|
617
|
+
# see [IAM Identifiers][1] in the *IAM User Guide*.
|
618
|
+
#
|
619
|
+
# This parameter is optional. If it is not included, it defaults to a
|
620
|
+
# slash (/).
|
621
|
+
#
|
622
|
+
# This paramater allows (per its [regex pattern][2]) a string of
|
623
|
+
# characters consisting of either a forward slash (/) by itself or a
|
624
|
+
# string that must begin and end with forward slashes, containing any
|
625
|
+
# ASCII character from the ! (\\u0021) thru the DEL character (\\u007F),
|
626
|
+
# including most punctuation characters, digits, and upper and
|
627
|
+
# lowercased letters.
|
628
|
+
#
|
629
|
+
#
|
630
|
+
#
|
631
|
+
# [1]: http://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html
|
632
|
+
# [2]: http://wikipedia.org/wiki/regex
|
633
|
+
# @option options [required, String] :virtual_mfa_device_name
|
634
|
+
# The name of the virtual MFA device. Use with path to uniquely identify
|
635
|
+
# a virtual MFA device.
|
636
|
+
#
|
637
|
+
# This parameter allows (per its [regex pattern][1]) a string of
|
638
|
+
# characters consisting of upper and lowercase alphanumeric characters
|
639
|
+
# with no spaces. You can also include any of the following characters:
|
640
|
+
# =,.@-
|
641
|
+
#
|
642
|
+
#
|
643
|
+
#
|
644
|
+
# [1]: http://wikipedia.org/wiki/regex
|
645
|
+
# @return [VirtualMfaDevice]
|
646
|
+
def create_virtual_mfa_device(options = {})
|
647
|
+
resp = @client.create_virtual_mfa_device(options)
|
648
|
+
VirtualMfaDevice.new(
|
649
|
+
serial_number: resp.data.virtual_mfa_device.serial_number,
|
650
|
+
data: resp.data.virtual_mfa_device,
|
651
|
+
client: @client
|
652
|
+
)
|
653
|
+
end
|
636
654
|
|
637
|
-
|
655
|
+
# @!group Associations
|
638
656
|
|
639
|
-
|
640
|
-
|
641
|
-
|
642
|
-
|
657
|
+
# @return [AccountPasswordPolicy]
|
658
|
+
def account_password_policy
|
659
|
+
AccountPasswordPolicy.new(client: @client)
|
660
|
+
end
|
643
661
|
|
644
|
-
|
645
|
-
|
646
|
-
|
647
|
-
|
662
|
+
# @return [AccountSummary]
|
663
|
+
def account_summary
|
664
|
+
AccountSummary.new(client: @client)
|
665
|
+
end
|
648
666
|
|
649
|
-
|
650
|
-
|
651
|
-
|
652
|
-
|
667
|
+
# @return [CurrentUser]
|
668
|
+
def current_user
|
669
|
+
CurrentUser.new(client: @client)
|
670
|
+
end
|
653
671
|
|
654
|
-
|
655
|
-
|
656
|
-
|
657
|
-
|
658
|
-
|
659
|
-
|
660
|
-
|
661
|
-
|
672
|
+
# @param [String] name
|
673
|
+
# @return [Group]
|
674
|
+
def group(name)
|
675
|
+
Group.new(
|
676
|
+
name: name,
|
677
|
+
client: @client
|
678
|
+
)
|
679
|
+
end
|
662
680
|
|
663
|
-
|
664
|
-
|
665
|
-
|
666
|
-
|
667
|
-
|
668
|
-
|
669
|
-
|
670
|
-
|
671
|
-
|
672
|
-
|
673
|
-
|
674
|
-
|
675
|
-
|
676
|
-
|
677
|
-
|
678
|
-
|
679
|
-
|
680
|
-
|
681
|
-
|
682
|
-
|
683
|
-
|
684
|
-
|
685
|
-
|
686
|
-
|
687
|
-
|
688
|
-
|
689
|
-
|
690
|
-
|
691
|
-
|
692
|
-
|
693
|
-
|
694
|
-
|
695
|
-
|
696
|
-
|
697
|
-
end
|
698
|
-
y.yield(batch)
|
681
|
+
# @example Request syntax with placeholder values
|
682
|
+
#
|
683
|
+
# groups = iam.groups({
|
684
|
+
# path_prefix: "pathPrefixType",
|
685
|
+
# })
|
686
|
+
# @param [Hash] options ({})
|
687
|
+
# @option options [String] :path_prefix
|
688
|
+
# The path prefix for filtering the results. For example, the prefix
|
689
|
+
# `/division_abc/subdivision_xyz/` gets all groups whose path starts
|
690
|
+
# with `/division_abc/subdivision_xyz/`.
|
691
|
+
#
|
692
|
+
# This parameter is optional. If it is not included, it defaults to a
|
693
|
+
# slash (/), listing all groups. This paramater allows (per its [regex
|
694
|
+
# pattern][1]) a string of characters consisting of either a forward
|
695
|
+
# slash (/) by itself or a string that must begin and end with forward
|
696
|
+
# slashes, containing any ASCII character from the ! (\\u0021) thru the
|
697
|
+
# DEL character (\\u007F), including most punctuation characters,
|
698
|
+
# digits, and upper and lowercased letters.
|
699
|
+
#
|
700
|
+
#
|
701
|
+
#
|
702
|
+
# [1]: http://wikipedia.org/wiki/regex
|
703
|
+
# @return [Group::Collection]
|
704
|
+
def groups(options = {})
|
705
|
+
batches = Enumerator.new do |y|
|
706
|
+
resp = @client.list_groups(options)
|
707
|
+
resp.each_page do |page|
|
708
|
+
batch = []
|
709
|
+
page.data.groups.each do |g|
|
710
|
+
batch << Group.new(
|
711
|
+
name: g.group_name,
|
712
|
+
data: g,
|
713
|
+
client: @client
|
714
|
+
)
|
699
715
|
end
|
716
|
+
y.yield(batch)
|
700
717
|
end
|
701
|
-
Group::Collection.new(batches)
|
702
718
|
end
|
719
|
+
Group::Collection.new(batches)
|
720
|
+
end
|
703
721
|
|
704
|
-
|
705
|
-
|
706
|
-
|
707
|
-
|
708
|
-
|
709
|
-
|
710
|
-
|
711
|
-
|
722
|
+
# @param [String] name
|
723
|
+
# @return [InstanceProfile]
|
724
|
+
def instance_profile(name)
|
725
|
+
InstanceProfile.new(
|
726
|
+
name: name,
|
727
|
+
client: @client
|
728
|
+
)
|
729
|
+
end
|
712
730
|
|
713
|
-
|
714
|
-
|
715
|
-
|
716
|
-
|
717
|
-
|
718
|
-
|
719
|
-
|
720
|
-
|
721
|
-
|
722
|
-
|
723
|
-
|
724
|
-
|
725
|
-
|
726
|
-
|
727
|
-
|
728
|
-
|
729
|
-
|
730
|
-
|
731
|
-
|
732
|
-
|
733
|
-
|
734
|
-
|
735
|
-
|
736
|
-
|
737
|
-
|
738
|
-
|
739
|
-
|
740
|
-
|
741
|
-
|
742
|
-
|
743
|
-
|
744
|
-
|
745
|
-
|
746
|
-
|
747
|
-
end
|
748
|
-
y.yield(batch)
|
731
|
+
# @example Request syntax with placeholder values
|
732
|
+
#
|
733
|
+
# instance_profiles = iam.instance_profiles({
|
734
|
+
# path_prefix: "pathPrefixType",
|
735
|
+
# })
|
736
|
+
# @param [Hash] options ({})
|
737
|
+
# @option options [String] :path_prefix
|
738
|
+
# The path prefix for filtering the results. For example, the prefix
|
739
|
+
# `/application_abc/component_xyz/` gets all instance profiles whose
|
740
|
+
# path starts with `/application_abc/component_xyz/`.
|
741
|
+
#
|
742
|
+
# This parameter is optional. If it is not included, it defaults to a
|
743
|
+
# slash (/), listing all instance profiles. This paramater allows (per
|
744
|
+
# its [regex pattern][1]) a string of characters consisting of either a
|
745
|
+
# forward slash (/) by itself or a string that must begin and end with
|
746
|
+
# forward slashes, containing any ASCII character from the ! (\\u0021)
|
747
|
+
# thru the DEL character (\\u007F), including most punctuation
|
748
|
+
# characters, digits, and upper and lowercased letters.
|
749
|
+
#
|
750
|
+
#
|
751
|
+
#
|
752
|
+
# [1]: http://wikipedia.org/wiki/regex
|
753
|
+
# @return [InstanceProfile::Collection]
|
754
|
+
def instance_profiles(options = {})
|
755
|
+
batches = Enumerator.new do |y|
|
756
|
+
resp = @client.list_instance_profiles(options)
|
757
|
+
resp.each_page do |page|
|
758
|
+
batch = []
|
759
|
+
page.data.instance_profiles.each do |i|
|
760
|
+
batch << InstanceProfile.new(
|
761
|
+
name: i.instance_profile_name,
|
762
|
+
data: i,
|
763
|
+
client: @client
|
764
|
+
)
|
749
765
|
end
|
766
|
+
y.yield(batch)
|
750
767
|
end
|
751
|
-
InstanceProfile::Collection.new(batches)
|
752
768
|
end
|
769
|
+
InstanceProfile::Collection.new(batches)
|
770
|
+
end
|
753
771
|
|
754
|
-
|
755
|
-
|
756
|
-
|
757
|
-
|
758
|
-
|
759
|
-
|
760
|
-
|
761
|
-
|
762
|
-
|
763
|
-
|
764
|
-
|
765
|
-
|
766
|
-
|
767
|
-
|
768
|
-
|
769
|
-
|
770
|
-
|
771
|
-
|
772
|
-
|
773
|
-
|
774
|
-
|
775
|
-
|
776
|
-
|
777
|
-
|
778
|
-
|
779
|
-
|
780
|
-
|
781
|
-
|
782
|
-
|
783
|
-
|
784
|
-
|
785
|
-
|
786
|
-
|
787
|
-
|
788
|
-
|
789
|
-
|
790
|
-
|
791
|
-
|
792
|
-
|
793
|
-
|
794
|
-
|
795
|
-
|
796
|
-
|
797
|
-
|
798
|
-
|
799
|
-
|
800
|
-
|
801
|
-
|
802
|
-
|
803
|
-
end
|
804
|
-
y.yield(batch)
|
772
|
+
# @example Request syntax with placeholder values
|
773
|
+
#
|
774
|
+
# policies = iam.policies({
|
775
|
+
# scope: "All", # accepts All, AWS, Local
|
776
|
+
# only_attached: false,
|
777
|
+
# path_prefix: "policyPathType",
|
778
|
+
# })
|
779
|
+
# @param [Hash] options ({})
|
780
|
+
# @option options [String] :scope
|
781
|
+
# The scope to use for filtering the results.
|
782
|
+
#
|
783
|
+
# To list only AWS managed policies, set `Scope` to `AWS`. To list only
|
784
|
+
# the customer managed policies in your AWS account, set `Scope` to
|
785
|
+
# `Local`.
|
786
|
+
#
|
787
|
+
# This parameter is optional. If it is not included, or if it is set to
|
788
|
+
# `All`, all policies are returned.
|
789
|
+
# @option options [Boolean] :only_attached
|
790
|
+
# A flag to filter the results to only the attached policies.
|
791
|
+
#
|
792
|
+
# When `OnlyAttached` is `true`, the returned list contains only the
|
793
|
+
# policies that are attached to an IAM user, group, or role. When
|
794
|
+
# `OnlyAttached` is `false`, or when the parameter is not included, all
|
795
|
+
# policies are returned.
|
796
|
+
# @option options [String] :path_prefix
|
797
|
+
# The path prefix for filtering the results. This parameter is optional.
|
798
|
+
# If it is not included, it defaults to a slash (/), listing all
|
799
|
+
# policies. This paramater allows (per its [regex pattern][1]) a string
|
800
|
+
# of characters consisting of either a forward slash (/) by itself or a
|
801
|
+
# string that must begin and end with forward slashes, containing any
|
802
|
+
# ASCII character from the ! (\\u0021) thru the DEL character (\\u007F),
|
803
|
+
# including most punctuation characters, digits, and upper and
|
804
|
+
# lowercased letters.
|
805
|
+
#
|
806
|
+
#
|
807
|
+
#
|
808
|
+
# [1]: http://wikipedia.org/wiki/regex
|
809
|
+
# @return [Policy::Collection]
|
810
|
+
def policies(options = {})
|
811
|
+
batches = Enumerator.new do |y|
|
812
|
+
resp = @client.list_policies(options)
|
813
|
+
resp.each_page do |page|
|
814
|
+
batch = []
|
815
|
+
page.data.policies.each do |p|
|
816
|
+
batch << Policy.new(
|
817
|
+
arn: p.arn,
|
818
|
+
data: p,
|
819
|
+
client: @client
|
820
|
+
)
|
805
821
|
end
|
822
|
+
y.yield(batch)
|
806
823
|
end
|
807
|
-
Policy::Collection.new(batches)
|
808
|
-
end
|
809
|
-
|
810
|
-
# @param [String] arn
|
811
|
-
# @return [Policy]
|
812
|
-
def policy(arn)
|
813
|
-
Policy.new(
|
814
|
-
arn: arn,
|
815
|
-
client: @client
|
816
|
-
)
|
817
|
-
end
|
818
|
-
|
819
|
-
# @param [String] name
|
820
|
-
# @return [Role]
|
821
|
-
def role(name)
|
822
|
-
Role.new(
|
823
|
-
name: name,
|
824
|
-
client: @client
|
825
|
-
)
|
826
824
|
end
|
825
|
+
Policy::Collection.new(batches)
|
826
|
+
end
|
827
827
|
|
828
|
-
|
829
|
-
|
830
|
-
|
831
|
-
|
832
|
-
|
833
|
-
|
834
|
-
|
835
|
-
|
836
|
-
# `/application_abc/component_xyz/` gets all roles whose path starts
|
837
|
-
# with `/application_abc/component_xyz/`.
|
838
|
-
#
|
839
|
-
# This parameter is optional. If it is not included, it defaults to a
|
840
|
-
# slash (/), listing all roles. The [regex pattern][1] for this
|
841
|
-
# parameter is a string of characters consisting of either a forward
|
842
|
-
# slash (/) by itself or a string that must begin and end with forward
|
843
|
-
# slashes, containing any ASCII character from the ! (\\u0021) thru the
|
844
|
-
# DEL character (\\u007F), including most punctuation characters,
|
845
|
-
# digits, and upper and lowercased letters.
|
846
|
-
#
|
847
|
-
#
|
848
|
-
#
|
849
|
-
# [1]: http://wikipedia.org/wiki/regex
|
850
|
-
# @return [Role::Collection]
|
851
|
-
def roles(options = {})
|
852
|
-
batches = Enumerator.new do |y|
|
853
|
-
resp = @client.list_roles(options)
|
854
|
-
resp.each_page do |page|
|
855
|
-
batch = []
|
856
|
-
page.data.roles.each do |r|
|
857
|
-
batch << Role.new(
|
858
|
-
name: r.role_name,
|
859
|
-
data: r,
|
860
|
-
client: @client
|
861
|
-
)
|
862
|
-
end
|
863
|
-
y.yield(batch)
|
864
|
-
end
|
865
|
-
end
|
866
|
-
Role::Collection.new(batches)
|
867
|
-
end
|
828
|
+
# @param [String] arn
|
829
|
+
# @return [Policy]
|
830
|
+
def policy(arn)
|
831
|
+
Policy.new(
|
832
|
+
arn: arn,
|
833
|
+
client: @client
|
834
|
+
)
|
835
|
+
end
|
868
836
|
|
869
|
-
|
870
|
-
|
871
|
-
|
872
|
-
|
873
|
-
|
874
|
-
|
875
|
-
|
876
|
-
|
837
|
+
# @param [String] name
|
838
|
+
# @return [Role]
|
839
|
+
def role(name)
|
840
|
+
Role.new(
|
841
|
+
name: name,
|
842
|
+
client: @client
|
843
|
+
)
|
844
|
+
end
|
877
845
|
|
878
|
-
|
879
|
-
|
880
|
-
|
881
|
-
|
882
|
-
|
883
|
-
|
884
|
-
|
846
|
+
# @example Request syntax with placeholder values
|
847
|
+
#
|
848
|
+
# roles = iam.roles({
|
849
|
+
# path_prefix: "pathPrefixType",
|
850
|
+
# })
|
851
|
+
# @param [Hash] options ({})
|
852
|
+
# @option options [String] :path_prefix
|
853
|
+
# The path prefix for filtering the results. For example, the prefix
|
854
|
+
# `/application_abc/component_xyz/` gets all roles whose path starts
|
855
|
+
# with `/application_abc/component_xyz/`.
|
856
|
+
#
|
857
|
+
# This parameter is optional. If it is not included, it defaults to a
|
858
|
+
# slash (/), listing all roles. This paramater allows (per its [regex
|
859
|
+
# pattern][1]) a string of characters consisting of either a forward
|
860
|
+
# slash (/) by itself or a string that must begin and end with forward
|
861
|
+
# slashes, containing any ASCII character from the ! (\\u0021) thru the
|
862
|
+
# DEL character (\\u007F), including most punctuation characters,
|
863
|
+
# digits, and upper and lowercased letters.
|
864
|
+
#
|
865
|
+
#
|
866
|
+
#
|
867
|
+
# [1]: http://wikipedia.org/wiki/regex
|
868
|
+
# @return [Role::Collection]
|
869
|
+
def roles(options = {})
|
870
|
+
batches = Enumerator.new do |y|
|
871
|
+
resp = @client.list_roles(options)
|
872
|
+
resp.each_page do |page|
|
885
873
|
batch = []
|
886
|
-
|
887
|
-
|
888
|
-
|
889
|
-
|
874
|
+
page.data.roles.each do |r|
|
875
|
+
batch << Role.new(
|
876
|
+
name: r.role_name,
|
877
|
+
data: r,
|
890
878
|
client: @client
|
891
879
|
)
|
892
880
|
end
|
893
881
|
y.yield(batch)
|
894
882
|
end
|
895
|
-
SamlProvider::Collection.new(batches)
|
896
883
|
end
|
884
|
+
Role::Collection.new(batches)
|
885
|
+
end
|
886
|
+
|
887
|
+
# @param [String] arn
|
888
|
+
# @return [SamlProvider]
|
889
|
+
def saml_provider(arn)
|
890
|
+
SamlProvider.new(
|
891
|
+
arn: arn,
|
892
|
+
client: @client
|
893
|
+
)
|
894
|
+
end
|
897
895
|
|
898
|
-
|
899
|
-
|
900
|
-
|
901
|
-
|
902
|
-
|
903
|
-
|
904
|
-
|
896
|
+
# @example Request syntax with placeholder values
|
897
|
+
#
|
898
|
+
# iam.saml_providers()
|
899
|
+
# @param [Hash] options ({})
|
900
|
+
# @return [SamlProvider::Collection]
|
901
|
+
def saml_providers(options = {})
|
902
|
+
batches = Enumerator.new do |y|
|
903
|
+
batch = []
|
904
|
+
resp = @client.list_saml_providers(options)
|
905
|
+
resp.data.saml_provider_list.each do |s|
|
906
|
+
batch << SamlProvider.new(
|
907
|
+
arn: s.arn,
|
908
|
+
client: @client
|
909
|
+
)
|
910
|
+
end
|
911
|
+
y.yield(batch)
|
905
912
|
end
|
913
|
+
SamlProvider::Collection.new(batches)
|
914
|
+
end
|
906
915
|
|
907
|
-
|
908
|
-
|
909
|
-
|
910
|
-
|
911
|
-
|
912
|
-
|
913
|
-
|
914
|
-
|
915
|
-
|
916
|
-
|
917
|
-
|
918
|
-
|
919
|
-
|
920
|
-
|
921
|
-
|
922
|
-
|
923
|
-
|
924
|
-
|
925
|
-
|
926
|
-
|
927
|
-
|
928
|
-
|
929
|
-
|
930
|
-
|
931
|
-
|
932
|
-
|
933
|
-
|
934
|
-
|
935
|
-
|
936
|
-
|
937
|
-
|
938
|
-
|
939
|
-
|
940
|
-
|
941
|
-
|
916
|
+
# @param [String] name
|
917
|
+
# @return [ServerCertificate]
|
918
|
+
def server_certificate(name)
|
919
|
+
ServerCertificate.new(
|
920
|
+
name: name,
|
921
|
+
client: @client
|
922
|
+
)
|
923
|
+
end
|
924
|
+
|
925
|
+
# @example Request syntax with placeholder values
|
926
|
+
#
|
927
|
+
# server_certificates = iam.server_certificates({
|
928
|
+
# path_prefix: "pathPrefixType",
|
929
|
+
# })
|
930
|
+
# @param [Hash] options ({})
|
931
|
+
# @option options [String] :path_prefix
|
932
|
+
# The path prefix for filtering the results. For example:
|
933
|
+
# `/company/servercerts` would get all server certificates for which the
|
934
|
+
# path starts with `/company/servercerts`.
|
935
|
+
#
|
936
|
+
# This parameter is optional. If it is not included, it defaults to a
|
937
|
+
# slash (/), listing all server certificates. This paramater allows (per
|
938
|
+
# its [regex pattern][1]) a string of characters consisting of either a
|
939
|
+
# forward slash (/) by itself or a string that must begin and end with
|
940
|
+
# forward slashes, containing any ASCII character from the ! (\\u0021)
|
941
|
+
# thru the DEL character (\\u007F), including most punctuation
|
942
|
+
# characters, digits, and upper and lowercased letters.
|
943
|
+
#
|
944
|
+
#
|
945
|
+
#
|
946
|
+
# [1]: http://wikipedia.org/wiki/regex
|
947
|
+
# @return [ServerCertificate::Collection]
|
948
|
+
def server_certificates(options = {})
|
949
|
+
batches = Enumerator.new do |y|
|
950
|
+
resp = @client.list_server_certificates(options)
|
951
|
+
resp.each_page do |page|
|
952
|
+
batch = []
|
953
|
+
page.data.server_certificate_metadata_list.each do |s|
|
954
|
+
batch << ServerCertificate.new(
|
955
|
+
name: s.server_certificate_name,
|
956
|
+
client: @client
|
957
|
+
)
|
942
958
|
end
|
959
|
+
y.yield(batch)
|
943
960
|
end
|
944
|
-
ServerCertificate::Collection.new(batches)
|
945
961
|
end
|
962
|
+
ServerCertificate::Collection.new(batches)
|
963
|
+
end
|
946
964
|
|
947
|
-
|
948
|
-
|
949
|
-
|
950
|
-
|
951
|
-
|
952
|
-
|
953
|
-
|
954
|
-
|
965
|
+
# @param [String] name
|
966
|
+
# @return [User]
|
967
|
+
def user(name)
|
968
|
+
User.new(
|
969
|
+
name: name,
|
970
|
+
client: @client
|
971
|
+
)
|
972
|
+
end
|
955
973
|
|
956
|
-
|
957
|
-
|
958
|
-
|
959
|
-
|
960
|
-
|
961
|
-
|
962
|
-
|
963
|
-
|
964
|
-
|
965
|
-
|
966
|
-
|
967
|
-
|
968
|
-
|
969
|
-
|
970
|
-
|
971
|
-
|
972
|
-
|
973
|
-
|
974
|
-
|
975
|
-
|
976
|
-
|
977
|
-
|
978
|
-
|
979
|
-
|
980
|
-
|
981
|
-
|
982
|
-
|
983
|
-
|
984
|
-
|
985
|
-
|
986
|
-
|
987
|
-
|
988
|
-
|
989
|
-
|
990
|
-
end
|
991
|
-
y.yield(batch)
|
974
|
+
# @example Request syntax with placeholder values
|
975
|
+
#
|
976
|
+
# users = iam.users({
|
977
|
+
# path_prefix: "pathPrefixType",
|
978
|
+
# })
|
979
|
+
# @param [Hash] options ({})
|
980
|
+
# @option options [String] :path_prefix
|
981
|
+
# The path prefix for filtering the results. For example:
|
982
|
+
# `/division_abc/subdivision_xyz/`, which would get all user names whose
|
983
|
+
# path starts with `/division_abc/subdivision_xyz/`.
|
984
|
+
#
|
985
|
+
# This parameter is optional. If it is not included, it defaults to a
|
986
|
+
# slash (/), listing all user names. This paramater allows (per its
|
987
|
+
# [regex pattern][1]) a string of characters consisting of either a
|
988
|
+
# forward slash (/) by itself or a string that must begin and end with
|
989
|
+
# forward slashes, containing any ASCII character from the ! (\\u0021)
|
990
|
+
# thru the DEL character (\\u007F), including most punctuation
|
991
|
+
# characters, digits, and upper and lowercased letters.
|
992
|
+
#
|
993
|
+
#
|
994
|
+
#
|
995
|
+
# [1]: http://wikipedia.org/wiki/regex
|
996
|
+
# @return [User::Collection]
|
997
|
+
def users(options = {})
|
998
|
+
batches = Enumerator.new do |y|
|
999
|
+
resp = @client.list_users(options)
|
1000
|
+
resp.each_page do |page|
|
1001
|
+
batch = []
|
1002
|
+
page.data.users.each do |u|
|
1003
|
+
batch << User.new(
|
1004
|
+
name: u.user_name,
|
1005
|
+
data: u,
|
1006
|
+
client: @client
|
1007
|
+
)
|
992
1008
|
end
|
1009
|
+
y.yield(batch)
|
993
1010
|
end
|
994
|
-
User::Collection.new(batches)
|
995
1011
|
end
|
1012
|
+
User::Collection.new(batches)
|
1013
|
+
end
|
996
1014
|
|
997
|
-
|
998
|
-
|
999
|
-
|
1000
|
-
|
1001
|
-
|
1002
|
-
|
1003
|
-
|
1004
|
-
|
1015
|
+
# @param [String] serial_number
|
1016
|
+
# @return [VirtualMfaDevice]
|
1017
|
+
def virtual_mfa_device(serial_number)
|
1018
|
+
VirtualMfaDevice.new(
|
1019
|
+
serial_number: serial_number,
|
1020
|
+
client: @client
|
1021
|
+
)
|
1022
|
+
end
|
1005
1023
|
|
1006
|
-
|
1007
|
-
|
1008
|
-
|
1009
|
-
|
1010
|
-
|
1011
|
-
|
1012
|
-
|
1013
|
-
|
1014
|
-
|
1015
|
-
|
1016
|
-
|
1017
|
-
|
1018
|
-
|
1019
|
-
|
1020
|
-
|
1021
|
-
|
1022
|
-
|
1023
|
-
|
1024
|
-
|
1025
|
-
|
1026
|
-
|
1027
|
-
|
1028
|
-
end
|
1029
|
-
y.yield(batch)
|
1024
|
+
# @example Request syntax with placeholder values
|
1025
|
+
#
|
1026
|
+
# virtual_mfa_devices = iam.virtual_mfa_devices({
|
1027
|
+
# assignment_status: "Assigned", # accepts Assigned, Unassigned, Any
|
1028
|
+
# })
|
1029
|
+
# @param [Hash] options ({})
|
1030
|
+
# @option options [String] :assignment_status
|
1031
|
+
# The status (`Unassigned` or `Assigned`) of the devices to list. If you
|
1032
|
+
# do not specify an `AssignmentStatus`, the action defaults to `Any`
|
1033
|
+
# which lists both assigned and unassigned virtual MFA devices.
|
1034
|
+
# @return [VirtualMfaDevice::Collection]
|
1035
|
+
def virtual_mfa_devices(options = {})
|
1036
|
+
batches = Enumerator.new do |y|
|
1037
|
+
resp = @client.list_virtual_mfa_devices(options)
|
1038
|
+
resp.each_page do |page|
|
1039
|
+
batch = []
|
1040
|
+
page.data.virtual_mfa_devices.each do |v|
|
1041
|
+
batch << VirtualMfaDevice.new(
|
1042
|
+
serial_number: v.serial_number,
|
1043
|
+
data: v,
|
1044
|
+
client: @client
|
1045
|
+
)
|
1030
1046
|
end
|
1047
|
+
y.yield(batch)
|
1031
1048
|
end
|
1032
|
-
VirtualMfaDevice::Collection.new(batches)
|
1033
1049
|
end
|
1034
|
-
|
1050
|
+
VirtualMfaDevice::Collection.new(batches)
|
1035
1051
|
end
|
1052
|
+
|
1036
1053
|
end
|
1037
1054
|
end
|