aws-sdk-comprehend 1.44.0 → 1.45.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 97ad3963c70493fd091a5c3019ba24ae72eec643a44ada58faf9cd9c60639595
4
- data.tar.gz: ea890d4c8078e40db1b78fbf7cb19ebce593563925caba288424bbf9523524e1
3
+ metadata.gz: eaba32a4f57dbbceb28c4971772a0ffe6da0e7e792848ef4765dffea16f68a58
4
+ data.tar.gz: bdde5db48550908bc508e6ba526470d51b7e56cf0d577df0e794b6c40c86608b
5
5
  SHA512:
6
- metadata.gz: d22df7d9dd5046979fc0a7136d98810419332d927995e3697ce7a5e1b2aa99570aa57b6b48c390c3fc505c48ab4b042b273a665372449dbc576373173f752514
7
- data.tar.gz: e6e6b3dd25e4d5a6282828c4ef18c00fc84c0d370692a463213bcdfd2512f7b33893cfce61dc60bf5319d9296c4aecb65f644c3b7b3b938ff7a3823e6bba06a8
6
+ metadata.gz: 0fed0eb3f1ff17711c848c1bd89f3a91b703810be3c15d81d55dfbf341481db708b9a212aa8e693da0204b7d5b5591ab8cf14ca7a096c53d277ac0c33ea9a54b
7
+ data.tar.gz: 53cbb816eed784b16b24e146e0178e35263886823800ff5b63db05d12ddea7f7094f2a9899644a105f5b083f5f4afc19000ce9094224f6eb571c5ba6f8e724bb
data/CHANGELOG.md CHANGED
@@ -1,6 +1,11 @@
1
1
  Unreleased Changes
2
2
  ------------------
3
3
 
4
+ 1.45.0 (2021-03-11)
5
+ ------------------
6
+
7
+ * Feature - ContainsPiiEntities API analyzes the input text for the presence of personally identifiable information(PII) and returns the labels of identified PII entity types such as name, address etc.
8
+
4
9
  1.44.0 (2021-03-10)
5
10
  ------------------
6
11
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.44.0
1
+ 1.45.0
@@ -48,6 +48,6 @@ require_relative 'aws-sdk-comprehend/customizations'
48
48
  # @!group service
49
49
  module Aws::Comprehend
50
50
 
51
- GEM_VERSION = '1.44.0'
51
+ GEM_VERSION = '1.45.0'
52
52
 
53
53
  end
@@ -621,6 +621,44 @@ module Aws::Comprehend
621
621
  req.send_request(options)
622
622
  end
623
623
 
624
+ # Analyzes input text for the presence of personally identifiable
625
+ # information (PII) and returns the labels of identified PII entity
626
+ # types such as name, address, bank account number, or phone number.
627
+ #
628
+ # @option params [required, String] :text
629
+ # Creates a new document classification request to analyze a single
630
+ # document in real-time, returning personally identifiable information
631
+ # (PII) entity labels.
632
+ #
633
+ # @option params [required, String] :language_code
634
+ # The language of the input documents.
635
+ #
636
+ # @return [Types::ContainsPiiEntitiesResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
637
+ #
638
+ # * {Types::ContainsPiiEntitiesResponse#labels #labels} => Array<Types::EntityLabel>
639
+ #
640
+ # @example Request syntax with placeholder values
641
+ #
642
+ # resp = client.contains_pii_entities({
643
+ # text: "String", # required
644
+ # language_code: "en", # required, accepts en, es, fr, de, it, pt, ar, hi, ja, ko, zh, zh-TW
645
+ # })
646
+ #
647
+ # @example Response structure
648
+ #
649
+ # resp.labels #=> Array
650
+ # resp.labels[0].name #=> String, one of "BANK_ACCOUNT_NUMBER", "BANK_ROUTING", "CREDIT_DEBIT_NUMBER", "CREDIT_DEBIT_CVV", "CREDIT_DEBIT_EXPIRY", "PIN", "EMAIL", "ADDRESS", "NAME", "PHONE", "SSN", "DATE_TIME", "PASSPORT_NUMBER", "DRIVER_ID", "URL", "AGE", "USERNAME", "PASSWORD", "AWS_ACCESS_KEY", "AWS_SECRET_KEY", "IP_ADDRESS", "MAC_ADDRESS", "ALL"
651
+ # resp.labels[0].score #=> Float
652
+ #
653
+ # @see http://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/ContainsPiiEntities AWS API Documentation
654
+ #
655
+ # @overload contains_pii_entities(params = {})
656
+ # @param [Hash] params ({})
657
+ def contains_pii_entities(params = {}, options = {})
658
+ req = build_request(:contains_pii_entities, params)
659
+ req.send_request(options)
660
+ end
661
+
624
662
  # Creates a new document classifier that you can use to categorize
625
663
  # documents. To create a classifier, you provide a set of training
626
664
  # documents that labeled with the categories that you want to use. After
@@ -3680,7 +3718,7 @@ module Aws::Comprehend
3680
3718
  params: params,
3681
3719
  config: config)
3682
3720
  context[:gem_name] = 'aws-sdk-comprehend'
3683
- context[:gem_version] = '1.44.0'
3721
+ context[:gem_version] = '1.45.0'
3684
3722
  Seahorse::Client::Request.new(handlers, context)
3685
3723
  end
3686
3724
 
@@ -46,6 +46,8 @@ module Aws::Comprehend
46
46
  ComprehendEndpointName = Shapes::StringShape.new(name: 'ComprehendEndpointName')
47
47
  ComprehendModelArn = Shapes::StringShape.new(name: 'ComprehendModelArn')
48
48
  ConcurrentModificationException = Shapes::StructureShape.new(name: 'ConcurrentModificationException')
49
+ ContainsPiiEntitiesRequest = Shapes::StructureShape.new(name: 'ContainsPiiEntitiesRequest')
50
+ ContainsPiiEntitiesResponse = Shapes::StructureShape.new(name: 'ContainsPiiEntitiesResponse')
49
51
  CreateDocumentClassifierRequest = Shapes::StructureShape.new(name: 'CreateDocumentClassifierRequest')
50
52
  CreateDocumentClassifierResponse = Shapes::StructureShape.new(name: 'CreateDocumentClassifierResponse')
51
53
  CreateEndpointRequest = Shapes::StructureShape.new(name: 'CreateEndpointRequest')
@@ -122,6 +124,7 @@ module Aws::Comprehend
122
124
  EntitiesDetectionJobProperties = Shapes::StructureShape.new(name: 'EntitiesDetectionJobProperties')
123
125
  EntitiesDetectionJobPropertiesList = Shapes::ListShape.new(name: 'EntitiesDetectionJobPropertiesList')
124
126
  Entity = Shapes::StructureShape.new(name: 'Entity')
127
+ EntityLabel = Shapes::StructureShape.new(name: 'EntityLabel')
125
128
  EntityRecognizerAnnotations = Shapes::StructureShape.new(name: 'EntityRecognizerAnnotations')
126
129
  EntityRecognizerArn = Shapes::StringShape.new(name: 'EntityRecognizerArn')
127
130
  EntityRecognizerAugmentedManifestsList = Shapes::ListShape.new(name: 'EntityRecognizerAugmentedManifestsList')
@@ -191,6 +194,7 @@ module Aws::Comprehend
191
194
  ListOfDetectSyntaxResult = Shapes::ListShape.new(name: 'ListOfDetectSyntaxResult')
192
195
  ListOfDominantLanguages = Shapes::ListShape.new(name: 'ListOfDominantLanguages')
193
196
  ListOfEntities = Shapes::ListShape.new(name: 'ListOfEntities')
197
+ ListOfEntityLabels = Shapes::ListShape.new(name: 'ListOfEntityLabels')
194
198
  ListOfKeyPhrases = Shapes::ListShape.new(name: 'ListOfKeyPhrases')
195
199
  ListOfLabels = Shapes::ListShape.new(name: 'ListOfLabels')
196
200
  ListOfPiiEntities = Shapes::ListShape.new(name: 'ListOfPiiEntities')
@@ -395,6 +399,13 @@ module Aws::Comprehend
395
399
  ConcurrentModificationException.add_member(:message, Shapes::ShapeRef.new(shape: String, location_name: "Message"))
396
400
  ConcurrentModificationException.struct_class = Types::ConcurrentModificationException
397
401
 
402
+ ContainsPiiEntitiesRequest.add_member(:text, Shapes::ShapeRef.new(shape: String, required: true, location_name: "Text"))
403
+ ContainsPiiEntitiesRequest.add_member(:language_code, Shapes::ShapeRef.new(shape: LanguageCode, required: true, location_name: "LanguageCode"))
404
+ ContainsPiiEntitiesRequest.struct_class = Types::ContainsPiiEntitiesRequest
405
+
406
+ ContainsPiiEntitiesResponse.add_member(:labels, Shapes::ShapeRef.new(shape: ListOfEntityLabels, location_name: "Labels"))
407
+ ContainsPiiEntitiesResponse.struct_class = Types::ContainsPiiEntitiesResponse
408
+
398
409
  CreateDocumentClassifierRequest.add_member(:document_classifier_name, Shapes::ShapeRef.new(shape: ComprehendArnName, required: true, location_name: "DocumentClassifierName"))
399
410
  CreateDocumentClassifierRequest.add_member(:data_access_role_arn, Shapes::ShapeRef.new(shape: IamRoleArn, required: true, location_name: "DataAccessRoleArn"))
400
411
  CreateDocumentClassifierRequest.add_member(:tags, Shapes::ShapeRef.new(shape: TagList, location_name: "Tags"))
@@ -698,6 +709,10 @@ module Aws::Comprehend
698
709
  Entity.add_member(:end_offset, Shapes::ShapeRef.new(shape: Integer, location_name: "EndOffset"))
699
710
  Entity.struct_class = Types::Entity
700
711
 
712
+ EntityLabel.add_member(:name, Shapes::ShapeRef.new(shape: PiiEntityType, location_name: "Name"))
713
+ EntityLabel.add_member(:score, Shapes::ShapeRef.new(shape: Float, location_name: "Score"))
714
+ EntityLabel.struct_class = Types::EntityLabel
715
+
701
716
  EntityRecognizerAnnotations.add_member(:s3_uri, Shapes::ShapeRef.new(shape: S3Uri, required: true, location_name: "S3Uri"))
702
717
  EntityRecognizerAnnotations.struct_class = Types::EntityRecognizerAnnotations
703
718
 
@@ -923,6 +938,8 @@ module Aws::Comprehend
923
938
 
924
939
  ListOfEntities.member = Shapes::ShapeRef.new(shape: Entity)
925
940
 
941
+ ListOfEntityLabels.member = Shapes::ShapeRef.new(shape: EntityLabel)
942
+
926
943
  ListOfKeyPhrases.member = Shapes::ShapeRef.new(shape: KeyPhrase)
927
944
 
928
945
  ListOfLabels.member = Shapes::ShapeRef.new(shape: DocumentLabel)
@@ -1390,6 +1407,18 @@ module Aws::Comprehend
1390
1407
  o.errors << Shapes::ShapeRef.new(shape: InternalServerException)
1391
1408
  end)
1392
1409
 
1410
+ api.add_operation(:contains_pii_entities, Seahorse::Model::Operation.new.tap do |o|
1411
+ o.name = "ContainsPiiEntities"
1412
+ o.http_method = "POST"
1413
+ o.http_request_uri = "/"
1414
+ o.input = Shapes::ShapeRef.new(shape: ContainsPiiEntitiesRequest)
1415
+ o.output = Shapes::ShapeRef.new(shape: ContainsPiiEntitiesResponse)
1416
+ o.errors << Shapes::ShapeRef.new(shape: InvalidRequestException)
1417
+ o.errors << Shapes::ShapeRef.new(shape: TextSizeLimitExceededException)
1418
+ o.errors << Shapes::ShapeRef.new(shape: UnsupportedLanguageException)
1419
+ o.errors << Shapes::ShapeRef.new(shape: InternalServerException)
1420
+ end)
1421
+
1393
1422
  api.add_operation(:create_document_classifier, Seahorse::Model::Operation.new.tap do |o|
1394
1423
  o.name = "CreateDocumentClassifier"
1395
1424
  o.http_method = "POST"
@@ -632,6 +632,46 @@ module Aws::Comprehend
632
632
  include Aws::Structure
633
633
  end
634
634
 
635
+ # @note When making an API call, you may pass ContainsPiiEntitiesRequest
636
+ # data as a hash:
637
+ #
638
+ # {
639
+ # text: "String", # required
640
+ # language_code: "en", # required, accepts en, es, fr, de, it, pt, ar, hi, ja, ko, zh, zh-TW
641
+ # }
642
+ #
643
+ # @!attribute [rw] text
644
+ # Creates a new document classification request to analyze a single
645
+ # document in real-time, returning personally identifiable information
646
+ # (PII) entity labels.
647
+ # @return [String]
648
+ #
649
+ # @!attribute [rw] language_code
650
+ # The language of the input documents.
651
+ # @return [String]
652
+ #
653
+ # @see http://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/ContainsPiiEntitiesRequest AWS API Documentation
654
+ #
655
+ class ContainsPiiEntitiesRequest < Struct.new(
656
+ :text,
657
+ :language_code)
658
+ SENSITIVE = []
659
+ include Aws::Structure
660
+ end
661
+
662
+ # @!attribute [rw] labels
663
+ # The labels used in the document being analyzed. Individual labels
664
+ # represent personally identifiable information (PII) entity types.
665
+ # @return [Array<Types::EntityLabel>]
666
+ #
667
+ # @see http://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/ContainsPiiEntitiesResponse AWS API Documentation
668
+ #
669
+ class ContainsPiiEntitiesResponse < Struct.new(
670
+ :labels)
671
+ SENSITIVE = []
672
+ include Aws::Structure
673
+ end
674
+
635
675
  # @note When making an API call, you may pass CreateDocumentClassifierRequest
636
676
  # data as a hash:
637
677
  #
@@ -2607,6 +2647,27 @@ module Aws::Comprehend
2607
2647
  include Aws::Structure
2608
2648
  end
2609
2649
 
2650
+ # Specifies one of the label or labels that categorize the personally
2651
+ # identifiable information (PII) entity being analyzed.
2652
+ #
2653
+ # @!attribute [rw] name
2654
+ # The name of the label.
2655
+ # @return [String]
2656
+ #
2657
+ # @!attribute [rw] score
2658
+ # The level of confidence that Amazon Comprehend has in the accuracy
2659
+ # of the detection.
2660
+ # @return [Float]
2661
+ #
2662
+ # @see http://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/EntityLabel AWS API Documentation
2663
+ #
2664
+ class EntityLabel < Struct.new(
2665
+ :name,
2666
+ :score)
2667
+ SENSITIVE = []
2668
+ include Aws::Structure
2669
+ end
2670
+
2610
2671
  # Describes the annotations associated with a entity recognizer.
2611
2672
  #
2612
2673
  # @note When making an API call, you may pass EntityRecognizerAnnotations
@@ -6167,11 +6228,9 @@ module Aws::Comprehend
6167
6228
  end
6168
6229
 
6169
6230
  # Amazon Comprehend can't process the language of the input text. For
6170
- # all custom entity recognition APIs (such as `CreateEntityRecognizer`),
6171
- # only English, Spanish, French, Italian, German, or Portuguese are
6172
- # accepted. For most other APIs, such as those for Custom
6173
- # Classification, Amazon Comprehend accepts text in all supported
6174
- # languages. For a list of supported languages, see supported-languages.
6231
+ # custom entity recognition APIs, only English, Spanish, French,
6232
+ # Italian, German, or Portuguese are accepted. For a list of supported
6233
+ # languages, see supported-languages.
6175
6234
  #
6176
6235
  # @!attribute [rw] message
6177
6236
  # @return [String]
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws-sdk-comprehend
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.44.0
4
+ version: 1.45.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: 2021-03-10 00:00:00.000000000 Z
11
+ date: 2021-03-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-core