aws-sdk-opsworks 1.0.0.rc1 → 1.0.0.rc2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,23 +1,14 @@
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 OpsWorks
10
- module Errors
8
+ module Aws::OpsWorks
9
+ module Errors
11
10
 
12
- extend Aws::Errors::DynamicErrors
11
+ extend Aws::Errors::DynamicErrors
13
12
 
14
- # Raised when calling #load or #data on a resource class that can not be
15
- # loaded. This can happen when:
16
- #
17
- # * A resource class has identifiers, but no data attributes.
18
- # * Resource data is only available when making an API call that
19
- # enumerates all resources of that type.
20
- class ResourceNotLoadable < RuntimeError; end
21
- end
22
13
  end
23
14
  end
@@ -1,298 +1,302 @@
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 OpsWorks
10
- class Layer
11
-
12
- extend Aws::Deprecations
13
-
14
- # @overload def initialize(id, options = {})
15
- # @param [String] id
16
- # @option options [Client] :client
17
- # @overload def initialize(options = {})
18
- # @option options [required, String] :id
19
- # @option options [Client] :client
20
- def initialize(*args)
21
- options = Hash === args.last ? args.pop.dup : {}
22
- @id = extract_id(args, options)
23
- @data = options.delete(:data)
24
- @client = options.delete(:client) || Client.new(options)
25
- end
8
+ module Aws::OpsWorks
9
+ class Layer
10
+
11
+ extend Aws::Deprecations
12
+
13
+ # @overload def initialize(id, options = {})
14
+ # @param [String] id
15
+ # @option options [Client] :client
16
+ # @overload def initialize(options = {})
17
+ # @option options [required, String] :id
18
+ # @option options [Client] :client
19
+ def initialize(*args)
20
+ options = Hash === args.last ? args.pop.dup : {}
21
+ @id = extract_id(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 id
31
- @id
32
- end
28
+ # @return [String]
29
+ def id
30
+ @id
31
+ end
33
32
 
34
- # The layer stack ID.
35
- # @return [String]
36
- def stack_id
37
- data.stack_id
38
- end
33
+ # The layer stack ID.
34
+ # @return [String]
35
+ def stack_id
36
+ data.stack_id
37
+ end
39
38
 
40
- # The layer ID.
41
- # @return [String]
42
- def layer_id
43
- data.layer_id
44
- end
39
+ # The layer ID.
40
+ # @return [String]
41
+ def layer_id
42
+ data.layer_id
43
+ end
45
44
 
46
- # The layer type.
47
- # @return [String]
48
- def type
49
- data.type
50
- end
45
+ # The layer type.
46
+ # @return [String]
47
+ def type
48
+ data.type
49
+ end
51
50
 
52
- # The layer name.
53
- # @return [String]
54
- def name
55
- data.name
56
- end
51
+ # The layer name.
52
+ # @return [String]
53
+ def name
54
+ data.name
55
+ end
57
56
 
58
- # The layer short name.
59
- # @return [String]
60
- def shortname
61
- data.shortname
62
- end
57
+ # The layer short name.
58
+ # @return [String]
59
+ def shortname
60
+ data.shortname
61
+ end
63
62
 
64
- # The layer attributes.
65
- #
66
- # For the `HaproxyStatsPassword`, `MysqlRootPassword`, and
67
- # `GangliaPassword` attributes, AWS OpsWorks returns
68
- # `*****FILTERED*****` instead of the actual value
69
- #
70
- # For an ECS Cluster layer, AWS OpsWorks the `EcsClusterArn` attribute
71
- # is set to the cluster's ARN.
72
- # @return [Hash<String,String>]
73
- def attributes
74
- data.attributes
75
- end
63
+ # The layer attributes.
64
+ #
65
+ # For the `HaproxyStatsPassword`, `MysqlRootPassword`, and
66
+ # `GangliaPassword` attributes, AWS OpsWorks Stacks returns
67
+ # `*****FILTERED*****` instead of the actual value
68
+ #
69
+ # For an ECS Cluster layer, AWS OpsWorks Stacks the `EcsClusterArn`
70
+ # attribute is set to the cluster's ARN.
71
+ # @return [Hash<String,String>]
72
+ def attributes
73
+ data.attributes
74
+ end
76
75
 
77
- # The ARN of the default IAM profile to be used for the layer's EC2
78
- # instances. For more information about IAM ARNs, see [Using
79
- # Identifiers][1].
80
- #
81
- #
82
- #
83
- # [1]: http://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html
84
- # @return [String]
85
- def custom_instance_profile_arn
86
- data.custom_instance_profile_arn
87
- end
76
+ # The Amazon CloudWatch Logs configuration settings for the layer.
77
+ # @return [Types::CloudWatchLogsConfiguration]
78
+ def cloud_watch_logs_configuration
79
+ data.cloud_watch_logs_configuration
80
+ end
88
81
 
89
- # A JSON formatted string containing the layer's custom stack
90
- # configuration and deployment attributes.
91
- # @return [String]
92
- def custom_json
93
- data.custom_json
94
- end
82
+ # The ARN of the default IAM profile to be used for the layer's EC2
83
+ # instances. For more information about IAM ARNs, see [Using
84
+ # Identifiers][1].
85
+ #
86
+ #
87
+ #
88
+ # [1]: http://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html
89
+ # @return [String]
90
+ def custom_instance_profile_arn
91
+ data.custom_instance_profile_arn
92
+ end
95
93
 
96
- # An array containing the layer's custom security group IDs.
97
- # @return [Array<String>]
98
- def custom_security_group_ids
99
- data.custom_security_group_ids
100
- end
94
+ # A JSON formatted string containing the layer's custom stack
95
+ # configuration and deployment attributes.
96
+ # @return [String]
97
+ def custom_json
98
+ data.custom_json
99
+ end
101
100
 
102
- # An array containing the layer's security group names.
103
- # @return [Array<String>]
104
- def default_security_group_names
105
- data.default_security_group_names
106
- end
101
+ # An array containing the layer's custom security group IDs.
102
+ # @return [Array<String>]
103
+ def custom_security_group_ids
104
+ data.custom_security_group_ids
105
+ end
107
106
 
108
- # An array of `Package` objects that describe the layer's packages.
109
- # @return [Array<String>]
110
- def packages
111
- data.packages
112
- end
107
+ # An array containing the layer's security group names.
108
+ # @return [Array<String>]
109
+ def default_security_group_names
110
+ data.default_security_group_names
111
+ end
113
112
 
114
- # A `VolumeConfigurations` object that describes the layer's Amazon EBS
115
- # volumes.
116
- # @return [Array<Types::VolumeConfiguration>]
117
- def volume_configurations
118
- data.volume_configurations
119
- end
113
+ # An array of `Package` objects that describe the layer's packages.
114
+ # @return [Array<String>]
115
+ def packages
116
+ data.packages
117
+ end
120
118
 
121
- # Whether auto healing is disabled for the layer.
122
- # @return [Boolean]
123
- def enable_auto_healing
124
- data.enable_auto_healing
125
- end
119
+ # A `VolumeConfigurations` object that describes the layer's Amazon EBS
120
+ # volumes.
121
+ # @return [Array<Types::VolumeConfiguration>]
122
+ def volume_configurations
123
+ data.volume_configurations
124
+ end
126
125
 
127
- # Whether to automatically assign an [Elastic IP address][1] to the
128
- # layer's instances. For more information, see [How to Edit a
129
- # Layer][2].
130
- #
131
- #
132
- #
133
- # [1]: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html
134
- # [2]: http://docs.aws.amazon.com/opsworks/latest/userguide/workinglayers-basics-edit.html
135
- # @return [Boolean]
136
- def auto_assign_elastic_ips
137
- data.auto_assign_elastic_ips
138
- end
126
+ # Whether auto healing is disabled for the layer.
127
+ # @return [Boolean]
128
+ def enable_auto_healing
129
+ data.enable_auto_healing
130
+ end
139
131
 
140
- # For stacks that are running in a VPC, whether to automatically assign
141
- # a public IP address to the layer's instances. For more information,
142
- # see [How to Edit a Layer][1].
143
- #
144
- #
145
- #
146
- # [1]: http://docs.aws.amazon.com/opsworks/latest/userguide/workinglayers-basics-edit.html
147
- # @return [Boolean]
148
- def auto_assign_public_ips
149
- data.auto_assign_public_ips
150
- end
132
+ # Whether to automatically assign an [Elastic IP address][1] to the
133
+ # layer's instances. For more information, see [How to Edit a
134
+ # Layer][2].
135
+ #
136
+ #
137
+ #
138
+ # [1]: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html
139
+ # [2]: http://docs.aws.amazon.com/opsworks/latest/userguide/workinglayers-basics-edit.html
140
+ # @return [Boolean]
141
+ def auto_assign_elastic_ips
142
+ data.auto_assign_elastic_ips
143
+ end
151
144
 
152
- # AWS OpsWorks supports five lifecycle events: **setup**,
153
- # **configuration**, **deploy**, **undeploy**, and **shutdown**. For
154
- # each layer, AWS OpsWorks runs a set of standard recipes for each
155
- # event. In addition, you can provide custom recipes for any or all
156
- # layers and events. AWS OpsWorks runs custom event recipes after the
157
- # standard recipes. `LayerCustomRecipes` specifies the custom recipes
158
- # for a particular layer to be run in response to each of the five
159
- # events.
160
- #
161
- # To specify a recipe, use the cookbook's directory name in the
162
- # repository followed by two colons and the recipe name, which is the
163
- # recipe's file name without the .rb extension. For example:
164
- # phpapp2::dbsetup specifies the dbsetup.rb recipe in the repository's
165
- # phpapp2 folder.
166
- # @return [Types::Recipes]
167
- def default_recipes
168
- data.default_recipes
169
- end
145
+ # For stacks that are running in a VPC, whether to automatically assign
146
+ # a public IP address to the layer's instances. For more information,
147
+ # see [How to Edit a Layer][1].
148
+ #
149
+ #
150
+ #
151
+ # [1]: http://docs.aws.amazon.com/opsworks/latest/userguide/workinglayers-basics-edit.html
152
+ # @return [Boolean]
153
+ def auto_assign_public_ips
154
+ data.auto_assign_public_ips
155
+ end
170
156
 
171
- # A `LayerCustomRecipes` object that specifies the layer's custom
172
- # recipes.
173
- # @return [Types::Recipes]
174
- def custom_recipes
175
- data.custom_recipes
176
- end
157
+ # AWS OpsWorks Stacks supports five lifecycle events: **setup**,
158
+ # **configuration**, **deploy**, **undeploy**, and **shutdown**. For
159
+ # each layer, AWS OpsWorks Stacks runs a set of standard recipes for
160
+ # each event. In addition, you can provide custom recipes for any or all
161
+ # layers and events. AWS OpsWorks Stacks runs custom event recipes after
162
+ # the standard recipes. `LayerCustomRecipes` specifies the custom
163
+ # recipes for a particular layer to be run in response to each of the
164
+ # five events.
165
+ #
166
+ # To specify a recipe, use the cookbook's directory name in the
167
+ # repository followed by two colons and the recipe name, which is the
168
+ # recipe's file name without the .rb extension. For example:
169
+ # phpapp2::dbsetup specifies the dbsetup.rb recipe in the repository's
170
+ # phpapp2 folder.
171
+ # @return [Types::Recipes]
172
+ def default_recipes
173
+ data.default_recipes
174
+ end
177
175
 
178
- # Date when the layer was created.
179
- # @return [String]
180
- def created_at
181
- data.created_at
182
- end
176
+ # A `LayerCustomRecipes` object that specifies the layer's custom
177
+ # recipes.
178
+ # @return [Types::Recipes]
179
+ def custom_recipes
180
+ data.custom_recipes
181
+ end
183
182
 
184
- # Whether to install operating system and package updates when the
185
- # instance boots. The default value is `true`. If this value is set to
186
- # `false`, you must then update your instances manually by using
187
- # CreateDeployment to run the `update_dependencies` stack command or
188
- # manually running `yum` (Amazon Linux) or `apt-get` (Ubuntu) on the
189
- # instances.
190
- #
191
- # <note markdown="1"> We strongly recommend using the default value of `true`, to ensure
192
- # that your instances have the latest security updates.
193
- #
194
- # </note>
195
- # @return [Boolean]
196
- def install_updates_on_boot
197
- data.install_updates_on_boot
198
- end
183
+ # Date when the layer was created.
184
+ # @return [String]
185
+ def created_at
186
+ data.created_at
187
+ end
199
188
 
200
- # Whether the layer uses Amazon EBS-optimized instances.
201
- # @return [Boolean]
202
- def use_ebs_optimized_instances
203
- data.use_ebs_optimized_instances
204
- end
189
+ # Whether to install operating system and package updates when the
190
+ # instance boots. The default value is `true`. If this value is set to
191
+ # `false`, you must then update your instances manually by using
192
+ # CreateDeployment to run the `update_dependencies` stack command or
193
+ # manually running `yum` (Amazon Linux) or `apt-get` (Ubuntu) on the
194
+ # instances.
195
+ #
196
+ # <note markdown="1"> We strongly recommend using the default value of `true`, to ensure
197
+ # that your instances have the latest security updates.
198
+ #
199
+ # </note>
200
+ # @return [Boolean]
201
+ def install_updates_on_boot
202
+ data.install_updates_on_boot
203
+ end
205
204
 
206
- # A `LifeCycleEventConfiguration` object that specifies the Shutdown
207
- # event configuration.
208
- # @return [Types::LifecycleEventConfiguration]
209
- def lifecycle_event_configuration
210
- data.lifecycle_event_configuration
211
- end
205
+ # Whether the layer uses Amazon EBS-optimized instances.
206
+ # @return [Boolean]
207
+ def use_ebs_optimized_instances
208
+ data.use_ebs_optimized_instances
209
+ end
212
210
 
213
- # @!endgroup
211
+ # A `LifeCycleEventConfiguration` object that specifies the Shutdown
212
+ # event configuration.
213
+ # @return [Types::LifecycleEventConfiguration]
214
+ def lifecycle_event_configuration
215
+ data.lifecycle_event_configuration
216
+ end
214
217
 
215
- # @return [Client]
216
- def client
217
- @client
218
- end
218
+ # @!endgroup
219
219
 
220
- # Loads, or reloads {#data} for the current {Layer}.
221
- # Returns `self` making it possible to chain methods.
222
- #
223
- # layer.reload.data
224
- #
225
- # @return [self]
226
- def load
227
- resp = @client.describe_layers(layer_ids: [@id])
228
- @data = resp.layers[0]
229
- self
230
- end
231
- alias :reload :load
232
-
233
- # @return [Types::Layer]
234
- # Returns the data for this {Layer}. Calls
235
- # {Client#describe_layers} if {#data_loaded?} is `false`.
236
- def data
237
- load unless @data
238
- @data
239
- end
220
+ # @return [Client]
221
+ def client
222
+ @client
223
+ end
240
224
 
241
- # @return [Boolean]
242
- # Returns `true` if this resource is loaded. Accessing attributes or
243
- # {#data} on an unloaded resource will trigger a call to {#load}.
244
- def data_loaded?
245
- !!@data
246
- end
225
+ # Loads, or reloads {#data} for the current {Layer}.
226
+ # Returns `self` making it possible to chain methods.
227
+ #
228
+ # layer.reload.data
229
+ #
230
+ # @return [self]
231
+ def load
232
+ resp = @client.describe_layers(layer_ids: [@id])
233
+ @data = resp.layers[0]
234
+ self
235
+ end
236
+ alias :reload :load
237
+
238
+ # @return [Types::Layer]
239
+ # Returns the data for this {Layer}. Calls
240
+ # {Client#describe_layers} if {#data_loaded?} is `false`.
241
+ def data
242
+ load unless @data
243
+ @data
244
+ end
247
245
 
248
- # @!group Actions
249
-
250
- # @example Request syntax with placeholder values
251
- #
252
- # layer.delete()
253
- # @param [Hash] options ({})
254
- # @return [EmptyStructure]
255
- def delete(options = {})
256
- options = options.merge(layer_id: @id)
257
- resp = @client.delete_layer(options)
258
- resp.data
259
- end
246
+ # @return [Boolean]
247
+ # Returns `true` if this resource is loaded. Accessing attributes or
248
+ # {#data} on an unloaded resource will trigger a call to {#load}.
249
+ def data_loaded?
250
+ !!@data
251
+ end
260
252
 
261
- # @!group Associations
262
-
263
- # @return [Stack, nil]
264
- def stack
265
- if data.stack_id
266
- Stack.new(
267
- id: data.stack_id,
268
- client: @client
269
- )
270
- else
271
- nil
272
- end
273
- end
253
+ # @!group Actions
254
+
255
+ # @example Request syntax with placeholder values
256
+ #
257
+ # layer.delete()
258
+ # @param [Hash] options ({})
259
+ # @return [EmptyStructure]
260
+ def delete(options = {})
261
+ options = options.merge(layer_id: @id)
262
+ resp = @client.delete_layer(options)
263
+ resp.data
264
+ end
274
265
 
275
- # @deprecated
276
- # @api private
277
- def identifiers
278
- { id: @id }
279
- end
280
- deprecated(:identifiers)
281
-
282
- private
283
-
284
- def extract_id(args, options)
285
- value = args[0] || options.delete(:id)
286
- case value
287
- when String then value
288
- when nil then raise ArgumentError, "missing required option :id"
289
- else
290
- msg = "expected :id to be a String, got #{value.class}"
291
- raise ArgumentError, msg
292
- end
266
+ # @!group Associations
267
+
268
+ # @return [Stack, nil]
269
+ def stack
270
+ if data.stack_id
271
+ Stack.new(
272
+ id: data.stack_id,
273
+ client: @client
274
+ )
275
+ else
276
+ nil
293
277
  end
278
+ end
294
279
 
295
- class Collection < Aws::Resources::Collection; end
280
+ # @deprecated
281
+ # @api private
282
+ def identifiers
283
+ { id: @id }
296
284
  end
285
+ deprecated(:identifiers)
286
+
287
+ private
288
+
289
+ def extract_id(args, options)
290
+ value = args[0] || options.delete(:id)
291
+ case value
292
+ when String then value
293
+ when nil then raise ArgumentError, "missing required option :id"
294
+ else
295
+ msg = "expected :id to be a String, got #{value.class}"
296
+ raise ArgumentError, msg
297
+ end
298
+ end
299
+
300
+ class Collection < Aws::Resources::Collection; end
297
301
  end
298
302
  end