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