aws-sdk-cloudcontrolapi 1.0.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.
@@ -0,0 +1,1232 @@
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
+ require 'seahorse/client/plugins/content_length.rb'
11
+ require 'aws-sdk-core/plugins/credentials_configuration.rb'
12
+ require 'aws-sdk-core/plugins/logging.rb'
13
+ require 'aws-sdk-core/plugins/param_converter.rb'
14
+ require 'aws-sdk-core/plugins/param_validator.rb'
15
+ require 'aws-sdk-core/plugins/user_agent.rb'
16
+ require 'aws-sdk-core/plugins/helpful_socket_errors.rb'
17
+ require 'aws-sdk-core/plugins/retry_errors.rb'
18
+ require 'aws-sdk-core/plugins/global_configuration.rb'
19
+ require 'aws-sdk-core/plugins/regional_endpoint.rb'
20
+ require 'aws-sdk-core/plugins/endpoint_discovery.rb'
21
+ require 'aws-sdk-core/plugins/endpoint_pattern.rb'
22
+ require 'aws-sdk-core/plugins/response_paging.rb'
23
+ require 'aws-sdk-core/plugins/stub_responses.rb'
24
+ require 'aws-sdk-core/plugins/idempotency_token.rb'
25
+ require 'aws-sdk-core/plugins/jsonvalue_converter.rb'
26
+ require 'aws-sdk-core/plugins/client_metrics_plugin.rb'
27
+ require 'aws-sdk-core/plugins/client_metrics_send_plugin.rb'
28
+ require 'aws-sdk-core/plugins/transfer_encoding.rb'
29
+ require 'aws-sdk-core/plugins/http_checksum.rb'
30
+ require 'aws-sdk-core/plugins/signature_v4.rb'
31
+ require 'aws-sdk-core/plugins/protocols/json_rpc.rb'
32
+
33
+ Aws::Plugins::GlobalConfiguration.add_identifier(:cloudcontrolapi)
34
+
35
+ module Aws::CloudControlApi
36
+ # An API client for CloudControlApi. To construct a client, you need to configure a `:region` and `:credentials`.
37
+ #
38
+ # client = Aws::CloudControlApi::Client.new(
39
+ # region: region_name,
40
+ # credentials: credentials,
41
+ # # ...
42
+ # )
43
+ #
44
+ # For details on configuring region and credentials see
45
+ # the [developer guide](/sdk-for-ruby/v3/developer-guide/setup-config.html).
46
+ #
47
+ # See {#initialize} for a full list of supported configuration options.
48
+ class Client < Seahorse::Client::Base
49
+
50
+ include Aws::ClientStubs
51
+
52
+ @identifier = :cloudcontrolapi
53
+
54
+ set_api(ClientApi::API)
55
+
56
+ add_plugin(Seahorse::Client::Plugins::ContentLength)
57
+ add_plugin(Aws::Plugins::CredentialsConfiguration)
58
+ add_plugin(Aws::Plugins::Logging)
59
+ add_plugin(Aws::Plugins::ParamConverter)
60
+ add_plugin(Aws::Plugins::ParamValidator)
61
+ add_plugin(Aws::Plugins::UserAgent)
62
+ add_plugin(Aws::Plugins::HelpfulSocketErrors)
63
+ add_plugin(Aws::Plugins::RetryErrors)
64
+ add_plugin(Aws::Plugins::GlobalConfiguration)
65
+ add_plugin(Aws::Plugins::RegionalEndpoint)
66
+ add_plugin(Aws::Plugins::EndpointDiscovery)
67
+ add_plugin(Aws::Plugins::EndpointPattern)
68
+ add_plugin(Aws::Plugins::ResponsePaging)
69
+ add_plugin(Aws::Plugins::StubResponses)
70
+ add_plugin(Aws::Plugins::IdempotencyToken)
71
+ add_plugin(Aws::Plugins::JsonvalueConverter)
72
+ add_plugin(Aws::Plugins::ClientMetricsPlugin)
73
+ add_plugin(Aws::Plugins::ClientMetricsSendPlugin)
74
+ add_plugin(Aws::Plugins::TransferEncoding)
75
+ add_plugin(Aws::Plugins::HttpChecksum)
76
+ add_plugin(Aws::Plugins::SignatureV4)
77
+ add_plugin(Aws::Plugins::Protocols::JsonRpc)
78
+
79
+ # @overload initialize(options)
80
+ # @param [Hash] options
81
+ # @option options [required, Aws::CredentialProvider] :credentials
82
+ # Your AWS credentials. This can be an instance of any one of the
83
+ # following classes:
84
+ #
85
+ # * `Aws::Credentials` - Used for configuring static, non-refreshing
86
+ # credentials.
87
+ #
88
+ # * `Aws::SharedCredentials` - Used for loading static credentials from a
89
+ # shared file, such as `~/.aws/config`.
90
+ #
91
+ # * `Aws::AssumeRoleCredentials` - Used when you need to assume a role.
92
+ #
93
+ # * `Aws::AssumeRoleWebIdentityCredentials` - Used when you need to
94
+ # assume a role after providing credentials via the web.
95
+ #
96
+ # * `Aws::SSOCredentials` - Used for loading credentials from AWS SSO using an
97
+ # access token generated from `aws login`.
98
+ #
99
+ # * `Aws::ProcessCredentials` - Used for loading credentials from a
100
+ # process that outputs to stdout.
101
+ #
102
+ # * `Aws::InstanceProfileCredentials` - Used for loading credentials
103
+ # from an EC2 IMDS on an EC2 instance.
104
+ #
105
+ # * `Aws::ECSCredentials` - Used for loading credentials from
106
+ # instances running in ECS.
107
+ #
108
+ # * `Aws::CognitoIdentityCredentials` - Used for loading credentials
109
+ # from the Cognito Identity service.
110
+ #
111
+ # When `:credentials` are not configured directly, the following
112
+ # locations will be searched for credentials:
113
+ #
114
+ # * `Aws.config[:credentials]`
115
+ # * The `:access_key_id`, `:secret_access_key`, and `:session_token` options.
116
+ # * ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY']
117
+ # * `~/.aws/credentials`
118
+ # * `~/.aws/config`
119
+ # * EC2/ECS IMDS instance profile - When used by default, the timeouts
120
+ # are very aggressive. Construct and pass an instance of
121
+ # `Aws::InstanceProfileCredentails` or `Aws::ECSCredentials` to
122
+ # enable retries and extended timeouts.
123
+ #
124
+ # @option options [required, String] :region
125
+ # The AWS region to connect to. The configured `:region` is
126
+ # used to determine the service `:endpoint`. When not passed,
127
+ # a default `:region` is searched for in the following locations:
128
+ #
129
+ # * `Aws.config[:region]`
130
+ # * `ENV['AWS_REGION']`
131
+ # * `ENV['AMAZON_REGION']`
132
+ # * `ENV['AWS_DEFAULT_REGION']`
133
+ # * `~/.aws/credentials`
134
+ # * `~/.aws/config`
135
+ #
136
+ # @option options [String] :access_key_id
137
+ #
138
+ # @option options [Boolean] :active_endpoint_cache (false)
139
+ # When set to `true`, a thread polling for endpoints will be running in
140
+ # the background every 60 secs (default). Defaults to `false`.
141
+ #
142
+ # @option options [Boolean] :adaptive_retry_wait_to_fill (true)
143
+ # Used only in `adaptive` retry mode. When true, the request will sleep
144
+ # until there is sufficent client side capacity to retry the request.
145
+ # When false, the request will raise a `RetryCapacityNotAvailableError` and will
146
+ # not retry instead of sleeping.
147
+ #
148
+ # @option options [Boolean] :client_side_monitoring (false)
149
+ # When `true`, client-side metrics will be collected for all API requests from
150
+ # this client.
151
+ #
152
+ # @option options [String] :client_side_monitoring_client_id ("")
153
+ # Allows you to provide an identifier for this client which will be attached to
154
+ # all generated client side metrics. Defaults to an empty string.
155
+ #
156
+ # @option options [String] :client_side_monitoring_host ("127.0.0.1")
157
+ # Allows you to specify the DNS hostname or IPv4 or IPv6 address that the client
158
+ # side monitoring agent is running on, where client metrics will be published via UDP.
159
+ #
160
+ # @option options [Integer] :client_side_monitoring_port (31000)
161
+ # Required for publishing client metrics. The port that the client side monitoring
162
+ # agent is running on, where client metrics will be published via UDP.
163
+ #
164
+ # @option options [Aws::ClientSideMonitoring::Publisher] :client_side_monitoring_publisher (Aws::ClientSideMonitoring::Publisher)
165
+ # Allows you to provide a custom client-side monitoring publisher class. By default,
166
+ # will use the Client Side Monitoring Agent Publisher.
167
+ #
168
+ # @option options [Boolean] :convert_params (true)
169
+ # When `true`, an attempt is made to coerce request parameters into
170
+ # the required types.
171
+ #
172
+ # @option options [Boolean] :correct_clock_skew (true)
173
+ # Used only in `standard` and adaptive retry modes. Specifies whether to apply
174
+ # a clock skew correction and retry requests with skewed client clocks.
175
+ #
176
+ # @option options [Boolean] :disable_host_prefix_injection (false)
177
+ # Set to true to disable SDK automatically adding host prefix
178
+ # to default service endpoint when available.
179
+ #
180
+ # @option options [String] :endpoint
181
+ # The client endpoint is normally constructed from the `:region`
182
+ # option. You should only configure an `:endpoint` when connecting
183
+ # to test or custom endpoints. This should be a valid HTTP(S) URI.
184
+ #
185
+ # @option options [Integer] :endpoint_cache_max_entries (1000)
186
+ # Used for the maximum size limit of the LRU cache storing endpoints data
187
+ # for endpoint discovery enabled operations. Defaults to 1000.
188
+ #
189
+ # @option options [Integer] :endpoint_cache_max_threads (10)
190
+ # Used for the maximum threads in use for polling endpoints to be cached, defaults to 10.
191
+ #
192
+ # @option options [Integer] :endpoint_cache_poll_interval (60)
193
+ # When :endpoint_discovery and :active_endpoint_cache is enabled,
194
+ # Use this option to config the time interval in seconds for making
195
+ # requests fetching endpoints information. Defaults to 60 sec.
196
+ #
197
+ # @option options [Boolean] :endpoint_discovery (false)
198
+ # When set to `true`, endpoint discovery will be enabled for operations when available.
199
+ #
200
+ # @option options [Aws::Log::Formatter] :log_formatter (Aws::Log::Formatter.default)
201
+ # The log formatter.
202
+ #
203
+ # @option options [Symbol] :log_level (:info)
204
+ # The log level to send messages to the `:logger` at.
205
+ #
206
+ # @option options [Logger] :logger
207
+ # The Logger instance to send log messages to. If this option
208
+ # is not set, logging will be disabled.
209
+ #
210
+ # @option options [Integer] :max_attempts (3)
211
+ # An integer representing the maximum number attempts that will be made for
212
+ # a single request, including the initial attempt. For example,
213
+ # setting this value to 5 will result in a request being retried up to
214
+ # 4 times. Used in `standard` and `adaptive` retry modes.
215
+ #
216
+ # @option options [String] :profile ("default")
217
+ # Used when loading credentials from the shared credentials file
218
+ # at HOME/.aws/credentials. When not specified, 'default' is used.
219
+ #
220
+ # @option options [Proc] :retry_backoff
221
+ # A proc or lambda used for backoff. Defaults to 2**retries * retry_base_delay.
222
+ # This option is only used in the `legacy` retry mode.
223
+ #
224
+ # @option options [Float] :retry_base_delay (0.3)
225
+ # The base delay in seconds used by the default backoff function. This option
226
+ # is only used in the `legacy` retry mode.
227
+ #
228
+ # @option options [Symbol] :retry_jitter (:none)
229
+ # A delay randomiser function used by the default backoff function.
230
+ # Some predefined functions can be referenced by name - :none, :equal, :full,
231
+ # otherwise a Proc that takes and returns a number. This option is only used
232
+ # in the `legacy` retry mode.
233
+ #
234
+ # @see https://www.awsarchitectureblog.com/2015/03/backoff.html
235
+ #
236
+ # @option options [Integer] :retry_limit (3)
237
+ # The maximum number of times to retry failed requests. Only
238
+ # ~ 500 level server errors and certain ~ 400 level client errors
239
+ # are retried. Generally, these are throttling errors, data
240
+ # checksum errors, networking errors, timeout errors, auth errors,
241
+ # endpoint discovery, and errors from expired credentials.
242
+ # This option is only used in the `legacy` retry mode.
243
+ #
244
+ # @option options [Integer] :retry_max_delay (0)
245
+ # The maximum number of seconds to delay between retries (0 for no limit)
246
+ # used by the default backoff function. This option is only used in the
247
+ # `legacy` retry mode.
248
+ #
249
+ # @option options [String] :retry_mode ("legacy")
250
+ # Specifies which retry algorithm to use. Values are:
251
+ #
252
+ # * `legacy` - The pre-existing retry behavior. This is default value if
253
+ # no retry mode is provided.
254
+ #
255
+ # * `standard` - A standardized set of retry rules across the AWS SDKs.
256
+ # This includes support for retry quotas, which limit the number of
257
+ # unsuccessful retries a client can make.
258
+ #
259
+ # * `adaptive` - An experimental retry mode that includes all the
260
+ # functionality of `standard` mode along with automatic client side
261
+ # throttling. This is a provisional mode that may change behavior
262
+ # in the future.
263
+ #
264
+ #
265
+ # @option options [String] :secret_access_key
266
+ #
267
+ # @option options [String] :session_token
268
+ #
269
+ # @option options [Boolean] :simple_json (false)
270
+ # Disables request parameter conversion, validation, and formatting.
271
+ # Also disable response data type conversions. This option is useful
272
+ # when you want to ensure the highest level of performance by
273
+ # avoiding overhead of walking request parameters and response data
274
+ # structures.
275
+ #
276
+ # When `:simple_json` is enabled, the request parameters hash must
277
+ # be formatted exactly as the DynamoDB API expects.
278
+ #
279
+ # @option options [Boolean] :stub_responses (false)
280
+ # Causes the client to return stubbed responses. By default
281
+ # fake responses are generated and returned. You can specify
282
+ # the response data to return or errors to raise by calling
283
+ # {ClientStubs#stub_responses}. See {ClientStubs} for more information.
284
+ #
285
+ # ** Please note ** When response stubbing is enabled, no HTTP
286
+ # requests are made, and retries are disabled.
287
+ #
288
+ # @option options [Boolean] :validate_params (true)
289
+ # When `true`, request parameters are validated before
290
+ # sending the request.
291
+ #
292
+ # @option options [URI::HTTP,String] :http_proxy A proxy to send
293
+ # requests through. Formatted like 'http://proxy.com:123'.
294
+ #
295
+ # @option options [Float] :http_open_timeout (15) The number of
296
+ # seconds to wait when opening a HTTP session before raising a
297
+ # `Timeout::Error`.
298
+ #
299
+ # @option options [Integer] :http_read_timeout (60) The default
300
+ # number of seconds to wait for response data. This value can
301
+ # safely be set per-request on the session.
302
+ #
303
+ # @option options [Float] :http_idle_timeout (5) The number of
304
+ # seconds a connection is allowed to sit idle before it is
305
+ # considered stale. Stale connections are closed and removed
306
+ # from the pool before making a request.
307
+ #
308
+ # @option options [Float] :http_continue_timeout (1) The number of
309
+ # seconds to wait for a 100-continue response before sending the
310
+ # request body. This option has no effect unless the request has
311
+ # "Expect" header set to "100-continue". Defaults to `nil` which
312
+ # disables this behaviour. This value can safely be set per
313
+ # request on the session.
314
+ #
315
+ # @option options [Boolean] :http_wire_trace (false) When `true`,
316
+ # HTTP debug output will be sent to the `:logger`.
317
+ #
318
+ # @option options [Boolean] :ssl_verify_peer (true) When `true`,
319
+ # SSL peer certificates are verified when establishing a
320
+ # connection.
321
+ #
322
+ # @option options [String] :ssl_ca_bundle Full path to the SSL
323
+ # certificate authority bundle file that should be used when
324
+ # verifying peer certificates. If you do not pass
325
+ # `:ssl_ca_bundle` or `:ssl_ca_directory` the the system default
326
+ # will be used if available.
327
+ #
328
+ # @option options [String] :ssl_ca_directory Full path of the
329
+ # directory that contains the unbundled SSL certificate
330
+ # authority files for verifying peer certificates. If you do
331
+ # not pass `:ssl_ca_bundle` or `:ssl_ca_directory` the the
332
+ # system default will be used if available.
333
+ #
334
+ def initialize(*args)
335
+ super
336
+ end
337
+
338
+ # @!group API Operations
339
+
340
+ # Cancels the specified resource operation request. For more
341
+ # information, see [Canceling resource operation requests][1] in the
342
+ # *Amazon Web Services Cloud Control API User Guide*.
343
+ #
344
+ # Only resource operations requests with a status of `PENDING` or
345
+ # `IN_PROGRESS` can be cancelled.
346
+ #
347
+ #
348
+ #
349
+ # [1]: https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-operations-manage-requests.html#resource-operations-manage-requests-cancel
350
+ #
351
+ # @option params [required, String] :request_token
352
+ # The `RequestToken` of the `ProgressEvent` object returned by the
353
+ # resource operation request.
354
+ #
355
+ # @return [Types::CancelResourceRequestOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
356
+ #
357
+ # * {Types::CancelResourceRequestOutput#progress_event #progress_event} => Types::ProgressEvent
358
+ #
359
+ # @example Request syntax with placeholder values
360
+ #
361
+ # resp = client.cancel_resource_request({
362
+ # request_token: "RequestToken", # required
363
+ # })
364
+ #
365
+ # @example Response structure
366
+ #
367
+ # resp.progress_event.type_name #=> String
368
+ # resp.progress_event.identifier #=> String
369
+ # resp.progress_event.request_token #=> String
370
+ # resp.progress_event.operation #=> String, one of "CREATE", "DELETE", "UPDATE"
371
+ # resp.progress_event.operation_status #=> String, one of "PENDING", "IN_PROGRESS", "SUCCESS", "FAILED", "CANCEL_IN_PROGRESS", "CANCEL_COMPLETE"
372
+ # resp.progress_event.event_time #=> Time
373
+ # resp.progress_event.resource_model #=> String
374
+ # resp.progress_event.status_message #=> String
375
+ # resp.progress_event.error_code #=> String, one of "NotUpdatable", "InvalidRequest", "AccessDenied", "InvalidCredentials", "AlreadyExists", "NotFound", "ResourceConflict", "Throttling", "ServiceLimitExceeded", "NotStabilized", "GeneralServiceException", "ServiceInternalError", "ServiceTimeout", "NetworkFailure", "InternalFailure"
376
+ # resp.progress_event.retry_after #=> Time
377
+ #
378
+ # @see http://docs.aws.amazon.com/goto/WebAPI/cloudcontrol-2021-09-30/CancelResourceRequest AWS API Documentation
379
+ #
380
+ # @overload cancel_resource_request(params = {})
381
+ # @param [Hash] params ({})
382
+ def cancel_resource_request(params = {}, options = {})
383
+ req = build_request(:cancel_resource_request, params)
384
+ req.send_request(options)
385
+ end
386
+
387
+ # Creates the specified resource. For more information, see [Creating a
388
+ # resource][1] in the *Amazon Web Services Cloud Control API User
389
+ # Guide*.
390
+ #
391
+ # After you have initiated a resource creation request, you can monitor
392
+ # the progress of your request by calling [GetResourceRequestStatus][2]
393
+ # using the `RequestToken` of the `ProgressEvent` type returned by
394
+ # `CreateResource`.
395
+ #
396
+ #
397
+ #
398
+ # [1]: https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-operations-create.html
399
+ # [2]: https://docs.aws.amazon.com/cloudcontrolapi/latest/APIReference/API_GetResourceRequestStatus.html
400
+ #
401
+ # @option params [required, String] :type_name
402
+ # The name of the resource type.
403
+ #
404
+ # @option params [String] :type_version_id
405
+ # For private resource types, the type version to use in this resource
406
+ # operation. If you do not specify a resource version, CloudFormation
407
+ # uses the default version.
408
+ #
409
+ # @option params [String] :role_arn
410
+ # The Amazon Resource Name (ARN) of the Identity and Access Management
411
+ # (IAM) for Cloud Control API to use when performing this resource
412
+ # operation. The role specified must have the permissions required for
413
+ # this operation. The necessary permissions for each event handler are
414
+ # defined in the ` handlers ` section of the [resource type definition
415
+ # schema][1].
416
+ #
417
+ # If you do not specify a role, Cloud Control API uses a temporary
418
+ # session created using your Amazon Web Services user credentials.
419
+ #
420
+ # For more information, see [Specifying credentials][2] in the *Amazon
421
+ # Web Services Cloud Control API User Guide*.
422
+ #
423
+ #
424
+ #
425
+ # [1]: https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/resource-type-schema.html
426
+ # [2]: https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-operations.html#resource-operations-permissions
427
+ #
428
+ # @option params [String] :client_token
429
+ # A unique identifier to ensure the idempotency of the resource request.
430
+ # As a best practice, specify this token to ensure idempotency, so that
431
+ # Amazon Web Services Cloud Control API can accurately distinguish
432
+ # between request retries and new resource requests. You might retry a
433
+ # resource request to ensure that it was successfully received.
434
+ #
435
+ # A client token is valid for 36 hours once used. After that, a resource
436
+ # request with the same client token is treated as a new request.
437
+ #
438
+ # If you do not specify a client token, one is generated for inclusion
439
+ # in the request.
440
+ #
441
+ # For more information, see [Ensuring resource operation requests are
442
+ # unique][1] in the *Amazon Web Services Cloud Control API User Guide*.
443
+ #
444
+ # **A suitable default value is auto-generated.** You should normally
445
+ # not need to pass this option.**
446
+ #
447
+ #
448
+ #
449
+ # [1]: https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-operations.html#resource-operations-idempotency
450
+ #
451
+ # @option params [required, String] :desired_state
452
+ # Structured data format representing the desired state of the resource,
453
+ # consisting of that resource's properties and their desired values.
454
+ #
455
+ # <note markdown="1"> Cloud Control API currently supports JSON as a structured data format.
456
+ #
457
+ # </note>
458
+ #
459
+ # Specify the desired state as one of the following:
460
+ #
461
+ # * A JSON blob
462
+ #
463
+ # * A local path containing the desired state in JSON data format
464
+ #
465
+ # For more information, see [Composing the desired state of the
466
+ # resource][1] in the *Amazon Web Services Cloud Control API User
467
+ # Guide*.
468
+ #
469
+ # For more information about the properties of a specific resource,
470
+ # refer to the related topic for the resource in the [Resource and
471
+ # property types reference][2] in the *Amazon Web Services
472
+ # CloudFormation Users Guide*.
473
+ #
474
+ #
475
+ #
476
+ # [1]: https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-operations-create.html#resource-operations-create-desiredstate
477
+ # [2]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html
478
+ #
479
+ # @return [Types::CreateResourceOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
480
+ #
481
+ # * {Types::CreateResourceOutput#progress_event #progress_event} => Types::ProgressEvent
482
+ #
483
+ # @example Request syntax with placeholder values
484
+ #
485
+ # resp = client.create_resource({
486
+ # type_name: "TypeName", # required
487
+ # type_version_id: "TypeVersionId",
488
+ # role_arn: "RoleArn",
489
+ # client_token: "ClientToken",
490
+ # desired_state: "Properties", # required
491
+ # })
492
+ #
493
+ # @example Response structure
494
+ #
495
+ # resp.progress_event.type_name #=> String
496
+ # resp.progress_event.identifier #=> String
497
+ # resp.progress_event.request_token #=> String
498
+ # resp.progress_event.operation #=> String, one of "CREATE", "DELETE", "UPDATE"
499
+ # resp.progress_event.operation_status #=> String, one of "PENDING", "IN_PROGRESS", "SUCCESS", "FAILED", "CANCEL_IN_PROGRESS", "CANCEL_COMPLETE"
500
+ # resp.progress_event.event_time #=> Time
501
+ # resp.progress_event.resource_model #=> String
502
+ # resp.progress_event.status_message #=> String
503
+ # resp.progress_event.error_code #=> String, one of "NotUpdatable", "InvalidRequest", "AccessDenied", "InvalidCredentials", "AlreadyExists", "NotFound", "ResourceConflict", "Throttling", "ServiceLimitExceeded", "NotStabilized", "GeneralServiceException", "ServiceInternalError", "ServiceTimeout", "NetworkFailure", "InternalFailure"
504
+ # resp.progress_event.retry_after #=> Time
505
+ #
506
+ # @see http://docs.aws.amazon.com/goto/WebAPI/cloudcontrol-2021-09-30/CreateResource AWS API Documentation
507
+ #
508
+ # @overload create_resource(params = {})
509
+ # @param [Hash] params ({})
510
+ def create_resource(params = {}, options = {})
511
+ req = build_request(:create_resource, params)
512
+ req.send_request(options)
513
+ end
514
+
515
+ # Deletes the specified resource. For details, see [Deleting a
516
+ # resource][1] in the *Amazon Web Services Cloud Control API User
517
+ # Guide*.
518
+ #
519
+ # After you have initiated a resource deletion request, you can monitor
520
+ # the progress of your request by calling [GetResourceRequestStatus][2]
521
+ # using the `RequestToken` of the `ProgressEvent` returned by
522
+ # `DeleteResource`.
523
+ #
524
+ #
525
+ #
526
+ # [1]: https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-operations-delete.html
527
+ # [2]: https://docs.aws.amazon.com/cloudcontrolapi/latest/APIReference/API_GetResourceRequestStatus.html
528
+ #
529
+ # @option params [required, String] :type_name
530
+ # The name of the resource type.
531
+ #
532
+ # @option params [String] :type_version_id
533
+ # For private resource types, the type version to use in this resource
534
+ # operation. If you do not specify a resource version, CloudFormation
535
+ # uses the default version.
536
+ #
537
+ # @option params [String] :role_arn
538
+ # The Amazon Resource Name (ARN) of the Identity and Access Management
539
+ # (IAM) for Cloud Control API to use when performing this resource
540
+ # operation. The role specified must have the permissions required for
541
+ # this operation. The necessary permissions for each event handler are
542
+ # defined in the ` handlers ` section of the [resource type definition
543
+ # schema][1].
544
+ #
545
+ # If you do not specify a role, Cloud Control API uses a temporary
546
+ # session created using your Amazon Web Services user credentials.
547
+ #
548
+ # For more information, see [Specifying credentials][2] in the *Amazon
549
+ # Web Services Cloud Control API User Guide*.
550
+ #
551
+ #
552
+ #
553
+ # [1]: https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/resource-type-schema.html
554
+ # [2]: https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-operations.html#resource-operations-permissions
555
+ #
556
+ # @option params [String] :client_token
557
+ # A unique identifier to ensure the idempotency of the resource request.
558
+ # As a best practice, specify this token to ensure idempotency, so that
559
+ # Amazon Web Services Cloud Control API can accurately distinguish
560
+ # between request retries and new resource requests. You might retry a
561
+ # resource request to ensure that it was successfully received.
562
+ #
563
+ # A client token is valid for 36 hours once used. After that, a resource
564
+ # request with the same client token is treated as a new request.
565
+ #
566
+ # If you do not specify a client token, one is generated for inclusion
567
+ # in the request.
568
+ #
569
+ # For more information, see [Ensuring resource operation requests are
570
+ # unique][1] in the *Amazon Web Services Cloud Control API User Guide*.
571
+ #
572
+ # **A suitable default value is auto-generated.** You should normally
573
+ # not need to pass this option.**
574
+ #
575
+ #
576
+ #
577
+ # [1]: https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-operations.html#resource-operations-idempotency
578
+ #
579
+ # @option params [required, String] :identifier
580
+ # The identifier for the resource.
581
+ #
582
+ # You can specify the primary identifier, or any secondary identifier
583
+ # defined for the resource type in its resource schema. You can only
584
+ # specify one identifier. Primary identifiers can be specified as a
585
+ # string or JSON; secondary identifiers must be specified as JSON.
586
+ #
587
+ # For compound primary identifiers (that is, one that consists of
588
+ # multiple resource properties strung together), to specify the primary
589
+ # identifier as a string, list the property values *in the order they
590
+ # are specified* in the primary identifier definition, separated by `|`.
591
+ #
592
+ # For more information, see [Identifying resources][1] in the *Amazon
593
+ # Web Services Cloud Control API User Guide*.
594
+ #
595
+ #
596
+ #
597
+ # [1]: https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-identifier.html
598
+ #
599
+ # @return [Types::DeleteResourceOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
600
+ #
601
+ # * {Types::DeleteResourceOutput#progress_event #progress_event} => Types::ProgressEvent
602
+ #
603
+ # @example Request syntax with placeholder values
604
+ #
605
+ # resp = client.delete_resource({
606
+ # type_name: "TypeName", # required
607
+ # type_version_id: "TypeVersionId",
608
+ # role_arn: "RoleArn",
609
+ # client_token: "ClientToken",
610
+ # identifier: "Identifier", # required
611
+ # })
612
+ #
613
+ # @example Response structure
614
+ #
615
+ # resp.progress_event.type_name #=> String
616
+ # resp.progress_event.identifier #=> String
617
+ # resp.progress_event.request_token #=> String
618
+ # resp.progress_event.operation #=> String, one of "CREATE", "DELETE", "UPDATE"
619
+ # resp.progress_event.operation_status #=> String, one of "PENDING", "IN_PROGRESS", "SUCCESS", "FAILED", "CANCEL_IN_PROGRESS", "CANCEL_COMPLETE"
620
+ # resp.progress_event.event_time #=> Time
621
+ # resp.progress_event.resource_model #=> String
622
+ # resp.progress_event.status_message #=> String
623
+ # resp.progress_event.error_code #=> String, one of "NotUpdatable", "InvalidRequest", "AccessDenied", "InvalidCredentials", "AlreadyExists", "NotFound", "ResourceConflict", "Throttling", "ServiceLimitExceeded", "NotStabilized", "GeneralServiceException", "ServiceInternalError", "ServiceTimeout", "NetworkFailure", "InternalFailure"
624
+ # resp.progress_event.retry_after #=> Time
625
+ #
626
+ # @see http://docs.aws.amazon.com/goto/WebAPI/cloudcontrol-2021-09-30/DeleteResource AWS API Documentation
627
+ #
628
+ # @overload delete_resource(params = {})
629
+ # @param [Hash] params ({})
630
+ def delete_resource(params = {}, options = {})
631
+ req = build_request(:delete_resource, params)
632
+ req.send_request(options)
633
+ end
634
+
635
+ # Returns information about the current state of the specified resource.
636
+ # For details, see [Reading a resource's current state][1].
637
+ #
638
+ # You can use this action to return information about an existing
639
+ # resource in your account and Amazon Web Services Region, whether or
640
+ # not those resources were provisioned using Cloud Control API.
641
+ #
642
+ #
643
+ #
644
+ # [1]: https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-operations-read.html
645
+ #
646
+ # @option params [required, String] :type_name
647
+ # The name of the resource type.
648
+ #
649
+ # @option params [String] :type_version_id
650
+ # For private resource types, the type version to use in this resource
651
+ # operation. If you do not specify a resource version, CloudFormation
652
+ # uses the default version.
653
+ #
654
+ # @option params [String] :role_arn
655
+ # The Amazon Resource Name (ARN) of the Identity and Access Management
656
+ # (IAM) for Cloud Control API to use when performing this resource
657
+ # operation. The role specified must have the permissions required for
658
+ # this operation. The necessary permissions for each event handler are
659
+ # defined in the ` handlers ` section of the [resource type definition
660
+ # schema][1].
661
+ #
662
+ # If you do not specify a role, Cloud Control API uses a temporary
663
+ # session created using your Amazon Web Services user credentials.
664
+ #
665
+ # For more information, see [Specifying credentials][2] in the *Amazon
666
+ # Web Services Cloud Control API User Guide*.
667
+ #
668
+ #
669
+ #
670
+ # [1]: https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/resource-type-schema.html
671
+ # [2]: https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-operations.html#resource-operations-permissions
672
+ #
673
+ # @option params [required, String] :identifier
674
+ # The identifier for the resource.
675
+ #
676
+ # You can specify the primary identifier, or any secondary identifier
677
+ # defined for the resource type in its resource schema. You can only
678
+ # specify one identifier. Primary identifiers can be specified as a
679
+ # string or JSON; secondary identifiers must be specified as JSON.
680
+ #
681
+ # For compound primary identifiers (that is, one that consists of
682
+ # multiple resource properties strung together), to specify the primary
683
+ # identifier as a string, list the property values *in the order they
684
+ # are specified* in the primary identifier definition, separated by `|`.
685
+ #
686
+ # For more information, see [Identifying resources][1] in the *Amazon
687
+ # Web Services Cloud Control API User Guide*.
688
+ #
689
+ #
690
+ #
691
+ # [1]: https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-identifier.html
692
+ #
693
+ # @return [Types::GetResourceOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
694
+ #
695
+ # * {Types::GetResourceOutput#type_name #type_name} => String
696
+ # * {Types::GetResourceOutput#resource_description #resource_description} => Types::ResourceDescription
697
+ #
698
+ # @example Request syntax with placeholder values
699
+ #
700
+ # resp = client.get_resource({
701
+ # type_name: "TypeName", # required
702
+ # type_version_id: "TypeVersionId",
703
+ # role_arn: "RoleArn",
704
+ # identifier: "Identifier", # required
705
+ # })
706
+ #
707
+ # @example Response structure
708
+ #
709
+ # resp.type_name #=> String
710
+ # resp.resource_description.identifier #=> String
711
+ # resp.resource_description.properties #=> String
712
+ #
713
+ # @see http://docs.aws.amazon.com/goto/WebAPI/cloudcontrol-2021-09-30/GetResource AWS API Documentation
714
+ #
715
+ # @overload get_resource(params = {})
716
+ # @param [Hash] params ({})
717
+ def get_resource(params = {}, options = {})
718
+ req = build_request(:get_resource, params)
719
+ req.send_request(options)
720
+ end
721
+
722
+ # Returns the current status of a resource operation request. For more
723
+ # information, see [Tracking the progress of resource operation
724
+ # requests][1] in the *Amazon Web Services Cloud Control API User
725
+ # Guide*.
726
+ #
727
+ #
728
+ #
729
+ # [1]: https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-operations-manage-requests.html#resource-operations-manage-requests-track
730
+ #
731
+ # @option params [required, String] :request_token
732
+ # A unique token used to track the progress of the resource operation
733
+ # request.
734
+ #
735
+ # Request tokens are included in the `ProgressEvent` type returned by a
736
+ # resource operation request.
737
+ #
738
+ # @return [Types::GetResourceRequestStatusOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
739
+ #
740
+ # * {Types::GetResourceRequestStatusOutput#progress_event #progress_event} => Types::ProgressEvent
741
+ #
742
+ # @example Request syntax with placeholder values
743
+ #
744
+ # resp = client.get_resource_request_status({
745
+ # request_token: "RequestToken", # required
746
+ # })
747
+ #
748
+ # @example Response structure
749
+ #
750
+ # resp.progress_event.type_name #=> String
751
+ # resp.progress_event.identifier #=> String
752
+ # resp.progress_event.request_token #=> String
753
+ # resp.progress_event.operation #=> String, one of "CREATE", "DELETE", "UPDATE"
754
+ # resp.progress_event.operation_status #=> String, one of "PENDING", "IN_PROGRESS", "SUCCESS", "FAILED", "CANCEL_IN_PROGRESS", "CANCEL_COMPLETE"
755
+ # resp.progress_event.event_time #=> Time
756
+ # resp.progress_event.resource_model #=> String
757
+ # resp.progress_event.status_message #=> String
758
+ # resp.progress_event.error_code #=> String, one of "NotUpdatable", "InvalidRequest", "AccessDenied", "InvalidCredentials", "AlreadyExists", "NotFound", "ResourceConflict", "Throttling", "ServiceLimitExceeded", "NotStabilized", "GeneralServiceException", "ServiceInternalError", "ServiceTimeout", "NetworkFailure", "InternalFailure"
759
+ # resp.progress_event.retry_after #=> Time
760
+ #
761
+ #
762
+ # The following waiters are defined for this operation (see {Client#wait_until} for detailed usage):
763
+ #
764
+ # * resource_request_success
765
+ #
766
+ # @see http://docs.aws.amazon.com/goto/WebAPI/cloudcontrol-2021-09-30/GetResourceRequestStatus AWS API Documentation
767
+ #
768
+ # @overload get_resource_request_status(params = {})
769
+ # @param [Hash] params ({})
770
+ def get_resource_request_status(params = {}, options = {})
771
+ req = build_request(:get_resource_request_status, params)
772
+ req.send_request(options)
773
+ end
774
+
775
+ # Returns existing resource operation requests. This includes requests
776
+ # of all status types. For more information, see [Listing active
777
+ # resource operation requests][1] in the *Amazon Web Services Cloud
778
+ # Control API User Guide*.
779
+ #
780
+ # <note markdown="1"> Resource operation requests expire after seven days.
781
+ #
782
+ # </note>
783
+ #
784
+ #
785
+ #
786
+ # [1]: https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-operations-manage-requests.html#resource-operations-manage-requests-list
787
+ #
788
+ # @option params [Integer] :max_results
789
+ # The maximum number of results to be returned with a single call. If
790
+ # the number of available results exceeds this maximum, the response
791
+ # includes a `NextToken` value that you can assign to the `NextToken`
792
+ # request parameter to get the next set of results.
793
+ #
794
+ # The default is `20`.
795
+ #
796
+ # @option params [String] :next_token
797
+ # If the previous paginated request didn't return all of the remaining
798
+ # results, the response object's `NextToken` parameter value is set to
799
+ # a token. To retrieve the next set of results, call this action again
800
+ # and assign that token to the request object's `NextToken` parameter.
801
+ # If there are no remaining results, the previous response object's
802
+ # `NextToken` parameter is set to `null`.
803
+ #
804
+ # @option params [Types::ResourceRequestStatusFilter] :resource_request_status_filter
805
+ # The filter criteria to apply to the requests returned.
806
+ #
807
+ # @return [Types::ListResourceRequestsOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
808
+ #
809
+ # * {Types::ListResourceRequestsOutput#resource_request_status_summaries #resource_request_status_summaries} => Array&lt;Types::ProgressEvent&gt;
810
+ # * {Types::ListResourceRequestsOutput#next_token #next_token} => String
811
+ #
812
+ # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
813
+ #
814
+ # @example Request syntax with placeholder values
815
+ #
816
+ # resp = client.list_resource_requests({
817
+ # max_results: 1,
818
+ # next_token: "NextToken",
819
+ # resource_request_status_filter: {
820
+ # operations: ["CREATE"], # accepts CREATE, DELETE, UPDATE
821
+ # operation_statuses: ["PENDING"], # accepts PENDING, IN_PROGRESS, SUCCESS, FAILED, CANCEL_IN_PROGRESS, CANCEL_COMPLETE
822
+ # },
823
+ # })
824
+ #
825
+ # @example Response structure
826
+ #
827
+ # resp.resource_request_status_summaries #=> Array
828
+ # resp.resource_request_status_summaries[0].type_name #=> String
829
+ # resp.resource_request_status_summaries[0].identifier #=> String
830
+ # resp.resource_request_status_summaries[0].request_token #=> String
831
+ # resp.resource_request_status_summaries[0].operation #=> String, one of "CREATE", "DELETE", "UPDATE"
832
+ # resp.resource_request_status_summaries[0].operation_status #=> String, one of "PENDING", "IN_PROGRESS", "SUCCESS", "FAILED", "CANCEL_IN_PROGRESS", "CANCEL_COMPLETE"
833
+ # resp.resource_request_status_summaries[0].event_time #=> Time
834
+ # resp.resource_request_status_summaries[0].resource_model #=> String
835
+ # resp.resource_request_status_summaries[0].status_message #=> String
836
+ # resp.resource_request_status_summaries[0].error_code #=> String, one of "NotUpdatable", "InvalidRequest", "AccessDenied", "InvalidCredentials", "AlreadyExists", "NotFound", "ResourceConflict", "Throttling", "ServiceLimitExceeded", "NotStabilized", "GeneralServiceException", "ServiceInternalError", "ServiceTimeout", "NetworkFailure", "InternalFailure"
837
+ # resp.resource_request_status_summaries[0].retry_after #=> Time
838
+ # resp.next_token #=> String
839
+ #
840
+ # @see http://docs.aws.amazon.com/goto/WebAPI/cloudcontrol-2021-09-30/ListResourceRequests AWS API Documentation
841
+ #
842
+ # @overload list_resource_requests(params = {})
843
+ # @param [Hash] params ({})
844
+ def list_resource_requests(params = {}, options = {})
845
+ req = build_request(:list_resource_requests, params)
846
+ req.send_request(options)
847
+ end
848
+
849
+ # Returns information about the specified resources. For more
850
+ # information, see [Discovering
851
+ # resources](cloudcontrolapi/latest/userguide/resource-operations-list.html)
852
+ # in the *Amazon Web Services Cloud Control API User Guide*.
853
+ #
854
+ # You can use this action to return information about existing resources
855
+ # in your account and Amazon Web Services Region, whether or not those
856
+ # resources were provisioned using Cloud Control API.
857
+ #
858
+ # @option params [required, String] :type_name
859
+ # The name of the resource type.
860
+ #
861
+ # @option params [String] :type_version_id
862
+ # For private resource types, the type version to use in this resource
863
+ # operation. If you do not specify a resource version, CloudFormation
864
+ # uses the default version.
865
+ #
866
+ # @option params [String] :role_arn
867
+ # The Amazon Resource Name (ARN) of the Identity and Access Management
868
+ # (IAM) for Cloud Control API to use when performing this resource
869
+ # operation. The role specified must have the permissions required for
870
+ # this operation. The necessary permissions for each event handler are
871
+ # defined in the ` handlers ` section of the [resource type definition
872
+ # schema][1].
873
+ #
874
+ # If you do not specify a role, Cloud Control API uses a temporary
875
+ # session created using your Amazon Web Services user credentials.
876
+ #
877
+ # For more information, see [Specifying credentials][2] in the *Amazon
878
+ # Web Services Cloud Control API User Guide*.
879
+ #
880
+ #
881
+ #
882
+ # [1]: https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/resource-type-schema.html
883
+ # [2]: https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-operations.html#resource-operations-permissions
884
+ #
885
+ # @option params [String] :next_token
886
+ # If the previous paginated request didn't return all of the remaining
887
+ # results, the response object's `NextToken` parameter value is set to
888
+ # a token. To retrieve the next set of results, call this action again
889
+ # and assign that token to the request object's `NextToken` parameter.
890
+ # If there are no remaining results, the previous response object's
891
+ # `NextToken` parameter is set to `null`.
892
+ #
893
+ # @option params [Integer] :max_results
894
+ # The maximum number of results to be returned with a single call. If
895
+ # the number of available results exceeds this maximum, the response
896
+ # includes a `NextToken` value that you can assign to the `NextToken`
897
+ # request parameter to get the next set of results.
898
+ #
899
+ # The default is `20`.
900
+ #
901
+ # @option params [String] :resource_model
902
+ # The resource model to use to select the resources to return.
903
+ #
904
+ # @return [Types::ListResourcesOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
905
+ #
906
+ # * {Types::ListResourcesOutput#type_name #type_name} => String
907
+ # * {Types::ListResourcesOutput#resource_descriptions #resource_descriptions} => Array&lt;Types::ResourceDescription&gt;
908
+ # * {Types::ListResourcesOutput#next_token #next_token} => String
909
+ #
910
+ # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
911
+ #
912
+ # @example Request syntax with placeholder values
913
+ #
914
+ # resp = client.list_resources({
915
+ # type_name: "TypeName", # required
916
+ # type_version_id: "TypeVersionId",
917
+ # role_arn: "RoleArn",
918
+ # next_token: "HandlerNextToken",
919
+ # max_results: 1,
920
+ # resource_model: "Properties",
921
+ # })
922
+ #
923
+ # @example Response structure
924
+ #
925
+ # resp.type_name #=> String
926
+ # resp.resource_descriptions #=> Array
927
+ # resp.resource_descriptions[0].identifier #=> String
928
+ # resp.resource_descriptions[0].properties #=> String
929
+ # resp.next_token #=> String
930
+ #
931
+ # @see http://docs.aws.amazon.com/goto/WebAPI/cloudcontrol-2021-09-30/ListResources AWS API Documentation
932
+ #
933
+ # @overload list_resources(params = {})
934
+ # @param [Hash] params ({})
935
+ def list_resources(params = {}, options = {})
936
+ req = build_request(:list_resources, params)
937
+ req.send_request(options)
938
+ end
939
+
940
+ # Updates the specified property values in the resource.
941
+ #
942
+ # You specify your resource property updates as a list of patch
943
+ # operations contained in a JSON patch document that adheres to the [
944
+ # *RFC 6902 - JavaScript Object Notation (JSON) Patch* ][1] standard.
945
+ #
946
+ # For details on how Cloud Control API performs resource update
947
+ # operations, see [Updating a resource][2] in the *Amazon Web Services
948
+ # Cloud Control API User Guide*.
949
+ #
950
+ # After you have initiated a resource update request, you can monitor
951
+ # the progress of your request by calling [GetResourceRequestStatus][3]
952
+ # using the `RequestToken` of the `ProgressEvent` returned by
953
+ # `UpdateResource`.
954
+ #
955
+ # For more information about the properties of a specific resource,
956
+ # refer to the related topic for the resource in the [Resource and
957
+ # property types reference][4] in the *Amazon Web Services
958
+ # CloudFormation Users Guide*.
959
+ #
960
+ #
961
+ #
962
+ # [1]: https://datatracker.ietf.org/doc/html/rfc6902
963
+ # [2]: https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-operations-update.html
964
+ # [3]: https://docs.aws.amazon.com/cloudcontrolapi/latest/APIReference/API_GetResourceRequestStatus.html
965
+ # [4]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html
966
+ #
967
+ # @option params [required, String] :type_name
968
+ # The name of the resource type.
969
+ #
970
+ # @option params [String] :type_version_id
971
+ # For private resource types, the type version to use in this resource
972
+ # operation. If you do not specify a resource version, CloudFormation
973
+ # uses the default version.
974
+ #
975
+ # @option params [String] :role_arn
976
+ # The Amazon Resource Name (ARN) of the Identity and Access Management
977
+ # (IAM) for Cloud Control API to use when performing this resource
978
+ # operation. The role specified must have the permissions required for
979
+ # this operation. The necessary permissions for each event handler are
980
+ # defined in the ` handlers ` section of the [resource type definition
981
+ # schema][1].
982
+ #
983
+ # If you do not specify a role, Cloud Control API uses a temporary
984
+ # session created using your Amazon Web Services user credentials.
985
+ #
986
+ # For more information, see [Specifying credentials][2] in the *Amazon
987
+ # Web Services Cloud Control API User Guide*.
988
+ #
989
+ #
990
+ #
991
+ # [1]: https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/resource-type-schema.html
992
+ # [2]: https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-operations.html#resource-operations-permissions
993
+ #
994
+ # @option params [String] :client_token
995
+ # A unique identifier to ensure the idempotency of the resource request.
996
+ # As a best practice, specify this token to ensure idempotency, so that
997
+ # Amazon Web Services Cloud Control API can accurately distinguish
998
+ # between request retries and new resource requests. You might retry a
999
+ # resource request to ensure that it was successfully received.
1000
+ #
1001
+ # A client token is valid for 36 hours once used. After that, a resource
1002
+ # request with the same client token is treated as a new request.
1003
+ #
1004
+ # If you do not specify a client token, one is generated for inclusion
1005
+ # in the request.
1006
+ #
1007
+ # For more information, see [Ensuring resource operation requests are
1008
+ # unique][1] in the *Amazon Web Services Cloud Control API User Guide*.
1009
+ #
1010
+ # **A suitable default value is auto-generated.** You should normally
1011
+ # not need to pass this option.**
1012
+ #
1013
+ #
1014
+ #
1015
+ # [1]: https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-operations.html#resource-operations-idempotency
1016
+ #
1017
+ # @option params [required, String] :identifier
1018
+ # The identifier for the resource.
1019
+ #
1020
+ # You can specify the primary identifier, or any secondary identifier
1021
+ # defined for the resource type in its resource schema. You can only
1022
+ # specify one identifier. Primary identifiers can be specified as a
1023
+ # string or JSON; secondary identifiers must be specified as JSON.
1024
+ #
1025
+ # For compound primary identifiers (that is, one that consists of
1026
+ # multiple resource properties strung together), to specify the primary
1027
+ # identifier as a string, list the property values *in the order they
1028
+ # are specified* in the primary identifier definition, separated by `|`.
1029
+ #
1030
+ # For more information, see [Identifying resources][1] in the *Amazon
1031
+ # Web Services Cloud Control API User Guide*.
1032
+ #
1033
+ #
1034
+ #
1035
+ # [1]: https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-identifier.html
1036
+ #
1037
+ # @option params [required, String] :patch_document
1038
+ # A JavaScript Object Notation (JSON) document listing the patch
1039
+ # operations that represent the updates to apply to the current resource
1040
+ # properties. For details, see [Composing the patch document][1] in the
1041
+ # *Amazon Web Services Cloud Control API User Guide*.
1042
+ #
1043
+ #
1044
+ #
1045
+ # [1]: https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-operations-update.html#resource-operations-update-patch
1046
+ #
1047
+ # @return [Types::UpdateResourceOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1048
+ #
1049
+ # * {Types::UpdateResourceOutput#progress_event #progress_event} => Types::ProgressEvent
1050
+ #
1051
+ # @example Request syntax with placeholder values
1052
+ #
1053
+ # resp = client.update_resource({
1054
+ # type_name: "TypeName", # required
1055
+ # type_version_id: "TypeVersionId",
1056
+ # role_arn: "RoleArn",
1057
+ # client_token: "ClientToken",
1058
+ # identifier: "Identifier", # required
1059
+ # patch_document: "PatchDocument", # required
1060
+ # })
1061
+ #
1062
+ # @example Response structure
1063
+ #
1064
+ # resp.progress_event.type_name #=> String
1065
+ # resp.progress_event.identifier #=> String
1066
+ # resp.progress_event.request_token #=> String
1067
+ # resp.progress_event.operation #=> String, one of "CREATE", "DELETE", "UPDATE"
1068
+ # resp.progress_event.operation_status #=> String, one of "PENDING", "IN_PROGRESS", "SUCCESS", "FAILED", "CANCEL_IN_PROGRESS", "CANCEL_COMPLETE"
1069
+ # resp.progress_event.event_time #=> Time
1070
+ # resp.progress_event.resource_model #=> String
1071
+ # resp.progress_event.status_message #=> String
1072
+ # resp.progress_event.error_code #=> String, one of "NotUpdatable", "InvalidRequest", "AccessDenied", "InvalidCredentials", "AlreadyExists", "NotFound", "ResourceConflict", "Throttling", "ServiceLimitExceeded", "NotStabilized", "GeneralServiceException", "ServiceInternalError", "ServiceTimeout", "NetworkFailure", "InternalFailure"
1073
+ # resp.progress_event.retry_after #=> Time
1074
+ #
1075
+ # @see http://docs.aws.amazon.com/goto/WebAPI/cloudcontrol-2021-09-30/UpdateResource AWS API Documentation
1076
+ #
1077
+ # @overload update_resource(params = {})
1078
+ # @param [Hash] params ({})
1079
+ def update_resource(params = {}, options = {})
1080
+ req = build_request(:update_resource, params)
1081
+ req.send_request(options)
1082
+ end
1083
+
1084
+ # @!endgroup
1085
+
1086
+ # @param params ({})
1087
+ # @api private
1088
+ def build_request(operation_name, params = {})
1089
+ handlers = @handlers.for(operation_name)
1090
+ context = Seahorse::Client::RequestContext.new(
1091
+ operation_name: operation_name,
1092
+ operation: config.api.operation(operation_name),
1093
+ client: self,
1094
+ params: params,
1095
+ config: config)
1096
+ context[:gem_name] = 'aws-sdk-cloudcontrolapi'
1097
+ context[:gem_version] = '1.0.0'
1098
+ Seahorse::Client::Request.new(handlers, context)
1099
+ end
1100
+
1101
+ # Polls an API operation until a resource enters a desired state.
1102
+ #
1103
+ # ## Basic Usage
1104
+ #
1105
+ # A waiter will call an API operation until:
1106
+ #
1107
+ # * It is successful
1108
+ # * It enters a terminal state
1109
+ # * It makes the maximum number of attempts
1110
+ #
1111
+ # In between attempts, the waiter will sleep.
1112
+ #
1113
+ # # polls in a loop, sleeping between attempts
1114
+ # client.wait_until(waiter_name, params)
1115
+ #
1116
+ # ## Configuration
1117
+ #
1118
+ # You can configure the maximum number of polling attempts, and the
1119
+ # delay (in seconds) between each polling attempt. You can pass
1120
+ # configuration as the final arguments hash.
1121
+ #
1122
+ # # poll for ~25 seconds
1123
+ # client.wait_until(waiter_name, params, {
1124
+ # max_attempts: 5,
1125
+ # delay: 5,
1126
+ # })
1127
+ #
1128
+ # ## Callbacks
1129
+ #
1130
+ # You can be notified before each polling attempt and before each
1131
+ # delay. If you throw `:success` or `:failure` from these callbacks,
1132
+ # it will terminate the waiter.
1133
+ #
1134
+ # started_at = Time.now
1135
+ # client.wait_until(waiter_name, params, {
1136
+ #
1137
+ # # disable max attempts
1138
+ # max_attempts: nil,
1139
+ #
1140
+ # # poll for 1 hour, instead of a number of attempts
1141
+ # before_wait: -> (attempts, response) do
1142
+ # throw :failure if Time.now - started_at > 3600
1143
+ # end
1144
+ # })
1145
+ #
1146
+ # ## Handling Errors
1147
+ #
1148
+ # When a waiter is unsuccessful, it will raise an error.
1149
+ # All of the failure errors extend from
1150
+ # {Aws::Waiters::Errors::WaiterFailed}.
1151
+ #
1152
+ # begin
1153
+ # client.wait_until(...)
1154
+ # rescue Aws::Waiters::Errors::WaiterFailed
1155
+ # # resource did not enter the desired state in time
1156
+ # end
1157
+ #
1158
+ # ## Valid Waiters
1159
+ #
1160
+ # The following table lists the valid waiter names, the operations they call,
1161
+ # and the default `:delay` and `:max_attempts` values.
1162
+ #
1163
+ # | waiter_name | params | :delay | :max_attempts |
1164
+ # | ------------------------ | ------------------------------------ | -------- | ------------- |
1165
+ # | resource_request_success | {Client#get_resource_request_status} | 5 | 720 |
1166
+ #
1167
+ # @raise [Errors::FailureStateError] Raised when the waiter terminates
1168
+ # because the waiter has entered a state that it will not transition
1169
+ # out of, preventing success.
1170
+ #
1171
+ # @raise [Errors::TooManyAttemptsError] Raised when the configured
1172
+ # maximum number of attempts have been made, and the waiter is not
1173
+ # yet successful.
1174
+ #
1175
+ # @raise [Errors::UnexpectedError] Raised when an error is encounted
1176
+ # while polling for a resource that is not expected.
1177
+ #
1178
+ # @raise [Errors::NoSuchWaiterError] Raised when you request to wait
1179
+ # for an unknown state.
1180
+ #
1181
+ # @return [Boolean] Returns `true` if the waiter was successful.
1182
+ # @param [Symbol] waiter_name
1183
+ # @param [Hash] params ({})
1184
+ # @param [Hash] options ({})
1185
+ # @option options [Integer] :max_attempts
1186
+ # @option options [Integer] :delay
1187
+ # @option options [Proc] :before_attempt
1188
+ # @option options [Proc] :before_wait
1189
+ def wait_until(waiter_name, params = {}, options = {})
1190
+ w = waiter(waiter_name, options)
1191
+ yield(w.waiter) if block_given? # deprecated
1192
+ w.wait(params)
1193
+ end
1194
+
1195
+ # @api private
1196
+ # @deprecated
1197
+ def waiter_names
1198
+ waiters.keys
1199
+ end
1200
+
1201
+ private
1202
+
1203
+ # @param [Symbol] waiter_name
1204
+ # @param [Hash] options ({})
1205
+ def waiter(waiter_name, options = {})
1206
+ waiter_class = waiters[waiter_name]
1207
+ if waiter_class
1208
+ waiter_class.new(options.merge(client: self))
1209
+ else
1210
+ raise Aws::Waiters::Errors::NoSuchWaiterError.new(waiter_name, waiters.keys)
1211
+ end
1212
+ end
1213
+
1214
+ def waiters
1215
+ {
1216
+ resource_request_success: Waiters::ResourceRequestSuccess
1217
+ }
1218
+ end
1219
+
1220
+ class << self
1221
+
1222
+ # @api private
1223
+ attr_reader :identifier
1224
+
1225
+ # @api private
1226
+ def errors_module
1227
+ Errors
1228
+ end
1229
+
1230
+ end
1231
+ end
1232
+ end