aws-sdk-acm 1.8.0 → 1.9.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.
- checksums.yaml +4 -4
- data/lib/aws-sdk-acm.rb +2 -1
- data/lib/aws-sdk-acm/client.rb +115 -2
- data/lib/aws-sdk-acm/waiters.rb +68 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e95fc0cc3d458b6e6efd9822d21038e286419c10
|
4
|
+
data.tar.gz: 0d284584e697726b5490ada11570a4bdef7b4b87
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5a269e5590fbd35ddc7e514f11bb1698f1156ab0017c7b3b4f28d5a6932414acbedf7b9a79ab3d327f41621e619180a6a108ca91cca3883b5a73111ea2f5835b
|
7
|
+
data.tar.gz: adecb71c780e4de25fac677240bb4a897fafe6daf0cbd08412b5d50df00691d63722fa0ba24463abaa7730a122286c7844bcfee7563da70a6440a30ac6c072f7
|
data/lib/aws-sdk-acm.rb
CHANGED
@@ -12,6 +12,7 @@ require_relative 'aws-sdk-acm/types'
|
|
12
12
|
require_relative 'aws-sdk-acm/client_api'
|
13
13
|
require_relative 'aws-sdk-acm/client'
|
14
14
|
require_relative 'aws-sdk-acm/errors'
|
15
|
+
require_relative 'aws-sdk-acm/waiters'
|
15
16
|
require_relative 'aws-sdk-acm/resource'
|
16
17
|
require_relative 'aws-sdk-acm/customizations'
|
17
18
|
|
@@ -42,6 +43,6 @@ require_relative 'aws-sdk-acm/customizations'
|
|
42
43
|
# @service
|
43
44
|
module Aws::ACM
|
44
45
|
|
45
|
-
GEM_VERSION = '1.
|
46
|
+
GEM_VERSION = '1.9.0'
|
46
47
|
|
47
48
|
end
|
data/lib/aws-sdk-acm/client.rb
CHANGED
@@ -980,14 +980,127 @@ module Aws::ACM
|
|
980
980
|
params: params,
|
981
981
|
config: config)
|
982
982
|
context[:gem_name] = 'aws-sdk-acm'
|
983
|
-
context[:gem_version] = '1.
|
983
|
+
context[:gem_version] = '1.9.0'
|
984
984
|
Seahorse::Client::Request.new(handlers, context)
|
985
985
|
end
|
986
986
|
|
987
|
+
# Polls an API operation until a resource enters a desired state.
|
988
|
+
#
|
989
|
+
# ## Basic Usage
|
990
|
+
#
|
991
|
+
# A waiter will call an API operation until:
|
992
|
+
#
|
993
|
+
# * It is successful
|
994
|
+
# * It enters a terminal state
|
995
|
+
# * It makes the maximum number of attempts
|
996
|
+
#
|
997
|
+
# In between attempts, the waiter will sleep.
|
998
|
+
#
|
999
|
+
# # polls in a loop, sleeping between attempts
|
1000
|
+
# client.waiter_until(waiter_name, params)
|
1001
|
+
#
|
1002
|
+
# ## Configuration
|
1003
|
+
#
|
1004
|
+
# You can configure the maximum number of polling attempts, and the
|
1005
|
+
# delay (in seconds) between each polling attempt. You can pass
|
1006
|
+
# configuration as the final arguments hash.
|
1007
|
+
#
|
1008
|
+
# # poll for ~25 seconds
|
1009
|
+
# client.wait_until(waiter_name, params, {
|
1010
|
+
# max_attempts: 5,
|
1011
|
+
# delay: 5,
|
1012
|
+
# })
|
1013
|
+
#
|
1014
|
+
# ## Callbacks
|
1015
|
+
#
|
1016
|
+
# You can be notified before each polling attempt and before each
|
1017
|
+
# delay. If you throw `:success` or `:failure` from these callbacks,
|
1018
|
+
# it will terminate the waiter.
|
1019
|
+
#
|
1020
|
+
# started_at = Time.now
|
1021
|
+
# client.wait_until(waiter_name, params, {
|
1022
|
+
#
|
1023
|
+
# # disable max attempts
|
1024
|
+
# max_attempts: nil,
|
1025
|
+
#
|
1026
|
+
# # poll for 1 hour, instead of a number of attempts
|
1027
|
+
# before_wait: -> (attempts, response) do
|
1028
|
+
# throw :failure if Time.now - started_at > 3600
|
1029
|
+
# end
|
1030
|
+
# })
|
1031
|
+
#
|
1032
|
+
# ## Handling Errors
|
1033
|
+
#
|
1034
|
+
# When a waiter is unsuccessful, it will raise an error.
|
1035
|
+
# All of the failure errors extend from
|
1036
|
+
# {Aws::Waiters::Errors::WaiterFailed}.
|
1037
|
+
#
|
1038
|
+
# begin
|
1039
|
+
# client.wait_until(...)
|
1040
|
+
# rescue Aws::Waiters::Errors::WaiterFailed
|
1041
|
+
# # resource did not enter the desired state in time
|
1042
|
+
# end
|
1043
|
+
#
|
1044
|
+
# ## Valid Waiters
|
1045
|
+
#
|
1046
|
+
# The following table lists the valid waiter names, the operations they call,
|
1047
|
+
# and the default `:delay` and `:max_attempts` values.
|
1048
|
+
#
|
1049
|
+
# | waiter_name | params | :delay | :max_attempts |
|
1050
|
+
# | --------------------- | ----------------------- | -------- | ------------- |
|
1051
|
+
# | certificate_validated | {#describe_certificate} | 60 | 40 |
|
1052
|
+
#
|
1053
|
+
# @raise [Errors::FailureStateError] Raised when the waiter terminates
|
1054
|
+
# because the waiter has entered a state that it will not transition
|
1055
|
+
# out of, preventing success.
|
1056
|
+
#
|
1057
|
+
# @raise [Errors::TooManyAttemptsError] Raised when the configured
|
1058
|
+
# maximum number of attempts have been made, and the waiter is not
|
1059
|
+
# yet successful.
|
1060
|
+
#
|
1061
|
+
# @raise [Errors::UnexpectedError] Raised when an error is encounted
|
1062
|
+
# while polling for a resource that is not expected.
|
1063
|
+
#
|
1064
|
+
# @raise [Errors::NoSuchWaiterError] Raised when you request to wait
|
1065
|
+
# for an unknown state.
|
1066
|
+
#
|
1067
|
+
# @return [Boolean] Returns `true` if the waiter was successful.
|
1068
|
+
# @param [Symbol] waiter_name
|
1069
|
+
# @param [Hash] params ({})
|
1070
|
+
# @param [Hash] options ({})
|
1071
|
+
# @option options [Integer] :max_attempts
|
1072
|
+
# @option options [Integer] :delay
|
1073
|
+
# @option options [Proc] :before_attempt
|
1074
|
+
# @option options [Proc] :before_wait
|
1075
|
+
def wait_until(waiter_name, params = {}, options = {})
|
1076
|
+
w = waiter(waiter_name, options)
|
1077
|
+
yield(w.waiter) if block_given? # deprecated
|
1078
|
+
w.wait(params)
|
1079
|
+
end
|
1080
|
+
|
987
1081
|
# @api private
|
988
1082
|
# @deprecated
|
989
1083
|
def waiter_names
|
990
|
-
|
1084
|
+
waiters.keys
|
1085
|
+
end
|
1086
|
+
|
1087
|
+
private
|
1088
|
+
|
1089
|
+
# @param [Symbol] waiter_name
|
1090
|
+
# @param [Hash] options ({})
|
1091
|
+
def waiter(waiter_name, options = {})
|
1092
|
+
waiter_class = waiters[waiter_name]
|
1093
|
+
if waiter_class
|
1094
|
+
waiter_class.new(options.merge(client: self))
|
1095
|
+
else
|
1096
|
+
raise Aws::Waiters::Errors::NoSuchWaiterError.new(waiter_name, waiters.keys)
|
1097
|
+
end
|
1098
|
+
end
|
1099
|
+
|
1100
|
+
def waiters
|
1101
|
+
{
|
1102
|
+
certificate_validated: Waiters::CertificateValidated
|
1103
|
+
}
|
991
1104
|
end
|
992
1105
|
|
993
1106
|
class << self
|
@@ -0,0 +1,68 @@
|
|
1
|
+
# WARNING ABOUT GENERATED CODE
|
2
|
+
#
|
3
|
+
# This file is generated. See the contributing guide for more information:
|
4
|
+
# https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
|
5
|
+
#
|
6
|
+
# WARNING ABOUT GENERATED CODE
|
7
|
+
|
8
|
+
require 'aws-sdk-core/waiters'
|
9
|
+
|
10
|
+
module Aws::ACM
|
11
|
+
module Waiters
|
12
|
+
|
13
|
+
class CertificateValidated
|
14
|
+
|
15
|
+
# @param [Hash] options
|
16
|
+
# @option options [required, Client] :client
|
17
|
+
# @option options [Integer] :max_attempts (40)
|
18
|
+
# @option options [Integer] :delay (60)
|
19
|
+
# @option options [Proc] :before_attempt
|
20
|
+
# @option options [Proc] :before_wait
|
21
|
+
def initialize(options)
|
22
|
+
@client = options.fetch(:client)
|
23
|
+
@waiter = Aws::Waiters::Waiter.new({
|
24
|
+
max_attempts: 40,
|
25
|
+
delay: 60,
|
26
|
+
poller: Aws::Waiters::Poller.new(
|
27
|
+
operation_name: :describe_certificate,
|
28
|
+
acceptors: [
|
29
|
+
{
|
30
|
+
"matcher" => "pathAll",
|
31
|
+
"expected" => "SUCCESS",
|
32
|
+
"argument" => "certificate.domain_validation_options[].validation_status",
|
33
|
+
"state" => "success"
|
34
|
+
},
|
35
|
+
{
|
36
|
+
"matcher" => "pathAny",
|
37
|
+
"expected" => "PENDING_VALIDATION",
|
38
|
+
"argument" => "certificate.domain_validation_options[].validation_status",
|
39
|
+
"state" => "retry"
|
40
|
+
},
|
41
|
+
{
|
42
|
+
"matcher" => "path",
|
43
|
+
"expected" => "FAILED",
|
44
|
+
"argument" => "certificate.status",
|
45
|
+
"state" => "failure"
|
46
|
+
},
|
47
|
+
{
|
48
|
+
"matcher" => "error",
|
49
|
+
"expected" => "ResourceNotFoundException",
|
50
|
+
"state" => "failure"
|
51
|
+
}
|
52
|
+
]
|
53
|
+
)
|
54
|
+
}.merge(options))
|
55
|
+
end
|
56
|
+
|
57
|
+
# @option (see Client#describe_certificate)
|
58
|
+
# @return (see Client#describe_certificate)
|
59
|
+
def wait(params = {})
|
60
|
+
@waiter.wait(client: @client, params: params)
|
61
|
+
end
|
62
|
+
|
63
|
+
# @api private
|
64
|
+
attr_reader :waiter
|
65
|
+
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aws-sdk-acm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Amazon Web Services
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-07-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-core
|
@@ -53,6 +53,7 @@ files:
|
|
53
53
|
- lib/aws-sdk-acm/errors.rb
|
54
54
|
- lib/aws-sdk-acm/resource.rb
|
55
55
|
- lib/aws-sdk-acm/types.rb
|
56
|
+
- lib/aws-sdk-acm/waiters.rb
|
56
57
|
homepage: http://github.com/aws/aws-sdk-ruby
|
57
58
|
licenses:
|
58
59
|
- Apache-2.0
|