aws-sdk-rekognition 1.56.0 → 1.60.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -285,6 +285,15 @@ module Aws::Rekognition
285
285
  # ** Please note ** When response stubbing is enabled, no HTTP
286
286
  # requests are made, and retries are disabled.
287
287
  #
288
+ # @option options [Boolean] :use_dualstack_endpoint
289
+ # When set to `true`, dualstack enabled endpoints (with `.aws` TLD)
290
+ # will be used if available.
291
+ #
292
+ # @option options [Boolean] :use_fips_endpoint
293
+ # When set to `true`, fips compatible endpoints will be used if available.
294
+ # When a `fips` region is used, the region is normalized and this config
295
+ # is set to `true`.
296
+ #
288
297
  # @option options [Boolean] :validate_params (true)
289
298
  # When `true`, request parameters are validated before
290
299
  # sending the request.
@@ -652,9 +661,84 @@ module Aws::Rekognition
652
661
  req.send_request(options)
653
662
  end
654
663
 
664
+ # Creates a new Amazon Rekognition Custom Labels dataset. You can create
665
+ # a dataset by using an Amazon Sagemaker format manifest file or by
666
+ # copying an existing Amazon Rekognition Custom Labels dataset.
667
+ #
668
+ # To create a training dataset for a project, specify `train` for the
669
+ # value of `DatasetType`. To create the test dataset for a project,
670
+ # specify `test` for the value of `DatasetType`.
671
+ #
672
+ # The response from `CreateDataset` is the Amazon Resource Name (ARN)
673
+ # for the dataset. Creating a dataset takes a while to complete. Use
674
+ # DescribeDataset to check the current status. The dataset created
675
+ # successfully if the value of `Status` is `CREATE_COMPLETE`.
676
+ #
677
+ # To check if any non-terminal errors occurred, call ListDatasetEntries
678
+ # and check for the presence of `errors` lists in the JSON Lines.
679
+ #
680
+ # Dataset creation fails if a terminal error occurs (`Status` =
681
+ # `CREATE_FAILED`). Currently, you can't access the terminal error
682
+ # information.
683
+ #
684
+ # For more information, see Creating dataset in the *Amazon Rekognition
685
+ # Custom Labels Developer Guide*.
686
+ #
687
+ # This operation requires permissions to perform the
688
+ # `rekognition:CreateDataset` action. If you want to copy an existing
689
+ # dataset, you also require permission to perform the
690
+ # `rekognition:ListDatasetEntries` action.
691
+ #
692
+ # @option params [Types::DatasetSource] :dataset_source
693
+ # The source files for the dataset. You can specify the ARN of an
694
+ # existing dataset or specify the Amazon S3 bucket location of an Amazon
695
+ # Sagemaker format manifest file. If you don't specify `datasetSource`,
696
+ # an empty dataset is created. To add labeled images to the dataset, You
697
+ # can use the console or call UpdateDatasetEntries.
698
+ #
699
+ # @option params [required, String] :dataset_type
700
+ # The type of the dataset. Specify `train` to create a training dataset.
701
+ # Specify `test` to create a test dataset.
702
+ #
703
+ # @option params [required, String] :project_arn
704
+ # The ARN of the Amazon Rekognition Custom Labels project to which you
705
+ # want to asssign the dataset.
706
+ #
707
+ # @return [Types::CreateDatasetResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
708
+ #
709
+ # * {Types::CreateDatasetResponse#dataset_arn #dataset_arn} => String
710
+ #
711
+ # @example Request syntax with placeholder values
712
+ #
713
+ # resp = client.create_dataset({
714
+ # dataset_source: {
715
+ # ground_truth_manifest: {
716
+ # s3_object: {
717
+ # bucket: "S3Bucket",
718
+ # name: "S3ObjectName",
719
+ # version: "S3ObjectVersion",
720
+ # },
721
+ # },
722
+ # dataset_arn: "DatasetArn",
723
+ # },
724
+ # dataset_type: "TRAIN", # required, accepts TRAIN, TEST
725
+ # project_arn: "ProjectArn", # required
726
+ # })
727
+ #
728
+ # @example Response structure
729
+ #
730
+ # resp.dataset_arn #=> String
731
+ #
732
+ # @overload create_dataset(params = {})
733
+ # @param [Hash] params ({})
734
+ def create_dataset(params = {}, options = {})
735
+ req = build_request(:create_dataset, params)
736
+ req.send_request(options)
737
+ end
738
+
655
739
  # Creates a new Amazon Rekognition Custom Labels project. A project is a
656
- # logical grouping of resources (images, Labels, models) and operations
657
- # (training, evaluation and detection).
740
+ # group of resources (datasets, model versions) that you use to create
741
+ # and manage Amazon Rekognition Custom Labels models.
658
742
  #
659
743
  # This operation requires permissions to perform the
660
744
  # `rekognition:CreateProject` action.
@@ -684,16 +768,40 @@ module Aws::Rekognition
684
768
  end
685
769
 
686
770
  # Creates a new version of a model and begins training. Models are
687
- # managed as part of an Amazon Rekognition Custom Labels project. You
688
- # can specify one training dataset and one testing dataset. The response
689
- # from `CreateProjectVersion` is an Amazon Resource Name (ARN) for the
690
- # version of the model.
771
+ # managed as part of an Amazon Rekognition Custom Labels project. The
772
+ # response from `CreateProjectVersion` is an Amazon Resource Name (ARN)
773
+ # for the version of the model.
774
+ #
775
+ # Training uses the training and test datasets associated with the
776
+ # project. For more information, see Creating training and test dataset
777
+ # in the *Amazon Rekognition Custom Labels Developer Guide*.
778
+ #
779
+ # <note markdown="1"> You can train a modelin a project that doesn't have associated
780
+ # datasets by specifying manifest files in the `TrainingData` and
781
+ # `TestingData` fields.
782
+ #
783
+ # If you open the console after training a model with manifest files,
784
+ # Amazon Rekognition Custom Labels creates the datasets for you using
785
+ # the most recent manifest files. You can no longer train a model
786
+ # version for the project by specifying manifest files.
787
+ #
788
+ # Instead of training with a project without associated datasets, we
789
+ # recommend that you use the manifest files to create training and test
790
+ # datasets for the project.
791
+ #
792
+ # </note>
691
793
  #
692
794
  # Training takes a while to complete. You can get the current status by
693
- # calling DescribeProjectVersions.
795
+ # calling DescribeProjectVersions. Training completed successfully if
796
+ # the value of the `Status` field is `TRAINING_COMPLETED`.
797
+ #
798
+ # If training fails, see Debugging a failed model training in the
799
+ # *Amazon Rekognition Custom Labels* developer guide.
694
800
  #
695
801
  # Once training has successfully completed, call DescribeProjectVersions
696
- # to get the training results and evaluate the model.
802
+ # to get the training results and evaluate the model. For more
803
+ # information, see Improving a trained Amazon Rekognition Custom Labels
804
+ # model in the *Amazon Rekognition Custom Labels* developers guide.
697
805
  #
698
806
  # After evaluating the model, you start the model by calling
699
807
  # StartProjectVersion.
@@ -713,26 +821,30 @@ module Aws::Rekognition
713
821
  # bucket can be in any AWS account as long as the caller has
714
822
  # `s3:PutObject` permissions on the S3 bucket.
715
823
  #
716
- # @option params [required, Types::TrainingData] :training_data
717
- # The dataset to use for training.
824
+ # @option params [Types::TrainingData] :training_data
825
+ # Specifies an external manifest that the services uses to train the
826
+ # model. If you specify `TrainingData` you must also specify
827
+ # `TestingData`. The project must not have any associated datasets.
718
828
  #
719
- # @option params [required, Types::TestingData] :testing_data
720
- # The dataset to use for testing.
829
+ # @option params [Types::TestingData] :testing_data
830
+ # Specifies an external manifest that the service uses to test the
831
+ # model. If you specify `TestingData` you must also specify
832
+ # `TrainingData`. The project must not have any associated datasets.
721
833
  #
722
834
  # @option params [Hash<String,String>] :tags
723
835
  # A set of tags (key-value pairs) that you want to attach to the model.
724
836
  #
725
837
  # @option params [String] :kms_key_id
726
- # The identifier for your AWS Key Management Service (AWS KMS) customer
727
- # master key (CMK). You can supply the Amazon Resource Name (ARN) of
728
- # your CMK, the ID of your CMK, an alias for your CMK, or an alias ARN.
729
- # The key is used to encrypt training and test images copied into the
730
- # service for model training. Your source images are unaffected. The key
731
- # is also used to encrypt training results and manifest files written to
732
- # the output Amazon S3 bucket (`OutputConfig`).
838
+ # The identifier for your AWS Key Management Service key (AWS KMS key).
839
+ # You can supply the Amazon Resource Name (ARN) of your KMS key, the ID
840
+ # of your KMS key, an alias for your KMS key, or an alias ARN. The key
841
+ # is used to encrypt training and test images copied into the service
842
+ # for model training. Your source images are unaffected. The key is also
843
+ # used to encrypt training results and manifest files written to the
844
+ # output Amazon S3 bucket (`OutputConfig`).
733
845
  #
734
- # If you choose to use your own CMK, you need the following permissions
735
- # on the CMK.
846
+ # If you choose to use your own KMS key, you need the following
847
+ # permissions on the KMS key.
736
848
  #
737
849
  # * kms:CreateGrant
738
850
  #
@@ -758,7 +870,7 @@ module Aws::Rekognition
758
870
  # s3_bucket: "S3Bucket",
759
871
  # s3_key_prefix: "S3KeyPrefix",
760
872
  # },
761
- # training_data: { # required
873
+ # training_data: {
762
874
  # assets: [
763
875
  # {
764
876
  # ground_truth_manifest: {
@@ -771,7 +883,7 @@ module Aws::Rekognition
771
883
  # },
772
884
  # ],
773
885
  # },
774
- # testing_data: { # required
886
+ # testing_data: {
775
887
  # assets: [
776
888
  # {
777
889
  # ground_truth_manifest: {
@@ -940,6 +1052,38 @@ module Aws::Rekognition
940
1052
  req.send_request(options)
941
1053
  end
942
1054
 
1055
+ # Deletes an existing Amazon Rekognition Custom Labels dataset. Deleting
1056
+ # a dataset might take while. Use DescribeDataset to check the current
1057
+ # status. The dataset is still deleting if the value of `Status` is
1058
+ # `DELETE_IN_PROGRESS`. If you try to access the dataset after it is
1059
+ # deleted, you get a `ResourceNotFoundException` exception.
1060
+ #
1061
+ # You can't delete a dataset while it is creating (`Status` =
1062
+ # `CREATE_IN_PROGRESS`) or if the dataset is updating (`Status` =
1063
+ # `UPDATE_IN_PROGRESS`).
1064
+ #
1065
+ # This operation requires permissions to perform the
1066
+ # `rekognition:DeleteDataset` action.
1067
+ #
1068
+ # @option params [required, String] :dataset_arn
1069
+ # The ARN of the Amazon Rekognition Custom Labels dataset that you want
1070
+ # to delete.
1071
+ #
1072
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
1073
+ #
1074
+ # @example Request syntax with placeholder values
1075
+ #
1076
+ # resp = client.delete_dataset({
1077
+ # dataset_arn: "DatasetArn", # required
1078
+ # })
1079
+ #
1080
+ # @overload delete_dataset(params = {})
1081
+ # @param [Hash] params ({})
1082
+ def delete_dataset(params = {}, options = {})
1083
+ req = build_request(:delete_dataset, params)
1084
+ req.send_request(options)
1085
+ end
1086
+
943
1087
  # Deletes faces from a collection. You specify a collection ID and an
944
1088
  # array of face IDs to remove from the collection.
945
1089
  #
@@ -998,6 +1142,10 @@ module Aws::Rekognition
998
1142
  # project you must first delete all models associated with the project.
999
1143
  # To delete a model, see DeleteProjectVersion.
1000
1144
  #
1145
+ # `DeleteProject` is an asynchronous operation. To check if the project
1146
+ # is deleted, call DescribeProjects. The project is deleted when the
1147
+ # project no longer appears in the response.
1148
+ #
1001
1149
  # This operation requires permissions to perform the
1002
1150
  # `rekognition:DeleteProject` action.
1003
1151
  #
@@ -1122,10 +1270,50 @@ module Aws::Rekognition
1122
1270
  req.send_request(options)
1123
1271
  end
1124
1272
 
1125
- # Lists and describes the models in an Amazon Rekognition Custom Labels
1126
- # project. You can specify up to 10 model versions in
1273
+ # Describes an Amazon Rekognition Custom Labels dataset. You can get
1274
+ # information such as the current status of a dataset and statistics
1275
+ # about the images and labels in a dataset.
1276
+ #
1277
+ # This operation requires permissions to perform the
1278
+ # `rekognition:DescribeDataset` action.
1279
+ #
1280
+ # @option params [required, String] :dataset_arn
1281
+ # The Amazon Resource Name (ARN) of the dataset that you want to
1282
+ # describe.
1283
+ #
1284
+ # @return [Types::DescribeDatasetResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1285
+ #
1286
+ # * {Types::DescribeDatasetResponse#dataset_description #dataset_description} => Types::DatasetDescription
1287
+ #
1288
+ # @example Request syntax with placeholder values
1289
+ #
1290
+ # resp = client.describe_dataset({
1291
+ # dataset_arn: "DatasetArn", # required
1292
+ # })
1293
+ #
1294
+ # @example Response structure
1295
+ #
1296
+ # resp.dataset_description.creation_timestamp #=> Time
1297
+ # resp.dataset_description.last_updated_timestamp #=> Time
1298
+ # resp.dataset_description.status #=> String, one of "CREATE_IN_PROGRESS", "CREATE_COMPLETE", "CREATE_FAILED", "UPDATE_IN_PROGRESS", "UPDATE_COMPLETE", "UPDATE_FAILED", "DELETE_IN_PROGRESS"
1299
+ # resp.dataset_description.status_message #=> String
1300
+ # resp.dataset_description.status_message_code #=> String, one of "SUCCESS", "SERVICE_ERROR", "CLIENT_ERROR"
1301
+ # resp.dataset_description.dataset_stats.labeled_entries #=> Integer
1302
+ # resp.dataset_description.dataset_stats.total_entries #=> Integer
1303
+ # resp.dataset_description.dataset_stats.total_labels #=> Integer
1304
+ # resp.dataset_description.dataset_stats.error_entries #=> Integer
1305
+ #
1306
+ # @overload describe_dataset(params = {})
1307
+ # @param [Hash] params ({})
1308
+ def describe_dataset(params = {}, options = {})
1309
+ req = build_request(:describe_dataset, params)
1310
+ req.send_request(options)
1311
+ end
1312
+
1313
+ # Lists and describes the versions of a model in an Amazon Rekognition
1314
+ # Custom Labels project. You can specify up to 10 model versions in
1127
1315
  # `ProjectVersionArns`. If you don't specify a value, descriptions for
1128
- # all models are returned.
1316
+ # all model versions in the project are returned.
1129
1317
  #
1130
1318
  # This operation requires permissions to perform the
1131
1319
  # `rekognition:DescribeProjectVersions` action.
@@ -1232,8 +1420,7 @@ module Aws::Rekognition
1232
1420
  req.send_request(options)
1233
1421
  end
1234
1422
 
1235
- # Lists and gets information about your Amazon Rekognition Custom Labels
1236
- # projects.
1423
+ # Gets information about your Amazon Rekognition Custom Labels projects.
1237
1424
  #
1238
1425
  # This operation requires permissions to perform the
1239
1426
  # `rekognition:DescribeProjects` action.
@@ -1250,6 +1437,11 @@ module Aws::Rekognition
1250
1437
  # than 100, a ValidationException error occurs. The default value is
1251
1438
  # 100.
1252
1439
  #
1440
+ # @option params [Array<String>] :project_names
1441
+ # A list of the projects that you want Amazon Rekognition Custom Labels
1442
+ # to describe. If you don't specify a value, the response includes
1443
+ # descriptions for all the projects in your AWS account.
1444
+ #
1253
1445
  # @return [Types::DescribeProjectsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1254
1446
  #
1255
1447
  # * {Types::DescribeProjectsResponse#project_descriptions #project_descriptions} => Array&lt;Types::ProjectDescription&gt;
@@ -1262,6 +1454,7 @@ module Aws::Rekognition
1262
1454
  # resp = client.describe_projects({
1263
1455
  # next_token: "ExtendedPaginationToken",
1264
1456
  # max_results: 1,
1457
+ # project_names: ["ProjectName"],
1265
1458
  # })
1266
1459
  #
1267
1460
  # @example Response structure
@@ -1270,6 +1463,13 @@ module Aws::Rekognition
1270
1463
  # resp.project_descriptions[0].project_arn #=> String
1271
1464
  # resp.project_descriptions[0].creation_timestamp #=> Time
1272
1465
  # resp.project_descriptions[0].status #=> String, one of "CREATING", "CREATED", "DELETING"
1466
+ # resp.project_descriptions[0].datasets #=> Array
1467
+ # resp.project_descriptions[0].datasets[0].creation_timestamp #=> Time
1468
+ # resp.project_descriptions[0].datasets[0].dataset_type #=> String, one of "TRAIN", "TEST"
1469
+ # resp.project_descriptions[0].datasets[0].dataset_arn #=> String
1470
+ # resp.project_descriptions[0].datasets[0].status #=> String, one of "CREATE_IN_PROGRESS", "CREATE_COMPLETE", "CREATE_FAILED", "UPDATE_IN_PROGRESS", "UPDATE_COMPLETE", "UPDATE_FAILED", "DELETE_IN_PROGRESS"
1471
+ # resp.project_descriptions[0].datasets[0].status_message #=> String
1472
+ # resp.project_descriptions[0].datasets[0].status_message_code #=> String, one of "SUCCESS", "SERVICE_ERROR", "CLIENT_ERROR"
1273
1473
  # resp.next_token #=> String
1274
1474
  #
1275
1475
  # @overload describe_projects(params = {})
@@ -2118,6 +2318,50 @@ module Aws::Rekognition
2118
2318
  req.send_request(options)
2119
2319
  end
2120
2320
 
2321
+ # Distributes the entries (images) in a training dataset across the
2322
+ # training dataset and the test dataset for a project.
2323
+ # `DistributeDatasetEntries` moves 20% of the training dataset images to
2324
+ # the test dataset. An entry is a JSON Line that describes an image.
2325
+ #
2326
+ # You supply the Amazon Resource Names (ARN) of a project's training
2327
+ # dataset and test dataset. The training dataset must contain the images
2328
+ # that you want to split. The test dataset must be empty. The datasets
2329
+ # must belong to the same project. To create training and test datasets
2330
+ # for a project, call CreateDataset.
2331
+ #
2332
+ # Distributing a dataset takes a while to complete. To check the status
2333
+ # call `DescribeDataset`. The operation is complete when the `Status`
2334
+ # field for the training dataset and the test dataset is
2335
+ # `UPDATE_COMPLETE`. If the dataset split fails, the value of `Status`
2336
+ # is `UPDATE_FAILED`.
2337
+ #
2338
+ # This operation requires permissions to perform the
2339
+ # `rekognition:DistributeDatasetEntries` action.
2340
+ #
2341
+ # @option params [required, Array<Types::DistributeDataset>] :datasets
2342
+ # The ARNS for the training dataset and test dataset that you want to
2343
+ # use. The datasets must belong to the same project. The test dataset
2344
+ # must be empty.
2345
+ #
2346
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
2347
+ #
2348
+ # @example Request syntax with placeholder values
2349
+ #
2350
+ # resp = client.distribute_dataset_entries({
2351
+ # datasets: [ # required
2352
+ # {
2353
+ # arn: "DatasetArn", # required
2354
+ # },
2355
+ # ],
2356
+ # })
2357
+ #
2358
+ # @overload distribute_dataset_entries(params = {})
2359
+ # @param [Hash] params ({})
2360
+ def distribute_dataset_entries(params = {}, options = {})
2361
+ req = build_request(:distribute_dataset_entries, params)
2362
+ req.send_request(options)
2363
+ end
2364
+
2121
2365
  # Gets the name and additional information about a celebrity based on
2122
2366
  # their Amazon Rekognition ID. The additional information is returned as
2123
2367
  # an array of URLs. If there is no additional information about the
@@ -2165,12 +2409,14 @@ module Aws::Rekognition
2165
2409
  #
2166
2410
  # Celebrity recognition in a video is an asynchronous operation.
2167
2411
  # Analysis is started by a call to StartCelebrityRecognition which
2168
- # returns a job identifier (`JobId`). When the celebrity recognition
2169
- # operation finishes, Amazon Rekognition Video publishes a completion
2170
- # status to the Amazon Simple Notification Service topic registered in
2171
- # the initial call to `StartCelebrityRecognition`. To get the results of
2172
- # the celebrity recognition analysis, first check that the status value
2173
- # published to the Amazon SNS topic is `SUCCEEDED`. If so, call
2412
+ # returns a job identifier (`JobId`).
2413
+ #
2414
+ # When the celebrity recognition operation finishes, Amazon Rekognition
2415
+ # Video publishes a completion status to the Amazon Simple Notification
2416
+ # Service topic registered in the initial call to
2417
+ # `StartCelebrityRecognition`. To get the results of the celebrity
2418
+ # recognition analysis, first check that the status value published to
2419
+ # the Amazon SNS topic is `SUCCEEDED`. If so, call
2174
2420
  # `GetCelebrityDetection` and pass the job identifier (`JobId`) from the
2175
2421
  # initial call to `StartCelebrityDetection`.
2176
2422
  #
@@ -2181,10 +2427,13 @@ module Aws::Rekognition
2181
2427
  # they are detected in an array (`Celebrities`) of CelebrityRecognition
2182
2428
  # objects. Each `CelebrityRecognition` contains information about the
2183
2429
  # celebrity in a CelebrityDetail object and the time, `Timestamp`, the
2184
- # celebrity was detected.
2430
+ # celebrity was detected. This CelebrityDetail object stores information
2431
+ # about the detected celebrity's face attributes, a face bounding box,
2432
+ # known gender, the celebrity's name, and a confidence estimate.
2185
2433
  #
2186
2434
  # <note markdown="1"> `GetCelebrityRecognition` only returns the default facial attributes
2187
2435
  # (`BoundingBox`, `Confidence`, `Landmarks`, `Pose`, and `Quality`). The
2436
+ # `BoundingBox` field only applies to the detected face instance. The
2188
2437
  # other facial attributes listed in the `Face` object of the following
2189
2438
  # response syntax are not returned. For more information, see FaceDetail
2190
2439
  # in the Amazon Rekognition Developer Guide.
@@ -2308,6 +2557,7 @@ module Aws::Rekognition
2308
2557
  # resp.celebrities[0].celebrity.face.quality.brightness #=> Float
2309
2558
  # resp.celebrities[0].celebrity.face.quality.sharpness #=> Float
2310
2559
  # resp.celebrities[0].celebrity.face.confidence #=> Float
2560
+ # resp.celebrities[0].celebrity.known_gender.type #=> String, one of "Male", "Female"
2311
2561
  #
2312
2562
  # @overload get_celebrity_recognition(params = {})
2313
2563
  # @param [Hash] params ({})
@@ -3651,6 +3901,155 @@ module Aws::Rekognition
3651
3901
  req.send_request(options)
3652
3902
  end
3653
3903
 
3904
+ # Lists the entries (images) within a dataset. An entry is a JSON Line
3905
+ # that contains the information for a single image, including the image
3906
+ # location, assigned labels, and object location bounding boxes. For
3907
+ # more information, see [Creating a manifest file][1].
3908
+ #
3909
+ # JSON Lines in the response include information about non-terminal
3910
+ # errors found in the dataset. Non terminal errors are reported in
3911
+ # `errors` lists within each JSON Line. The same information is reported
3912
+ # in the training and testing validation result manifests that Amazon
3913
+ # Rekognition Custom Labels creates during model training.
3914
+ #
3915
+ # You can filter the response in variety of ways, such as choosing which
3916
+ # labels to return and returning JSON Lines created after a specific
3917
+ # date.
3918
+ #
3919
+ # This operation requires permissions to perform the
3920
+ # `rekognition:ListDatasetEntries` action.
3921
+ #
3922
+ #
3923
+ #
3924
+ # [1]: https://docs.aws.amazon.com/rekognition/latest/customlabels-dg/md-manifest-files.html
3925
+ #
3926
+ # @option params [required, String] :dataset_arn
3927
+ # The Amazon Resource Name (ARN) for the dataset that you want to use.
3928
+ #
3929
+ # @option params [Array<String>] :contains_labels
3930
+ # Specifies a label filter for the response. The response includes an
3931
+ # entry only if one or more of the labels in `ContainsLabels` exist in
3932
+ # the entry.
3933
+ #
3934
+ # @option params [Boolean] :labeled
3935
+ # Specify `true` to get only the JSON Lines where the image is labeled.
3936
+ # Specify `false` to get only the JSON Lines where the image isn't
3937
+ # labeled. If you don't specify `Labeled`, `ListDatasetEntries` returns
3938
+ # JSON Lines for labeled and unlabeled images.
3939
+ #
3940
+ # @option params [String] :source_ref_contains
3941
+ # If specified, `ListDatasetEntries` only returns JSON Lines where the
3942
+ # value of `SourceRefContains` is part of the `source-ref` field. The
3943
+ # `source-ref` field contains the Amazon S3 location of the image. You
3944
+ # can use `SouceRefContains` for tasks such as getting the JSON Line for
3945
+ # a single image, or gettting JSON Lines for all images within a
3946
+ # specific folder.
3947
+ #
3948
+ # @option params [Boolean] :has_errors
3949
+ # Specifies an error filter for the response. Specify `True` to only
3950
+ # include entries that have errors.
3951
+ #
3952
+ # @option params [String] :next_token
3953
+ # If the previous response was incomplete (because there is more results
3954
+ # to retrieve), Amazon Rekognition Custom Labels returns a pagination
3955
+ # token in the response. You can use this pagination token to retrieve
3956
+ # the next set of results.
3957
+ #
3958
+ # @option params [Integer] :max_results
3959
+ # The maximum number of results to return per paginated call. The
3960
+ # largest value you can specify is 100. If you specify a value greater
3961
+ # than 100, a ValidationException error occurs. The default value is
3962
+ # 100.
3963
+ #
3964
+ # @return [Types::ListDatasetEntriesResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
3965
+ #
3966
+ # * {Types::ListDatasetEntriesResponse#dataset_entries #dataset_entries} => Array&lt;String&gt;
3967
+ # * {Types::ListDatasetEntriesResponse#next_token #next_token} => String
3968
+ #
3969
+ # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
3970
+ #
3971
+ # @example Request syntax with placeholder values
3972
+ #
3973
+ # resp = client.list_dataset_entries({
3974
+ # dataset_arn: "DatasetArn", # required
3975
+ # contains_labels: ["DatasetLabel"],
3976
+ # labeled: false,
3977
+ # source_ref_contains: "QueryString",
3978
+ # has_errors: false,
3979
+ # next_token: "ExtendedPaginationToken",
3980
+ # max_results: 1,
3981
+ # })
3982
+ #
3983
+ # @example Response structure
3984
+ #
3985
+ # resp.dataset_entries #=> Array
3986
+ # resp.dataset_entries[0] #=> String
3987
+ # resp.next_token #=> String
3988
+ #
3989
+ # @overload list_dataset_entries(params = {})
3990
+ # @param [Hash] params ({})
3991
+ def list_dataset_entries(params = {}, options = {})
3992
+ req = build_request(:list_dataset_entries, params)
3993
+ req.send_request(options)
3994
+ end
3995
+
3996
+ # Lists the labels in a dataset. Amazon Rekognition Custom Labels uses
3997
+ # labels to describe images. For more information, see [Labeling
3998
+ # images][1].
3999
+ #
4000
+ # Lists the labels in a dataset. Amazon Rekognition Custom Labels uses
4001
+ # labels to describe images. For more information, see Labeling images
4002
+ # in the *Amazon Rekognition Custom Labels Developer Guide*.
4003
+ #
4004
+ #
4005
+ #
4006
+ # [1]: https://docs.aws.amazon.com/rekognition/latest/customlabels-dg/md-labeling-images.html
4007
+ #
4008
+ # @option params [required, String] :dataset_arn
4009
+ # The Amazon Resource Name (ARN) of the dataset that you want to use.
4010
+ #
4011
+ # @option params [String] :next_token
4012
+ # If the previous response was incomplete (because there is more results
4013
+ # to retrieve), Amazon Rekognition Custom Labels returns a pagination
4014
+ # token in the response. You can use this pagination token to retrieve
4015
+ # the next set of results.
4016
+ #
4017
+ # @option params [Integer] :max_results
4018
+ # The maximum number of results to return per paginated call. The
4019
+ # largest value you can specify is 100. If you specify a value greater
4020
+ # than 100, a ValidationException error occurs. The default value is
4021
+ # 100.
4022
+ #
4023
+ # @return [Types::ListDatasetLabelsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
4024
+ #
4025
+ # * {Types::ListDatasetLabelsResponse#dataset_label_descriptions #dataset_label_descriptions} => Array&lt;Types::DatasetLabelDescription&gt;
4026
+ # * {Types::ListDatasetLabelsResponse#next_token #next_token} => String
4027
+ #
4028
+ # The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
4029
+ #
4030
+ # @example Request syntax with placeholder values
4031
+ #
4032
+ # resp = client.list_dataset_labels({
4033
+ # dataset_arn: "DatasetArn", # required
4034
+ # next_token: "ExtendedPaginationToken",
4035
+ # max_results: 1,
4036
+ # })
4037
+ #
4038
+ # @example Response structure
4039
+ #
4040
+ # resp.dataset_label_descriptions #=> Array
4041
+ # resp.dataset_label_descriptions[0].label_name #=> String
4042
+ # resp.dataset_label_descriptions[0].label_stats.entry_count #=> Integer
4043
+ # resp.dataset_label_descriptions[0].label_stats.bounding_box_count #=> Integer
4044
+ # resp.next_token #=> String
4045
+ #
4046
+ # @overload list_dataset_labels(params = {})
4047
+ # @param [Hash] params ({})
4048
+ def list_dataset_labels(params = {}, options = {})
4049
+ req = build_request(:list_dataset_labels, params)
4050
+ req.send_request(options)
4051
+ end
4052
+
3654
4053
  # Returns metadata for faces in the specified collection. This metadata
3655
4054
  # includes information such as the bounding box coordinates, the
3656
4055
  # confidence (that the bounding box contains a face), and face ID. For
@@ -3924,7 +4323,7 @@ module Aws::Rekognition
3924
4323
  # Rekognition Developer Guide.
3925
4324
  #
3926
4325
  # `RecognizeCelebrities` returns the 64 largest faces in the image. It
3927
- # lists recognized celebrities in the `CelebrityFaces` array and
4326
+ # lists the recognized celebrities in the `CelebrityFaces` array and any
3928
4327
  # unrecognized faces in the `UnrecognizedFaces` array.
3929
4328
  # `RecognizeCelebrities` doesn't return celebrities whose faces aren't
3930
4329
  # among the largest 64 faces in the image.
@@ -5236,6 +5635,61 @@ module Aws::Rekognition
5236
5635
  req.send_request(options)
5237
5636
  end
5238
5637
 
5638
+ # Adds or updates one or more entries (images) in a dataset. An entry is
5639
+ # a JSON Line which contains the information for a single image,
5640
+ # including the image location, assigned labels, and object location
5641
+ # bounding boxes. For more information, see Image-Level labels in
5642
+ # manifest files and Object localization in manifest files in the
5643
+ # *Amazon Rekognition Custom Labels Developer Guide*.
5644
+ #
5645
+ # If the `source-ref` field in the JSON line references an existing
5646
+ # image, the existing image in the dataset is updated. If `source-ref`
5647
+ # field doesn't reference an existing image, the image is added as a
5648
+ # new image to the dataset.
5649
+ #
5650
+ # You specify the changes that you want to make in the `Changes` input
5651
+ # parameter. There isn't a limit to the number JSON Lines that you can
5652
+ # change, but the size of `Changes` must be less than 5MB.
5653
+ #
5654
+ # `UpdateDatasetEntries` returns immediatly, but the dataset update
5655
+ # might take a while to complete. Use DescribeDataset to check the
5656
+ # current status. The dataset updated successfully if the value of
5657
+ # `Status` is `UPDATE_COMPLETE`.
5658
+ #
5659
+ # To check if any non-terminal errors occured, call ListDatasetEntries
5660
+ # and check for the presence of `errors` lists in the JSON Lines.
5661
+ #
5662
+ # Dataset update fails if a terminal error occurs (`Status` =
5663
+ # `UPDATE_FAILED`). Currently, you can't access the terminal error
5664
+ # information from the Amazon Rekognition Custom Labels SDK.
5665
+ #
5666
+ # This operation requires permissions to perform the
5667
+ # `rekognition:UpdateDatasetEntries` action.
5668
+ #
5669
+ # @option params [required, String] :dataset_arn
5670
+ # The Amazon Resource Name (ARN) of the dataset that you want to update.
5671
+ #
5672
+ # @option params [required, Types::DatasetChanges] :changes
5673
+ # The changes that you want to make to the dataset.
5674
+ #
5675
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
5676
+ #
5677
+ # @example Request syntax with placeholder values
5678
+ #
5679
+ # resp = client.update_dataset_entries({
5680
+ # dataset_arn: "DatasetArn", # required
5681
+ # changes: { # required
5682
+ # ground_truth: "data", # required
5683
+ # },
5684
+ # })
5685
+ #
5686
+ # @overload update_dataset_entries(params = {})
5687
+ # @param [Hash] params ({})
5688
+ def update_dataset_entries(params = {}, options = {})
5689
+ req = build_request(:update_dataset_entries, params)
5690
+ req.send_request(options)
5691
+ end
5692
+
5239
5693
  # @!endgroup
5240
5694
 
5241
5695
  # @param params ({})
@@ -5249,7 +5703,7 @@ module Aws::Rekognition
5249
5703
  params: params,
5250
5704
  config: config)
5251
5705
  context[:gem_name] = 'aws-sdk-rekognition'
5252
- context[:gem_version] = '1.56.0'
5706
+ context[:gem_version] = '1.60.0'
5253
5707
  Seahorse::Client::Request.new(handlers, context)
5254
5708
  end
5255
5709