aws-sdk-cloudformation 1.41.0 → 1.131.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,7 +2,7 @@
2
2
  # WARNING ABOUT GENERATED CODE
3
3
  #
4
4
  # This file is generated. See the contributing for info on making contributions:
5
- # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
5
+ # https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
6
6
  #
7
7
  # WARNING ABOUT GENERATED CODE
8
8
 
@@ -0,0 +1,69 @@
1
+ # frozen_string_literal: true
2
+
3
+ # WARNING ABOUT GENERATED CODE
4
+ #
5
+ # This file is generated. See the contributing guide for more information:
6
+ # https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
7
+ #
8
+ # WARNING ABOUT GENERATED CODE
9
+
10
+ module Aws::CloudFormation
11
+ # Endpoint parameters used to influence endpoints per request.
12
+ #
13
+ # @!attribute region
14
+ # The AWS region used to dispatch the request.
15
+ #
16
+ # @return [String]
17
+ #
18
+ # @!attribute use_dual_stack
19
+ # When true, use the dual-stack endpoint. If the configured endpoint does not support dual-stack, dispatching the request MAY return an error.
20
+ #
21
+ # @return [Boolean]
22
+ #
23
+ # @!attribute use_fips
24
+ # When true, send this request to the FIPS-compliant regional endpoint. If the configured endpoint does not have a FIPS compliant endpoint, dispatching the request will return an error.
25
+ #
26
+ # @return [Boolean]
27
+ #
28
+ # @!attribute endpoint
29
+ # Override the endpoint used to send this request
30
+ #
31
+ # @return [String]
32
+ #
33
+ EndpointParameters = Struct.new(
34
+ :region,
35
+ :use_dual_stack,
36
+ :use_fips,
37
+ :endpoint,
38
+ ) do
39
+ include Aws::Structure
40
+
41
+ # @api private
42
+ class << self
43
+ PARAM_MAP = {
44
+ 'Region' => :region,
45
+ 'UseDualStack' => :use_dual_stack,
46
+ 'UseFIPS' => :use_fips,
47
+ 'Endpoint' => :endpoint,
48
+ }.freeze
49
+ end
50
+
51
+ def initialize(options = {})
52
+ self[:region] = options[:region]
53
+ self[:use_dual_stack] = options[:use_dual_stack]
54
+ self[:use_dual_stack] = false if self[:use_dual_stack].nil?
55
+ self[:use_fips] = options[:use_fips]
56
+ self[:use_fips] = false if self[:use_fips].nil?
57
+ self[:endpoint] = options[:endpoint]
58
+ end
59
+
60
+ def self.create(config, options={})
61
+ new({
62
+ region: config.region,
63
+ use_dual_stack: config.use_dualstack_endpoint,
64
+ use_fips: config.use_fips_endpoint,
65
+ endpoint: (config.endpoint.to_s unless config.regional_endpoint),
66
+ }.merge(options))
67
+ end
68
+ end
69
+ end
@@ -0,0 +1,53 @@
1
+ # frozen_string_literal: true
2
+
3
+ # WARNING ABOUT GENERATED CODE
4
+ #
5
+ # This file is generated. See the contributing guide for more information:
6
+ # https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
7
+ #
8
+ # WARNING ABOUT GENERATED CODE
9
+
10
+ module Aws::CloudFormation
11
+ class EndpointProvider
12
+ def resolve_endpoint(parameters)
13
+ if Aws::Endpoints::Matchers.set?(parameters.endpoint)
14
+ if Aws::Endpoints::Matchers.boolean_equals?(parameters.use_fips, true)
15
+ raise ArgumentError, "Invalid Configuration: FIPS and custom endpoint are not supported"
16
+ end
17
+ if Aws::Endpoints::Matchers.boolean_equals?(parameters.use_dual_stack, true)
18
+ raise ArgumentError, "Invalid Configuration: Dualstack and custom endpoint are not supported"
19
+ end
20
+ return Aws::Endpoints::Endpoint.new(url: parameters.endpoint, headers: {}, properties: {})
21
+ end
22
+ if Aws::Endpoints::Matchers.set?(parameters.region)
23
+ if (partition_result = Aws::Endpoints::Matchers.aws_partition(parameters.region))
24
+ if Aws::Endpoints::Matchers.boolean_equals?(parameters.use_fips, true) && Aws::Endpoints::Matchers.boolean_equals?(parameters.use_dual_stack, true)
25
+ if Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsFIPS")) && Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsDualStack"))
26
+ return Aws::Endpoints::Endpoint.new(url: "https://cloudformation-fips.#{parameters.region}.#{partition_result['dualStackDnsSuffix']}", headers: {}, properties: {})
27
+ end
28
+ raise ArgumentError, "FIPS and DualStack are enabled, but this partition does not support one or both"
29
+ end
30
+ if Aws::Endpoints::Matchers.boolean_equals?(parameters.use_fips, true)
31
+ if Aws::Endpoints::Matchers.boolean_equals?(Aws::Endpoints::Matchers.attr(partition_result, "supportsFIPS"), true)
32
+ if Aws::Endpoints::Matchers.string_equals?(Aws::Endpoints::Matchers.attr(partition_result, "name"), "aws-us-gov")
33
+ return Aws::Endpoints::Endpoint.new(url: "https://cloudformation.#{parameters.region}.amazonaws.com", headers: {}, properties: {})
34
+ end
35
+ return Aws::Endpoints::Endpoint.new(url: "https://cloudformation-fips.#{parameters.region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
36
+ end
37
+ raise ArgumentError, "FIPS is enabled but this partition does not support FIPS"
38
+ end
39
+ if Aws::Endpoints::Matchers.boolean_equals?(parameters.use_dual_stack, true)
40
+ if Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsDualStack"))
41
+ return Aws::Endpoints::Endpoint.new(url: "https://cloudformation.#{parameters.region}.#{partition_result['dualStackDnsSuffix']}", headers: {}, properties: {})
42
+ end
43
+ raise ArgumentError, "DualStack is enabled but this partition does not support DualStack"
44
+ end
45
+ return Aws::Endpoints::Endpoint.new(url: "https://cloudformation.#{parameters.region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
46
+ end
47
+ end
48
+ raise ArgumentError, "Invalid Configuration: Missing Region"
49
+ raise ArgumentError, 'No endpoint could be resolved'
50
+
51
+ end
52
+ end
53
+ end
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ # WARNING ABOUT GENERATED CODE
4
+ #
5
+ # This file is generated. See the contributing guide for more information:
6
+ # https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
7
+ #
8
+ # WARNING ABOUT GENERATED CODE
9
+
10
+
11
+ module Aws::CloudFormation
12
+ # @api private
13
+ module Endpoints
14
+
15
+
16
+ def self.parameters_for_operation(context)
17
+ Aws::CloudFormation::EndpointParameters.create(context.config)
18
+ end
19
+ end
20
+ end
@@ -3,7 +3,7 @@
3
3
  # WARNING ABOUT GENERATED CODE
4
4
  #
5
5
  # This file is generated. See the contributing guide for more information:
6
- # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
6
+ # https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
7
7
  #
8
8
  # WARNING ABOUT GENERATED CODE
9
9
 
@@ -30,26 +30,46 @@ module Aws::CloudFormation
30
30
  # * {AlreadyExistsException}
31
31
  # * {CFNRegistryException}
32
32
  # * {ChangeSetNotFoundException}
33
+ # * This error class is not used. `ChangeSetNotFound` is used during parsing instead.
34
+ # * {ConcurrentResourcesLimitExceededException}
35
+ # * This error class is not used. `ConcurrentResourcesLimitExceeded` is used during parsing instead.
33
36
  # * {CreatedButModifiedException}
37
+ # * {GeneratedTemplateNotFoundException}
38
+ # * This error class is not used. `GeneratedTemplateNotFound` is used during parsing instead.
39
+ # * {HookResultNotFoundException}
40
+ # * This error class is not used. `HookResultNotFound` is used during parsing instead.
34
41
  # * {InsufficientCapabilitiesException}
35
42
  # * {InvalidChangeSetStatusException}
43
+ # * This error class is not used. `InvalidChangeSetStatus` is used during parsing instead.
36
44
  # * {InvalidOperationException}
37
45
  # * {InvalidStateTransitionException}
46
+ # * This error class is not used. `InvalidStateTransition` is used during parsing instead.
38
47
  # * {LimitExceededException}
39
48
  # * {NameAlreadyExistsException}
40
49
  # * {OperationIdAlreadyExistsException}
41
50
  # * {OperationInProgressException}
42
51
  # * {OperationNotFoundException}
43
52
  # * {OperationStatusCheckFailedException}
53
+ # * This error class is not used. `ConditionalCheckFailed` is used during parsing instead.
54
+ # * {ResourceScanInProgressException}
55
+ # * This error class is not used. `ResourceScanInProgress` is used during parsing instead.
56
+ # * {ResourceScanLimitExceededException}
57
+ # * This error class is not used. `ResourceScanLimitExceeded` is used during parsing instead.
58
+ # * {ResourceScanNotFoundException}
59
+ # * This error class is not used. `ResourceScanNotFound` is used during parsing instead.
44
60
  # * {StackInstanceNotFoundException}
61
+ # * {StackNotFoundException}
62
+ # * {StackRefactorNotFoundException}
45
63
  # * {StackSetNotEmptyException}
46
64
  # * {StackSetNotFoundException}
47
65
  # * {StaleRequestException}
48
66
  # * {TokenAlreadyExistsException}
67
+ # * {TypeConfigurationNotFoundException}
49
68
  # * {TypeNotFoundException}
50
69
  #
51
70
  # Additionally, error classes are dynamically generated for service errors based on the error code
52
71
  # if they are not defined above.
72
+ # Some existing error classes may use a different class name than the one documented.
53
73
  module Errors
54
74
 
55
75
  extend Aws::Errors::DynamicErrors
@@ -79,6 +99,8 @@ module Aws::CloudFormation
79
99
  end
80
100
  end
81
101
 
102
+ # @deprecated This error class is not used during parsing.
103
+ # Please use `ChangeSetNotFound` instead.
82
104
  class ChangeSetNotFoundException < ServiceError
83
105
 
84
106
  # @param [Seahorse::Client::RequestContext] context
@@ -89,6 +111,18 @@ module Aws::CloudFormation
89
111
  end
90
112
  end
91
113
 
114
+ # @deprecated This error class is not used during parsing.
115
+ # Please use `ConcurrentResourcesLimitExceeded` instead.
116
+ class ConcurrentResourcesLimitExceededException < ServiceError
117
+
118
+ # @param [Seahorse::Client::RequestContext] context
119
+ # @param [String] message
120
+ # @param [Aws::CloudFormation::Types::ConcurrentResourcesLimitExceededException] data
121
+ def initialize(context, message, data = Aws::EmptyStructure.new)
122
+ super(context, message, data)
123
+ end
124
+ end
125
+
92
126
  class CreatedButModifiedException < ServiceError
93
127
 
94
128
  # @param [Seahorse::Client::RequestContext] context
@@ -99,6 +133,30 @@ module Aws::CloudFormation
99
133
  end
100
134
  end
101
135
 
136
+ # @deprecated This error class is not used during parsing.
137
+ # Please use `GeneratedTemplateNotFound` instead.
138
+ class GeneratedTemplateNotFoundException < ServiceError
139
+
140
+ # @param [Seahorse::Client::RequestContext] context
141
+ # @param [String] message
142
+ # @param [Aws::CloudFormation::Types::GeneratedTemplateNotFoundException] data
143
+ def initialize(context, message, data = Aws::EmptyStructure.new)
144
+ super(context, message, data)
145
+ end
146
+ end
147
+
148
+ # @deprecated This error class is not used during parsing.
149
+ # Please use `HookResultNotFound` instead.
150
+ class HookResultNotFoundException < ServiceError
151
+
152
+ # @param [Seahorse::Client::RequestContext] context
153
+ # @param [String] message
154
+ # @param [Aws::CloudFormation::Types::HookResultNotFoundException] data
155
+ def initialize(context, message, data = Aws::EmptyStructure.new)
156
+ super(context, message, data)
157
+ end
158
+ end
159
+
102
160
  class InsufficientCapabilitiesException < ServiceError
103
161
 
104
162
  # @param [Seahorse::Client::RequestContext] context
@@ -109,6 +167,8 @@ module Aws::CloudFormation
109
167
  end
110
168
  end
111
169
 
170
+ # @deprecated This error class is not used during parsing.
171
+ # Please use `InvalidChangeSetStatus` instead.
112
172
  class InvalidChangeSetStatusException < ServiceError
113
173
 
114
174
  # @param [Seahorse::Client::RequestContext] context
@@ -129,6 +189,8 @@ module Aws::CloudFormation
129
189
  end
130
190
  end
131
191
 
192
+ # @deprecated This error class is not used during parsing.
193
+ # Please use `InvalidStateTransition` instead.
132
194
  class InvalidStateTransitionException < ServiceError
133
195
 
134
196
  # @param [Seahorse::Client::RequestContext] context
@@ -189,6 +251,8 @@ module Aws::CloudFormation
189
251
  end
190
252
  end
191
253
 
254
+ # @deprecated This error class is not used during parsing.
255
+ # Please use `ConditionalCheckFailed` instead.
192
256
  class OperationStatusCheckFailedException < ServiceError
193
257
 
194
258
  # @param [Seahorse::Client::RequestContext] context
@@ -199,6 +263,42 @@ module Aws::CloudFormation
199
263
  end
200
264
  end
201
265
 
266
+ # @deprecated This error class is not used during parsing.
267
+ # Please use `ResourceScanInProgress` instead.
268
+ class ResourceScanInProgressException < ServiceError
269
+
270
+ # @param [Seahorse::Client::RequestContext] context
271
+ # @param [String] message
272
+ # @param [Aws::CloudFormation::Types::ResourceScanInProgressException] data
273
+ def initialize(context, message, data = Aws::EmptyStructure.new)
274
+ super(context, message, data)
275
+ end
276
+ end
277
+
278
+ # @deprecated This error class is not used during parsing.
279
+ # Please use `ResourceScanLimitExceeded` instead.
280
+ class ResourceScanLimitExceededException < ServiceError
281
+
282
+ # @param [Seahorse::Client::RequestContext] context
283
+ # @param [String] message
284
+ # @param [Aws::CloudFormation::Types::ResourceScanLimitExceededException] data
285
+ def initialize(context, message, data = Aws::EmptyStructure.new)
286
+ super(context, message, data)
287
+ end
288
+ end
289
+
290
+ # @deprecated This error class is not used during parsing.
291
+ # Please use `ResourceScanNotFound` instead.
292
+ class ResourceScanNotFoundException < ServiceError
293
+
294
+ # @param [Seahorse::Client::RequestContext] context
295
+ # @param [String] message
296
+ # @param [Aws::CloudFormation::Types::ResourceScanNotFoundException] data
297
+ def initialize(context, message, data = Aws::EmptyStructure.new)
298
+ super(context, message, data)
299
+ end
300
+ end
301
+
202
302
  class StackInstanceNotFoundException < ServiceError
203
303
 
204
304
  # @param [Seahorse::Client::RequestContext] context
@@ -209,6 +309,26 @@ module Aws::CloudFormation
209
309
  end
210
310
  end
211
311
 
312
+ class StackNotFoundException < ServiceError
313
+
314
+ # @param [Seahorse::Client::RequestContext] context
315
+ # @param [String] message
316
+ # @param [Aws::CloudFormation::Types::StackNotFoundException] data
317
+ def initialize(context, message, data = Aws::EmptyStructure.new)
318
+ super(context, message, data)
319
+ end
320
+ end
321
+
322
+ class StackRefactorNotFoundException < ServiceError
323
+
324
+ # @param [Seahorse::Client::RequestContext] context
325
+ # @param [String] message
326
+ # @param [Aws::CloudFormation::Types::StackRefactorNotFoundException] data
327
+ def initialize(context, message, data = Aws::EmptyStructure.new)
328
+ super(context, message, data)
329
+ end
330
+ end
331
+
212
332
  class StackSetNotEmptyException < ServiceError
213
333
 
214
334
  # @param [Seahorse::Client::RequestContext] context
@@ -249,6 +369,16 @@ module Aws::CloudFormation
249
369
  end
250
370
  end
251
371
 
372
+ class TypeConfigurationNotFoundException < ServiceError
373
+
374
+ # @param [Seahorse::Client::RequestContext] context
375
+ # @param [String] message
376
+ # @param [Aws::CloudFormation::Types::TypeConfigurationNotFoundException] data
377
+ def initialize(context, message, data = Aws::EmptyStructure.new)
378
+ super(context, message, data)
379
+ end
380
+ end
381
+
252
382
  class TypeNotFoundException < ServiceError
253
383
 
254
384
  # @param [Seahorse::Client::RequestContext] context
@@ -3,7 +3,7 @@
3
3
  # WARNING ABOUT GENERATED CODE
4
4
  #
5
5
  # This file is generated. See the contributing guide for more information:
6
- # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
6
+ # https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
7
7
  #
8
8
  # WARNING ABOUT GENERATED CODE
9
9
 
@@ -60,8 +60,9 @@ module Aws::CloudFormation
60
60
  data[:physical_resource_id]
61
61
  end
62
62
 
63
- # Type of resource. (For more information, go to [ AWS Resource Types
64
- # Reference][1] in the AWS CloudFormation User Guide.)
63
+ # Type of resource. For more information, see [Amazon Web Services
64
+ # resource and property types reference][1] in the *CloudFormation User
65
+ # Guide*.
65
66
  #
66
67
  #
67
68
  #
@@ -115,6 +116,67 @@ module Aws::CloudFormation
115
116
  data[:client_request_token]
116
117
  end
117
118
 
119
+ # The name of the hook.
120
+ # @return [String]
121
+ def hook_type
122
+ data[:hook_type]
123
+ end
124
+
125
+ # Provides the status of the change set hook.
126
+ # @return [String]
127
+ def hook_status
128
+ data[:hook_status]
129
+ end
130
+
131
+ # Provides the reason for the hook status.
132
+ # @return [String]
133
+ def hook_status_reason
134
+ data[:hook_status_reason]
135
+ end
136
+
137
+ # Invocation points are points in provisioning logic where Hooks are
138
+ # initiated.
139
+ # @return [String]
140
+ def hook_invocation_point
141
+ data[:hook_invocation_point]
142
+ end
143
+
144
+ # Specify the hook failure mode for non-compliant resources in the
145
+ # followings ways.
146
+ #
147
+ # * `FAIL` Stops provisioning resources.
148
+ #
149
+ # * `WARN` Allows provisioning to continue with a warning message.
150
+ # @return [String]
151
+ def hook_failure_mode
152
+ data[:hook_failure_mode]
153
+ end
154
+
155
+ # An optional field containing information about the detailed status of
156
+ # the stack event.
157
+ #
158
+ # * `CONFIGURATION_COMPLETE` - all of the resources in the stack have
159
+ # reached that event. For more information, see [Understand
160
+ # CloudFormation stack creation events][1] in the *CloudFormation User
161
+ # Guide*.
162
+ #
163
+ # ^
164
+ # ^
165
+ #
166
+ # * `VALIDATION_FAILED` - template validation failed because of invalid
167
+ # properties in the template. The `ResourceStatusReason` field shows
168
+ # what properties are defined incorrectly.
169
+ #
170
+ # ^
171
+ #
172
+ #
173
+ #
174
+ # [1]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stack-resource-configuration-complete.html
175
+ # @return [String]
176
+ def detailed_status
177
+ data[:detailed_status]
178
+ end
179
+
118
180
  # @!endgroup
119
181
 
120
182
  # @return [Client]
@@ -239,7 +301,9 @@ module Aws::CloudFormation
239
301
  :retry
240
302
  end
241
303
  end
242
- Aws::Waiters::Waiter.new(options).wait({})
304
+ Aws::Plugins::UserAgent.metric('RESOURCE_MODEL') do
305
+ Aws::Waiters::Waiter.new(options).wait({})
306
+ end
243
307
  end
244
308
 
245
309
  # @deprecated
@@ -0,0 +1,77 @@
1
+ # frozen_string_literal: true
2
+
3
+ # WARNING ABOUT GENERATED CODE
4
+ #
5
+ # This file is generated. See the contributing guide for more information:
6
+ # https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
7
+ #
8
+ # WARNING ABOUT GENERATED CODE
9
+
10
+
11
+ module Aws::CloudFormation
12
+ module Plugins
13
+ class Endpoints < Seahorse::Client::Plugin
14
+ option(
15
+ :endpoint_provider,
16
+ doc_type: 'Aws::CloudFormation::EndpointProvider',
17
+ rbs_type: 'untyped',
18
+ docstring: <<~DOCS) do |_cfg|
19
+ The endpoint provider used to resolve endpoints. Any object that responds to
20
+ `#resolve_endpoint(parameters)` where `parameters` is a Struct similar to
21
+ `Aws::CloudFormation::EndpointParameters`.
22
+ DOCS
23
+ Aws::CloudFormation::EndpointProvider.new
24
+ end
25
+
26
+ # @api private
27
+ class Handler < Seahorse::Client::Handler
28
+ def call(context)
29
+ unless context[:discovered_endpoint]
30
+ params = Aws::CloudFormation::Endpoints.parameters_for_operation(context)
31
+ endpoint = context.config.endpoint_provider.resolve_endpoint(params)
32
+
33
+ context.http_request.endpoint = endpoint.url
34
+ apply_endpoint_headers(context, endpoint.headers)
35
+
36
+ context[:endpoint_params] = params
37
+ context[:endpoint_properties] = endpoint.properties
38
+ end
39
+
40
+ context[:auth_scheme] =
41
+ Aws::Endpoints.resolve_auth_scheme(context, endpoint)
42
+
43
+ with_metrics(context) { @handler.call(context) }
44
+ end
45
+
46
+ private
47
+
48
+ def with_metrics(context, &block)
49
+ metrics = []
50
+ metrics << 'ENDPOINT_OVERRIDE' unless context.config.regional_endpoint
51
+ if context[:auth_scheme] && context[:auth_scheme]['name'] == 'sigv4a'
52
+ metrics << 'SIGV4A_SIGNING'
53
+ end
54
+ if context.config.credentials&.credentials&.account_id
55
+ metrics << 'RESOLVED_ACCOUNT_ID'
56
+ end
57
+ Aws::Plugins::UserAgent.metric(*metrics, &block)
58
+ end
59
+
60
+ def apply_endpoint_headers(context, headers)
61
+ headers.each do |key, values|
62
+ value = values
63
+ .compact
64
+ .map { |s| Seahorse::Util.escape_header_list_string(s.to_s) }
65
+ .join(',')
66
+
67
+ context.http_request.headers[key] = value
68
+ end
69
+ end
70
+ end
71
+
72
+ def add_handlers(handlers, _config)
73
+ handlers.add(Handler, step: :build, priority: 75)
74
+ end
75
+ end
76
+ end
77
+ end