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.
- checksums.yaml +4 -4
- data/lib/aws-sdk-opsworks.rb +2 -2
- data/lib/aws-sdk-opsworks/client.rb +5271 -4518
- data/lib/aws-sdk-opsworks/client_api.rb +1863 -1837
- data/lib/aws-sdk-opsworks/errors.rb +4 -13
- data/lib/aws-sdk-opsworks/layer.rb +261 -257
- data/lib/aws-sdk-opsworks/resource.rb +358 -358
- data/lib/aws-sdk-opsworks/stack.rb +442 -423
- data/lib/aws-sdk-opsworks/stack_summary.rb +107 -109
- data/lib/aws-sdk-opsworks/types.rb +7004 -6194
- data/lib/aws-sdk-opsworks/waiters.rb +425 -426
- metadata +2 -2
@@ -1,468 +1,487 @@
|
|
1
1
|
# WARNING ABOUT GENERATED CODE
|
2
2
|
#
|
3
|
-
# This file is generated. See the contributing for
|
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
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
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
|
-
|
26
|
+
# @!group Read-Only Attributes
|
28
27
|
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
28
|
+
# @return [String]
|
29
|
+
def id
|
30
|
+
@id
|
31
|
+
end
|
33
32
|
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
33
|
+
# The stack ID.
|
34
|
+
# @return [String]
|
35
|
+
def stack_id
|
36
|
+
data.stack_id
|
37
|
+
end
|
39
38
|
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
39
|
+
# The stack name.
|
40
|
+
# @return [String]
|
41
|
+
def name
|
42
|
+
data.name
|
43
|
+
end
|
45
44
|
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
45
|
+
# The stack's ARN.
|
46
|
+
# @return [String]
|
47
|
+
def arn
|
48
|
+
data.arn
|
49
|
+
end
|
51
50
|
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
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
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
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
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
68
|
+
# The stack's attributes.
|
69
|
+
# @return [Hash<String,String>]
|
70
|
+
def attributes
|
71
|
+
data.attributes
|
72
|
+
end
|
74
73
|
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
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
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
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
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
92
|
+
# The stack's default operating system.
|
93
|
+
# @return [String]
|
94
|
+
def default_os
|
95
|
+
data.default_os
|
96
|
+
end
|
98
97
|
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
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
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
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
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
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
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
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
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
141
|
+
# The configuration manager.
|
142
|
+
# @return [Types::StackConfigurationManager]
|
143
|
+
def configuration_manager
|
144
|
+
data.configuration_manager
|
145
|
+
end
|
147
146
|
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
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
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
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
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
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
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
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
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
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
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
192
|
+
# The date when the stack was created.
|
193
|
+
# @return [String]
|
194
|
+
def created_at
|
195
|
+
data.created_at
|
196
|
+
end
|
198
197
|
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
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
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
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
|
-
|
217
|
+
# @!endgroup
|
219
218
|
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
219
|
+
# @return [Client]
|
220
|
+
def client
|
221
|
+
@client
|
222
|
+
end
|
224
223
|
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
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
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
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
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
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
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
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
|
-
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
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
|
-
|
452
|
+
y.yield(batch)
|
435
453
|
end
|
454
|
+
Layer::Collection.new(batches)
|
455
|
+
end
|
436
456
|
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
457
|
+
# @return [StackSummary]
|
458
|
+
def summary
|
459
|
+
StackSummary.new(
|
460
|
+
stack_id: @id,
|
461
|
+
client: @client
|
462
|
+
)
|
463
|
+
end
|
444
464
|
|
445
|
-
|
446
|
-
|
447
|
-
|
448
|
-
|
449
|
-
|
450
|
-
|
451
|
-
|
452
|
-
|
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
|
-
|
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
|