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