aws-sdk-opsworks 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,468 +1,487 @@
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 Stack
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 Stack
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 stack ID.
35
- # @return [String]
36
- def stack_id
37
- data.stack_id
38
- end
33
+ # The stack ID.
34
+ # @return [String]
35
+ def stack_id
36
+ data.stack_id
37
+ end
39
38
 
40
- # The stack name.
41
- # @return [String]
42
- def name
43
- data.name
44
- end
39
+ # The stack name.
40
+ # @return [String]
41
+ def name
42
+ data.name
43
+ end
45
44
 
46
- # The stack's ARN.
47
- # @return [String]
48
- def arn
49
- data.arn
50
- end
45
+ # The stack's ARN.
46
+ # @return [String]
47
+ def arn
48
+ data.arn
49
+ end
51
50
 
52
- # The stack AWS region, such as "ap-northeast-2". For more information
53
- # about AWS regions, see [Regions and Endpoints][1].
54
- #
55
- #
56
- #
57
- # [1]: http://docs.aws.amazon.com/general/latest/gr/rande.html
58
- # @return [String]
59
- def region
60
- data.region
61
- end
51
+ # The stack AWS region, such as "ap-northeast-2". For more information
52
+ # about AWS regions, see [Regions and Endpoints][1].
53
+ #
54
+ #
55
+ #
56
+ # [1]: http://docs.aws.amazon.com/general/latest/gr/rande.html
57
+ # @return [String]
58
+ def region
59
+ data.region
60
+ end
62
61
 
63
- # The VPC ID; applicable only if the stack is running in a VPC.
64
- # @return [String]
65
- def vpc_id
66
- data.vpc_id
67
- end
62
+ # The VPC ID; applicable only if the stack is running in a VPC.
63
+ # @return [String]
64
+ def vpc_id
65
+ data.vpc_id
66
+ end
68
67
 
69
- # The stack's attributes.
70
- # @return [Hash<String,String>]
71
- def attributes
72
- data.attributes
73
- end
68
+ # The stack's attributes.
69
+ # @return [Hash<String,String>]
70
+ def attributes
71
+ data.attributes
72
+ end
74
73
 
75
- # The stack AWS Identity and Access Management (IAM) role.
76
- # @return [String]
77
- def service_role_arn
78
- data.service_role_arn
79
- end
74
+ # The stack AWS Identity and Access Management (IAM) role.
75
+ # @return [String]
76
+ def service_role_arn
77
+ data.service_role_arn
78
+ end
80
79
 
81
- # The ARN of an IAM profile that is the default profile for all of the
82
- # stack's EC2 instances. For more information about IAM ARNs, see
83
- # [Using Identifiers][1].
84
- #
85
- #
86
- #
87
- # [1]: http://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html
88
- # @return [String]
89
- def default_instance_profile_arn
90
- data.default_instance_profile_arn
91
- end
80
+ # The ARN of an IAM profile that is the default profile for all of the
81
+ # stack's EC2 instances. For more information about IAM ARNs, see
82
+ # [Using Identifiers][1].
83
+ #
84
+ #
85
+ #
86
+ # [1]: http://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html
87
+ # @return [String]
88
+ def default_instance_profile_arn
89
+ data.default_instance_profile_arn
90
+ end
92
91
 
93
- # The stack's default operating system.
94
- # @return [String]
95
- def default_os
96
- data.default_os
97
- end
92
+ # The stack's default operating system.
93
+ # @return [String]
94
+ def default_os
95
+ data.default_os
96
+ end
98
97
 
99
- # The stack host name theme, with spaces replaced by underscores.
100
- # @return [String]
101
- def hostname_theme
102
- data.hostname_theme
103
- end
98
+ # The stack host name theme, with spaces replaced by underscores.
99
+ # @return [String]
100
+ def hostname_theme
101
+ data.hostname_theme
102
+ end
104
103
 
105
- # The stack's default Availability Zone. For more information, see
106
- # [Regions and Endpoints][1].
107
- #
108
- #
109
- #
110
- # [1]: http://docs.aws.amazon.com/general/latest/gr/rande.html
111
- # @return [String]
112
- def default_availability_zone
113
- data.default_availability_zone
114
- end
104
+ # The stack's default Availability Zone. For more information, see
105
+ # [Regions and Endpoints][1].
106
+ #
107
+ #
108
+ #
109
+ # [1]: http://docs.aws.amazon.com/general/latest/gr/rande.html
110
+ # @return [String]
111
+ def default_availability_zone
112
+ data.default_availability_zone
113
+ end
115
114
 
116
- # The default subnet ID; applicable only if the stack is running in a
117
- # VPC.
118
- # @return [String]
119
- def default_subnet_id
120
- data.default_subnet_id
121
- end
115
+ # The default subnet ID; applicable only if the stack is running in a
116
+ # VPC.
117
+ # @return [String]
118
+ def default_subnet_id
119
+ data.default_subnet_id
120
+ end
122
121
 
123
- # A JSON object that contains user-defined attributes to be added to the
124
- # stack configuration and deployment attributes. You can use custom JSON
125
- # to override the corresponding default stack configuration attribute
126
- # values or to pass data to recipes. The string should be in the
127
- # following format:
128
- #
129
- # `"\{"key1": "value1", "key2": "value2",...\}"`
130
- #
131
- # For more information on custom JSON, see [Use Custom JSON to Modify
132
- # the Stack Configuration Attributes][1].
133
- #
134
- #
135
- #
136
- # [1]: http://docs.aws.amazon.com/opsworks/latest/userguide/workingstacks-json.html
137
- # @return [String]
138
- def custom_json
139
- data.custom_json
140
- end
122
+ # A JSON object that contains user-defined attributes to be added to the
123
+ # stack configuration and deployment attributes. You can use custom JSON
124
+ # to override the corresponding default stack configuration attribute
125
+ # values or to pass data to recipes. The string should be in the
126
+ # following format:
127
+ #
128
+ # `"\{"key1": "value1", "key2": "value2",...\}"`
129
+ #
130
+ # For more information on custom JSON, see [Use Custom JSON to Modify
131
+ # the Stack Configuration Attributes][1].
132
+ #
133
+ #
134
+ #
135
+ # [1]: http://docs.aws.amazon.com/opsworks/latest/userguide/workingstacks-json.html
136
+ # @return [String]
137
+ def custom_json
138
+ data.custom_json
139
+ end
141
140
 
142
- # The configuration manager.
143
- # @return [Types::StackConfigurationManager]
144
- def configuration_manager
145
- data.configuration_manager
146
- end
141
+ # The configuration manager.
142
+ # @return [Types::StackConfigurationManager]
143
+ def configuration_manager
144
+ data.configuration_manager
145
+ end
147
146
 
148
- # A `ChefConfiguration` object that specifies whether to enable
149
- # Berkshelf and the Berkshelf version. For more information, see [Create
150
- # a New Stack][1].
151
- #
152
- #
153
- #
154
- # [1]: http://docs.aws.amazon.com/opsworks/latest/userguide/workingstacks-creating.html
155
- # @return [Types::ChefConfiguration]
156
- def chef_configuration
157
- data.chef_configuration
158
- end
147
+ # A `ChefConfiguration` object that specifies whether to enable
148
+ # Berkshelf and the Berkshelf version. For more information, see [Create
149
+ # a New Stack][1].
150
+ #
151
+ #
152
+ #
153
+ # [1]: http://docs.aws.amazon.com/opsworks/latest/userguide/workingstacks-creating.html
154
+ # @return [Types::ChefConfiguration]
155
+ def chef_configuration
156
+ data.chef_configuration
157
+ end
159
158
 
160
- # Whether the stack uses custom cookbooks.
161
- # @return [Boolean]
162
- def use_custom_cookbooks
163
- data.use_custom_cookbooks
164
- end
159
+ # Whether the stack uses custom cookbooks.
160
+ # @return [Boolean]
161
+ def use_custom_cookbooks
162
+ data.use_custom_cookbooks
163
+ end
165
164
 
166
- # Whether the stack automatically associates the AWS OpsWorks built-in
167
- # security groups with the stack's layers.
168
- # @return [Boolean]
169
- def use_opsworks_security_groups
170
- data.use_opsworks_security_groups
171
- end
165
+ # Whether the stack automatically associates the AWS OpsWorks Stacks
166
+ # built-in security groups with the stack's layers.
167
+ # @return [Boolean]
168
+ def use_opsworks_security_groups
169
+ data.use_opsworks_security_groups
170
+ end
172
171
 
173
- # Contains the information required to retrieve an app or cookbook from
174
- # a repository. For more information, see [Creating Apps][1] or [Custom
175
- # Recipes and Cookbooks][2].
176
- #
177
- #
178
- #
179
- # [1]: http://docs.aws.amazon.com/opsworks/latest/userguide/workingapps-creating.html
180
- # [2]: http://docs.aws.amazon.com/opsworks/latest/userguide/workingcookbook.html
181
- # @return [Types::Source]
182
- def custom_cookbooks_source
183
- data.custom_cookbooks_source
184
- end
172
+ # Contains the information required to retrieve an app or cookbook from
173
+ # a repository. For more information, see [Creating Apps][1] or [Custom
174
+ # Recipes and Cookbooks][2].
175
+ #
176
+ #
177
+ #
178
+ # [1]: http://docs.aws.amazon.com/opsworks/latest/userguide/workingapps-creating.html
179
+ # [2]: http://docs.aws.amazon.com/opsworks/latest/userguide/workingcookbook.html
180
+ # @return [Types::Source]
181
+ def custom_cookbooks_source
182
+ data.custom_cookbooks_source
183
+ end
185
184
 
186
- # A default Amazon EC2 key pair for the stack's instances. You can
187
- # override this value when you create or update an instance.
188
- # @return [String]
189
- def default_ssh_key_name
190
- data.default_ssh_key_name
191
- end
185
+ # A default Amazon EC2 key pair for the stack's instances. You can
186
+ # override this value when you create or update an instance.
187
+ # @return [String]
188
+ def default_ssh_key_name
189
+ data.default_ssh_key_name
190
+ end
192
191
 
193
- # The date when the stack was created.
194
- # @return [String]
195
- def created_at
196
- data.created_at
197
- end
192
+ # The date when the stack was created.
193
+ # @return [String]
194
+ def created_at
195
+ data.created_at
196
+ end
198
197
 
199
- # The default root device type. This value is used by default for all
200
- # instances in the stack, but you can override it when you create an
201
- # instance. For more information, see [Storage for the Root Device][1].
202
- #
203
- #
204
- #
205
- # [1]: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ComponentsAMIs.html#storage-for-the-root-device
206
- # @return [String]
207
- def default_root_device_type
208
- data.default_root_device_type
209
- end
198
+ # The default root device type. This value is used by default for all
199
+ # instances in the stack, but you can override it when you create an
200
+ # instance. For more information, see [Storage for the Root Device][1].
201
+ #
202
+ #
203
+ #
204
+ # [1]: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ComponentsAMIs.html#storage-for-the-root-device
205
+ # @return [String]
206
+ def default_root_device_type
207
+ data.default_root_device_type
208
+ end
210
209
 
211
- # The agent version. This parameter is set to `LATEST` for auto-update.
212
- # or a version number for a fixed agent version.
213
- # @return [String]
214
- def agent_version
215
- data.agent_version
216
- end
210
+ # The agent version. This parameter is set to `LATEST` for auto-update.
211
+ # or a version number for a fixed agent version.
212
+ # @return [String]
213
+ def agent_version
214
+ data.agent_version
215
+ end
217
216
 
218
- # @!endgroup
217
+ # @!endgroup
219
218
 
220
- # @return [Client]
221
- def client
222
- @client
223
- end
219
+ # @return [Client]
220
+ def client
221
+ @client
222
+ end
224
223
 
225
- # Loads, or reloads {#data} for the current {Stack}.
226
- # Returns `self` making it possible to chain methods.
227
- #
228
- # stack.reload.data
229
- #
230
- # @return [self]
231
- def load
232
- resp = @client.describe_stacks(stack_ids: [@id])
233
- @data = resp.stacks[0]
234
- self
235
- end
236
- alias :reload :load
237
-
238
- # @return [Types::Stack]
239
- # Returns the data for this {Stack}. Calls
240
- # {Client#describe_stacks} if {#data_loaded?} is `false`.
241
- def data
242
- load unless @data
243
- @data
244
- end
224
+ # Loads, or reloads {#data} for the current {Stack}.
225
+ # Returns `self` making it possible to chain methods.
226
+ #
227
+ # stack.reload.data
228
+ #
229
+ # @return [self]
230
+ def load
231
+ resp = @client.describe_stacks(stack_ids: [@id])
232
+ @data = resp.stacks[0]
233
+ self
234
+ end
235
+ alias :reload :load
236
+
237
+ # @return [Types::Stack]
238
+ # Returns the data for this {Stack}. Calls
239
+ # {Client#describe_stacks} if {#data_loaded?} is `false`.
240
+ def data
241
+ load unless @data
242
+ @data
243
+ end
245
244
 
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
245
+ # @return [Boolean]
246
+ # Returns `true` if this resource is loaded. Accessing attributes or
247
+ # {#data} on an unloaded resource will trigger a call to {#load}.
248
+ def data_loaded?
249
+ !!@data
250
+ end
252
251
 
253
- # @!group Actions
254
-
255
- # @example Request syntax with placeholder values
256
- #
257
- # layer = stack.create_layer({
258
- # type: "aws-flow-ruby", # required, accepts aws-flow-ruby, ecs-cluster, java-app, lb, web, php-app, rails-app, nodejs-app, memcached, db-master, monitoring-master, custom
259
- # name: "String", # required
260
- # shortname: "String", # required
261
- # attributes: {
262
- # "EcsClusterArn" => "String",
263
- # },
264
- # custom_instance_profile_arn: "String",
265
- # custom_json: "String",
266
- # custom_security_group_ids: ["String"],
267
- # packages: ["String"],
268
- # volume_configurations: [
269
- # {
270
- # mount_point: "String", # required
271
- # raid_level: 1,
272
- # number_of_disks: 1, # required
273
- # size: 1, # required
274
- # volume_type: "String",
275
- # iops: 1,
276
- # },
277
- # ],
278
- # enable_auto_healing: false,
279
- # auto_assign_elastic_ips: false,
280
- # auto_assign_public_ips: false,
281
- # custom_recipes: {
282
- # setup: ["String"],
283
- # configure: ["String"],
284
- # deploy: ["String"],
285
- # undeploy: ["String"],
286
- # shutdown: ["String"],
287
- # },
288
- # install_updates_on_boot: false,
289
- # use_ebs_optimized_instances: false,
290
- # lifecycle_event_configuration: {
291
- # shutdown: {
292
- # execution_timeout: 1,
293
- # delay_until_elb_connections_drained: false,
294
- # },
295
- # },
296
- # })
297
- # @param [Hash] options ({})
298
- # @option options [required, String] :type
299
- # The layer type. A stack cannot have more than one built-in layer of
300
- # the same type. It can have any number of custom layers. Built-in
301
- # layers are not available in Chef 12 stacks.
302
- # @option options [required, String] :name
303
- # The layer name, which is used by the console.
304
- # @option options [required, String] :shortname
305
- # For custom layers only, use this parameter to specify the layer's
306
- # short name, which is used internally by AWS OpsWorks and by Chef
307
- # recipes. The short name is also used as the name for the directory
308
- # where your app files are installed. It can have a maximum of 200
309
- # characters, which are limited to the alphanumeric characters, '-',
310
- # '\_', and '.'.
311
- #
312
- # The built-in layers' short names are defined by AWS OpsWorks. For
313
- # more information, see the [Layer Reference][1].
314
- #
315
- #
316
- #
317
- # [1]: http://docs.aws.amazon.com/opsworks/latest/userguide/layers.html
318
- # @option options [Hash<String,String>] :attributes
319
- # One or more user-defined key-value pairs to be added to the stack
320
- # attributes.
321
- #
322
- # To create a cluster layer, set the `EcsClusterArn` attribute to the
323
- # cluster's ARN.
324
- # @option options [String] :custom_instance_profile_arn
325
- # The ARN of an IAM profile to be used for the layer's EC2 instances.
326
- # For more information about IAM ARNs, see [Using Identifiers][1].
327
- #
328
- #
329
- #
330
- # [1]: http://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html
331
- # @option options [String] :custom_json
332
- # A JSON-formatted string containing custom stack configuration and
333
- # deployment attributes to be installed on the layer's instances. For
334
- # more information, see [ Using Custom JSON][1]. This feature is
335
- # supported as of version 1.7.42 of the AWS CLI.
336
- #
337
- #
338
- #
339
- # [1]: http://docs.aws.amazon.com/opsworks/latest/userguide/workingcookbook-json-override.html
340
- # @option options [Array<String>] :custom_security_group_ids
341
- # An array containing the layer custom security group IDs.
342
- # @option options [Array<String>] :packages
343
- # An array of `Package` objects that describes the layer packages.
344
- # @option options [Array<Types::VolumeConfiguration>] :volume_configurations
345
- # A `VolumeConfigurations` object that describes the layer's Amazon EBS
346
- # volumes.
347
- # @option options [Boolean] :enable_auto_healing
348
- # Whether to disable auto healing for the layer.
349
- # @option options [Boolean] :auto_assign_elastic_ips
350
- # Whether to automatically assign an [Elastic IP address][1] to the
351
- # layer's instances. For more information, see [How to Edit a
352
- # Layer][2].
353
- #
354
- #
355
- #
356
- # [1]: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html
357
- # [2]: http://docs.aws.amazon.com/opsworks/latest/userguide/workinglayers-basics-edit.html
358
- # @option options [Boolean] :auto_assign_public_ips
359
- # For stacks that are running in a VPC, whether to automatically assign
360
- # a public IP address to the layer's instances. For more information,
361
- # see [How to Edit a Layer][1].
362
- #
363
- #
364
- #
365
- # [1]: http://docs.aws.amazon.com/opsworks/latest/userguide/workinglayers-basics-edit.html
366
- # @option options [Types::Recipes] :custom_recipes
367
- # A `LayerCustomRecipes` object that specifies the layer custom recipes.
368
- # @option options [Boolean] :install_updates_on_boot
369
- # Whether to install operating system and package updates when the
370
- # instance boots. The default value is `true`. To control when updates
371
- # are installed, set this value to `false`. You must then update your
372
- # instances manually by using CreateDeployment to run the
373
- # `update_dependencies` stack command or by manually running `yum`
374
- # (Amazon Linux) or `apt-get` (Ubuntu) on the instances.
375
- #
376
- # <note markdown="1"> To ensure that your instances have the latest security updates, we
377
- # strongly recommend using the default value of `true`.
378
- #
379
- # </note>
380
- # @option options [Boolean] :use_ebs_optimized_instances
381
- # Whether to use Amazon EBS-optimized instances.
382
- # @option options [Types::LifecycleEventConfiguration] :lifecycle_event_configuration
383
- # A `LifeCycleEventConfiguration` object that you can use to configure
384
- # the Shutdown event to specify an execution timeout and enable or
385
- # disable Elastic Load Balancer connection draining.
386
- # @return [Layer]
387
- def create_layer(options = {})
388
- options = options.merge(stack_id: @id)
389
- resp = @client.create_layer(options)
390
- Layer.new(
391
- id: resp.data.layer_id,
392
- client: @client
393
- )
394
- end
252
+ # @!group Actions
253
+
254
+ # @example Request syntax with placeholder values
255
+ #
256
+ # layer = stack.create_layer({
257
+ # type: "aws-flow-ruby", # required, accepts aws-flow-ruby, ecs-cluster, java-app, lb, web, php-app, rails-app, nodejs-app, memcached, db-master, monitoring-master, custom
258
+ # name: "String", # required
259
+ # shortname: "String", # required
260
+ # attributes: {
261
+ # "EcsClusterArn" => "String",
262
+ # },
263
+ # cloud_watch_logs_configuration: {
264
+ # enabled: false,
265
+ # log_streams: [
266
+ # {
267
+ # log_group_name: "String",
268
+ # datetime_format: "String",
269
+ # time_zone: "LOCAL", # accepts LOCAL, UTC
270
+ # file: "String",
271
+ # file_fingerprint_lines: "String",
272
+ # multi_line_start_pattern: "String",
273
+ # initial_position: "start_of_file", # accepts start_of_file, end_of_file
274
+ # encoding: "ascii", # accepts ascii, big5, big5hkscs, cp037, cp424, cp437, cp500, cp720, cp737, cp775, cp850, cp852, cp855, cp856, cp857, cp858, cp860, cp861, cp862, cp863, cp864, cp865, cp866, cp869, cp874, cp875, cp932, cp949, cp950, cp1006, cp1026, cp1140, cp1250, cp1251, cp1252, cp1253, cp1254, cp1255, cp1256, cp1257, cp1258, euc_jp, euc_jis_2004, euc_jisx0213, euc_kr, gb2312, gbk, gb18030, hz, iso2022_jp, iso2022_jp_1, iso2022_jp_2, iso2022_jp_2004, iso2022_jp_3, iso2022_jp_ext, iso2022_kr, latin_1, iso8859_2, iso8859_3, iso8859_4, iso8859_5, iso8859_6, iso8859_7, iso8859_8, iso8859_9, iso8859_10, iso8859_13, iso8859_14, iso8859_15, iso8859_16, johab, koi8_r, koi8_u, mac_cyrillic, mac_greek, mac_iceland, mac_latin2, mac_roman, mac_turkish, ptcp154, shift_jis, shift_jis_2004, shift_jisx0213, utf_32, utf_32_be, utf_32_le, utf_16, utf_16_be, utf_16_le, utf_7, utf_8, utf_8_sig
275
+ # buffer_duration: 1,
276
+ # batch_count: 1,
277
+ # batch_size: 1,
278
+ # },
279
+ # ],
280
+ # },
281
+ # custom_instance_profile_arn: "String",
282
+ # custom_json: "String",
283
+ # custom_security_group_ids: ["String"],
284
+ # packages: ["String"],
285
+ # volume_configurations: [
286
+ # {
287
+ # mount_point: "String", # required
288
+ # raid_level: 1,
289
+ # number_of_disks: 1, # required
290
+ # size: 1, # required
291
+ # volume_type: "String",
292
+ # iops: 1,
293
+ # },
294
+ # ],
295
+ # enable_auto_healing: false,
296
+ # auto_assign_elastic_ips: false,
297
+ # auto_assign_public_ips: false,
298
+ # custom_recipes: {
299
+ # setup: ["String"],
300
+ # configure: ["String"],
301
+ # deploy: ["String"],
302
+ # undeploy: ["String"],
303
+ # shutdown: ["String"],
304
+ # },
305
+ # install_updates_on_boot: false,
306
+ # use_ebs_optimized_instances: false,
307
+ # lifecycle_event_configuration: {
308
+ # shutdown: {
309
+ # execution_timeout: 1,
310
+ # delay_until_elb_connections_drained: false,
311
+ # },
312
+ # },
313
+ # })
314
+ # @param [Hash] options ({})
315
+ # @option options [required, String] :type
316
+ # The layer type. A stack cannot have more than one built-in layer of
317
+ # the same type. It can have any number of custom layers. Built-in
318
+ # layers are not available in Chef 12 stacks.
319
+ # @option options [required, String] :name
320
+ # The layer name, which is used by the console.
321
+ # @option options [required, String] :shortname
322
+ # For custom layers only, use this parameter to specify the layer's
323
+ # short name, which is used internally by AWS OpsWorks Stacks and by
324
+ # Chef recipes. The short name is also used as the name for the
325
+ # directory where your app files are installed. It can have a maximum of
326
+ # 200 characters, which are limited to the alphanumeric characters,
327
+ # '-', '\_', and '.'.
328
+ #
329
+ # The built-in layers' short names are defined by AWS OpsWorks Stacks.
330
+ # For more information, see the [Layer Reference][1].
331
+ #
332
+ #
333
+ #
334
+ # [1]: http://docs.aws.amazon.com/opsworks/latest/userguide/layers.html
335
+ # @option options [Hash<String,String>] :attributes
336
+ # One or more user-defined key-value pairs to be added to the stack
337
+ # attributes.
338
+ #
339
+ # To create a cluster layer, set the `EcsClusterArn` attribute to the
340
+ # cluster's ARN.
341
+ # @option options [Types::CloudWatchLogsConfiguration] :cloud_watch_logs_configuration
342
+ # Specifies CloudWatch Logs configuration options for the layer. For
343
+ # more information, see CloudWatchLogsLogStream.
344
+ # @option options [String] :custom_instance_profile_arn
345
+ # The ARN of an IAM profile to be used for the layer's EC2 instances.
346
+ # For more information about IAM ARNs, see [Using Identifiers][1].
347
+ #
348
+ #
349
+ #
350
+ # [1]: http://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html
351
+ # @option options [String] :custom_json
352
+ # A JSON-formatted string containing custom stack configuration and
353
+ # deployment attributes to be installed on the layer's instances. For
354
+ # more information, see [ Using Custom JSON][1]. This feature is
355
+ # supported as of version 1.7.42 of the AWS CLI.
356
+ #
357
+ #
358
+ #
359
+ # [1]: http://docs.aws.amazon.com/opsworks/latest/userguide/workingcookbook-json-override.html
360
+ # @option options [Array<String>] :custom_security_group_ids
361
+ # An array containing the layer custom security group IDs.
362
+ # @option options [Array<String>] :packages
363
+ # An array of `Package` objects that describes the layer packages.
364
+ # @option options [Array<Types::VolumeConfiguration>] :volume_configurations
365
+ # A `VolumeConfigurations` object that describes the layer's Amazon EBS
366
+ # volumes.
367
+ # @option options [Boolean] :enable_auto_healing
368
+ # Whether to disable auto healing for the layer.
369
+ # @option options [Boolean] :auto_assign_elastic_ips
370
+ # Whether to automatically assign an [Elastic IP address][1] to the
371
+ # layer's instances. For more information, see [How to Edit a
372
+ # Layer][2].
373
+ #
374
+ #
375
+ #
376
+ # [1]: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html
377
+ # [2]: http://docs.aws.amazon.com/opsworks/latest/userguide/workinglayers-basics-edit.html
378
+ # @option options [Boolean] :auto_assign_public_ips
379
+ # For stacks that are running in a VPC, whether to automatically assign
380
+ # a public IP address to the layer's instances. For more information,
381
+ # see [How to Edit a Layer][1].
382
+ #
383
+ #
384
+ #
385
+ # [1]: http://docs.aws.amazon.com/opsworks/latest/userguide/workinglayers-basics-edit.html
386
+ # @option options [Types::Recipes] :custom_recipes
387
+ # A `LayerCustomRecipes` object that specifies the layer custom recipes.
388
+ # @option options [Boolean] :install_updates_on_boot
389
+ # Whether to install operating system and package updates when the
390
+ # instance boots. The default value is `true`. To control when updates
391
+ # are installed, set this value to `false`. You must then update your
392
+ # instances manually by using CreateDeployment to run the
393
+ # `update_dependencies` stack command or by manually running `yum`
394
+ # (Amazon Linux) or `apt-get` (Ubuntu) on the instances.
395
+ #
396
+ # <note markdown="1"> To ensure that your instances have the latest security updates, we
397
+ # strongly recommend using the default value of `true`.
398
+ #
399
+ # </note>
400
+ # @option options [Boolean] :use_ebs_optimized_instances
401
+ # Whether to use Amazon EBS-optimized instances.
402
+ # @option options [Types::LifecycleEventConfiguration] :lifecycle_event_configuration
403
+ # A `LifeCycleEventConfiguration` object that you can use to configure
404
+ # the Shutdown event to specify an execution timeout and enable or
405
+ # disable Elastic Load Balancer connection draining.
406
+ # @return [Layer]
407
+ def create_layer(options = {})
408
+ options = options.merge(stack_id: @id)
409
+ resp = @client.create_layer(options)
410
+ Layer.new(
411
+ id: resp.data.layer_id,
412
+ client: @client
413
+ )
414
+ end
395
415
 
396
- # @example Request syntax with placeholder values
397
- #
398
- # stack.delete()
399
- # @param [Hash] options ({})
400
- # @return [EmptyStructure]
401
- def delete(options = {})
402
- options = options.merge(stack_id: @id)
403
- resp = @client.delete_stack(options)
404
- resp.data
405
- end
416
+ # @example Request syntax with placeholder values
417
+ #
418
+ # stack.delete()
419
+ # @param [Hash] options ({})
420
+ # @return [EmptyStructure]
421
+ def delete(options = {})
422
+ options = options.merge(stack_id: @id)
423
+ resp = @client.delete_stack(options)
424
+ resp.data
425
+ end
406
426
 
407
- # @!group Associations
408
-
409
- # @example Request syntax with placeholder values
410
- #
411
- # layers = stack.layers({
412
- # layer_ids: ["String"],
413
- # })
414
- # @param [Hash] options ({})
415
- # @option options [Array<String>] :layer_ids
416
- # An array of layer IDs that specify the layers to be described. If you
417
- # omit this parameter, `DescribeLayers` returns a description of every
418
- # layer in the specified stack.
419
- # @return [Layer::Collection]
420
- def layers(options = {})
421
- batches = Enumerator.new do |y|
422
- batch = []
423
- options = options.merge(stack_id: @id)
424
- resp = @client.describe_layers(options)
425
- resp.data.layers.each do |l|
426
- batch << Layer.new(
427
- id: l.layer_id,
428
- data: l,
429
- client: @client
430
- )
431
- end
432
- y.yield(batch)
427
+ # @!group Associations
428
+
429
+ # @example Request syntax with placeholder values
430
+ #
431
+ # layers = stack.layers({
432
+ # layer_ids: ["String"],
433
+ # })
434
+ # @param [Hash] options ({})
435
+ # @option options [Array<String>] :layer_ids
436
+ # An array of layer IDs that specify the layers to be described. If you
437
+ # omit this parameter, `DescribeLayers` returns a description of every
438
+ # layer in the specified stack.
439
+ # @return [Layer::Collection]
440
+ def layers(options = {})
441
+ batches = Enumerator.new do |y|
442
+ batch = []
443
+ options = options.merge(stack_id: @id)
444
+ resp = @client.describe_layers(options)
445
+ resp.data.layers.each do |l|
446
+ batch << Layer.new(
447
+ id: l.layer_id,
448
+ data: l,
449
+ client: @client
450
+ )
433
451
  end
434
- Layer::Collection.new(batches)
452
+ y.yield(batch)
435
453
  end
454
+ Layer::Collection.new(batches)
455
+ end
436
456
 
437
- # @return [StackSummary]
438
- def summary
439
- StackSummary.new(
440
- stack_id: @id,
441
- client: @client
442
- )
443
- end
457
+ # @return [StackSummary]
458
+ def summary
459
+ StackSummary.new(
460
+ stack_id: @id,
461
+ client: @client
462
+ )
463
+ end
444
464
 
445
- # @deprecated
446
- # @api private
447
- def identifiers
448
- { id: @id }
449
- end
450
- deprecated(:identifiers)
451
-
452
- private
453
-
454
- def extract_id(args, options)
455
- value = args[0] || options.delete(:id)
456
- case value
457
- when String then value
458
- when nil then raise ArgumentError, "missing required option :id"
459
- else
460
- msg = "expected :id to be a String, got #{value.class}"
461
- raise ArgumentError, msg
462
- end
463
- end
465
+ # @deprecated
466
+ # @api private
467
+ def identifiers
468
+ { id: @id }
469
+ end
470
+ deprecated(:identifiers)
471
+
472
+ private
464
473
 
465
- class Collection < Aws::Resources::Collection; end
474
+ def extract_id(args, options)
475
+ value = args[0] || options.delete(:id)
476
+ case value
477
+ when String then value
478
+ when nil then raise ArgumentError, "missing required option :id"
479
+ else
480
+ msg = "expected :id to be a String, got #{value.class}"
481
+ raise ArgumentError, msg
482
+ end
466
483
  end
484
+
485
+ class Collection < Aws::Resources::Collection; end
467
486
  end
468
487
  end