aws-sdk-comprehend 1.65.0 → 1.66.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/VERSION +1 -1
- data/lib/aws-sdk-comprehend/client.rb +815 -61
- data/lib/aws-sdk-comprehend/client_api.rb +478 -2
- data/lib/aws-sdk-comprehend/endpoint_parameters.rb +0 -3
- data/lib/aws-sdk-comprehend/endpoint_provider.rb +27 -24
- data/lib/aws-sdk-comprehend/endpoints.rb +154 -0
- data/lib/aws-sdk-comprehend/plugins/endpoints.rb +22 -0
- data/lib/aws-sdk-comprehend/types.rb +1386 -114
- data/lib/aws-sdk-comprehend.rb +1 -1
- metadata +2 -2
@@ -50,9 +50,6 @@ module Aws::Comprehend
|
|
50
50
|
|
51
51
|
def initialize(options = {})
|
52
52
|
self[:region] = options[:region]
|
53
|
-
if self[:region].nil?
|
54
|
-
raise ArgumentError, "Missing required EndpointParameter: :region"
|
55
|
-
end
|
56
53
|
self[:use_dual_stack] = options[:use_dual_stack]
|
57
54
|
self[:use_dual_stack] = false if self[:use_dual_stack].nil?
|
58
55
|
if self[:use_dual_stack].nil?
|
@@ -14,36 +14,39 @@ module Aws::Comprehend
|
|
14
14
|
use_dual_stack = parameters.use_dual_stack
|
15
15
|
use_fips = parameters.use_fips
|
16
16
|
endpoint = parameters.endpoint
|
17
|
-
if
|
18
|
-
if Aws::Endpoints::Matchers.set?(endpoint) && (url = Aws::Endpoints::Matchers.parse_url(endpoint))
|
19
|
-
if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true)
|
20
|
-
raise ArgumentError, "Invalid Configuration: FIPS and custom endpoint are not supported"
|
21
|
-
end
|
22
|
-
if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true)
|
23
|
-
raise ArgumentError, "Invalid Configuration: Dualstack and custom endpoint are not supported"
|
24
|
-
end
|
25
|
-
return Aws::Endpoints::Endpoint.new(url: endpoint, headers: {}, properties: {})
|
26
|
-
end
|
27
|
-
if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true)
|
28
|
-
if Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsFIPS")) && Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsDualStack"))
|
29
|
-
return Aws::Endpoints::Endpoint.new(url: "https://comprehend-fips.#{region}.#{partition_result['dualStackDnsSuffix']}", headers: {}, properties: {})
|
30
|
-
end
|
31
|
-
raise ArgumentError, "FIPS and DualStack are enabled, but this partition does not support one or both"
|
32
|
-
end
|
17
|
+
if Aws::Endpoints::Matchers.set?(endpoint)
|
33
18
|
if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true)
|
34
|
-
|
35
|
-
return Aws::Endpoints::Endpoint.new(url: "https://comprehend-fips.#{region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
|
36
|
-
end
|
37
|
-
raise ArgumentError, "FIPS is enabled but this partition does not support FIPS"
|
19
|
+
raise ArgumentError, "Invalid Configuration: FIPS and custom endpoint are not supported"
|
38
20
|
end
|
39
21
|
if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true)
|
40
|
-
|
41
|
-
|
22
|
+
raise ArgumentError, "Invalid Configuration: Dualstack and custom endpoint are not supported"
|
23
|
+
end
|
24
|
+
return Aws::Endpoints::Endpoint.new(url: endpoint, headers: {}, properties: {})
|
25
|
+
end
|
26
|
+
if Aws::Endpoints::Matchers.set?(region)
|
27
|
+
if (partition_result = Aws::Endpoints::Matchers.aws_partition(region))
|
28
|
+
if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true)
|
29
|
+
if Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsFIPS")) && Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsDualStack"))
|
30
|
+
return Aws::Endpoints::Endpoint.new(url: "https://comprehend-fips.#{region}.#{partition_result['dualStackDnsSuffix']}", headers: {}, properties: {})
|
31
|
+
end
|
32
|
+
raise ArgumentError, "FIPS and DualStack are enabled, but this partition does not support one or both"
|
33
|
+
end
|
34
|
+
if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true)
|
35
|
+
if Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsFIPS"))
|
36
|
+
return Aws::Endpoints::Endpoint.new(url: "https://comprehend-fips.#{region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
|
37
|
+
end
|
38
|
+
raise ArgumentError, "FIPS is enabled but this partition does not support FIPS"
|
39
|
+
end
|
40
|
+
if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true)
|
41
|
+
if Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsDualStack"))
|
42
|
+
return Aws::Endpoints::Endpoint.new(url: "https://comprehend.#{region}.#{partition_result['dualStackDnsSuffix']}", headers: {}, properties: {})
|
43
|
+
end
|
44
|
+
raise ArgumentError, "DualStack is enabled but this partition does not support DualStack"
|
42
45
|
end
|
43
|
-
|
46
|
+
return Aws::Endpoints::Endpoint.new(url: "https://comprehend.#{region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
|
44
47
|
end
|
45
|
-
return Aws::Endpoints::Endpoint.new(url: "https://comprehend.#{region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
|
46
48
|
end
|
49
|
+
raise ArgumentError, "Invalid Configuration: Missing Region"
|
47
50
|
raise ArgumentError, 'No endpoint could be resolved'
|
48
51
|
|
49
52
|
end
|
@@ -123,6 +123,20 @@ module Aws::Comprehend
|
|
123
123
|
end
|
124
124
|
end
|
125
125
|
|
126
|
+
class CreateDataset
|
127
|
+
def self.build(context)
|
128
|
+
unless context.config.regional_endpoint
|
129
|
+
endpoint = context.config.endpoint.to_s
|
130
|
+
end
|
131
|
+
Aws::Comprehend::EndpointParameters.new(
|
132
|
+
region: context.config.region,
|
133
|
+
use_dual_stack: context.config.use_dualstack_endpoint,
|
134
|
+
use_fips: context.config.use_fips_endpoint,
|
135
|
+
endpoint: endpoint,
|
136
|
+
)
|
137
|
+
end
|
138
|
+
end
|
139
|
+
|
126
140
|
class CreateDocumentClassifier
|
127
141
|
def self.build(context)
|
128
142
|
unless context.config.regional_endpoint
|
@@ -165,6 +179,20 @@ module Aws::Comprehend
|
|
165
179
|
end
|
166
180
|
end
|
167
181
|
|
182
|
+
class CreateFlywheel
|
183
|
+
def self.build(context)
|
184
|
+
unless context.config.regional_endpoint
|
185
|
+
endpoint = context.config.endpoint.to_s
|
186
|
+
end
|
187
|
+
Aws::Comprehend::EndpointParameters.new(
|
188
|
+
region: context.config.region,
|
189
|
+
use_dual_stack: context.config.use_dualstack_endpoint,
|
190
|
+
use_fips: context.config.use_fips_endpoint,
|
191
|
+
endpoint: endpoint,
|
192
|
+
)
|
193
|
+
end
|
194
|
+
end
|
195
|
+
|
168
196
|
class DeleteDocumentClassifier
|
169
197
|
def self.build(context)
|
170
198
|
unless context.config.regional_endpoint
|
@@ -207,6 +235,20 @@ module Aws::Comprehend
|
|
207
235
|
end
|
208
236
|
end
|
209
237
|
|
238
|
+
class DeleteFlywheel
|
239
|
+
def self.build(context)
|
240
|
+
unless context.config.regional_endpoint
|
241
|
+
endpoint = context.config.endpoint.to_s
|
242
|
+
end
|
243
|
+
Aws::Comprehend::EndpointParameters.new(
|
244
|
+
region: context.config.region,
|
245
|
+
use_dual_stack: context.config.use_dualstack_endpoint,
|
246
|
+
use_fips: context.config.use_fips_endpoint,
|
247
|
+
endpoint: endpoint,
|
248
|
+
)
|
249
|
+
end
|
250
|
+
end
|
251
|
+
|
210
252
|
class DeleteResourcePolicy
|
211
253
|
def self.build(context)
|
212
254
|
unless context.config.regional_endpoint
|
@@ -221,6 +263,20 @@ module Aws::Comprehend
|
|
221
263
|
end
|
222
264
|
end
|
223
265
|
|
266
|
+
class DescribeDataset
|
267
|
+
def self.build(context)
|
268
|
+
unless context.config.regional_endpoint
|
269
|
+
endpoint = context.config.endpoint.to_s
|
270
|
+
end
|
271
|
+
Aws::Comprehend::EndpointParameters.new(
|
272
|
+
region: context.config.region,
|
273
|
+
use_dual_stack: context.config.use_dualstack_endpoint,
|
274
|
+
use_fips: context.config.use_fips_endpoint,
|
275
|
+
endpoint: endpoint,
|
276
|
+
)
|
277
|
+
end
|
278
|
+
end
|
279
|
+
|
224
280
|
class DescribeDocumentClassificationJob
|
225
281
|
def self.build(context)
|
226
282
|
unless context.config.regional_endpoint
|
@@ -319,6 +375,34 @@ module Aws::Comprehend
|
|
319
375
|
end
|
320
376
|
end
|
321
377
|
|
378
|
+
class DescribeFlywheel
|
379
|
+
def self.build(context)
|
380
|
+
unless context.config.regional_endpoint
|
381
|
+
endpoint = context.config.endpoint.to_s
|
382
|
+
end
|
383
|
+
Aws::Comprehend::EndpointParameters.new(
|
384
|
+
region: context.config.region,
|
385
|
+
use_dual_stack: context.config.use_dualstack_endpoint,
|
386
|
+
use_fips: context.config.use_fips_endpoint,
|
387
|
+
endpoint: endpoint,
|
388
|
+
)
|
389
|
+
end
|
390
|
+
end
|
391
|
+
|
392
|
+
class DescribeFlywheelIteration
|
393
|
+
def self.build(context)
|
394
|
+
unless context.config.regional_endpoint
|
395
|
+
endpoint = context.config.endpoint.to_s
|
396
|
+
end
|
397
|
+
Aws::Comprehend::EndpointParameters.new(
|
398
|
+
region: context.config.region,
|
399
|
+
use_dual_stack: context.config.use_dualstack_endpoint,
|
400
|
+
use_fips: context.config.use_fips_endpoint,
|
401
|
+
endpoint: endpoint,
|
402
|
+
)
|
403
|
+
end
|
404
|
+
end
|
405
|
+
|
322
406
|
class DescribeKeyPhrasesDetectionJob
|
323
407
|
def self.build(context)
|
324
408
|
unless context.config.regional_endpoint
|
@@ -515,6 +599,20 @@ module Aws::Comprehend
|
|
515
599
|
end
|
516
600
|
end
|
517
601
|
|
602
|
+
class ListDatasets
|
603
|
+
def self.build(context)
|
604
|
+
unless context.config.regional_endpoint
|
605
|
+
endpoint = context.config.endpoint.to_s
|
606
|
+
end
|
607
|
+
Aws::Comprehend::EndpointParameters.new(
|
608
|
+
region: context.config.region,
|
609
|
+
use_dual_stack: context.config.use_dualstack_endpoint,
|
610
|
+
use_fips: context.config.use_fips_endpoint,
|
611
|
+
endpoint: endpoint,
|
612
|
+
)
|
613
|
+
end
|
614
|
+
end
|
615
|
+
|
518
616
|
class ListDocumentClassificationJobs
|
519
617
|
def self.build(context)
|
520
618
|
unless context.config.regional_endpoint
|
@@ -641,6 +739,34 @@ module Aws::Comprehend
|
|
641
739
|
end
|
642
740
|
end
|
643
741
|
|
742
|
+
class ListFlywheelIterationHistory
|
743
|
+
def self.build(context)
|
744
|
+
unless context.config.regional_endpoint
|
745
|
+
endpoint = context.config.endpoint.to_s
|
746
|
+
end
|
747
|
+
Aws::Comprehend::EndpointParameters.new(
|
748
|
+
region: context.config.region,
|
749
|
+
use_dual_stack: context.config.use_dualstack_endpoint,
|
750
|
+
use_fips: context.config.use_fips_endpoint,
|
751
|
+
endpoint: endpoint,
|
752
|
+
)
|
753
|
+
end
|
754
|
+
end
|
755
|
+
|
756
|
+
class ListFlywheels
|
757
|
+
def self.build(context)
|
758
|
+
unless context.config.regional_endpoint
|
759
|
+
endpoint = context.config.endpoint.to_s
|
760
|
+
end
|
761
|
+
Aws::Comprehend::EndpointParameters.new(
|
762
|
+
region: context.config.region,
|
763
|
+
use_dual_stack: context.config.use_dualstack_endpoint,
|
764
|
+
use_fips: context.config.use_fips_endpoint,
|
765
|
+
endpoint: endpoint,
|
766
|
+
)
|
767
|
+
end
|
768
|
+
end
|
769
|
+
|
644
770
|
class ListKeyPhrasesDetectionJobs
|
645
771
|
def self.build(context)
|
646
772
|
unless context.config.regional_endpoint
|
@@ -795,6 +921,20 @@ module Aws::Comprehend
|
|
795
921
|
end
|
796
922
|
end
|
797
923
|
|
924
|
+
class StartFlywheelIteration
|
925
|
+
def self.build(context)
|
926
|
+
unless context.config.regional_endpoint
|
927
|
+
endpoint = context.config.endpoint.to_s
|
928
|
+
end
|
929
|
+
Aws::Comprehend::EndpointParameters.new(
|
930
|
+
region: context.config.region,
|
931
|
+
use_dual_stack: context.config.use_dualstack_endpoint,
|
932
|
+
use_fips: context.config.use_fips_endpoint,
|
933
|
+
endpoint: endpoint,
|
934
|
+
)
|
935
|
+
end
|
936
|
+
end
|
937
|
+
|
798
938
|
class StartKeyPhrasesDetectionJob
|
799
939
|
def self.build(context)
|
800
940
|
unless context.config.regional_endpoint
|
@@ -1033,5 +1173,19 @@ module Aws::Comprehend
|
|
1033
1173
|
end
|
1034
1174
|
end
|
1035
1175
|
|
1176
|
+
class UpdateFlywheel
|
1177
|
+
def self.build(context)
|
1178
|
+
unless context.config.regional_endpoint
|
1179
|
+
endpoint = context.config.endpoint.to_s
|
1180
|
+
end
|
1181
|
+
Aws::Comprehend::EndpointParameters.new(
|
1182
|
+
region: context.config.region,
|
1183
|
+
use_dual_stack: context.config.use_dualstack_endpoint,
|
1184
|
+
use_fips: context.config.use_fips_endpoint,
|
1185
|
+
endpoint: endpoint,
|
1186
|
+
)
|
1187
|
+
end
|
1188
|
+
end
|
1189
|
+
|
1036
1190
|
end
|
1037
1191
|
end
|
@@ -72,20 +72,28 @@ module Aws::Comprehend
|
|
72
72
|
Aws::Comprehend::Endpoints::ClassifyDocument.build(context)
|
73
73
|
when :contains_pii_entities
|
74
74
|
Aws::Comprehend::Endpoints::ContainsPiiEntities.build(context)
|
75
|
+
when :create_dataset
|
76
|
+
Aws::Comprehend::Endpoints::CreateDataset.build(context)
|
75
77
|
when :create_document_classifier
|
76
78
|
Aws::Comprehend::Endpoints::CreateDocumentClassifier.build(context)
|
77
79
|
when :create_endpoint
|
78
80
|
Aws::Comprehend::Endpoints::CreateEndpoint.build(context)
|
79
81
|
when :create_entity_recognizer
|
80
82
|
Aws::Comprehend::Endpoints::CreateEntityRecognizer.build(context)
|
83
|
+
when :create_flywheel
|
84
|
+
Aws::Comprehend::Endpoints::CreateFlywheel.build(context)
|
81
85
|
when :delete_document_classifier
|
82
86
|
Aws::Comprehend::Endpoints::DeleteDocumentClassifier.build(context)
|
83
87
|
when :delete_endpoint
|
84
88
|
Aws::Comprehend::Endpoints::DeleteEndpoint.build(context)
|
85
89
|
when :delete_entity_recognizer
|
86
90
|
Aws::Comprehend::Endpoints::DeleteEntityRecognizer.build(context)
|
91
|
+
when :delete_flywheel
|
92
|
+
Aws::Comprehend::Endpoints::DeleteFlywheel.build(context)
|
87
93
|
when :delete_resource_policy
|
88
94
|
Aws::Comprehend::Endpoints::DeleteResourcePolicy.build(context)
|
95
|
+
when :describe_dataset
|
96
|
+
Aws::Comprehend::Endpoints::DescribeDataset.build(context)
|
89
97
|
when :describe_document_classification_job
|
90
98
|
Aws::Comprehend::Endpoints::DescribeDocumentClassificationJob.build(context)
|
91
99
|
when :describe_document_classifier
|
@@ -100,6 +108,10 @@ module Aws::Comprehend
|
|
100
108
|
Aws::Comprehend::Endpoints::DescribeEntityRecognizer.build(context)
|
101
109
|
when :describe_events_detection_job
|
102
110
|
Aws::Comprehend::Endpoints::DescribeEventsDetectionJob.build(context)
|
111
|
+
when :describe_flywheel
|
112
|
+
Aws::Comprehend::Endpoints::DescribeFlywheel.build(context)
|
113
|
+
when :describe_flywheel_iteration
|
114
|
+
Aws::Comprehend::Endpoints::DescribeFlywheelIteration.build(context)
|
103
115
|
when :describe_key_phrases_detection_job
|
104
116
|
Aws::Comprehend::Endpoints::DescribeKeyPhrasesDetectionJob.build(context)
|
105
117
|
when :describe_pii_entities_detection_job
|
@@ -128,6 +140,8 @@ module Aws::Comprehend
|
|
128
140
|
Aws::Comprehend::Endpoints::DetectTargetedSentiment.build(context)
|
129
141
|
when :import_model
|
130
142
|
Aws::Comprehend::Endpoints::ImportModel.build(context)
|
143
|
+
when :list_datasets
|
144
|
+
Aws::Comprehend::Endpoints::ListDatasets.build(context)
|
131
145
|
when :list_document_classification_jobs
|
132
146
|
Aws::Comprehend::Endpoints::ListDocumentClassificationJobs.build(context)
|
133
147
|
when :list_document_classifier_summaries
|
@@ -146,6 +160,10 @@ module Aws::Comprehend
|
|
146
160
|
Aws::Comprehend::Endpoints::ListEntityRecognizers.build(context)
|
147
161
|
when :list_events_detection_jobs
|
148
162
|
Aws::Comprehend::Endpoints::ListEventsDetectionJobs.build(context)
|
163
|
+
when :list_flywheel_iteration_history
|
164
|
+
Aws::Comprehend::Endpoints::ListFlywheelIterationHistory.build(context)
|
165
|
+
when :list_flywheels
|
166
|
+
Aws::Comprehend::Endpoints::ListFlywheels.build(context)
|
149
167
|
when :list_key_phrases_detection_jobs
|
150
168
|
Aws::Comprehend::Endpoints::ListKeyPhrasesDetectionJobs.build(context)
|
151
169
|
when :list_pii_entities_detection_jobs
|
@@ -168,6 +186,8 @@ module Aws::Comprehend
|
|
168
186
|
Aws::Comprehend::Endpoints::StartEntitiesDetectionJob.build(context)
|
169
187
|
when :start_events_detection_job
|
170
188
|
Aws::Comprehend::Endpoints::StartEventsDetectionJob.build(context)
|
189
|
+
when :start_flywheel_iteration
|
190
|
+
Aws::Comprehend::Endpoints::StartFlywheelIteration.build(context)
|
171
191
|
when :start_key_phrases_detection_job
|
172
192
|
Aws::Comprehend::Endpoints::StartKeyPhrasesDetectionJob.build(context)
|
173
193
|
when :start_pii_entities_detection_job
|
@@ -202,6 +222,8 @@ module Aws::Comprehend
|
|
202
222
|
Aws::Comprehend::Endpoints::UntagResource.build(context)
|
203
223
|
when :update_endpoint
|
204
224
|
Aws::Comprehend::Endpoints::UpdateEndpoint.build(context)
|
225
|
+
when :update_flywheel
|
226
|
+
Aws::Comprehend::Endpoints::UpdateFlywheel.build(context)
|
205
227
|
end
|
206
228
|
end
|
207
229
|
end
|