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,23 +1,14 @@
|
|
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
|
-
module
|
10
|
-
module Errors
|
8
|
+
module Aws::OpsWorks
|
9
|
+
module Errors
|
11
10
|
|
12
|
-
|
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
|
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 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
|
-
|
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 layer stack ID.
|
34
|
+
# @return [String]
|
35
|
+
def stack_id
|
36
|
+
data.stack_id
|
37
|
+
end
|
39
38
|
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
39
|
+
# The layer ID.
|
40
|
+
# @return [String]
|
41
|
+
def layer_id
|
42
|
+
data.layer_id
|
43
|
+
end
|
45
44
|
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
45
|
+
# The layer type.
|
46
|
+
# @return [String]
|
47
|
+
def type
|
48
|
+
data.type
|
49
|
+
end
|
51
50
|
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
51
|
+
# The layer name.
|
52
|
+
# @return [String]
|
53
|
+
def name
|
54
|
+
data.name
|
55
|
+
end
|
57
56
|
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
57
|
+
# The layer short name.
|
58
|
+
# @return [String]
|
59
|
+
def shortname
|
60
|
+
data.shortname
|
61
|
+
end
|
63
62
|
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
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
|
-
|
78
|
-
|
79
|
-
|
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
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
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
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
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
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
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
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
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
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
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
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
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
|
-
|
128
|
-
|
129
|
-
|
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
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
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
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
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
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
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
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
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
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
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
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
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
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
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
|
-
|
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
|
-
|
216
|
-
def client
|
217
|
-
@client
|
218
|
-
end
|
218
|
+
# @!endgroup
|
219
219
|
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
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
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
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
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
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
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
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
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
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
|
-
|
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
|