aws-sdk-proton 1.0.0 → 1.4.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.
@@ -167,7 +167,7 @@ module Aws::Proton
167
167
  TagValue = Shapes::StringShape.new(name: 'TagValue')
168
168
  TemplateSchema = Shapes::StringShape.new(name: 'TemplateSchema')
169
169
  TemplateVersionPart = Shapes::StringShape.new(name: 'TemplateVersionPart')
170
- TemplateVersionSourceInput = Shapes::StructureShape.new(name: 'TemplateVersionSourceInput')
170
+ TemplateVersionSourceInput = Shapes::UnionShape.new(name: 'TemplateVersionSourceInput')
171
171
  TemplateVersionStatus = Shapes::StringShape.new(name: 'TemplateVersionStatus')
172
172
  ThrottlingException = Shapes::StructureShape.new(name: 'ThrottlingException')
173
173
  Timestamp = Shapes::TimestampShape.new(name: 'Timestamp')
@@ -784,6 +784,9 @@ module Aws::Proton
784
784
  TagResourceOutput.struct_class = Types::TagResourceOutput
785
785
 
786
786
  TemplateVersionSourceInput.add_member(:s3, Shapes::ShapeRef.new(shape: S3ObjectSource, location_name: "s3"))
787
+ TemplateVersionSourceInput.add_member(:unknown, Shapes::ShapeRef.new(shape: nil, location_name: 'unknown'))
788
+ TemplateVersionSourceInput.add_member_subclass(:s3, Types::TemplateVersionSourceInput::S3)
789
+ TemplateVersionSourceInput.add_member_subclass(:unknown, Types::TemplateVersionSourceInput::Unknown)
787
790
  TemplateVersionSourceInput.struct_class = Types::TemplateVersionSourceInput
788
791
 
789
792
  ThrottlingException.add_member(:message, Shapes::ShapeRef.new(shape: ErrorMessage, required: true, location_name: "message"))
@@ -325,8 +325,11 @@ module Aws::Proton
325
325
  # environment account. You must include either the
326
326
  # `environmentAccountConnectionId` or `protonServiceRoleArn` parameter
327
327
  # and value. For more information, see [Environment account
328
- # connections](proton/latest/adminguide/ag-env-account-connections.html)
329
- # in the *AWS Proton Administration guide*.
328
+ # connections][1] in the *AWS Proton Administrator guide*.
329
+ #
330
+ #
331
+ #
332
+ # [1]: https://docs.aws.amazon.com/proton/latest/adminguide/ag-env-account-connections.html
330
333
  # @return [String]
331
334
  #
332
335
  # @!attribute [rw] name
@@ -343,17 +346,17 @@ module Aws::Proton
343
346
  # @!attribute [rw] spec
344
347
  # A link to a YAML formatted spec file that provides inputs as defined
345
348
  # in the environment template bundle schema file. For more
346
- # information, see [Environments][1] in the *AWS Proton Administration
349
+ # information, see [Environments][1] in the *AWS Proton Administrator
347
350
  # Guide*.
348
351
  #
349
352
  #
350
353
  #
351
- # [1]: https://docs.aws.amazon.com/proton/latest/adminguide/ag-managing-environments.html
354
+ # [1]: https://docs.aws.amazon.com/proton/latest/adminguide/ag-environments.html
352
355
  # @return [String]
353
356
  #
354
357
  # @!attribute [rw] tags
355
358
  # Create tags for your environment. For more information, see *AWS
356
- # Proton resources and tagging* in the [AWS Proton Administration
359
+ # Proton resources and tagging* in the [AWS Proton Administrator
357
360
  # Guide][1] or [AWS Proton User Guide][2].
358
361
  #
359
362
  #
@@ -372,11 +375,11 @@ module Aws::Proton
372
375
  #
373
376
  # @!attribute [rw] template_name
374
377
  # The name of the environment template. For more information, see
375
- # [Environment Templates][1] in the *AWS Proton Administration Guide*.
378
+ # [Environment Templates][1] in the *AWS Proton Administrator Guide*.
376
379
  #
377
380
  #
378
381
  #
379
- # [1]: https://docs.aws.amazon.com/proton/latest/adminguide/ag-env-templates.html
382
+ # [1]: https://docs.aws.amazon.com/proton/latest/adminguide/ag-templates.html
380
383
  # @return [String]
381
384
  #
382
385
  # @see http://docs.aws.amazon.com/goto/WebAPI/proton-2020-07-20/CreateEnvironmentInput AWS API Documentation
@@ -449,7 +452,7 @@ module Aws::Proton
449
452
  #
450
453
  # @!attribute [rw] tags
451
454
  # Create tags for your environment template. For more information, see
452
- # *AWS Proton resources and tagging* in the [AWS Proton Administration
455
+ # *AWS Proton resources and tagging* in the [AWS Proton Administrator
453
456
  # Guide][1] or [AWS Proton User Guide][2].
454
457
  #
455
458
  #
@@ -523,7 +526,7 @@ module Aws::Proton
523
526
  # `majorVersion`.
524
527
  #
525
528
  # To create a new major and minor version of the environment template,
526
- # exclude `majorVersion`.
529
+ # *exclude* `majorVersion`.
527
530
  # @return [String]
528
531
  #
529
532
  # @!attribute [rw] source
@@ -600,16 +603,16 @@ module Aws::Proton
600
603
  # @return [String]
601
604
  #
602
605
  # @!attribute [rw] repository_connection_arn
603
- # The ARN of the repository connection. For more information, see [Set
604
- # up repository connection][1] in the *AWS Proton Administration
605
- # Guide* and [Getting started][2] in the *AWS Proton User Guide*.
606
- # *Don't* include this parameter if your service template *doesn't*
607
- # include a service pipeline.
606
+ # The Amazon Resource Name (ARN) of the repository connection. For
607
+ # more information, see [Set up repository connection][1] in the *AWS
608
+ # Proton Administrator Guide* and [Setting up with AWS Proton][2] in
609
+ # the *AWS Proton User Guide*. *Don't* include this parameter if your
610
+ # service template *doesn't* include a service pipeline.
608
611
  #
609
612
  #
610
613
  #
611
- # [1]: https://docs.aws.amazon.com/proton/latest/adminguide/setting-up-for-service.html#settingSS-up-vcontrol
612
- # [2]: https://docs.aws.amazon.com/proton/latest/userguide/ug-getting-started.html#getting-started-step1
614
+ # [1]: https://docs.aws.amazon.com/proton/latest/adminguide/setting-up-for-service.html#setting-up-vcontrol
615
+ # [2]: https://docs.aws.amazon.com/proton/latest/userguide/proton-setup.html#setup-repo-connection
613
616
  # @return [String]
614
617
  #
615
618
  # @!attribute [rw] repository_id
@@ -620,10 +623,10 @@ module Aws::Proton
620
623
  # @!attribute [rw] spec
621
624
  # A link to a spec file that provides inputs as defined in the service
622
625
  # template bundle schema file. The spec file is in YAML format. Don’t
623
- # include pipeline inputs in the spec if your service template doesn’t
624
- # include a service pipeline. For more information, see [Create a
625
- # service][1] in the *AWS Proton Administration Guide* and [Create a
626
- # service][2] in the *AWS Proton User Guide*.
626
+ # include pipeline inputs in the spec if your service template
627
+ # *doesn’t* include a service pipeline. For more information, see
628
+ # [Create a service][1] in the *AWS Proton Administrator Guide* and
629
+ # [Create a service][2] in the *AWS Proton User Guide*.
627
630
  #
628
631
  #
629
632
  #
@@ -633,8 +636,8 @@ module Aws::Proton
633
636
  #
634
637
  # @!attribute [rw] tags
635
638
  # Create tags for your service. For more information, see *AWS Proton
636
- # resources and tagging* in the [AWS Proton Administration Guide][1]
637
- # or [AWS Proton User Guide][2].
639
+ # resources and tagging* in the [AWS Proton Administrator Guide][1] or
640
+ # [AWS Proton User Guide][2].
638
641
  #
639
642
  #
640
643
  #
@@ -724,16 +727,16 @@ module Aws::Proton
724
727
  # When included, this parameter indicates that an AWS Proton service
725
728
  # pipeline *won't* be included for your service. Once specified, this
726
729
  # parameter *can't* be changed. For more information, see [Service
727
- # template bundles][1] in the *AWS Proton Administration Guide*.
730
+ # template bundles][1] in the *AWS Proton Administrator Guide*.
728
731
  #
729
732
  #
730
733
  #
731
- # [1]: https://docs.aws.amazon.com/proton/latest/adminguide/ag-svc-template-bundles.html
734
+ # [1]: https://docs.aws.amazon.com/proton/latest/adminguide/ag-template-bundles.html
732
735
  # @return [String]
733
736
  #
734
737
  # @!attribute [rw] tags
735
738
  # Create tags for your service template. For more information, see
736
- # *AWS Proton resources and tagging* in the [AWS Proton Administration
739
+ # *AWS Proton resources and tagging* in the [AWS Proton Administrator
737
740
  # Guide][1] or [AWS Proton User Guide][2].
738
741
  #
739
742
  #
@@ -1151,8 +1154,8 @@ module Aws::Proton
1151
1154
  # @return [String]
1152
1155
  #
1153
1156
  # @!attribute [rw] proton_service_role_arn
1154
- # The ARN of the AWS Proton service role that allows AWS Proton to
1155
- # make calls to other services on your behalf.
1157
+ # The Amazon Resource Name (ARN) of the AWS Proton service role that
1158
+ # allows AWS Proton to make calls to other services on your behalf.
1156
1159
  # @return [String]
1157
1160
  #
1158
1161
  # @!attribute [rw] provisioning
@@ -1173,7 +1176,7 @@ module Aws::Proton
1173
1176
  # @return [String]
1174
1177
  #
1175
1178
  # @!attribute [rw] template_name
1176
- # The ARN of the environment template.
1179
+ # The Amazon Resource Name (ARN) of the environment template.
1177
1180
  # @return [String]
1178
1181
  #
1179
1182
  # @see http://docs.aws.amazon.com/goto/WebAPI/proton-2020-07-20/Environment AWS API Documentation
@@ -1362,8 +1365,8 @@ module Aws::Proton
1362
1365
  # @return [String]
1363
1366
  #
1364
1367
  # @!attribute [rw] proton_service_role_arn
1365
- # The ARN of the AWS Proton service role that allows AWS Proton to
1366
- # make calls to other services on your behalf.
1368
+ # The Amazon Resource Name (ARN) of the AWS Proton service role that
1369
+ # allows AWS Proton to make calls to other services on your behalf.
1367
1370
  # @return [String]
1368
1371
  #
1369
1372
  # @!attribute [rw] provisioning
@@ -2452,7 +2455,7 @@ module Aws::Proton
2452
2455
  # @return [String]
2453
2456
  #
2454
2457
  # @!attribute [rw] resource_arn
2455
- # The ARN of the resource for the listed tags.
2458
+ # The Amazon Resource Name (ARN) of the resource for the listed tags.
2456
2459
  # @return [String]
2457
2460
  #
2458
2461
  # @see http://docs.aws.amazon.com/goto/WebAPI/proton-2020-07-20/ListTagsForResourceInput AWS API Documentation
@@ -2588,14 +2591,15 @@ module Aws::Proton
2588
2591
  # @return [Types::ServicePipeline]
2589
2592
  #
2590
2593
  # @!attribute [rw] repository_connection_arn
2591
- # The ARN of the repository connection. For more information, see [Set
2592
- # up a repository connection][1] in the *AWS Proton Administration
2593
- # Guide* and [Getting started][2] in the *AWS Proton User Guide*.
2594
+ # The Amazon Resource Name (ARN) of the repository connection. For
2595
+ # more information, see [Set up a repository connection][1] in the
2596
+ # *AWS Proton Administrator Guide* and [Setting up with AWS Proton][2]
2597
+ # in the *AWS Proton User Guide*.
2594
2598
  #
2595
2599
  #
2596
2600
  #
2597
2601
  # [1]: https://docs.aws.amazon.com/proton/latest/adminguide/setting-up-for-service.html#setting-up-vcontrol
2598
- # [2]: https://docs.aws.amazon.com/proton/latest/userguide/ug-getting-started.html#getting-started-step1
2602
+ # [2]: https://docs.aws.amazon.com/proton/latest/userguide/proton-setup.html#setup-repo-connection
2599
2603
  # @return [String]
2600
2604
  #
2601
2605
  # @!attribute [rw] repository_id
@@ -2851,7 +2855,7 @@ module Aws::Proton
2851
2855
  end
2852
2856
 
2853
2857
  # A quota was exceeded. For more information, see [AWS Proton Quotas][1]
2854
- # in the *AWS Proton Administration Guide*.
2858
+ # in the *AWS Proton Administrator Guide*.
2855
2859
  #
2856
2860
  #
2857
2861
  #
@@ -3220,15 +3224,7 @@ module Aws::Proton
3220
3224
 
3221
3225
  # Template version source data.
3222
3226
  #
3223
- # @note When making an API call, you may pass TemplateVersionSourceInput
3224
- # data as a hash:
3225
- #
3226
- # {
3227
- # s3: {
3228
- # bucket: "S3Bucket", # required
3229
- # key: "S3Key", # required
3230
- # },
3231
- # }
3227
+ # @note TemplateVersionSourceInput is a union - when making an API calls you must set exactly one of the members.
3232
3228
  #
3233
3229
  # @!attribute [rw] s3
3234
3230
  # An S3 source object that includes the template bundle S3 path and
@@ -3238,9 +3234,14 @@ module Aws::Proton
3238
3234
  # @see http://docs.aws.amazon.com/goto/WebAPI/proton-2020-07-20/TemplateVersionSourceInput AWS API Documentation
3239
3235
  #
3240
3236
  class TemplateVersionSourceInput < Struct.new(
3241
- :s3)
3237
+ :s3,
3238
+ :unknown)
3242
3239
  SENSITIVE = []
3243
3240
  include Aws::Structure
3241
+ include Aws::Structure::Union
3242
+
3243
+ class S3 < TemplateVersionSourceInput; end
3244
+ class Unknown < TemplateVersionSourceInput; end
3244
3245
  end
3245
3246
 
3246
3247
  # The request was denied due to request throttling.
@@ -3422,7 +3423,7 @@ module Aws::Proton
3422
3423
  #
3423
3424
  # You can only update to a new environment account connection if it
3424
3425
  # was created in the same environment account that the current
3425
- # environment account connection was created in and associated with
3426
+ # environment account connection was created in and is associated with
3426
3427
  # the current environment.
3427
3428
  # @return [String]
3428
3429
  #
@@ -3431,8 +3432,8 @@ module Aws::Proton
3431
3432
  # @return [String]
3432
3433
  #
3433
3434
  # @!attribute [rw] proton_service_role_arn
3434
- # The ARN of the AWS Proton service role that allows AWS Proton to
3435
- # make API calls to other services your behalf.
3435
+ # The Amazon Resource Name (ARN) of the AWS Proton service role that
3436
+ # allows AWS Proton to make API calls to other services your behalf.
3436
3437
  # @return [String]
3437
3438
  #
3438
3439
  # @!attribute [rw] spec
@@ -3598,7 +3599,7 @@ module Aws::Proton
3598
3599
  # instances to remain. Omit the existing service instances to delete
3599
3600
  # from the list. *Don't* include edits to the existing service
3600
3601
  # instances or pipeline. For more information, see *Edit a service* in
3601
- # the [AWS Proton Administration Guide][1] or the [AWS Proton User
3602
+ # the [AWS Proton Administrator Guide][1] or the [AWS Proton User
3602
3603
  # Guide][2].
3603
3604
  #
3604
3605
  #
@@ -0,0 +1,484 @@
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 'aws-sdk-core/waiters'
11
+
12
+ module Aws::Proton
13
+ # Waiters are utility methods that poll for a particular state to occur
14
+ # on a client. Waiters can fail after a number of attempts at a polling
15
+ # interval defined for the service client.
16
+ #
17
+ # For a list of operations that can be waited for and the
18
+ # client methods called for each operation, see the table below or the
19
+ # {Client#wait_until} field documentation for the {Client}.
20
+ #
21
+ # # Invoking a Waiter
22
+ # To invoke a waiter, call #wait_until on a {Client}. The first parameter
23
+ # is the waiter name, which is specific to the service client and indicates
24
+ # which operation is being waited for. The second parameter is a hash of
25
+ # parameters that are passed to the client method called by the waiter,
26
+ # which varies according to the waiter name.
27
+ #
28
+ # # Wait Failures
29
+ # To catch errors in a waiter, use WaiterFailed,
30
+ # as shown in the following example.
31
+ #
32
+ # rescue rescue Aws::Waiters::Errors::WaiterFailed => error
33
+ # puts "failed waiting for instance running: #{error.message}
34
+ # end
35
+ #
36
+ # # Configuring a Waiter
37
+ # Each waiter has a default polling interval and a maximum number of
38
+ # attempts it will make before returning control to your program.
39
+ # To set these values, use the `max_attempts` and `delay` parameters
40
+ # in your `#wait_until` call.
41
+ # The following example waits for up to 25 seconds, polling every five seconds.
42
+ #
43
+ # client.wait_until(...) do |w|
44
+ # w.max_attempts = 5
45
+ # w.delay = 5
46
+ # end
47
+ #
48
+ # To disable wait failures, set the value of either of these parameters
49
+ # to `nil`.
50
+ #
51
+ # # Extending a Waiter
52
+ # To modify the behavior of waiters, you can register callbacks that are
53
+ # triggered before each polling attempt and before waiting.
54
+ #
55
+ # The following example implements an exponential backoff in a waiter
56
+ # by doubling the amount of time to wait on every attempt.
57
+ #
58
+ # client.wait_until(...) do |w|
59
+ # w.interval = 0 # disable normal sleep
60
+ # w.before_wait do |n, resp|
61
+ # sleep(n ** 2)
62
+ # end
63
+ # end
64
+ #
65
+ # # Available Waiters
66
+ #
67
+ # The following table lists the valid waiter names, the operations they call,
68
+ # and the default `:delay` and `:max_attempts` values.
69
+ #
70
+ # | waiter_name | params | :delay | :max_attempts |
71
+ # | --------------------------------------- | ----------------------------------------- | -------- | ------------- |
72
+ # | environment_deployed | {Client#get_environment} | 5 | 999 |
73
+ # | environment_template_version_registered | {Client#get_environment_template_version} | 2 | 150 |
74
+ # | service_created | {Client#get_service} | 5 | 999 |
75
+ # | service_deleted | {Client#get_service} | 5 | 999 |
76
+ # | service_instance_deployed | {Client#get_service_instance} | 5 | 999 |
77
+ # | service_pipeline_deployed | {Client#get_service} | 10 | 360 |
78
+ # | service_template_version_registered | {Client#get_service_template_version} | 2 | 150 |
79
+ # | service_updated | {Client#get_service} | 5 | 999 |
80
+ #
81
+ module Waiters
82
+
83
+ # Wait until an Environment is deployed. Use this after invoking CreateEnvironment or UpdateEnvironment
84
+ class EnvironmentDeployed
85
+
86
+ # @param [Hash] options
87
+ # @option options [required, Client] :client
88
+ # @option options [Integer] :max_attempts (999)
89
+ # @option options [Integer] :delay (5)
90
+ # @option options [Proc] :before_attempt
91
+ # @option options [Proc] :before_wait
92
+ def initialize(options)
93
+ @client = options.fetch(:client)
94
+ @waiter = Aws::Waiters::Waiter.new({
95
+ max_attempts: 999,
96
+ delay: 5,
97
+ poller: Aws::Waiters::Poller.new(
98
+ operation_name: :get_environment,
99
+ acceptors: [
100
+ {
101
+ "matcher" => "path",
102
+ "argument" => "environment.deployment_status",
103
+ "state" => "success",
104
+ "expected" => "SUCCEEDED"
105
+ },
106
+ {
107
+ "matcher" => "path",
108
+ "argument" => "environment.deployment_status",
109
+ "state" => "failure",
110
+ "expected" => "FAILED"
111
+ }
112
+ ]
113
+ )
114
+ }.merge(options))
115
+ end
116
+
117
+ # @option (see Client#get_environment)
118
+ # @return (see Client#get_environment)
119
+ def wait(params = {})
120
+ @waiter.wait(client: @client, params: params)
121
+ end
122
+
123
+ # @api private
124
+ attr_reader :waiter
125
+
126
+ end
127
+
128
+ # Wait until an EnvironmentTemplateVersion is registered. Use this after invoking CreateEnvironmentTemplateVersion
129
+ class EnvironmentTemplateVersionRegistered
130
+
131
+ # @param [Hash] options
132
+ # @option options [required, Client] :client
133
+ # @option options [Integer] :max_attempts (150)
134
+ # @option options [Integer] :delay (2)
135
+ # @option options [Proc] :before_attempt
136
+ # @option options [Proc] :before_wait
137
+ def initialize(options)
138
+ @client = options.fetch(:client)
139
+ @waiter = Aws::Waiters::Waiter.new({
140
+ max_attempts: 150,
141
+ delay: 2,
142
+ poller: Aws::Waiters::Poller.new(
143
+ operation_name: :get_environment_template_version,
144
+ acceptors: [
145
+ {
146
+ "matcher" => "path",
147
+ "argument" => "environment_template_version.status",
148
+ "state" => "success",
149
+ "expected" => "DRAFT"
150
+ },
151
+ {
152
+ "matcher" => "path",
153
+ "argument" => "environment_template_version.status",
154
+ "state" => "success",
155
+ "expected" => "PUBLISHED"
156
+ },
157
+ {
158
+ "matcher" => "path",
159
+ "argument" => "environment_template_version.status",
160
+ "state" => "failure",
161
+ "expected" => "REGISTRATION_FAILED"
162
+ }
163
+ ]
164
+ )
165
+ }.merge(options))
166
+ end
167
+
168
+ # @option (see Client#get_environment_template_version)
169
+ # @return (see Client#get_environment_template_version)
170
+ def wait(params = {})
171
+ @waiter.wait(client: @client, params: params)
172
+ end
173
+
174
+ # @api private
175
+ attr_reader :waiter
176
+
177
+ end
178
+
179
+ # Wait until an Service has deployed its instances and possibly pipeline. Use this after invoking CreateService
180
+ class ServiceCreated
181
+
182
+ # @param [Hash] options
183
+ # @option options [required, Client] :client
184
+ # @option options [Integer] :max_attempts (999)
185
+ # @option options [Integer] :delay (5)
186
+ # @option options [Proc] :before_attempt
187
+ # @option options [Proc] :before_wait
188
+ def initialize(options)
189
+ @client = options.fetch(:client)
190
+ @waiter = Aws::Waiters::Waiter.new({
191
+ max_attempts: 999,
192
+ delay: 5,
193
+ poller: Aws::Waiters::Poller.new(
194
+ operation_name: :get_service,
195
+ acceptors: [
196
+ {
197
+ "matcher" => "path",
198
+ "argument" => "service.status",
199
+ "state" => "success",
200
+ "expected" => "ACTIVE"
201
+ },
202
+ {
203
+ "matcher" => "path",
204
+ "argument" => "service.status",
205
+ "state" => "failure",
206
+ "expected" => "CREATE_FAILED_CLEANUP_COMPLETE"
207
+ },
208
+ {
209
+ "matcher" => "path",
210
+ "argument" => "service.status",
211
+ "state" => "failure",
212
+ "expected" => "CREATE_FAILED_CLEANUP_FAILED"
213
+ },
214
+ {
215
+ "matcher" => "path",
216
+ "argument" => "service.status",
217
+ "state" => "failure",
218
+ "expected" => "CREATE_FAILED"
219
+ }
220
+ ]
221
+ )
222
+ }.merge(options))
223
+ end
224
+
225
+ # @option (see Client#get_service)
226
+ # @return (see Client#get_service)
227
+ def wait(params = {})
228
+ @waiter.wait(client: @client, params: params)
229
+ end
230
+
231
+ # @api private
232
+ attr_reader :waiter
233
+
234
+ end
235
+
236
+ # Wait until a Service, its instances, and possibly pipeline have been deleted after DeleteService is invoked
237
+ class ServiceDeleted
238
+
239
+ # @param [Hash] options
240
+ # @option options [required, Client] :client
241
+ # @option options [Integer] :max_attempts (999)
242
+ # @option options [Integer] :delay (5)
243
+ # @option options [Proc] :before_attempt
244
+ # @option options [Proc] :before_wait
245
+ def initialize(options)
246
+ @client = options.fetch(:client)
247
+ @waiter = Aws::Waiters::Waiter.new({
248
+ max_attempts: 999,
249
+ delay: 5,
250
+ poller: Aws::Waiters::Poller.new(
251
+ operation_name: :get_service,
252
+ acceptors: [
253
+ {
254
+ "matcher" => "error",
255
+ "state" => "success",
256
+ "expected" => "ResourceNotFoundException"
257
+ },
258
+ {
259
+ "matcher" => "path",
260
+ "argument" => "service.status",
261
+ "state" => "failure",
262
+ "expected" => "DELETE_FAILED"
263
+ }
264
+ ]
265
+ )
266
+ }.merge(options))
267
+ end
268
+
269
+ # @option (see Client#get_service)
270
+ # @return (see Client#get_service)
271
+ def wait(params = {})
272
+ @waiter.wait(client: @client, params: params)
273
+ end
274
+
275
+ # @api private
276
+ attr_reader :waiter
277
+
278
+ end
279
+
280
+ # Wait until a ServiceInstance is deployed. Use this after invoking CreateService or UpdateServiceInstance
281
+ class ServiceInstanceDeployed
282
+
283
+ # @param [Hash] options
284
+ # @option options [required, Client] :client
285
+ # @option options [Integer] :max_attempts (999)
286
+ # @option options [Integer] :delay (5)
287
+ # @option options [Proc] :before_attempt
288
+ # @option options [Proc] :before_wait
289
+ def initialize(options)
290
+ @client = options.fetch(:client)
291
+ @waiter = Aws::Waiters::Waiter.new({
292
+ max_attempts: 999,
293
+ delay: 5,
294
+ poller: Aws::Waiters::Poller.new(
295
+ operation_name: :get_service_instance,
296
+ acceptors: [
297
+ {
298
+ "matcher" => "path",
299
+ "argument" => "service_instance.deployment_status",
300
+ "state" => "success",
301
+ "expected" => "SUCCEEDED"
302
+ },
303
+ {
304
+ "matcher" => "path",
305
+ "argument" => "service_instance.deployment_status",
306
+ "state" => "failure",
307
+ "expected" => "FAILED"
308
+ }
309
+ ]
310
+ )
311
+ }.merge(options))
312
+ end
313
+
314
+ # @option (see Client#get_service_instance)
315
+ # @return (see Client#get_service_instance)
316
+ def wait(params = {})
317
+ @waiter.wait(client: @client, params: params)
318
+ end
319
+
320
+ # @api private
321
+ attr_reader :waiter
322
+
323
+ end
324
+
325
+ # Wait until an ServicePipeline is deployed. Use this after invoking CreateService or UpdateServicePipeline
326
+ class ServicePipelineDeployed
327
+
328
+ # @param [Hash] options
329
+ # @option options [required, Client] :client
330
+ # @option options [Integer] :max_attempts (360)
331
+ # @option options [Integer] :delay (10)
332
+ # @option options [Proc] :before_attempt
333
+ # @option options [Proc] :before_wait
334
+ def initialize(options)
335
+ @client = options.fetch(:client)
336
+ @waiter = Aws::Waiters::Waiter.new({
337
+ max_attempts: 360,
338
+ delay: 10,
339
+ poller: Aws::Waiters::Poller.new(
340
+ operation_name: :get_service,
341
+ acceptors: [
342
+ {
343
+ "matcher" => "path",
344
+ "argument" => "service.pipeline.deployment_status",
345
+ "state" => "success",
346
+ "expected" => "SUCCEEDED"
347
+ },
348
+ {
349
+ "matcher" => "path",
350
+ "argument" => "service.pipeline.deployment_status",
351
+ "state" => "failure",
352
+ "expected" => "FAILED"
353
+ }
354
+ ]
355
+ )
356
+ }.merge(options))
357
+ end
358
+
359
+ # @option (see Client#get_service)
360
+ # @return (see Client#get_service)
361
+ def wait(params = {})
362
+ @waiter.wait(client: @client, params: params)
363
+ end
364
+
365
+ # @api private
366
+ attr_reader :waiter
367
+
368
+ end
369
+
370
+ # Wait until a ServiceTemplateVersion is registered. Use this after invoking CreateServiceTemplateVersion
371
+ class ServiceTemplateVersionRegistered
372
+
373
+ # @param [Hash] options
374
+ # @option options [required, Client] :client
375
+ # @option options [Integer] :max_attempts (150)
376
+ # @option options [Integer] :delay (2)
377
+ # @option options [Proc] :before_attempt
378
+ # @option options [Proc] :before_wait
379
+ def initialize(options)
380
+ @client = options.fetch(:client)
381
+ @waiter = Aws::Waiters::Waiter.new({
382
+ max_attempts: 150,
383
+ delay: 2,
384
+ poller: Aws::Waiters::Poller.new(
385
+ operation_name: :get_service_template_version,
386
+ acceptors: [
387
+ {
388
+ "matcher" => "path",
389
+ "argument" => "service_template_version.status",
390
+ "state" => "success",
391
+ "expected" => "DRAFT"
392
+ },
393
+ {
394
+ "matcher" => "path",
395
+ "argument" => "service_template_version.status",
396
+ "state" => "success",
397
+ "expected" => "PUBLISHED"
398
+ },
399
+ {
400
+ "matcher" => "path",
401
+ "argument" => "service_template_version.status",
402
+ "state" => "failure",
403
+ "expected" => "REGISTRATION_FAILED"
404
+ }
405
+ ]
406
+ )
407
+ }.merge(options))
408
+ end
409
+
410
+ # @option (see Client#get_service_template_version)
411
+ # @return (see Client#get_service_template_version)
412
+ def wait(params = {})
413
+ @waiter.wait(client: @client, params: params)
414
+ end
415
+
416
+ # @api private
417
+ attr_reader :waiter
418
+
419
+ end
420
+
421
+ # Wait until a Service, its instances, and possibly pipeline have been deployed after UpdateService is invoked
422
+ class ServiceUpdated
423
+
424
+ # @param [Hash] options
425
+ # @option options [required, Client] :client
426
+ # @option options [Integer] :max_attempts (999)
427
+ # @option options [Integer] :delay (5)
428
+ # @option options [Proc] :before_attempt
429
+ # @option options [Proc] :before_wait
430
+ def initialize(options)
431
+ @client = options.fetch(:client)
432
+ @waiter = Aws::Waiters::Waiter.new({
433
+ max_attempts: 999,
434
+ delay: 5,
435
+ poller: Aws::Waiters::Poller.new(
436
+ operation_name: :get_service,
437
+ acceptors: [
438
+ {
439
+ "matcher" => "path",
440
+ "argument" => "service.status",
441
+ "state" => "success",
442
+ "expected" => "ACTIVE"
443
+ },
444
+ {
445
+ "matcher" => "path",
446
+ "argument" => "service.status",
447
+ "state" => "failure",
448
+ "expected" => "UPDATE_FAILED_CLEANUP_COMPLETE"
449
+ },
450
+ {
451
+ "matcher" => "path",
452
+ "argument" => "service.status",
453
+ "state" => "failure",
454
+ "expected" => "UPDATE_FAILED_CLEANUP_FAILED"
455
+ },
456
+ {
457
+ "matcher" => "path",
458
+ "argument" => "service.status",
459
+ "state" => "failure",
460
+ "expected" => "UPDATE_FAILED"
461
+ },
462
+ {
463
+ "matcher" => "path",
464
+ "argument" => "service.status",
465
+ "state" => "failure",
466
+ "expected" => "UPDATE_COMPLETE_CLEANUP_FAILED"
467
+ }
468
+ ]
469
+ )
470
+ }.merge(options))
471
+ end
472
+
473
+ # @option (see Client#get_service)
474
+ # @return (see Client#get_service)
475
+ def wait(params = {})
476
+ @waiter.wait(client: @client, params: params)
477
+ end
478
+
479
+ # @api private
480
+ attr_reader :waiter
481
+
482
+ end
483
+ end
484
+ end