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