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,178 +1,178 @@
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 RolePolicy
11
-
12
- extend Aws::Deprecations
13
-
14
- # @overload def initialize(role_name, name, options = {})
15
- # @param [String] role_name
16
- # @param [String] name
17
- # @option options [Client] :client
18
- # @overload def initialize(options = {})
19
- # @option options [required, String] :role_name
20
- # @option options [required, String] :name
21
- # @option options [Client] :client
22
- def initialize(*args)
23
- options = Hash === args.last ? args.pop.dup : {}
24
- @role_name = extract_role_name(args, options)
25
- @name = extract_name(args, options)
26
- @data = options.delete(:data)
27
- @client = options.delete(:client) || Client.new(options)
28
- end
8
+ module Aws::IAM
9
+ class RolePolicy
10
+
11
+ extend Aws::Deprecations
12
+
13
+ # @overload def initialize(role_name, name, options = {})
14
+ # @param [String] role_name
15
+ # @param [String] name
16
+ # @option options [Client] :client
17
+ # @overload def initialize(options = {})
18
+ # @option options [required, String] :role_name
19
+ # @option options [required, String] :name
20
+ # @option options [Client] :client
21
+ def initialize(*args)
22
+ options = Hash === args.last ? args.pop.dup : {}
23
+ @role_name = extract_role_name(args, options)
24
+ @name = extract_name(args, options)
25
+ @data = options.delete(:data)
26
+ @client = options.delete(:client) || Client.new(options)
27
+ end
29
28
 
30
- # @!group Read-Only Attributes
29
+ # @!group Read-Only Attributes
31
30
 
32
- # @return [String]
33
- def role_name
34
- @role_name
35
- end
31
+ # @return [String]
32
+ def role_name
33
+ @role_name
34
+ end
36
35
 
37
- # @return [String]
38
- def name
39
- @name
40
- end
41
- alias :policy_name :name
36
+ # @return [String]
37
+ def name
38
+ @name
39
+ end
40
+ alias :policy_name :name
42
41
 
43
- # The policy document.
44
- # @return [String]
45
- def policy_document
46
- data.policy_document
47
- end
42
+ # The policy document.
43
+ # @return [String]
44
+ def policy_document
45
+ data.policy_document
46
+ end
48
47
 
49
- # @!endgroup
48
+ # @!endgroup
50
49
 
51
- # @return [Client]
52
- def client
53
- @client
54
- end
50
+ # @return [Client]
51
+ def client
52
+ @client
53
+ end
55
54
 
56
- # Loads, or reloads {#data} for the current {RolePolicy}.
57
- # Returns `self` making it possible to chain methods.
58
- #
59
- # role_policy.reload.data
60
- #
61
- # @return [self]
62
- def load
63
- resp = @client.get_role_policy(
64
- role_name: @role_name,
65
- policy_name: @name
66
- )
67
- @data = resp.data
68
- self
69
- end
70
- alias :reload :load
71
-
72
- # @return [Types::GetRolePolicyResponse]
73
- # Returns the data for this {RolePolicy}. Calls
74
- # {Client#get_role_policy} if {#data_loaded?} is `false`.
75
- def data
76
- load unless @data
77
- @data
78
- end
55
+ # Loads, or reloads {#data} for the current {RolePolicy}.
56
+ # Returns `self` making it possible to chain methods.
57
+ #
58
+ # role_policy.reload.data
59
+ #
60
+ # @return [self]
61
+ def load
62
+ resp = @client.get_role_policy(
63
+ role_name: @role_name,
64
+ policy_name: @name
65
+ )
66
+ @data = resp.data
67
+ self
68
+ end
69
+ alias :reload :load
70
+
71
+ # @return [Types::GetRolePolicyResponse]
72
+ # Returns the data for this {RolePolicy}. Calls
73
+ # {Client#get_role_policy} if {#data_loaded?} is `false`.
74
+ def data
75
+ load unless @data
76
+ @data
77
+ end
79
78
 
80
- # @return [Boolean]
81
- # Returns `true` if this resource is loaded. Accessing attributes or
82
- # {#data} on an unloaded resource will trigger a call to {#load}.
83
- def data_loaded?
84
- !!@data
85
- end
79
+ # @return [Boolean]
80
+ # Returns `true` if this resource is loaded. Accessing attributes or
81
+ # {#data} on an unloaded resource will trigger a call to {#load}.
82
+ def data_loaded?
83
+ !!@data
84
+ end
86
85
 
87
- # @!group Actions
88
-
89
- # @example Request syntax with placeholder values
90
- #
91
- # role_policy.delete()
92
- # @param [Hash] options ({})
93
- # @return [EmptyStructure]
94
- def delete(options = {})
95
- options = options.merge(
96
- role_name: @role_name,
97
- policy_name: @name
98
- )
99
- resp = @client.delete_role_policy(options)
100
- resp.data
101
- end
86
+ # @!group Actions
87
+
88
+ # @example Request syntax with placeholder values
89
+ #
90
+ # role_policy.delete()
91
+ # @param [Hash] options ({})
92
+ # @return [EmptyStructure]
93
+ def delete(options = {})
94
+ options = options.merge(
95
+ role_name: @role_name,
96
+ policy_name: @name
97
+ )
98
+ resp = @client.delete_role_policy(options)
99
+ resp.data
100
+ end
102
101
 
103
- # @example Request syntax with placeholder values
104
- #
105
- # role_policy.put({
106
- # policy_document: "policyDocumentType", # required
107
- # })
108
- # @param [Hash] options ({})
109
- # @option options [required, String] :policy_document
110
- # The policy document.
111
- #
112
- # The [regex pattern][1] for this parameter is a string of characters
113
- # consisting of any printable ASCII character ranging from the space
114
- # character (\\u0020) through end of the ASCII character range
115
- # (\\u00FF). It also includes the special characters tab (\\u0009), line
116
- # feed (\\u000A), and carriage return (\\u000D).
117
- #
118
- #
119
- #
120
- # [1]: http://wikipedia.org/wiki/regex
121
- # @return [EmptyStructure]
122
- def put(options = {})
123
- options = options.merge(
124
- role_name: @role_name,
125
- policy_name: @name
126
- )
127
- resp = @client.put_role_policy(options)
128
- resp.data
129
- end
102
+ # @example Request syntax with placeholder values
103
+ #
104
+ # role_policy.put({
105
+ # policy_document: "policyDocumentType", # required
106
+ # })
107
+ # @param [Hash] options ({})
108
+ # @option options [required, String] :policy_document
109
+ # The policy document.
110
+ #
111
+ # The [regex pattern][1] used to validate this parameter is a string of
112
+ # characters consisting of any printable ASCII character ranging from
113
+ # the space character (\\u0020) through end of the ASCII character range
114
+ # as well as the printable characters in the Basic Latin and Latin-1
115
+ # Supplement character set (through \\u00FF). It also includes the
116
+ # special characters tab (\\u0009), line feed (\\u000A), and carriage
117
+ # return (\\u000D).
118
+ #
119
+ #
120
+ #
121
+ # [1]: http://wikipedia.org/wiki/regex
122
+ # @return [EmptyStructure]
123
+ def put(options = {})
124
+ options = options.merge(
125
+ role_name: @role_name,
126
+ policy_name: @name
127
+ )
128
+ resp = @client.put_role_policy(options)
129
+ resp.data
130
+ end
130
131
 
131
- # @!group Associations
132
+ # @!group Associations
132
133
 
133
- # @return [Role]
134
- def role
135
- Role.new(
136
- name: @role_name,
137
- client: @client
138
- )
139
- end
134
+ # @return [Role]
135
+ def role
136
+ Role.new(
137
+ name: @role_name,
138
+ client: @client
139
+ )
140
+ end
140
141
 
141
- # @deprecated
142
- # @api private
143
- def identifiers
144
- {
145
- role_name: @role_name,
146
- name: @name
147
- }
148
- end
149
- deprecated(:identifiers)
150
-
151
- private
152
-
153
- def extract_role_name(args, options)
154
- value = args[0] || options.delete(:role_name)
155
- case value
156
- when String then value
157
- when nil then raise ArgumentError, "missing required option :role_name"
158
- else
159
- msg = "expected :role_name to be a String, got #{value.class}"
160
- raise ArgumentError, msg
161
- end
142
+ # @deprecated
143
+ # @api private
144
+ def identifiers
145
+ {
146
+ role_name: @role_name,
147
+ name: @name
148
+ }
149
+ end
150
+ deprecated(:identifiers)
151
+
152
+ private
153
+
154
+ def extract_role_name(args, options)
155
+ value = args[0] || options.delete(:role_name)
156
+ case value
157
+ when String then value
158
+ when nil then raise ArgumentError, "missing required option :role_name"
159
+ else
160
+ msg = "expected :role_name to be a String, got #{value.class}"
161
+ raise ArgumentError, msg
162
162
  end
163
+ end
163
164
 
164
- def extract_name(args, options)
165
- value = args[1] || options.delete(:name)
166
- case value
167
- when String then value
168
- when nil then raise ArgumentError, "missing required option :name"
169
- else
170
- msg = "expected :name to be a String, got #{value.class}"
171
- raise ArgumentError, msg
172
- end
165
+ def extract_name(args, options)
166
+ value = args[1] || options.delete(:name)
167
+ case value
168
+ when String then value
169
+ when nil then raise ArgumentError, "missing required option :name"
170
+ else
171
+ msg = "expected :name to be a String, got #{value.class}"
172
+ raise ArgumentError, msg
173
173
  end
174
-
175
- class Collection < Aws::Resources::Collection; end
176
174
  end
175
+
176
+ class Collection < Aws::Resources::Collection; end
177
177
  end
178
178
  end
@@ -1,144 +1,142 @@
1
1
  # WARNING ABOUT GENERATED CODE
2
2
  #
3
- # This file is generated. See the contributing for 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 SamlProvider
11
-
12
- extend Aws::Deprecations
13
-
14
- # @overload def initialize(arn, options = {})
15
- # @param [String] arn
16
- # @option options [Client] :client
17
- # @overload def initialize(options = {})
18
- # @option options [required, String] :arn
19
- # @option options [Client] :client
20
- def initialize(*args)
21
- options = Hash === args.last ? args.pop.dup : {}
22
- @arn = extract_arn(args, options)
23
- @data = options.delete(:data)
24
- @client = options.delete(:client) || Client.new(options)
25
- end
8
+ module Aws::IAM
9
+ class SamlProvider
10
+
11
+ extend Aws::Deprecations
12
+
13
+ # @overload def initialize(arn, options = {})
14
+ # @param [String] arn
15
+ # @option options [Client] :client
16
+ # @overload def initialize(options = {})
17
+ # @option options [required, String] :arn
18
+ # @option options [Client] :client
19
+ def initialize(*args)
20
+ options = Hash === args.last ? args.pop.dup : {}
21
+ @arn = extract_arn(args, options)
22
+ @data = options.delete(:data)
23
+ @client = options.delete(:client) || Client.new(options)
24
+ end
26
25
 
27
- # @!group Read-Only Attributes
26
+ # @!group Read-Only Attributes
28
27
 
29
- # @return [String]
30
- def arn
31
- @arn
32
- end
28
+ # @return [String]
29
+ def arn
30
+ @arn
31
+ end
33
32
 
34
- # The XML metadata document that includes information about an identity
35
- # provider.
36
- # @return [String]
37
- def saml_metadata_document
38
- data.saml_metadata_document
39
- end
33
+ # The XML metadata document that includes information about an identity
34
+ # provider.
35
+ # @return [String]
36
+ def saml_metadata_document
37
+ data.saml_metadata_document
38
+ end
40
39
 
41
- # The date and time when the SAML provider was created.
42
- # @return [Time]
43
- def create_date
44
- data.create_date
45
- end
40
+ # The date and time when the SAML provider was created.
41
+ # @return [Time]
42
+ def create_date
43
+ data.create_date
44
+ end
46
45
 
47
- # The expiration date and time for the SAML provider.
48
- # @return [Time]
49
- def valid_until
50
- data.valid_until
51
- end
46
+ # The expiration date and time for the SAML provider.
47
+ # @return [Time]
48
+ def valid_until
49
+ data.valid_until
50
+ end
52
51
 
53
- # @!endgroup
52
+ # @!endgroup
54
53
 
55
- # @return [Client]
56
- def client
57
- @client
58
- end
54
+ # @return [Client]
55
+ def client
56
+ @client
57
+ end
59
58
 
60
- # Loads, or reloads {#data} for the current {SamlProvider}.
61
- # Returns `self` making it possible to chain methods.
62
- #
63
- # saml_provider.reload.data
64
- #
65
- # @return [self]
66
- def load
67
- resp = @client.get_saml_provider(saml_provider_arn: @arn)
68
- @data = resp.data
69
- self
70
- end
71
- alias :reload :load
72
-
73
- # @return [Types::GetSAMLProviderResponse]
74
- # Returns the data for this {SamlProvider}. Calls
75
- # {Client#get_saml_provider} if {#data_loaded?} is `false`.
76
- def data
77
- load unless @data
78
- @data
79
- end
59
+ # Loads, or reloads {#data} for the current {SamlProvider}.
60
+ # Returns `self` making it possible to chain methods.
61
+ #
62
+ # saml_provider.reload.data
63
+ #
64
+ # @return [self]
65
+ def load
66
+ resp = @client.get_saml_provider(saml_provider_arn: @arn)
67
+ @data = resp.data
68
+ self
69
+ end
70
+ alias :reload :load
71
+
72
+ # @return [Types::GetSAMLProviderResponse]
73
+ # Returns the data for this {SamlProvider}. Calls
74
+ # {Client#get_saml_provider} if {#data_loaded?} is `false`.
75
+ def data
76
+ load unless @data
77
+ @data
78
+ end
80
79
 
81
- # @return [Boolean]
82
- # Returns `true` if this resource is loaded. Accessing attributes or
83
- # {#data} on an unloaded resource will trigger a call to {#load}.
84
- def data_loaded?
85
- !!@data
86
- end
80
+ # @return [Boolean]
81
+ # Returns `true` if this resource is loaded. Accessing attributes or
82
+ # {#data} on an unloaded resource will trigger a call to {#load}.
83
+ def data_loaded?
84
+ !!@data
85
+ end
87
86
 
88
- # @!group Actions
89
-
90
- # @example Request syntax with placeholder values
91
- #
92
- # saml_provider.delete()
93
- # @param [Hash] options ({})
94
- # @return [EmptyStructure]
95
- def delete(options = {})
96
- options = options.merge(saml_provider_arn: @arn)
97
- resp = @client.delete_saml_provider(options)
98
- resp.data
99
- end
87
+ # @!group Actions
88
+
89
+ # @example Request syntax with placeholder values
90
+ #
91
+ # saml_provider.delete()
92
+ # @param [Hash] options ({})
93
+ # @return [EmptyStructure]
94
+ def delete(options = {})
95
+ options = options.merge(saml_provider_arn: @arn)
96
+ resp = @client.delete_saml_provider(options)
97
+ resp.data
98
+ end
100
99
 
101
- # @example Request syntax with placeholder values
102
- #
103
- # saml_provider.update({
104
- # saml_metadata_document: "SAMLMetadataDocumentType", # required
105
- # })
106
- # @param [Hash] options ({})
107
- # @option options [required, String] :saml_metadata_document
108
- # An XML document generated by an identity provider (IdP) that supports
109
- # SAML 2.0. The document includes the issuer's name, expiration
110
- # information, and keys that can be used to validate the SAML
111
- # authentication response (assertions) that are received from the IdP.
112
- # You must generate the metadata document using the identity management
113
- # software that is used as your organization's IdP.
114
- # @return [Types::UpdateSAMLProviderResponse]
115
- def update(options = {})
116
- options = options.merge(saml_provider_arn: @arn)
117
- resp = @client.update_saml_provider(options)
118
- resp.data
119
- end
100
+ # @example Request syntax with placeholder values
101
+ #
102
+ # saml_provider.update({
103
+ # saml_metadata_document: "SAMLMetadataDocumentType", # required
104
+ # })
105
+ # @param [Hash] options ({})
106
+ # @option options [required, String] :saml_metadata_document
107
+ # An XML document generated by an identity provider (IdP) that supports
108
+ # SAML 2.0. The document includes the issuer's name, expiration
109
+ # information, and keys that can be used to validate the SAML
110
+ # authentication response (assertions) that are received from the IdP.
111
+ # You must generate the metadata document using the identity management
112
+ # software that is used as your organization's IdP.
113
+ # @return [Types::UpdateSAMLProviderResponse]
114
+ def update(options = {})
115
+ options = options.merge(saml_provider_arn: @arn)
116
+ resp = @client.update_saml_provider(options)
117
+ resp.data
118
+ end
120
119
 
121
- # @deprecated
122
- # @api private
123
- def identifiers
124
- { arn: @arn }
125
- end
126
- deprecated(:identifiers)
127
-
128
- private
129
-
130
- def extract_arn(args, options)
131
- value = args[0] || options.delete(:arn)
132
- case value
133
- when String then value
134
- when nil then raise ArgumentError, "missing required option :arn"
135
- else
136
- msg = "expected :arn to be a String, got #{value.class}"
137
- raise ArgumentError, msg
138
- end
120
+ # @deprecated
121
+ # @api private
122
+ def identifiers
123
+ { arn: @arn }
124
+ end
125
+ deprecated(:identifiers)
126
+
127
+ private
128
+
129
+ def extract_arn(args, options)
130
+ value = args[0] || options.delete(:arn)
131
+ case value
132
+ when String then value
133
+ when nil then raise ArgumentError, "missing required option :arn"
134
+ else
135
+ msg = "expected :arn to be a String, got #{value.class}"
136
+ raise ArgumentError, msg
139
137
  end
140
-
141
- class Collection < Aws::Resources::Collection; end
142
138
  end
139
+
140
+ class Collection < Aws::Resources::Collection; end
143
141
  end
144
142
  end