aws-sdk-rekognition 1.33.0 → 1.38.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -20,6 +20,8 @@ module Aws::Rekognition
20
20
  Beard = Shapes::StructureShape.new(name: 'Beard')
21
21
  Boolean = Shapes::BooleanShape.new(name: 'Boolean')
22
22
  BoundingBox = Shapes::StructureShape.new(name: 'BoundingBox')
23
+ BoundingBoxHeight = Shapes::FloatShape.new(name: 'BoundingBoxHeight')
24
+ BoundingBoxWidth = Shapes::FloatShape.new(name: 'BoundingBoxWidth')
23
25
  Celebrity = Shapes::StructureShape.new(name: 'Celebrity')
24
26
  CelebrityDetail = Shapes::StructureShape.new(name: 'CelebrityDetail')
25
27
  CelebrityList = Shapes::ListShape.new(name: 'CelebrityList')
@@ -58,6 +60,10 @@ module Aws::Rekognition
58
60
  DeleteCollectionResponse = Shapes::StructureShape.new(name: 'DeleteCollectionResponse')
59
61
  DeleteFacesRequest = Shapes::StructureShape.new(name: 'DeleteFacesRequest')
60
62
  DeleteFacesResponse = Shapes::StructureShape.new(name: 'DeleteFacesResponse')
63
+ DeleteProjectRequest = Shapes::StructureShape.new(name: 'DeleteProjectRequest')
64
+ DeleteProjectResponse = Shapes::StructureShape.new(name: 'DeleteProjectResponse')
65
+ DeleteProjectVersionRequest = Shapes::StructureShape.new(name: 'DeleteProjectVersionRequest')
66
+ DeleteProjectVersionResponse = Shapes::StructureShape.new(name: 'DeleteProjectVersionResponse')
61
67
  DeleteStreamProcessorRequest = Shapes::StructureShape.new(name: 'DeleteStreamProcessorRequest')
62
68
  DeleteStreamProcessorResponse = Shapes::StructureShape.new(name: 'DeleteStreamProcessorResponse')
63
69
  DescribeCollectionRequest = Shapes::StructureShape.new(name: 'DescribeCollectionRequest')
@@ -76,8 +82,10 @@ module Aws::Rekognition
76
82
  DetectLabelsResponse = Shapes::StructureShape.new(name: 'DetectLabelsResponse')
77
83
  DetectModerationLabelsRequest = Shapes::StructureShape.new(name: 'DetectModerationLabelsRequest')
78
84
  DetectModerationLabelsResponse = Shapes::StructureShape.new(name: 'DetectModerationLabelsResponse')
85
+ DetectTextFilters = Shapes::StructureShape.new(name: 'DetectTextFilters')
79
86
  DetectTextRequest = Shapes::StructureShape.new(name: 'DetectTextRequest')
80
87
  DetectTextResponse = Shapes::StructureShape.new(name: 'DetectTextResponse')
88
+ DetectionFilter = Shapes::StructureShape.new(name: 'DetectionFilter')
81
89
  Emotion = Shapes::StructureShape.new(name: 'Emotion')
82
90
  EmotionName = Shapes::StringShape.new(name: 'EmotionName')
83
91
  Emotions = Shapes::ListShape.new(name: 'Emotions')
@@ -121,6 +129,8 @@ module Aws::Rekognition
121
129
  GetLabelDetectionResponse = Shapes::StructureShape.new(name: 'GetLabelDetectionResponse')
122
130
  GetPersonTrackingRequest = Shapes::StructureShape.new(name: 'GetPersonTrackingRequest')
123
131
  GetPersonTrackingResponse = Shapes::StructureShape.new(name: 'GetPersonTrackingResponse')
132
+ GetTextDetectionRequest = Shapes::StructureShape.new(name: 'GetTextDetectionRequest')
133
+ GetTextDetectionResponse = Shapes::StructureShape.new(name: 'GetTextDetectionResponse')
124
134
  GroundTruthManifest = Shapes::StructureShape.new(name: 'GroundTruthManifest')
125
135
  HumanLoopActivationConditionsEvaluationResults = Shapes::StringShape.new(name: 'HumanLoopActivationConditionsEvaluationResults')
126
136
  HumanLoopActivationOutput = Shapes::StructureShape.new(name: 'HumanLoopActivationOutput')
@@ -210,6 +220,8 @@ module Aws::Rekognition
210
220
  Reasons = Shapes::ListShape.new(name: 'Reasons')
211
221
  RecognizeCelebritiesRequest = Shapes::StructureShape.new(name: 'RecognizeCelebritiesRequest')
212
222
  RecognizeCelebritiesResponse = Shapes::StructureShape.new(name: 'RecognizeCelebritiesResponse')
223
+ RegionOfInterest = Shapes::StructureShape.new(name: 'RegionOfInterest')
224
+ RegionsOfInterest = Shapes::ListShape.new(name: 'RegionsOfInterest')
213
225
  RekognitionUniqueId = Shapes::StringShape.new(name: 'RekognitionUniqueId')
214
226
  ResourceAlreadyExistsException = Shapes::StructureShape.new(name: 'ResourceAlreadyExistsException')
215
227
  ResourceInUseException = Shapes::StructureShape.new(name: 'ResourceInUseException')
@@ -243,6 +255,9 @@ module Aws::Rekognition
243
255
  StartProjectVersionResponse = Shapes::StructureShape.new(name: 'StartProjectVersionResponse')
244
256
  StartStreamProcessorRequest = Shapes::StructureShape.new(name: 'StartStreamProcessorRequest')
245
257
  StartStreamProcessorResponse = Shapes::StructureShape.new(name: 'StartStreamProcessorResponse')
258
+ StartTextDetectionFilters = Shapes::StructureShape.new(name: 'StartTextDetectionFilters')
259
+ StartTextDetectionRequest = Shapes::StructureShape.new(name: 'StartTextDetectionRequest')
260
+ StartTextDetectionResponse = Shapes::StructureShape.new(name: 'StartTextDetectionResponse')
246
261
  StatusMessage = Shapes::StringShape.new(name: 'StatusMessage')
247
262
  StopProjectVersionRequest = Shapes::StructureShape.new(name: 'StopProjectVersionRequest')
248
263
  StopProjectVersionResponse = Shapes::StructureShape.new(name: 'StopProjectVersionResponse')
@@ -263,6 +278,8 @@ module Aws::Rekognition
263
278
  TestingDataResult = Shapes::StructureShape.new(name: 'TestingDataResult')
264
279
  TextDetection = Shapes::StructureShape.new(name: 'TextDetection')
265
280
  TextDetectionList = Shapes::ListShape.new(name: 'TextDetectionList')
281
+ TextDetectionResult = Shapes::StructureShape.new(name: 'TextDetectionResult')
282
+ TextDetectionResults = Shapes::ListShape.new(name: 'TextDetectionResults')
266
283
  TextTypes = Shapes::StringShape.new(name: 'TextTypes')
267
284
  ThrottlingException = Shapes::StructureShape.new(name: 'ThrottlingException')
268
285
  Timestamp = Shapes::IntegerShape.new(name: 'Timestamp')
@@ -281,6 +298,8 @@ module Aws::Rekognition
281
298
  VideoMetadata = Shapes::StructureShape.new(name: 'VideoMetadata')
282
299
  VideoTooLargeException = Shapes::StructureShape.new(name: 'VideoTooLargeException')
283
300
 
301
+ AccessDeniedException.struct_class = Types::AccessDeniedException
302
+
284
303
  AgeRange.add_member(:low, Shapes::ShapeRef.new(shape: UInteger, location_name: "Low"))
285
304
  AgeRange.add_member(:high, Shapes::ShapeRef.new(shape: UInteger, location_name: "High"))
286
305
  AgeRange.struct_class = Types::AgeRange
@@ -423,6 +442,18 @@ module Aws::Rekognition
423
442
  DeleteFacesResponse.add_member(:deleted_faces, Shapes::ShapeRef.new(shape: FaceIdList, location_name: "DeletedFaces"))
424
443
  DeleteFacesResponse.struct_class = Types::DeleteFacesResponse
425
444
 
445
+ DeleteProjectRequest.add_member(:project_arn, Shapes::ShapeRef.new(shape: ProjectArn, required: true, location_name: "ProjectArn"))
446
+ DeleteProjectRequest.struct_class = Types::DeleteProjectRequest
447
+
448
+ DeleteProjectResponse.add_member(:status, Shapes::ShapeRef.new(shape: ProjectStatus, location_name: "Status"))
449
+ DeleteProjectResponse.struct_class = Types::DeleteProjectResponse
450
+
451
+ DeleteProjectVersionRequest.add_member(:project_version_arn, Shapes::ShapeRef.new(shape: ProjectVersionArn, required: true, location_name: "ProjectVersionArn"))
452
+ DeleteProjectVersionRequest.struct_class = Types::DeleteProjectVersionRequest
453
+
454
+ DeleteProjectVersionResponse.add_member(:status, Shapes::ShapeRef.new(shape: ProjectVersionStatus, location_name: "Status"))
455
+ DeleteProjectVersionResponse.struct_class = Types::DeleteProjectVersionResponse
456
+
426
457
  DeleteStreamProcessorRequest.add_member(:name, Shapes::ShapeRef.new(shape: StreamProcessorName, required: true, location_name: "Name"))
427
458
  DeleteStreamProcessorRequest.struct_class = Types::DeleteStreamProcessorRequest
428
459
 
@@ -507,12 +538,23 @@ module Aws::Rekognition
507
538
  DetectModerationLabelsResponse.add_member(:human_loop_activation_output, Shapes::ShapeRef.new(shape: HumanLoopActivationOutput, location_name: "HumanLoopActivationOutput"))
508
539
  DetectModerationLabelsResponse.struct_class = Types::DetectModerationLabelsResponse
509
540
 
541
+ DetectTextFilters.add_member(:word_filter, Shapes::ShapeRef.new(shape: DetectionFilter, location_name: "WordFilter"))
542
+ DetectTextFilters.add_member(:regions_of_interest, Shapes::ShapeRef.new(shape: RegionsOfInterest, location_name: "RegionsOfInterest"))
543
+ DetectTextFilters.struct_class = Types::DetectTextFilters
544
+
510
545
  DetectTextRequest.add_member(:image, Shapes::ShapeRef.new(shape: Image, required: true, location_name: "Image"))
546
+ DetectTextRequest.add_member(:filters, Shapes::ShapeRef.new(shape: DetectTextFilters, location_name: "Filters"))
511
547
  DetectTextRequest.struct_class = Types::DetectTextRequest
512
548
 
513
549
  DetectTextResponse.add_member(:text_detections, Shapes::ShapeRef.new(shape: TextDetectionList, location_name: "TextDetections"))
550
+ DetectTextResponse.add_member(:text_model_version, Shapes::ShapeRef.new(shape: String, location_name: "TextModelVersion"))
514
551
  DetectTextResponse.struct_class = Types::DetectTextResponse
515
552
 
553
+ DetectionFilter.add_member(:min_confidence, Shapes::ShapeRef.new(shape: Percent, location_name: "MinConfidence"))
554
+ DetectionFilter.add_member(:min_bounding_box_height, Shapes::ShapeRef.new(shape: BoundingBoxHeight, location_name: "MinBoundingBoxHeight"))
555
+ DetectionFilter.add_member(:min_bounding_box_width, Shapes::ShapeRef.new(shape: BoundingBoxWidth, location_name: "MinBoundingBoxWidth"))
556
+ DetectionFilter.struct_class = Types::DetectionFilter
557
+
516
558
  Emotion.add_member(:type, Shapes::ShapeRef.new(shape: EmotionName, location_name: "Type"))
517
559
  Emotion.add_member(:confidence, Shapes::ShapeRef.new(shape: Percent, location_name: "Confidence"))
518
560
  Emotion.struct_class = Types::Emotion
@@ -679,6 +721,19 @@ module Aws::Rekognition
679
721
  GetPersonTrackingResponse.add_member(:persons, Shapes::ShapeRef.new(shape: PersonDetections, location_name: "Persons"))
680
722
  GetPersonTrackingResponse.struct_class = Types::GetPersonTrackingResponse
681
723
 
724
+ GetTextDetectionRequest.add_member(:job_id, Shapes::ShapeRef.new(shape: JobId, required: true, location_name: "JobId"))
725
+ GetTextDetectionRequest.add_member(:max_results, Shapes::ShapeRef.new(shape: MaxResults, location_name: "MaxResults"))
726
+ GetTextDetectionRequest.add_member(:next_token, Shapes::ShapeRef.new(shape: PaginationToken, location_name: "NextToken"))
727
+ GetTextDetectionRequest.struct_class = Types::GetTextDetectionRequest
728
+
729
+ GetTextDetectionResponse.add_member(:job_status, Shapes::ShapeRef.new(shape: VideoJobStatus, location_name: "JobStatus"))
730
+ GetTextDetectionResponse.add_member(:status_message, Shapes::ShapeRef.new(shape: StatusMessage, location_name: "StatusMessage"))
731
+ GetTextDetectionResponse.add_member(:video_metadata, Shapes::ShapeRef.new(shape: VideoMetadata, location_name: "VideoMetadata"))
732
+ GetTextDetectionResponse.add_member(:text_detections, Shapes::ShapeRef.new(shape: TextDetectionResults, location_name: "TextDetections"))
733
+ GetTextDetectionResponse.add_member(:next_token, Shapes::ShapeRef.new(shape: PaginationToken, location_name: "NextToken"))
734
+ GetTextDetectionResponse.add_member(:text_model_version, Shapes::ShapeRef.new(shape: String, location_name: "TextModelVersion"))
735
+ GetTextDetectionResponse.struct_class = Types::GetTextDetectionResponse
736
+
682
737
  GroundTruthManifest.add_member(:s3_object, Shapes::ShapeRef.new(shape: S3Object, location_name: "S3Object"))
683
738
  GroundTruthManifest.struct_class = Types::GroundTruthManifest
684
739
 
@@ -702,6 +757,8 @@ module Aws::Rekognition
702
757
  HumanLoopQuotaExceededException.add_member(:service_code, Shapes::ShapeRef.new(shape: String, location_name: "ServiceCode"))
703
758
  HumanLoopQuotaExceededException.struct_class = Types::HumanLoopQuotaExceededException
704
759
 
760
+ IdempotentParameterMismatchException.struct_class = Types::IdempotentParameterMismatchException
761
+
705
762
  Image.add_member(:bytes, Shapes::ShapeRef.new(shape: ImageBlob, location_name: "Bytes"))
706
763
  Image.add_member(:s3_object, Shapes::ShapeRef.new(shape: S3Object, location_name: "S3Object"))
707
764
  Image.struct_class = Types::Image
@@ -710,6 +767,8 @@ module Aws::Rekognition
710
767
  ImageQuality.add_member(:sharpness, Shapes::ShapeRef.new(shape: Float, location_name: "Sharpness"))
711
768
  ImageQuality.struct_class = Types::ImageQuality
712
769
 
770
+ ImageTooLargeException.struct_class = Types::ImageTooLargeException
771
+
713
772
  IndexFacesRequest.add_member(:collection_id, Shapes::ShapeRef.new(shape: CollectionId, required: true, location_name: "CollectionId"))
714
773
  IndexFacesRequest.add_member(:image, Shapes::ShapeRef.new(shape: Image, required: true, location_name: "Image"))
715
774
  IndexFacesRequest.add_member(:external_image_id, Shapes::ShapeRef.new(shape: ExternalImageId, location_name: "ExternalImageId"))
@@ -730,6 +789,16 @@ module Aws::Rekognition
730
789
 
731
790
  Instances.member = Shapes::ShapeRef.new(shape: Instance)
732
791
 
792
+ InternalServerError.struct_class = Types::InternalServerError
793
+
794
+ InvalidImageFormatException.struct_class = Types::InvalidImageFormatException
795
+
796
+ InvalidPaginationTokenException.struct_class = Types::InvalidPaginationTokenException
797
+
798
+ InvalidParameterException.struct_class = Types::InvalidParameterException
799
+
800
+ InvalidS3ObjectException.struct_class = Types::InvalidS3ObjectException
801
+
733
802
  KinesisDataStream.add_member(:arn, Shapes::ShapeRef.new(shape: KinesisDataArn, location_name: "Arn"))
734
803
  KinesisDataStream.struct_class = Types::KinesisDataStream
735
804
 
@@ -757,6 +826,8 @@ module Aws::Rekognition
757
826
 
758
827
  Landmarks.member = Shapes::ShapeRef.new(shape: Landmark)
759
828
 
829
+ LimitExceededException.struct_class = Types::LimitExceededException
830
+
760
831
  ListCollectionsRequest.add_member(:next_token, Shapes::ShapeRef.new(shape: PaginationToken, location_name: "NextToken"))
761
832
  ListCollectionsRequest.add_member(:max_results, Shapes::ShapeRef.new(shape: PageSize, location_name: "MaxResults"))
762
833
  ListCollectionsRequest.struct_class = Types::ListCollectionsRequest
@@ -863,6 +934,8 @@ module Aws::Rekognition
863
934
 
864
935
  ProjectVersionDescriptions.member = Shapes::ShapeRef.new(shape: ProjectVersionDescription)
865
936
 
937
+ ProvisionedThroughputExceededException.struct_class = Types::ProvisionedThroughputExceededException
938
+
866
939
  Reasons.member = Shapes::ShapeRef.new(shape: Reason)
867
940
 
868
941
  RecognizeCelebritiesRequest.add_member(:image, Shapes::ShapeRef.new(shape: Image, required: true, location_name: "Image"))
@@ -873,6 +946,19 @@ module Aws::Rekognition
873
946
  RecognizeCelebritiesResponse.add_member(:orientation_correction, Shapes::ShapeRef.new(shape: OrientationCorrection, location_name: "OrientationCorrection"))
874
947
  RecognizeCelebritiesResponse.struct_class = Types::RecognizeCelebritiesResponse
875
948
 
949
+ RegionOfInterest.add_member(:bounding_box, Shapes::ShapeRef.new(shape: BoundingBox, location_name: "BoundingBox"))
950
+ RegionOfInterest.struct_class = Types::RegionOfInterest
951
+
952
+ RegionsOfInterest.member = Shapes::ShapeRef.new(shape: RegionOfInterest)
953
+
954
+ ResourceAlreadyExistsException.struct_class = Types::ResourceAlreadyExistsException
955
+
956
+ ResourceInUseException.struct_class = Types::ResourceInUseException
957
+
958
+ ResourceNotFoundException.struct_class = Types::ResourceNotFoundException
959
+
960
+ ResourceNotReadyException.struct_class = Types::ResourceNotReadyException
961
+
876
962
  S3Object.add_member(:bucket, Shapes::ShapeRef.new(shape: S3Bucket, location_name: "Bucket"))
877
963
  S3Object.add_member(:name, Shapes::ShapeRef.new(shape: S3ObjectName, location_name: "Name"))
878
964
  S3Object.add_member(:version, Shapes::ShapeRef.new(shape: S3ObjectVersion, location_name: "Version"))
@@ -977,6 +1063,20 @@ module Aws::Rekognition
977
1063
 
978
1064
  StartStreamProcessorResponse.struct_class = Types::StartStreamProcessorResponse
979
1065
 
1066
+ StartTextDetectionFilters.add_member(:word_filter, Shapes::ShapeRef.new(shape: DetectionFilter, location_name: "WordFilter"))
1067
+ StartTextDetectionFilters.add_member(:regions_of_interest, Shapes::ShapeRef.new(shape: RegionsOfInterest, location_name: "RegionsOfInterest"))
1068
+ StartTextDetectionFilters.struct_class = Types::StartTextDetectionFilters
1069
+
1070
+ StartTextDetectionRequest.add_member(:video, Shapes::ShapeRef.new(shape: Video, required: true, location_name: "Video"))
1071
+ StartTextDetectionRequest.add_member(:client_request_token, Shapes::ShapeRef.new(shape: ClientRequestToken, location_name: "ClientRequestToken"))
1072
+ StartTextDetectionRequest.add_member(:notification_channel, Shapes::ShapeRef.new(shape: NotificationChannel, location_name: "NotificationChannel"))
1073
+ StartTextDetectionRequest.add_member(:job_tag, Shapes::ShapeRef.new(shape: JobTag, location_name: "JobTag"))
1074
+ StartTextDetectionRequest.add_member(:filters, Shapes::ShapeRef.new(shape: StartTextDetectionFilters, location_name: "Filters"))
1075
+ StartTextDetectionRequest.struct_class = Types::StartTextDetectionRequest
1076
+
1077
+ StartTextDetectionResponse.add_member(:job_id, Shapes::ShapeRef.new(shape: JobId, location_name: "JobId"))
1078
+ StartTextDetectionResponse.struct_class = Types::StartTextDetectionResponse
1079
+
980
1080
  StopProjectVersionRequest.add_member(:project_version_arn, Shapes::ShapeRef.new(shape: ProjectVersionArn, required: true, location_name: "ProjectVersionArn"))
981
1081
  StopProjectVersionRequest.struct_class = Types::StopProjectVersionRequest
982
1082
 
@@ -1028,6 +1128,14 @@ module Aws::Rekognition
1028
1128
 
1029
1129
  TextDetectionList.member = Shapes::ShapeRef.new(shape: TextDetection)
1030
1130
 
1131
+ TextDetectionResult.add_member(:timestamp, Shapes::ShapeRef.new(shape: Timestamp, location_name: "Timestamp"))
1132
+ TextDetectionResult.add_member(:text_detection, Shapes::ShapeRef.new(shape: TextDetection, location_name: "TextDetection"))
1133
+ TextDetectionResult.struct_class = Types::TextDetectionResult
1134
+
1135
+ TextDetectionResults.member = Shapes::ShapeRef.new(shape: TextDetectionResult)
1136
+
1137
+ ThrottlingException.struct_class = Types::ThrottlingException
1138
+
1031
1139
  TrainingData.add_member(:assets, Shapes::ShapeRef.new(shape: Assets, location_name: "Assets"))
1032
1140
  TrainingData.struct_class = Types::TrainingData
1033
1141
 
@@ -1056,6 +1164,8 @@ module Aws::Rekognition
1056
1164
  VideoMetadata.add_member(:frame_width, Shapes::ShapeRef.new(shape: ULong, location_name: "FrameWidth"))
1057
1165
  VideoMetadata.struct_class = Types::VideoMetadata
1058
1166
 
1167
+ VideoTooLargeException.struct_class = Types::VideoTooLargeException
1168
+
1059
1169
 
1060
1170
  # @api private
1061
1171
  API = Seahorse::Model::Api.new.tap do |api|
@@ -1178,6 +1288,36 @@ module Aws::Rekognition
1178
1288
  o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundException)
1179
1289
  end)
1180
1290
 
1291
+ api.add_operation(:delete_project, Seahorse::Model::Operation.new.tap do |o|
1292
+ o.name = "DeleteProject"
1293
+ o.http_method = "POST"
1294
+ o.http_request_uri = "/"
1295
+ o.input = Shapes::ShapeRef.new(shape: DeleteProjectRequest)
1296
+ o.output = Shapes::ShapeRef.new(shape: DeleteProjectResponse)
1297
+ o.errors << Shapes::ShapeRef.new(shape: ResourceInUseException)
1298
+ o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundException)
1299
+ o.errors << Shapes::ShapeRef.new(shape: InvalidParameterException)
1300
+ o.errors << Shapes::ShapeRef.new(shape: AccessDeniedException)
1301
+ o.errors << Shapes::ShapeRef.new(shape: InternalServerError)
1302
+ o.errors << Shapes::ShapeRef.new(shape: ThrottlingException)
1303
+ o.errors << Shapes::ShapeRef.new(shape: ProvisionedThroughputExceededException)
1304
+ end)
1305
+
1306
+ api.add_operation(:delete_project_version, Seahorse::Model::Operation.new.tap do |o|
1307
+ o.name = "DeleteProjectVersion"
1308
+ o.http_method = "POST"
1309
+ o.http_request_uri = "/"
1310
+ o.input = Shapes::ShapeRef.new(shape: DeleteProjectVersionRequest)
1311
+ o.output = Shapes::ShapeRef.new(shape: DeleteProjectVersionResponse)
1312
+ o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundException)
1313
+ o.errors << Shapes::ShapeRef.new(shape: ResourceInUseException)
1314
+ o.errors << Shapes::ShapeRef.new(shape: InvalidParameterException)
1315
+ o.errors << Shapes::ShapeRef.new(shape: AccessDeniedException)
1316
+ o.errors << Shapes::ShapeRef.new(shape: InternalServerError)
1317
+ o.errors << Shapes::ShapeRef.new(shape: ThrottlingException)
1318
+ o.errors << Shapes::ShapeRef.new(shape: ProvisionedThroughputExceededException)
1319
+ end)
1320
+
1181
1321
  api.add_operation(:delete_stream_processor, Seahorse::Model::Operation.new.tap do |o|
1182
1322
  o.name = "DeleteStreamProcessor"
1183
1323
  o.http_method = "POST"
@@ -1486,6 +1626,27 @@ module Aws::Rekognition
1486
1626
  )
1487
1627
  end)
1488
1628
 
1629
+ api.add_operation(:get_text_detection, Seahorse::Model::Operation.new.tap do |o|
1630
+ o.name = "GetTextDetection"
1631
+ o.http_method = "POST"
1632
+ o.http_request_uri = "/"
1633
+ o.input = Shapes::ShapeRef.new(shape: GetTextDetectionRequest)
1634
+ o.output = Shapes::ShapeRef.new(shape: GetTextDetectionResponse)
1635
+ o.errors << Shapes::ShapeRef.new(shape: AccessDeniedException)
1636
+ o.errors << Shapes::ShapeRef.new(shape: InternalServerError)
1637
+ o.errors << Shapes::ShapeRef.new(shape: InvalidParameterException)
1638
+ o.errors << Shapes::ShapeRef.new(shape: InvalidPaginationTokenException)
1639
+ o.errors << Shapes::ShapeRef.new(shape: ProvisionedThroughputExceededException)
1640
+ o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundException)
1641
+ o.errors << Shapes::ShapeRef.new(shape: ThrottlingException)
1642
+ o[:pager] = Aws::Pager.new(
1643
+ limit_key: "max_results",
1644
+ tokens: {
1645
+ "next_token" => "next_token"
1646
+ }
1647
+ )
1648
+ end)
1649
+
1489
1650
  api.add_operation(:index_faces, Seahorse::Model::Operation.new.tap do |o|
1490
1651
  o.name = "IndexFaces"
1491
1652
  o.http_method = "POST"
@@ -1747,6 +1908,23 @@ module Aws::Rekognition
1747
1908
  o.errors << Shapes::ShapeRef.new(shape: ProvisionedThroughputExceededException)
1748
1909
  end)
1749
1910
 
1911
+ api.add_operation(:start_text_detection, Seahorse::Model::Operation.new.tap do |o|
1912
+ o.name = "StartTextDetection"
1913
+ o.http_method = "POST"
1914
+ o.http_request_uri = "/"
1915
+ o.input = Shapes::ShapeRef.new(shape: StartTextDetectionRequest)
1916
+ o.output = Shapes::ShapeRef.new(shape: StartTextDetectionResponse)
1917
+ o.errors << Shapes::ShapeRef.new(shape: AccessDeniedException)
1918
+ o.errors << Shapes::ShapeRef.new(shape: IdempotentParameterMismatchException)
1919
+ o.errors << Shapes::ShapeRef.new(shape: InvalidParameterException)
1920
+ o.errors << Shapes::ShapeRef.new(shape: InvalidS3ObjectException)
1921
+ o.errors << Shapes::ShapeRef.new(shape: InternalServerError)
1922
+ o.errors << Shapes::ShapeRef.new(shape: VideoTooLargeException)
1923
+ o.errors << Shapes::ShapeRef.new(shape: ProvisionedThroughputExceededException)
1924
+ o.errors << Shapes::ShapeRef.new(shape: LimitExceededException)
1925
+ o.errors << Shapes::ShapeRef.new(shape: ThrottlingException)
1926
+ end)
1927
+
1750
1928
  api.add_operation(:stop_project_version, Seahorse::Model::Operation.new.tap do |o|
1751
1929
  o.name = "StopProjectVersion"
1752
1930
  o.http_method = "POST"
@@ -6,10 +6,59 @@
6
6
  # WARNING ABOUT GENERATED CODE
7
7
 
8
8
  module Aws::Rekognition
9
+
10
+ # When Rekognition returns an error response, the Ruby SDK constructs and raises an error.
11
+ # These errors all extend Aws::Rekognition::Errors::ServiceError < {Aws::Errors::ServiceError}
12
+ #
13
+ # You can rescue all Rekognition errors using ServiceError:
14
+ #
15
+ # begin
16
+ # # do stuff
17
+ # rescue Aws::Rekognition::Errors::ServiceError
18
+ # # rescues all Rekognition API errors
19
+ # end
20
+ #
21
+ #
22
+ # ## Request Context
23
+ # ServiceError objects have a {Aws::Errors::ServiceError#context #context} method that returns
24
+ # information about the request that generated the error.
25
+ # See {Seahorse::Client::RequestContext} for more information.
26
+ #
27
+ # ## Error Classes
28
+ # * {AccessDeniedException}
29
+ # * {HumanLoopQuotaExceededException}
30
+ # * {IdempotentParameterMismatchException}
31
+ # * {ImageTooLargeException}
32
+ # * {InternalServerError}
33
+ # * {InvalidImageFormatException}
34
+ # * {InvalidPaginationTokenException}
35
+ # * {InvalidParameterException}
36
+ # * {InvalidS3ObjectException}
37
+ # * {LimitExceededException}
38
+ # * {ProvisionedThroughputExceededException}
39
+ # * {ResourceAlreadyExistsException}
40
+ # * {ResourceInUseException}
41
+ # * {ResourceNotFoundException}
42
+ # * {ResourceNotReadyException}
43
+ # * {ThrottlingException}
44
+ # * {VideoTooLargeException}
45
+ #
46
+ # Additionally, error classes are dynamically generated for service errors based on the error code
47
+ # if they are not defined above.
9
48
  module Errors
10
49
 
11
50
  extend Aws::Errors::DynamicErrors
12
51
 
52
+ class AccessDeniedException < ServiceError
53
+
54
+ # @param [Seahorse::Client::RequestContext] context
55
+ # @param [String] message
56
+ # @param [Aws::Rekognition::Types::AccessDeniedException] data
57
+ def initialize(context, message, data = Aws::EmptyStructure.new)
58
+ super(context, message, data)
59
+ end
60
+ end
61
+
13
62
  class HumanLoopQuotaExceededException < ServiceError
14
63
 
15
64
  # @param [Seahorse::Client::RequestContext] context
@@ -33,7 +82,156 @@ module Aws::Rekognition
33
82
  def service_code
34
83
  @data[:service_code]
35
84
  end
85
+ end
86
+
87
+ class IdempotentParameterMismatchException < ServiceError
88
+
89
+ # @param [Seahorse::Client::RequestContext] context
90
+ # @param [String] message
91
+ # @param [Aws::Rekognition::Types::IdempotentParameterMismatchException] data
92
+ def initialize(context, message, data = Aws::EmptyStructure.new)
93
+ super(context, message, data)
94
+ end
95
+ end
96
+
97
+ class ImageTooLargeException < ServiceError
98
+
99
+ # @param [Seahorse::Client::RequestContext] context
100
+ # @param [String] message
101
+ # @param [Aws::Rekognition::Types::ImageTooLargeException] data
102
+ def initialize(context, message, data = Aws::EmptyStructure.new)
103
+ super(context, message, data)
104
+ end
105
+ end
106
+
107
+ class InternalServerError < ServiceError
108
+
109
+ # @param [Seahorse::Client::RequestContext] context
110
+ # @param [String] message
111
+ # @param [Aws::Rekognition::Types::InternalServerError] data
112
+ def initialize(context, message, data = Aws::EmptyStructure.new)
113
+ super(context, message, data)
114
+ end
115
+ end
116
+
117
+ class InvalidImageFormatException < ServiceError
118
+
119
+ # @param [Seahorse::Client::RequestContext] context
120
+ # @param [String] message
121
+ # @param [Aws::Rekognition::Types::InvalidImageFormatException] data
122
+ def initialize(context, message, data = Aws::EmptyStructure.new)
123
+ super(context, message, data)
124
+ end
125
+ end
126
+
127
+ class InvalidPaginationTokenException < ServiceError
128
+
129
+ # @param [Seahorse::Client::RequestContext] context
130
+ # @param [String] message
131
+ # @param [Aws::Rekognition::Types::InvalidPaginationTokenException] data
132
+ def initialize(context, message, data = Aws::EmptyStructure.new)
133
+ super(context, message, data)
134
+ end
135
+ end
136
+
137
+ class InvalidParameterException < ServiceError
138
+
139
+ # @param [Seahorse::Client::RequestContext] context
140
+ # @param [String] message
141
+ # @param [Aws::Rekognition::Types::InvalidParameterException] data
142
+ def initialize(context, message, data = Aws::EmptyStructure.new)
143
+ super(context, message, data)
144
+ end
145
+ end
146
+
147
+ class InvalidS3ObjectException < ServiceError
148
+
149
+ # @param [Seahorse::Client::RequestContext] context
150
+ # @param [String] message
151
+ # @param [Aws::Rekognition::Types::InvalidS3ObjectException] data
152
+ def initialize(context, message, data = Aws::EmptyStructure.new)
153
+ super(context, message, data)
154
+ end
155
+ end
156
+
157
+ class LimitExceededException < ServiceError
158
+
159
+ # @param [Seahorse::Client::RequestContext] context
160
+ # @param [String] message
161
+ # @param [Aws::Rekognition::Types::LimitExceededException] data
162
+ def initialize(context, message, data = Aws::EmptyStructure.new)
163
+ super(context, message, data)
164
+ end
165
+ end
166
+
167
+ class ProvisionedThroughputExceededException < ServiceError
168
+
169
+ # @param [Seahorse::Client::RequestContext] context
170
+ # @param [String] message
171
+ # @param [Aws::Rekognition::Types::ProvisionedThroughputExceededException] data
172
+ def initialize(context, message, data = Aws::EmptyStructure.new)
173
+ super(context, message, data)
174
+ end
175
+ end
176
+
177
+ class ResourceAlreadyExistsException < ServiceError
178
+
179
+ # @param [Seahorse::Client::RequestContext] context
180
+ # @param [String] message
181
+ # @param [Aws::Rekognition::Types::ResourceAlreadyExistsException] data
182
+ def initialize(context, message, data = Aws::EmptyStructure.new)
183
+ super(context, message, data)
184
+ end
185
+ end
186
+
187
+ class ResourceInUseException < ServiceError
188
+
189
+ # @param [Seahorse::Client::RequestContext] context
190
+ # @param [String] message
191
+ # @param [Aws::Rekognition::Types::ResourceInUseException] data
192
+ def initialize(context, message, data = Aws::EmptyStructure.new)
193
+ super(context, message, data)
194
+ end
195
+ end
196
+
197
+ class ResourceNotFoundException < ServiceError
198
+
199
+ # @param [Seahorse::Client::RequestContext] context
200
+ # @param [String] message
201
+ # @param [Aws::Rekognition::Types::ResourceNotFoundException] data
202
+ def initialize(context, message, data = Aws::EmptyStructure.new)
203
+ super(context, message, data)
204
+ end
205
+ end
206
+
207
+ class ResourceNotReadyException < ServiceError
208
+
209
+ # @param [Seahorse::Client::RequestContext] context
210
+ # @param [String] message
211
+ # @param [Aws::Rekognition::Types::ResourceNotReadyException] data
212
+ def initialize(context, message, data = Aws::EmptyStructure.new)
213
+ super(context, message, data)
214
+ end
215
+ end
216
+
217
+ class ThrottlingException < ServiceError
218
+
219
+ # @param [Seahorse::Client::RequestContext] context
220
+ # @param [String] message
221
+ # @param [Aws::Rekognition::Types::ThrottlingException] data
222
+ def initialize(context, message, data = Aws::EmptyStructure.new)
223
+ super(context, message, data)
224
+ end
225
+ end
36
226
 
227
+ class VideoTooLargeException < ServiceError
228
+
229
+ # @param [Seahorse::Client::RequestContext] context
230
+ # @param [String] message
231
+ # @param [Aws::Rekognition::Types::VideoTooLargeException] data
232
+ def initialize(context, message, data = Aws::EmptyStructure.new)
233
+ super(context, message, data)
234
+ end
37
235
  end
38
236
 
39
237
  end