aws-sdk-cloudformation 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-cloudformation.rb +2 -2
- data/lib/aws-sdk-cloudformation/client.rb +2202 -1943
- data/lib/aws-sdk-cloudformation/client_api.rb +882 -874
- data/lib/aws-sdk-cloudformation/errors.rb +4 -13
- data/lib/aws-sdk-cloudformation/event.rb +120 -122
- data/lib/aws-sdk-cloudformation/resource.rb +249 -251
- data/lib/aws-sdk-cloudformation/stack.rb +654 -656
- data/lib/aws-sdk-cloudformation/stack_resource.rb +156 -158
- data/lib/aws-sdk-cloudformation/stack_resource_summary.rb +128 -130
- data/lib/aws-sdk-cloudformation/types.rb +2961 -2674
- data/lib/aws-sdk-cloudformation/waiters.rb +281 -232
- metadata +2 -2
@@ -1,188 +1,186 @@
|
|
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
|
-
|
26
|
-
|
27
|
-
|
28
|
-
end
|
8
|
+
module Aws::CloudFormation
|
9
|
+
class StackResource
|
10
|
+
|
11
|
+
extend Aws::Deprecations
|
12
|
+
|
13
|
+
# @overload def initialize(stack_name, logical_id, options = {})
|
14
|
+
# @param [String] stack_name
|
15
|
+
# @param [String] logical_id
|
16
|
+
# @option options [Client] :client
|
17
|
+
# @overload def initialize(options = {})
|
18
|
+
# @option options [required, String] :stack_name
|
19
|
+
# @option options [required, String] :logical_id
|
20
|
+
# @option options [Client] :client
|
21
|
+
def initialize(*args)
|
22
|
+
options = Hash === args.last ? args.pop.dup : {}
|
23
|
+
@stack_name = extract_stack_name(args, options)
|
24
|
+
@logical_id = extract_logical_id(args, options)
|
25
|
+
@data = options.delete(:data)
|
26
|
+
@client = options.delete(:client) || Client.new(options)
|
27
|
+
end
|
29
28
|
|
30
|
-
|
29
|
+
# @!group Read-Only Attributes
|
31
30
|
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
31
|
+
# @return [String]
|
32
|
+
def stack_name
|
33
|
+
@stack_name
|
34
|
+
end
|
36
35
|
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
36
|
+
# @return [String]
|
37
|
+
def logical_id
|
38
|
+
@logical_id
|
39
|
+
end
|
40
|
+
alias :logical_resource_id :logical_id
|
42
41
|
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
42
|
+
# Unique identifier of the stack.
|
43
|
+
# @return [String]
|
44
|
+
def stack_id
|
45
|
+
data.stack_id
|
46
|
+
end
|
48
47
|
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
48
|
+
# The name or unique identifier that corresponds to a physical instance
|
49
|
+
# ID of a resource supported by AWS CloudFormation.
|
50
|
+
# @return [String]
|
51
|
+
def physical_resource_id
|
52
|
+
data.physical_resource_id
|
53
|
+
end
|
55
54
|
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
55
|
+
# Type of resource. ((For more information, go to [ AWS Resource Types
|
56
|
+
# Reference][1] in the AWS CloudFormation User Guide.)
|
57
|
+
#
|
58
|
+
#
|
59
|
+
#
|
60
|
+
# [1]: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html
|
61
|
+
# @return [String]
|
62
|
+
def resource_type
|
63
|
+
data.resource_type
|
64
|
+
end
|
66
65
|
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
66
|
+
# Time the status was updated.
|
67
|
+
# @return [Time]
|
68
|
+
def last_updated_timestamp
|
69
|
+
data.last_updated_timestamp
|
70
|
+
end
|
72
71
|
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
72
|
+
# Current status of the resource.
|
73
|
+
# @return [String]
|
74
|
+
def resource_status
|
75
|
+
data.resource_status
|
76
|
+
end
|
78
77
|
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
78
|
+
# Success/failure message associated with the resource.
|
79
|
+
# @return [String]
|
80
|
+
def resource_status_reason
|
81
|
+
data.resource_status_reason
|
82
|
+
end
|
84
83
|
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
84
|
+
# User defined description associated with the resource.
|
85
|
+
# @return [String]
|
86
|
+
def description
|
87
|
+
data.description
|
88
|
+
end
|
90
89
|
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
90
|
+
# The content of the `Metadata` attribute declared for the resource. For
|
91
|
+
# more information, see [Metadata Attribute][1] in the AWS
|
92
|
+
# CloudFormation User Guide.
|
93
|
+
#
|
94
|
+
#
|
95
|
+
#
|
96
|
+
# [1]: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-metadata.html
|
97
|
+
# @return [String]
|
98
|
+
def metadata
|
99
|
+
data.metadata
|
100
|
+
end
|
102
101
|
|
103
|
-
|
102
|
+
# @!endgroup
|
104
103
|
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
104
|
+
# @return [Client]
|
105
|
+
def client
|
106
|
+
@client
|
107
|
+
end
|
109
108
|
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
109
|
+
# Loads, or reloads {#data} for the current {StackResource}.
|
110
|
+
# Returns `self` making it possible to chain methods.
|
111
|
+
#
|
112
|
+
# stack_resource.reload.data
|
113
|
+
#
|
114
|
+
# @return [self]
|
115
|
+
def load
|
116
|
+
resp = @client.describe_stack_resource(
|
117
|
+
logical_resource_id: @logical_id,
|
118
|
+
stack_name: @stack_name
|
119
|
+
)
|
120
|
+
@data = resp.stackresourcedetail
|
121
|
+
self
|
122
|
+
end
|
123
|
+
alias :reload :load
|
124
|
+
|
125
|
+
# @return [Types::StackResourceDetail]
|
126
|
+
# Returns the data for this {StackResource}. Calls
|
127
|
+
# {Client#describe_stack_resource} if {#data_loaded?} is `false`.
|
128
|
+
def data
|
129
|
+
load unless @data
|
130
|
+
@data
|
131
|
+
end
|
133
132
|
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
133
|
+
# @return [Boolean]
|
134
|
+
# Returns `true` if this resource is loaded. Accessing attributes or
|
135
|
+
# {#data} on an unloaded resource will trigger a call to {#load}.
|
136
|
+
def data_loaded?
|
137
|
+
!!@data
|
138
|
+
end
|
140
139
|
|
141
|
-
|
140
|
+
# @!group Associations
|
142
141
|
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
142
|
+
# @return [Stack]
|
143
|
+
def stack
|
144
|
+
Stack.new(
|
145
|
+
name: @stack_name,
|
146
|
+
client: @client
|
147
|
+
)
|
148
|
+
end
|
150
149
|
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
private
|
162
|
-
|
163
|
-
def extract_stack_name(args, options)
|
164
|
-
value = args[0] || options.delete(:stack_name)
|
165
|
-
case value
|
166
|
-
when String then value
|
167
|
-
when nil then raise ArgumentError, "missing required option :stack_name"
|
168
|
-
else
|
169
|
-
msg = "expected :stack_name to be a String, got #{value.class}"
|
170
|
-
raise ArgumentError, msg
|
171
|
-
end
|
172
|
-
end
|
150
|
+
# @deprecated
|
151
|
+
# @api private
|
152
|
+
def identifiers
|
153
|
+
{
|
154
|
+
stack_name: @stack_name,
|
155
|
+
logical_id: @logical_id
|
156
|
+
}
|
157
|
+
end
|
158
|
+
deprecated(:identifiers)
|
173
159
|
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
160
|
+
private
|
161
|
+
|
162
|
+
def extract_stack_name(args, options)
|
163
|
+
value = args[0] || options.delete(:stack_name)
|
164
|
+
case value
|
165
|
+
when String then value
|
166
|
+
when nil then raise ArgumentError, "missing required option :stack_name"
|
167
|
+
else
|
168
|
+
msg = "expected :stack_name to be a String, got #{value.class}"
|
169
|
+
raise ArgumentError, msg
|
183
170
|
end
|
171
|
+
end
|
184
172
|
|
185
|
-
|
173
|
+
def extract_logical_id(args, options)
|
174
|
+
value = args[1] || options.delete(:logical_id)
|
175
|
+
case value
|
176
|
+
when String then value
|
177
|
+
when nil then raise ArgumentError, "missing required option :logical_id"
|
178
|
+
else
|
179
|
+
msg = "expected :logical_id to be a String, got #{value.class}"
|
180
|
+
raise ArgumentError, msg
|
181
|
+
end
|
186
182
|
end
|
183
|
+
|
184
|
+
class Collection < Aws::Resources::Collection; end
|
187
185
|
end
|
188
186
|
end
|
@@ -1,157 +1,155 @@
|
|
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
|
-
|
26
|
-
|
27
|
-
|
28
|
-
end
|
8
|
+
module Aws::CloudFormation
|
9
|
+
class StackResourceSummary
|
10
|
+
|
11
|
+
extend Aws::Deprecations
|
12
|
+
|
13
|
+
# @overload def initialize(stack_name, logical_id, options = {})
|
14
|
+
# @param [String] stack_name
|
15
|
+
# @param [String] logical_id
|
16
|
+
# @option options [Client] :client
|
17
|
+
# @overload def initialize(options = {})
|
18
|
+
# @option options [required, String] :stack_name
|
19
|
+
# @option options [required, String] :logical_id
|
20
|
+
# @option options [Client] :client
|
21
|
+
def initialize(*args)
|
22
|
+
options = Hash === args.last ? args.pop.dup : {}
|
23
|
+
@stack_name = extract_stack_name(args, options)
|
24
|
+
@logical_id = extract_logical_id(args, options)
|
25
|
+
@data = options.delete(:data)
|
26
|
+
@client = options.delete(:client) || Client.new(options)
|
27
|
+
end
|
29
28
|
|
30
|
-
|
29
|
+
# @!group Read-Only Attributes
|
31
30
|
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
31
|
+
# @return [String]
|
32
|
+
def stack_name
|
33
|
+
@stack_name
|
34
|
+
end
|
36
35
|
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
36
|
+
# @return [String]
|
37
|
+
def logical_id
|
38
|
+
@logical_id
|
39
|
+
end
|
40
|
+
alias :logical_resource_id :logical_id
|
42
41
|
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
42
|
+
# The name or unique identifier that corresponds to a physical instance
|
43
|
+
# ID of the resource.
|
44
|
+
# @return [String]
|
45
|
+
def physical_resource_id
|
46
|
+
data.physical_resource_id
|
47
|
+
end
|
49
48
|
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
49
|
+
# Type of resource. (For more information, go to [ AWS Resource Types
|
50
|
+
# Reference][1] in the AWS CloudFormation User Guide.)
|
51
|
+
#
|
52
|
+
#
|
53
|
+
#
|
54
|
+
# [1]: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html
|
55
|
+
# @return [String]
|
56
|
+
def resource_type
|
57
|
+
data.resource_type
|
58
|
+
end
|
60
59
|
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
60
|
+
# Time the status was updated.
|
61
|
+
# @return [Time]
|
62
|
+
def last_updated_timestamp
|
63
|
+
data.last_updated_timestamp
|
64
|
+
end
|
66
65
|
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
66
|
+
# Current status of the resource.
|
67
|
+
# @return [String]
|
68
|
+
def resource_status
|
69
|
+
data.resource_status
|
70
|
+
end
|
72
71
|
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
72
|
+
# Success/failure message associated with the resource.
|
73
|
+
# @return [String]
|
74
|
+
def resource_status_reason
|
75
|
+
data.resource_status_reason
|
76
|
+
end
|
78
77
|
|
79
|
-
|
78
|
+
# @!endgroup
|
80
79
|
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
80
|
+
# @return [Client]
|
81
|
+
def client
|
82
|
+
@client
|
83
|
+
end
|
85
84
|
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
85
|
+
# @raise [NotImplementedError]
|
86
|
+
# @api private
|
87
|
+
def load
|
88
|
+
msg = "#load is not implemented, data only available via enumeration"
|
89
|
+
raise NotImplementedError, msg
|
90
|
+
end
|
91
|
+
alias :reload :load
|
92
|
+
|
93
|
+
# @raise [NotImplementedError] Raises when {#data_loaded?} is `false`.
|
94
|
+
# @return [Types::StackResourceSummary]
|
95
|
+
# Returns the data for this {StackResourceSummary}.
|
96
|
+
def data
|
97
|
+
load unless @data
|
98
|
+
@data
|
99
|
+
end
|
101
100
|
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
101
|
+
# @return [Boolean]
|
102
|
+
# Returns `true` if this resource is loaded. Accessing attributes or
|
103
|
+
# {#data} on an unloaded resource will trigger a call to {#load}.
|
104
|
+
def data_loaded?
|
105
|
+
!!@data
|
106
|
+
end
|
108
107
|
|
109
|
-
|
108
|
+
# @!group Associations
|
110
109
|
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
110
|
+
# @return [StackResource]
|
111
|
+
def resource
|
112
|
+
StackResource.new(
|
113
|
+
logical_id: @logical_id,
|
114
|
+
stack_name: @stack_name,
|
115
|
+
client: @client
|
116
|
+
)
|
117
|
+
end
|
119
118
|
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
private
|
131
|
-
|
132
|
-
def extract_stack_name(args, options)
|
133
|
-
value = args[0] || options.delete(:stack_name)
|
134
|
-
case value
|
135
|
-
when String then value
|
136
|
-
when nil then raise ArgumentError, "missing required option :stack_name"
|
137
|
-
else
|
138
|
-
msg = "expected :stack_name to be a String, got #{value.class}"
|
139
|
-
raise ArgumentError, msg
|
140
|
-
end
|
141
|
-
end
|
119
|
+
# @deprecated
|
120
|
+
# @api private
|
121
|
+
def identifiers
|
122
|
+
{
|
123
|
+
stack_name: @stack_name,
|
124
|
+
logical_id: @logical_id
|
125
|
+
}
|
126
|
+
end
|
127
|
+
deprecated(:identifiers)
|
142
128
|
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
129
|
+
private
|
130
|
+
|
131
|
+
def extract_stack_name(args, options)
|
132
|
+
value = args[0] || options.delete(:stack_name)
|
133
|
+
case value
|
134
|
+
when String then value
|
135
|
+
when nil then raise ArgumentError, "missing required option :stack_name"
|
136
|
+
else
|
137
|
+
msg = "expected :stack_name to be a String, got #{value.class}"
|
138
|
+
raise ArgumentError, msg
|
152
139
|
end
|
140
|
+
end
|
153
141
|
|
154
|
-
|
142
|
+
def extract_logical_id(args, options)
|
143
|
+
value = args[1] || options.delete(:logical_id)
|
144
|
+
case value
|
145
|
+
when String then value
|
146
|
+
when nil then raise ArgumentError, "missing required option :logical_id"
|
147
|
+
else
|
148
|
+
msg = "expected :logical_id to be a String, got #{value.class}"
|
149
|
+
raise ArgumentError, msg
|
150
|
+
end
|
155
151
|
end
|
152
|
+
|
153
|
+
class Collection < Aws::Resources::Collection; end
|
156
154
|
end
|
157
155
|
end
|