aws-sdk-acmpca 1.7.0 → 1.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/aws-sdk-acmpca.rb +2 -1
- data/lib/aws-sdk-acmpca/client.rb +122 -5
- data/lib/aws-sdk-acmpca/client_api.rb +6 -0
- data/lib/aws-sdk-acmpca/waiters.rb +136 -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: 1ae30f0dafdfb9f2a8724f283b18d81c076adbbb
|
4
|
+
data.tar.gz: 5ad4daf3bed151785bb9c22e8d829d0ec5e5aba4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 44c3820c5e791d46d7ffb24b46ca72c7cf5e2ba7cc9232e5cf7f231586e505d28a782f4fdd204dea64042b520f1779f1fab2b99d70153de3d5301bf2bf9936cf
|
7
|
+
data.tar.gz: 95ac56c7dba585b0b32c7122a93bd2928216bccfbcb6b122243559089ebd7ea38bd86a7fc22da293f9c677e0b12c01627cd5cfc40e2122a73a748e98554816a3
|
data/lib/aws-sdk-acmpca.rb
CHANGED
@@ -12,6 +12,7 @@ require_relative 'aws-sdk-acmpca/types'
|
|
12
12
|
require_relative 'aws-sdk-acmpca/client_api'
|
13
13
|
require_relative 'aws-sdk-acmpca/client'
|
14
14
|
require_relative 'aws-sdk-acmpca/errors'
|
15
|
+
require_relative 'aws-sdk-acmpca/waiters'
|
15
16
|
require_relative 'aws-sdk-acmpca/resource'
|
16
17
|
require_relative 'aws-sdk-acmpca/customizations'
|
17
18
|
|
@@ -42,6 +43,6 @@ require_relative 'aws-sdk-acmpca/customizations'
|
|
42
43
|
# @service
|
43
44
|
module Aws::ACMPCA
|
44
45
|
|
45
|
-
GEM_VERSION = '1.
|
46
|
+
GEM_VERSION = '1.8.0'
|
46
47
|
|
47
48
|
end
|
@@ -428,9 +428,9 @@ module Aws::ACMPCA
|
|
428
428
|
# create a new CA.
|
429
429
|
#
|
430
430
|
# * `DELETED` - Your private CA is within the restoration period, after
|
431
|
-
# which it
|
432
|
-
#
|
433
|
-
#
|
431
|
+
# which it is permanently deleted. The length of time remaining in the
|
432
|
+
# CA's restoration period is also included in this operation's
|
433
|
+
# output.
|
434
434
|
#
|
435
435
|
# @option params [required, String] :certificate_authority_arn
|
436
436
|
# The Amazon Resource Name (ARN) that was returned when you called
|
@@ -1171,14 +1171,131 @@ module Aws::ACMPCA
|
|
1171
1171
|
params: params,
|
1172
1172
|
config: config)
|
1173
1173
|
context[:gem_name] = 'aws-sdk-acmpca'
|
1174
|
-
context[:gem_version] = '1.
|
1174
|
+
context[:gem_version] = '1.8.0'
|
1175
1175
|
Seahorse::Client::Request.new(handlers, context)
|
1176
1176
|
end
|
1177
1177
|
|
1178
|
+
# Polls an API operation until a resource enters a desired state.
|
1179
|
+
#
|
1180
|
+
# ## Basic Usage
|
1181
|
+
#
|
1182
|
+
# A waiter will call an API operation until:
|
1183
|
+
#
|
1184
|
+
# * It is successful
|
1185
|
+
# * It enters a terminal state
|
1186
|
+
# * It makes the maximum number of attempts
|
1187
|
+
#
|
1188
|
+
# In between attempts, the waiter will sleep.
|
1189
|
+
#
|
1190
|
+
# # polls in a loop, sleeping between attempts
|
1191
|
+
# client.waiter_until(waiter_name, params)
|
1192
|
+
#
|
1193
|
+
# ## Configuration
|
1194
|
+
#
|
1195
|
+
# You can configure the maximum number of polling attempts, and the
|
1196
|
+
# delay (in seconds) between each polling attempt. You can pass
|
1197
|
+
# configuration as the final arguments hash.
|
1198
|
+
#
|
1199
|
+
# # poll for ~25 seconds
|
1200
|
+
# client.wait_until(waiter_name, params, {
|
1201
|
+
# max_attempts: 5,
|
1202
|
+
# delay: 5,
|
1203
|
+
# })
|
1204
|
+
#
|
1205
|
+
# ## Callbacks
|
1206
|
+
#
|
1207
|
+
# You can be notified before each polling attempt and before each
|
1208
|
+
# delay. If you throw `:success` or `:failure` from these callbacks,
|
1209
|
+
# it will terminate the waiter.
|
1210
|
+
#
|
1211
|
+
# started_at = Time.now
|
1212
|
+
# client.wait_until(waiter_name, params, {
|
1213
|
+
#
|
1214
|
+
# # disable max attempts
|
1215
|
+
# max_attempts: nil,
|
1216
|
+
#
|
1217
|
+
# # poll for 1 hour, instead of a number of attempts
|
1218
|
+
# before_wait: -> (attempts, response) do
|
1219
|
+
# throw :failure if Time.now - started_at > 3600
|
1220
|
+
# end
|
1221
|
+
# })
|
1222
|
+
#
|
1223
|
+
# ## Handling Errors
|
1224
|
+
#
|
1225
|
+
# When a waiter is unsuccessful, it will raise an error.
|
1226
|
+
# All of the failure errors extend from
|
1227
|
+
# {Aws::Waiters::Errors::WaiterFailed}.
|
1228
|
+
#
|
1229
|
+
# begin
|
1230
|
+
# client.wait_until(...)
|
1231
|
+
# rescue Aws::Waiters::Errors::WaiterFailed
|
1232
|
+
# # resource did not enter the desired state in time
|
1233
|
+
# end
|
1234
|
+
#
|
1235
|
+
# ## Valid Waiters
|
1236
|
+
#
|
1237
|
+
# The following table lists the valid waiter names, the operations they call,
|
1238
|
+
# and the default `:delay` and `:max_attempts` values.
|
1239
|
+
#
|
1240
|
+
# | waiter_name | params | :delay | :max_attempts |
|
1241
|
+
# | --------------------------------- | ---------------------------------------------- | -------- | ------------- |
|
1242
|
+
# | audit_report_created | {#describe_certificate_authority_audit_report} | 3 | 60 |
|
1243
|
+
# | certificate_authority_csr_created | {#get_certificate_authority_csr} | 3 | 60 |
|
1244
|
+
# | certificate_issued | {#get_certificate} | 3 | 60 |
|
1245
|
+
#
|
1246
|
+
# @raise [Errors::FailureStateError] Raised when the waiter terminates
|
1247
|
+
# because the waiter has entered a state that it will not transition
|
1248
|
+
# out of, preventing success.
|
1249
|
+
#
|
1250
|
+
# @raise [Errors::TooManyAttemptsError] Raised when the configured
|
1251
|
+
# maximum number of attempts have been made, and the waiter is not
|
1252
|
+
# yet successful.
|
1253
|
+
#
|
1254
|
+
# @raise [Errors::UnexpectedError] Raised when an error is encounted
|
1255
|
+
# while polling for a resource that is not expected.
|
1256
|
+
#
|
1257
|
+
# @raise [Errors::NoSuchWaiterError] Raised when you request to wait
|
1258
|
+
# for an unknown state.
|
1259
|
+
#
|
1260
|
+
# @return [Boolean] Returns `true` if the waiter was successful.
|
1261
|
+
# @param [Symbol] waiter_name
|
1262
|
+
# @param [Hash] params ({})
|
1263
|
+
# @param [Hash] options ({})
|
1264
|
+
# @option options [Integer] :max_attempts
|
1265
|
+
# @option options [Integer] :delay
|
1266
|
+
# @option options [Proc] :before_attempt
|
1267
|
+
# @option options [Proc] :before_wait
|
1268
|
+
def wait_until(waiter_name, params = {}, options = {})
|
1269
|
+
w = waiter(waiter_name, options)
|
1270
|
+
yield(w.waiter) if block_given? # deprecated
|
1271
|
+
w.wait(params)
|
1272
|
+
end
|
1273
|
+
|
1178
1274
|
# @api private
|
1179
1275
|
# @deprecated
|
1180
1276
|
def waiter_names
|
1181
|
-
|
1277
|
+
waiters.keys
|
1278
|
+
end
|
1279
|
+
|
1280
|
+
private
|
1281
|
+
|
1282
|
+
# @param [Symbol] waiter_name
|
1283
|
+
# @param [Hash] options ({})
|
1284
|
+
def waiter(waiter_name, options = {})
|
1285
|
+
waiter_class = waiters[waiter_name]
|
1286
|
+
if waiter_class
|
1287
|
+
waiter_class.new(options.merge(client: self))
|
1288
|
+
else
|
1289
|
+
raise Aws::Waiters::Errors::NoSuchWaiterError.new(waiter_name, waiters.keys)
|
1290
|
+
end
|
1291
|
+
end
|
1292
|
+
|
1293
|
+
def waiters
|
1294
|
+
{
|
1295
|
+
audit_report_created: Waiters::AuditReportCreated,
|
1296
|
+
certificate_authority_csr_created: Waiters::CertificateAuthorityCSRCreated,
|
1297
|
+
certificate_issued: Waiters::CertificateIssued
|
1298
|
+
}
|
1182
1299
|
end
|
1183
1300
|
|
1184
1301
|
class << self
|
@@ -421,6 +421,12 @@ module Aws::ACMPCA
|
|
421
421
|
o.input = Shapes::ShapeRef.new(shape: ListCertificateAuthoritiesRequest)
|
422
422
|
o.output = Shapes::ShapeRef.new(shape: ListCertificateAuthoritiesResponse)
|
423
423
|
o.errors << Shapes::ShapeRef.new(shape: InvalidNextTokenException)
|
424
|
+
o[:pager] = Aws::Pager.new(
|
425
|
+
limit_key: "max_results",
|
426
|
+
tokens: {
|
427
|
+
"next_token" => "next_token"
|
428
|
+
}
|
429
|
+
)
|
424
430
|
end)
|
425
431
|
|
426
432
|
api.add_operation(:list_tags, Seahorse::Model::Operation.new.tap do |o|
|
@@ -0,0 +1,136 @@
|
|
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::ACMPCA
|
11
|
+
module Waiters
|
12
|
+
|
13
|
+
# Wait until a Audit Report is created
|
14
|
+
class AuditReportCreated
|
15
|
+
|
16
|
+
# @param [Hash] options
|
17
|
+
# @option options [required, Client] :client
|
18
|
+
# @option options [Integer] :max_attempts (60)
|
19
|
+
# @option options [Integer] :delay (3)
|
20
|
+
# @option options [Proc] :before_attempt
|
21
|
+
# @option options [Proc] :before_wait
|
22
|
+
def initialize(options)
|
23
|
+
@client = options.fetch(:client)
|
24
|
+
@waiter = Aws::Waiters::Waiter.new({
|
25
|
+
max_attempts: 60,
|
26
|
+
delay: 3,
|
27
|
+
poller: Aws::Waiters::Poller.new(
|
28
|
+
operation_name: :describe_certificate_authority_audit_report,
|
29
|
+
acceptors: [{
|
30
|
+
"state" => "success",
|
31
|
+
"matcher" => "path",
|
32
|
+
"argument" => "audit_report_status",
|
33
|
+
"expected" => "SUCCESS"
|
34
|
+
}]
|
35
|
+
)
|
36
|
+
}.merge(options))
|
37
|
+
end
|
38
|
+
|
39
|
+
# @option (see Client#describe_certificate_authority_audit_report)
|
40
|
+
# @return (see Client#describe_certificate_authority_audit_report)
|
41
|
+
def wait(params = {})
|
42
|
+
@waiter.wait(client: @client, params: params)
|
43
|
+
end
|
44
|
+
|
45
|
+
# @api private
|
46
|
+
attr_reader :waiter
|
47
|
+
|
48
|
+
end
|
49
|
+
|
50
|
+
# Wait until a Certificate Authority CSR is created
|
51
|
+
class CertificateAuthorityCSRCreated
|
52
|
+
|
53
|
+
# @param [Hash] options
|
54
|
+
# @option options [required, Client] :client
|
55
|
+
# @option options [Integer] :max_attempts (60)
|
56
|
+
# @option options [Integer] :delay (3)
|
57
|
+
# @option options [Proc] :before_attempt
|
58
|
+
# @option options [Proc] :before_wait
|
59
|
+
def initialize(options)
|
60
|
+
@client = options.fetch(:client)
|
61
|
+
@waiter = Aws::Waiters::Waiter.new({
|
62
|
+
max_attempts: 60,
|
63
|
+
delay: 3,
|
64
|
+
poller: Aws::Waiters::Poller.new(
|
65
|
+
operation_name: :get_certificate_authority_csr,
|
66
|
+
acceptors: [
|
67
|
+
{
|
68
|
+
"state" => "success",
|
69
|
+
"matcher" => "status",
|
70
|
+
"expected" => 200
|
71
|
+
},
|
72
|
+
{
|
73
|
+
"state" => "retry",
|
74
|
+
"matcher" => "error",
|
75
|
+
"expected" => "RequestInProgressException"
|
76
|
+
}
|
77
|
+
]
|
78
|
+
)
|
79
|
+
}.merge(options))
|
80
|
+
end
|
81
|
+
|
82
|
+
# @option (see Client#get_certificate_authority_csr)
|
83
|
+
# @return (see Client#get_certificate_authority_csr)
|
84
|
+
def wait(params = {})
|
85
|
+
@waiter.wait(client: @client, params: params)
|
86
|
+
end
|
87
|
+
|
88
|
+
# @api private
|
89
|
+
attr_reader :waiter
|
90
|
+
|
91
|
+
end
|
92
|
+
|
93
|
+
# Wait until a certificate is issued
|
94
|
+
class CertificateIssued
|
95
|
+
|
96
|
+
# @param [Hash] options
|
97
|
+
# @option options [required, Client] :client
|
98
|
+
# @option options [Integer] :max_attempts (60)
|
99
|
+
# @option options [Integer] :delay (3)
|
100
|
+
# @option options [Proc] :before_attempt
|
101
|
+
# @option options [Proc] :before_wait
|
102
|
+
def initialize(options)
|
103
|
+
@client = options.fetch(:client)
|
104
|
+
@waiter = Aws::Waiters::Waiter.new({
|
105
|
+
max_attempts: 60,
|
106
|
+
delay: 3,
|
107
|
+
poller: Aws::Waiters::Poller.new(
|
108
|
+
operation_name: :get_certificate,
|
109
|
+
acceptors: [
|
110
|
+
{
|
111
|
+
"state" => "success",
|
112
|
+
"matcher" => "status",
|
113
|
+
"expected" => 200
|
114
|
+
},
|
115
|
+
{
|
116
|
+
"state" => "retry",
|
117
|
+
"matcher" => "error",
|
118
|
+
"expected" => "RequestInProgressException"
|
119
|
+
}
|
120
|
+
]
|
121
|
+
)
|
122
|
+
}.merge(options))
|
123
|
+
end
|
124
|
+
|
125
|
+
# @option (see Client#get_certificate)
|
126
|
+
# @return (see Client#get_certificate)
|
127
|
+
def wait(params = {})
|
128
|
+
@waiter.wait(client: @client, params: params)
|
129
|
+
end
|
130
|
+
|
131
|
+
# @api private
|
132
|
+
attr_reader :waiter
|
133
|
+
|
134
|
+
end
|
135
|
+
end
|
136
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aws-sdk-acmpca
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.8.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-12-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-core
|
@@ -59,6 +59,7 @@ files:
|
|
59
59
|
- lib/aws-sdk-acmpca/errors.rb
|
60
60
|
- lib/aws-sdk-acmpca/resource.rb
|
61
61
|
- lib/aws-sdk-acmpca/types.rb
|
62
|
+
- lib/aws-sdk-acmpca/waiters.rb
|
62
63
|
homepage: http://github.com/aws/aws-sdk-ruby
|
63
64
|
licenses:
|
64
65
|
- Apache-2.0
|