aws-sdk-comprehend 1.56.0 → 1.59.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: c2b187626abb217b6efdbd726550891a23fbb725436f24f898dbff8eedcdbfb2
4
- data.tar.gz: 924f1b45ad97f93955faaefeef9557489238e1707805379073dc8b17c92d692c
3
+ metadata.gz: 7fc64211fc4dba52d0c1fb3c38ba71c7906731263a6bc1678dcd78f1d687fa40
4
+ data.tar.gz: bf5b64f24fbf4a3f460147a1aca794b500bf0178462d6790e7c19c5f7cf873e1
5
5
  SHA512:
6
- metadata.gz: cb7d498679e24b31e4ae6ef7162017ae3d87122ac09396b8084ad822e4a7c933fedef9896201906a4f44345a460daf500ddc71e5aa5314c42dfe5c77d1eb6ad8
7
- data.tar.gz: c3cc4d24f2263ae646a4f339e2fee17141ee9428f9b0a91ef7436e6144581a133da9e0da099def9d9532c1013fb0d681292f273304355210e1fffb20b9ee0b15
6
+ metadata.gz: 992c0546d6ea4fb8b156a9b050a2f97821fd3ef84106c9da68ae1216950a61e8cde9eed80fbf8b612452f52d523e4638535d4130ebc79280d8b6207dee296396
7
+ data.tar.gz: 754c3e0933a04f786dd5225daab40b6b59558264773d6344bc9167d5873472c3ee48af62016c2d170f6139ab7e8c4ec144caf8185527ea9a9c16baa3a7652d6c
data/CHANGELOG.md CHANGED
@@ -1,6 +1,21 @@
1
1
  Unreleased Changes
2
2
  ------------------
3
3
 
4
+ 1.59.0 (2022-02-24)
5
+ ------------------
6
+
7
+ * Feature - Code Generated Changes, see `./build_tools` or `aws-sdk-core`'s CHANGELOG.md for details.
8
+
9
+ 1.58.0 (2022-02-03)
10
+ ------------------
11
+
12
+ * Feature - Code Generated Changes, see `./build_tools` or `aws-sdk-core`'s CHANGELOG.md for details.
13
+
14
+ 1.57.0 (2022-02-02)
15
+ ------------------
16
+
17
+ * Feature - Amazon Comprehend now supports sharing and importing custom trained models from one AWS account to another within the same region.
18
+
4
19
  1.56.0 (2021-12-21)
5
20
  ------------------
6
21
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.56.0
1
+ 1.59.0
@@ -27,7 +27,9 @@ require 'aws-sdk-core/plugins/client_metrics_plugin.rb'
27
27
  require 'aws-sdk-core/plugins/client_metrics_send_plugin.rb'
28
28
  require 'aws-sdk-core/plugins/transfer_encoding.rb'
29
29
  require 'aws-sdk-core/plugins/http_checksum.rb'
30
+ require 'aws-sdk-core/plugins/checksum_algorithm.rb'
30
31
  require 'aws-sdk-core/plugins/defaults_mode.rb'
32
+ require 'aws-sdk-core/plugins/recursion_detection.rb'
31
33
  require 'aws-sdk-core/plugins/signature_v4.rb'
32
34
  require 'aws-sdk-core/plugins/protocols/json_rpc.rb'
33
35
 
@@ -74,7 +76,9 @@ module Aws::Comprehend
74
76
  add_plugin(Aws::Plugins::ClientMetricsSendPlugin)
75
77
  add_plugin(Aws::Plugins::TransferEncoding)
76
78
  add_plugin(Aws::Plugins::HttpChecksum)
79
+ add_plugin(Aws::Plugins::ChecksumAlgorithm)
77
80
  add_plugin(Aws::Plugins::DefaultsMode)
81
+ add_plugin(Aws::Plugins::RecursionDetection)
78
82
  add_plugin(Aws::Plugins::SignatureV4)
79
83
  add_plugin(Aws::Plugins::Protocols::JsonRpc)
80
84
 
@@ -765,6 +769,24 @@ module Aws::Comprehend
765
769
  # * Amazon Resource Name (ARN) of a KMS Key:
766
770
  # `"arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"`
767
771
  #
772
+ # @option params [String] :model_policy
773
+ # The resource-based policy to attach to your custom document classifier
774
+ # model. You can use this policy to allow another AWS account to import
775
+ # your custom model.
776
+ #
777
+ # Provide your policy as a JSON body that you enter as a UTF-8 encoded
778
+ # string without line breaks. To provide valid JSON, enclose the
779
+ # attribute names and values in double quotes. If the JSON body is also
780
+ # enclosed in double quotes, then you must escape the double quotes that
781
+ # are inside the policy:
782
+ #
783
+ # `"\{"attribute": "value", "attribute": ["value"]\}"`
784
+ #
785
+ # To avoid escaping quotes, you can use single quotes to enclose the
786
+ # policy and double quotes to enclose the JSON names and values:
787
+ #
788
+ # `'\{"attribute": "value", "attribute": ["value"]\}'`
789
+ #
768
790
  # @return [Types::CreateDocumentClassifierResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
769
791
  #
770
792
  # * {Types::CreateDocumentClassifierResponse#document_classifier_arn #document_classifier_arn} => String
@@ -810,6 +832,7 @@ module Aws::Comprehend
810
832
  # },
811
833
  # mode: "MULTI_CLASS", # accepts MULTI_CLASS, MULTI_LABEL
812
834
  # model_kms_key_id: "KmsKeyId",
835
+ # model_policy: "Policy",
813
836
  # })
814
837
  #
815
838
  # @example Response structure
@@ -970,6 +993,24 @@ module Aws::Comprehend
970
993
  # * Amazon Resource Name (ARN) of a KMS Key:
971
994
  # `"arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"`
972
995
  #
996
+ # @option params [String] :model_policy
997
+ # The JSON resource-based policy to attach to your custom entity
998
+ # recognizer model. You can use this policy to allow another AWS account
999
+ # to import your custom model.
1000
+ #
1001
+ # Provide your JSON as a UTF-8 encoded string without line breaks. To
1002
+ # provide valid JSON for your policy, enclose the attribute names and
1003
+ # values in double quotes. If the JSON body is also enclosed in double
1004
+ # quotes, then you must escape the double quotes that are inside the
1005
+ # policy:
1006
+ #
1007
+ # `"\{"attribute": "value", "attribute": ["value"]\}"`
1008
+ #
1009
+ # To avoid escaping quotes, you can use single quotes to enclose the
1010
+ # policy and double quotes to enclose the JSON names and values:
1011
+ #
1012
+ # `'\{"attribute": "value", "attribute": ["value"]\}'`
1013
+ #
973
1014
  # @return [Types::CreateEntityRecognizerResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
974
1015
  #
975
1016
  # * {Types::CreateEntityRecognizerResponse#entity_recognizer_arn #entity_recognizer_arn} => String
@@ -1024,6 +1065,7 @@ module Aws::Comprehend
1024
1065
  # subnets: ["SubnetId"], # required
1025
1066
  # },
1026
1067
  # model_kms_key_id: "KmsKeyId",
1068
+ # model_policy: "Policy",
1027
1069
  # })
1028
1070
  #
1029
1071
  # @example Response structure
@@ -1126,6 +1168,33 @@ module Aws::Comprehend
1126
1168
  req.send_request(options)
1127
1169
  end
1128
1170
 
1171
+ # Deletes a resource-based policy that is attached to a custom model.
1172
+ #
1173
+ # @option params [required, String] :resource_arn
1174
+ # The Amazon Resource Name (ARN) of the custom model version that has
1175
+ # the policy to delete.
1176
+ #
1177
+ # @option params [String] :policy_revision_id
1178
+ # The revision ID of the policy to delete.
1179
+ #
1180
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
1181
+ #
1182
+ # @example Request syntax with placeholder values
1183
+ #
1184
+ # resp = client.delete_resource_policy({
1185
+ # resource_arn: "ComprehendModelArn", # required
1186
+ # policy_revision_id: "PolicyRevisionId",
1187
+ # })
1188
+ #
1189
+ # @see http://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DeleteResourcePolicy AWS API Documentation
1190
+ #
1191
+ # @overload delete_resource_policy(params = {})
1192
+ # @param [Hash] params ({})
1193
+ def delete_resource_policy(params = {}, options = {})
1194
+ req = build_request(:delete_resource_policy, params)
1195
+ req.send_request(options)
1196
+ end
1197
+
1129
1198
  # Gets the properties associated with a document classification job. Use
1130
1199
  # this operation to get the status of a classification job.
1131
1200
  #
@@ -1237,6 +1306,7 @@ module Aws::Comprehend
1237
1306
  # resp.document_classifier_properties.mode #=> String, one of "MULTI_CLASS", "MULTI_LABEL"
1238
1307
  # resp.document_classifier_properties.model_kms_key_id #=> String
1239
1308
  # resp.document_classifier_properties.version_name #=> String
1309
+ # resp.document_classifier_properties.source_model_arn #=> String
1240
1310
  #
1241
1311
  # @see http://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DescribeDocumentClassifier AWS API Documentation
1242
1312
  #
@@ -1451,6 +1521,7 @@ module Aws::Comprehend
1451
1521
  # resp.entity_recognizer_properties.vpc_config.subnets[0] #=> String
1452
1522
  # resp.entity_recognizer_properties.model_kms_key_id #=> String
1453
1523
  # resp.entity_recognizer_properties.version_name #=> String
1524
+ # resp.entity_recognizer_properties.source_model_arn #=> String
1454
1525
  #
1455
1526
  # @see http://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DescribeEntityRecognizer AWS API Documentation
1456
1527
  #
@@ -1609,6 +1680,41 @@ module Aws::Comprehend
1609
1680
  req.send_request(options)
1610
1681
  end
1611
1682
 
1683
+ # Gets the details of a resource-based policy that is attached to a
1684
+ # custom model, including the JSON body of the policy.
1685
+ #
1686
+ # @option params [required, String] :resource_arn
1687
+ # The Amazon Resource Name (ARN) of the policy to describe.
1688
+ #
1689
+ # @return [Types::DescribeResourcePolicyResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1690
+ #
1691
+ # * {Types::DescribeResourcePolicyResponse#resource_policy #resource_policy} => String
1692
+ # * {Types::DescribeResourcePolicyResponse#creation_time #creation_time} => Time
1693
+ # * {Types::DescribeResourcePolicyResponse#last_modified_time #last_modified_time} => Time
1694
+ # * {Types::DescribeResourcePolicyResponse#policy_revision_id #policy_revision_id} => String
1695
+ #
1696
+ # @example Request syntax with placeholder values
1697
+ #
1698
+ # resp = client.describe_resource_policy({
1699
+ # resource_arn: "ComprehendModelArn", # required
1700
+ # })
1701
+ #
1702
+ # @example Response structure
1703
+ #
1704
+ # resp.resource_policy #=> String
1705
+ # resp.creation_time #=> Time
1706
+ # resp.last_modified_time #=> Time
1707
+ # resp.policy_revision_id #=> String
1708
+ #
1709
+ # @see http://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DescribeResourcePolicy AWS API Documentation
1710
+ #
1711
+ # @overload describe_resource_policy(params = {})
1712
+ # @param [Hash] params ({})
1713
+ def describe_resource_policy(params = {}, options = {})
1714
+ req = build_request(:describe_resource_policy, params)
1715
+ req.send_request(options)
1716
+ end
1717
+
1612
1718
  # Gets the properties associated with a sentiment detection job. Use
1613
1719
  # this operation to get the status of a detection job.
1614
1720
  #
@@ -1964,6 +2070,86 @@ module Aws::Comprehend
1964
2070
  req.send_request(options)
1965
2071
  end
1966
2072
 
2073
+ # Creates a new custom model that replicates a source custom model that
2074
+ # you import. The source model can be in your AWS account or another
2075
+ # one.
2076
+ #
2077
+ # If the source model is in another AWS account, then it must have a
2078
+ # resource-based policy that authorizes you to import it.
2079
+ #
2080
+ # The source model must be in the same AWS region that you're using
2081
+ # when you import. You can't import a model that's in a different
2082
+ # region.
2083
+ #
2084
+ # @option params [required, String] :source_model_arn
2085
+ # The Amazon Resource Name (ARN) of the custom model to import.
2086
+ #
2087
+ # @option params [String] :model_name
2088
+ # The name to assign to the custom model that is created in Amazon
2089
+ # Comprehend by this import.
2090
+ #
2091
+ # @option params [String] :version_name
2092
+ # The version name given to the custom model that is created by this
2093
+ # import. Version names can have a maximum of 256 characters.
2094
+ # Alphanumeric characters, hyphens (-) and underscores (\_) are allowed.
2095
+ # The version name must be unique among all models with the same
2096
+ # classifier name in the account/AWS Region.
2097
+ #
2098
+ # @option params [String] :model_kms_key_id
2099
+ # ID for the AWS Key Management Service (KMS) key that Amazon Comprehend
2100
+ # uses to encrypt trained custom models. The ModelKmsKeyId can be either
2101
+ # of the following formats:
2102
+ #
2103
+ # * KMS Key ID: `"1234abcd-12ab-34cd-56ef-1234567890ab"`
2104
+ #
2105
+ # * Amazon Resource Name (ARN) of a KMS Key:
2106
+ # `"arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"`
2107
+ #
2108
+ # @option params [String] :data_access_role_arn
2109
+ # The Amazon Resource Name (ARN) of the AWS Identity and Management
2110
+ # (IAM) role that allows Amazon Comprehend to use Amazon Key Management
2111
+ # Service (KMS) to encrypt or decrypt the custom model.
2112
+ #
2113
+ # @option params [Array<Types::Tag>] :tags
2114
+ # Tags to be associated with the custom model that is created by this
2115
+ # import. A tag is a key-value pair that adds as a metadata to a
2116
+ # resource used by Amazon Comprehend. For example, a tag with "Sales"
2117
+ # as the key might be added to a resource to indicate its use by the
2118
+ # sales department.
2119
+ #
2120
+ # @return [Types::ImportModelResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
2121
+ #
2122
+ # * {Types::ImportModelResponse#model_arn #model_arn} => String
2123
+ #
2124
+ # @example Request syntax with placeholder values
2125
+ #
2126
+ # resp = client.import_model({
2127
+ # source_model_arn: "ComprehendModelArn", # required
2128
+ # model_name: "ComprehendArnName",
2129
+ # version_name: "VersionName",
2130
+ # model_kms_key_id: "KmsKeyId",
2131
+ # data_access_role_arn: "IamRoleArn",
2132
+ # tags: [
2133
+ # {
2134
+ # key: "TagKey", # required
2135
+ # value: "TagValue",
2136
+ # },
2137
+ # ],
2138
+ # })
2139
+ #
2140
+ # @example Response structure
2141
+ #
2142
+ # resp.model_arn #=> String
2143
+ #
2144
+ # @see http://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/ImportModel AWS API Documentation
2145
+ #
2146
+ # @overload import_model(params = {})
2147
+ # @param [Hash] params ({})
2148
+ def import_model(params = {}, options = {})
2149
+ req = build_request(:import_model, params)
2150
+ req.send_request(options)
2151
+ end
2152
+
1967
2153
  # Gets a list of the documentation classification jobs that you have
1968
2154
  # submitted.
1969
2155
  #
@@ -2157,6 +2343,7 @@ module Aws::Comprehend
2157
2343
  # resp.document_classifier_properties_list[0].mode #=> String, one of "MULTI_CLASS", "MULTI_LABEL"
2158
2344
  # resp.document_classifier_properties_list[0].model_kms_key_id #=> String
2159
2345
  # resp.document_classifier_properties_list[0].version_name #=> String
2346
+ # resp.document_classifier_properties_list[0].source_model_arn #=> String
2160
2347
  # resp.next_token #=> String
2161
2348
  #
2162
2349
  # @see http://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/ListDocumentClassifiers AWS API Documentation
@@ -2497,6 +2684,7 @@ module Aws::Comprehend
2497
2684
  # resp.entity_recognizer_properties_list[0].vpc_config.subnets[0] #=> String
2498
2685
  # resp.entity_recognizer_properties_list[0].model_kms_key_id #=> String
2499
2686
  # resp.entity_recognizer_properties_list[0].version_name #=> String
2687
+ # resp.entity_recognizer_properties_list[0].source_model_arn #=> String
2500
2688
  # resp.next_token #=> String
2501
2689
  #
2502
2690
  # @see http://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/ListEntityRecognizers AWS API Documentation
@@ -2884,6 +3072,60 @@ module Aws::Comprehend
2884
3072
  req.send_request(options)
2885
3073
  end
2886
3074
 
3075
+ # Attaches a resource-based policy to a custom model. You can use this
3076
+ # policy to authorize an entity in another AWS account to import the
3077
+ # custom model, which replicates it in Amazon Comprehend in their
3078
+ # account.
3079
+ #
3080
+ # @option params [required, String] :resource_arn
3081
+ # The Amazon Resource Name (ARN) of the custom model to attach the
3082
+ # policy to.
3083
+ #
3084
+ # @option params [required, String] :resource_policy
3085
+ # The JSON resource-based policy to attach to your custom model. Provide
3086
+ # your JSON as a UTF-8 encoded string without line breaks. To provide
3087
+ # valid JSON for your policy, enclose the attribute names and values in
3088
+ # double quotes. If the JSON body is also enclosed in double quotes,
3089
+ # then you must escape the double quotes that are inside the policy:
3090
+ #
3091
+ # `"\{"attribute": "value", "attribute": ["value"]\}"`
3092
+ #
3093
+ # To avoid escaping quotes, you can use single quotes to enclose the
3094
+ # policy and double quotes to enclose the JSON names and values:
3095
+ #
3096
+ # `'\{"attribute": "value", "attribute": ["value"]\}'`
3097
+ #
3098
+ # @option params [String] :policy_revision_id
3099
+ # The revision ID that Amazon Comprehend assigned to the policy that you
3100
+ # are updating. If you are creating a new policy that has no prior
3101
+ # version, don't use this parameter. Amazon Comprehend creates the
3102
+ # revision ID for you.
3103
+ #
3104
+ # @return [Types::PutResourcePolicyResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
3105
+ #
3106
+ # * {Types::PutResourcePolicyResponse#policy_revision_id #policy_revision_id} => String
3107
+ #
3108
+ # @example Request syntax with placeholder values
3109
+ #
3110
+ # resp = client.put_resource_policy({
3111
+ # resource_arn: "ComprehendModelArn", # required
3112
+ # resource_policy: "Policy", # required
3113
+ # policy_revision_id: "PolicyRevisionId",
3114
+ # })
3115
+ #
3116
+ # @example Response structure
3117
+ #
3118
+ # resp.policy_revision_id #=> String
3119
+ #
3120
+ # @see http://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/PutResourcePolicy AWS API Documentation
3121
+ #
3122
+ # @overload put_resource_policy(params = {})
3123
+ # @param [Hash] params ({})
3124
+ def put_resource_policy(params = {}, options = {})
3125
+ req = build_request(:put_resource_policy, params)
3126
+ req.send_request(options)
3127
+ end
3128
+
2887
3129
  # Starts an asynchronous document classification job. Use the operation
2888
3130
  # to track the progress of the job.
2889
3131
  #
@@ -4162,7 +4404,7 @@ module Aws::Comprehend
4162
4404
  params: params,
4163
4405
  config: config)
4164
4406
  context[:gem_name] = 'aws-sdk-comprehend'
4165
- context[:gem_version] = '1.56.0'
4407
+ context[:gem_version] = '1.59.0'
4166
4408
  Seahorse::Client::Request.new(handlers, context)
4167
4409
  end
4168
4410
 
@@ -63,6 +63,8 @@ module Aws::Comprehend
63
63
  DeleteEndpointResponse = Shapes::StructureShape.new(name: 'DeleteEndpointResponse')
64
64
  DeleteEntityRecognizerRequest = Shapes::StructureShape.new(name: 'DeleteEntityRecognizerRequest')
65
65
  DeleteEntityRecognizerResponse = Shapes::StructureShape.new(name: 'DeleteEntityRecognizerResponse')
66
+ DeleteResourcePolicyRequest = Shapes::StructureShape.new(name: 'DeleteResourcePolicyRequest')
67
+ DeleteResourcePolicyResponse = Shapes::StructureShape.new(name: 'DeleteResourcePolicyResponse')
66
68
  DescribeDocumentClassificationJobRequest = Shapes::StructureShape.new(name: 'DescribeDocumentClassificationJobRequest')
67
69
  DescribeDocumentClassificationJobResponse = Shapes::StructureShape.new(name: 'DescribeDocumentClassificationJobResponse')
68
70
  DescribeDocumentClassifierRequest = Shapes::StructureShape.new(name: 'DescribeDocumentClassifierRequest')
@@ -81,6 +83,8 @@ module Aws::Comprehend
81
83
  DescribeKeyPhrasesDetectionJobResponse = Shapes::StructureShape.new(name: 'DescribeKeyPhrasesDetectionJobResponse')
82
84
  DescribePiiEntitiesDetectionJobRequest = Shapes::StructureShape.new(name: 'DescribePiiEntitiesDetectionJobRequest')
83
85
  DescribePiiEntitiesDetectionJobResponse = Shapes::StructureShape.new(name: 'DescribePiiEntitiesDetectionJobResponse')
86
+ DescribeResourcePolicyRequest = Shapes::StructureShape.new(name: 'DescribeResourcePolicyRequest')
87
+ DescribeResourcePolicyResponse = Shapes::StructureShape.new(name: 'DescribeResourcePolicyResponse')
84
88
  DescribeSentimentDetectionJobRequest = Shapes::StructureShape.new(name: 'DescribeSentimentDetectionJobRequest')
85
89
  DescribeSentimentDetectionJobResponse = Shapes::StructureShape.new(name: 'DescribeSentimentDetectionJobResponse')
86
90
  DescribeTopicsDetectionJobRequest = Shapes::StructureShape.new(name: 'DescribeTopicsDetectionJobRequest')
@@ -160,6 +164,8 @@ module Aws::Comprehend
160
164
  EventsDetectionJobPropertiesList = Shapes::ListShape.new(name: 'EventsDetectionJobPropertiesList')
161
165
  Float = Shapes::FloatShape.new(name: 'Float')
162
166
  IamRoleArn = Shapes::StringShape.new(name: 'IamRoleArn')
167
+ ImportModelRequest = Shapes::StructureShape.new(name: 'ImportModelRequest')
168
+ ImportModelResponse = Shapes::StructureShape.new(name: 'ImportModelResponse')
163
169
  InferenceUnitsInteger = Shapes::IntegerShape.new(name: 'InferenceUnitsInteger')
164
170
  InputDataConfig = Shapes::StructureShape.new(name: 'InputDataConfig')
165
171
  InputFormat = Shapes::StringShape.new(name: 'InputFormat')
@@ -237,6 +243,10 @@ module Aws::Comprehend
237
243
  PiiEntity = Shapes::StructureShape.new(name: 'PiiEntity')
238
244
  PiiEntityType = Shapes::StringShape.new(name: 'PiiEntityType')
239
245
  PiiOutputDataConfig = Shapes::StructureShape.new(name: 'PiiOutputDataConfig')
246
+ Policy = Shapes::StringShape.new(name: 'Policy')
247
+ PolicyRevisionId = Shapes::StringShape.new(name: 'PolicyRevisionId')
248
+ PutResourcePolicyRequest = Shapes::StructureShape.new(name: 'PutResourcePolicyRequest')
249
+ PutResourcePolicyResponse = Shapes::StructureShape.new(name: 'PutResourcePolicyResponse')
240
250
  RedactionConfig = Shapes::StructureShape.new(name: 'RedactionConfig')
241
251
  ResourceInUseException = Shapes::StructureShape.new(name: 'ResourceInUseException')
242
252
  ResourceLimitExceededException = Shapes::StructureShape.new(name: 'ResourceLimitExceededException')
@@ -438,6 +448,7 @@ module Aws::Comprehend
438
448
  CreateDocumentClassifierRequest.add_member(:vpc_config, Shapes::ShapeRef.new(shape: VpcConfig, location_name: "VpcConfig"))
439
449
  CreateDocumentClassifierRequest.add_member(:mode, Shapes::ShapeRef.new(shape: DocumentClassifierMode, location_name: "Mode"))
440
450
  CreateDocumentClassifierRequest.add_member(:model_kms_key_id, Shapes::ShapeRef.new(shape: KmsKeyId, location_name: "ModelKmsKeyId"))
451
+ CreateDocumentClassifierRequest.add_member(:model_policy, Shapes::ShapeRef.new(shape: Policy, location_name: "ModelPolicy"))
441
452
  CreateDocumentClassifierRequest.struct_class = Types::CreateDocumentClassifierRequest
442
453
 
443
454
  CreateDocumentClassifierResponse.add_member(:document_classifier_arn, Shapes::ShapeRef.new(shape: DocumentClassifierArn, location_name: "DocumentClassifierArn"))
@@ -464,6 +475,7 @@ module Aws::Comprehend
464
475
  CreateEntityRecognizerRequest.add_member(:volume_kms_key_id, Shapes::ShapeRef.new(shape: KmsKeyId, location_name: "VolumeKmsKeyId"))
465
476
  CreateEntityRecognizerRequest.add_member(:vpc_config, Shapes::ShapeRef.new(shape: VpcConfig, location_name: "VpcConfig"))
466
477
  CreateEntityRecognizerRequest.add_member(:model_kms_key_id, Shapes::ShapeRef.new(shape: KmsKeyId, location_name: "ModelKmsKeyId"))
478
+ CreateEntityRecognizerRequest.add_member(:model_policy, Shapes::ShapeRef.new(shape: Policy, location_name: "ModelPolicy"))
467
479
  CreateEntityRecognizerRequest.struct_class = Types::CreateEntityRecognizerRequest
468
480
 
469
481
  CreateEntityRecognizerResponse.add_member(:entity_recognizer_arn, Shapes::ShapeRef.new(shape: EntityRecognizerArn, location_name: "EntityRecognizerArn"))
@@ -486,6 +498,12 @@ module Aws::Comprehend
486
498
 
487
499
  DeleteEntityRecognizerResponse.struct_class = Types::DeleteEntityRecognizerResponse
488
500
 
501
+ DeleteResourcePolicyRequest.add_member(:resource_arn, Shapes::ShapeRef.new(shape: ComprehendModelArn, required: true, location_name: "ResourceArn"))
502
+ DeleteResourcePolicyRequest.add_member(:policy_revision_id, Shapes::ShapeRef.new(shape: PolicyRevisionId, location_name: "PolicyRevisionId"))
503
+ DeleteResourcePolicyRequest.struct_class = Types::DeleteResourcePolicyRequest
504
+
505
+ DeleteResourcePolicyResponse.struct_class = Types::DeleteResourcePolicyResponse
506
+
489
507
  DescribeDocumentClassificationJobRequest.add_member(:job_id, Shapes::ShapeRef.new(shape: JobId, required: true, location_name: "JobId"))
490
508
  DescribeDocumentClassificationJobRequest.struct_class = Types::DescribeDocumentClassificationJobRequest
491
509
 
@@ -540,6 +558,15 @@ module Aws::Comprehend
540
558
  DescribePiiEntitiesDetectionJobResponse.add_member(:pii_entities_detection_job_properties, Shapes::ShapeRef.new(shape: PiiEntitiesDetectionJobProperties, location_name: "PiiEntitiesDetectionJobProperties"))
541
559
  DescribePiiEntitiesDetectionJobResponse.struct_class = Types::DescribePiiEntitiesDetectionJobResponse
542
560
 
561
+ DescribeResourcePolicyRequest.add_member(:resource_arn, Shapes::ShapeRef.new(shape: ComprehendModelArn, required: true, location_name: "ResourceArn"))
562
+ DescribeResourcePolicyRequest.struct_class = Types::DescribeResourcePolicyRequest
563
+
564
+ DescribeResourcePolicyResponse.add_member(:resource_policy, Shapes::ShapeRef.new(shape: Policy, location_name: "ResourcePolicy"))
565
+ DescribeResourcePolicyResponse.add_member(:creation_time, Shapes::ShapeRef.new(shape: Timestamp, location_name: "CreationTime"))
566
+ DescribeResourcePolicyResponse.add_member(:last_modified_time, Shapes::ShapeRef.new(shape: Timestamp, location_name: "LastModifiedTime"))
567
+ DescribeResourcePolicyResponse.add_member(:policy_revision_id, Shapes::ShapeRef.new(shape: PolicyRevisionId, location_name: "PolicyRevisionId"))
568
+ DescribeResourcePolicyResponse.struct_class = Types::DescribeResourcePolicyResponse
569
+
543
570
  DescribeSentimentDetectionJobRequest.add_member(:job_id, Shapes::ShapeRef.new(shape: JobId, required: true, location_name: "JobId"))
544
571
  DescribeSentimentDetectionJobRequest.struct_class = Types::DescribeSentimentDetectionJobRequest
545
572
 
@@ -658,6 +685,7 @@ module Aws::Comprehend
658
685
  DocumentClassifierProperties.add_member(:mode, Shapes::ShapeRef.new(shape: DocumentClassifierMode, location_name: "Mode"))
659
686
  DocumentClassifierProperties.add_member(:model_kms_key_id, Shapes::ShapeRef.new(shape: KmsKeyId, location_name: "ModelKmsKeyId"))
660
687
  DocumentClassifierProperties.add_member(:version_name, Shapes::ShapeRef.new(shape: VersionName, location_name: "VersionName"))
688
+ DocumentClassifierProperties.add_member(:source_model_arn, Shapes::ShapeRef.new(shape: DocumentClassifierArn, location_name: "SourceModelArn"))
661
689
  DocumentClassifierProperties.struct_class = Types::DocumentClassifierProperties
662
690
 
663
691
  DocumentClassifierPropertiesList.member = Shapes::ShapeRef.new(shape: DocumentClassifierProperties)
@@ -823,6 +851,7 @@ module Aws::Comprehend
823
851
  EntityRecognizerProperties.add_member(:vpc_config, Shapes::ShapeRef.new(shape: VpcConfig, location_name: "VpcConfig"))
824
852
  EntityRecognizerProperties.add_member(:model_kms_key_id, Shapes::ShapeRef.new(shape: KmsKeyId, location_name: "ModelKmsKeyId"))
825
853
  EntityRecognizerProperties.add_member(:version_name, Shapes::ShapeRef.new(shape: VersionName, location_name: "VersionName"))
854
+ EntityRecognizerProperties.add_member(:source_model_arn, Shapes::ShapeRef.new(shape: EntityRecognizerArn, location_name: "SourceModelArn"))
826
855
  EntityRecognizerProperties.struct_class = Types::EntityRecognizerProperties
827
856
 
828
857
  EntityRecognizerPropertiesList.member = Shapes::ShapeRef.new(shape: EntityRecognizerProperties)
@@ -868,6 +897,17 @@ module Aws::Comprehend
868
897
 
869
898
  EventsDetectionJobPropertiesList.member = Shapes::ShapeRef.new(shape: EventsDetectionJobProperties)
870
899
 
900
+ ImportModelRequest.add_member(:source_model_arn, Shapes::ShapeRef.new(shape: ComprehendModelArn, required: true, location_name: "SourceModelArn"))
901
+ ImportModelRequest.add_member(:model_name, Shapes::ShapeRef.new(shape: ComprehendArnName, location_name: "ModelName"))
902
+ ImportModelRequest.add_member(:version_name, Shapes::ShapeRef.new(shape: VersionName, location_name: "VersionName"))
903
+ ImportModelRequest.add_member(:model_kms_key_id, Shapes::ShapeRef.new(shape: KmsKeyId, location_name: "ModelKmsKeyId"))
904
+ ImportModelRequest.add_member(:data_access_role_arn, Shapes::ShapeRef.new(shape: IamRoleArn, location_name: "DataAccessRoleArn"))
905
+ ImportModelRequest.add_member(:tags, Shapes::ShapeRef.new(shape: TagList, location_name: "Tags"))
906
+ ImportModelRequest.struct_class = Types::ImportModelRequest
907
+
908
+ ImportModelResponse.add_member(:model_arn, Shapes::ShapeRef.new(shape: ComprehendModelArn, location_name: "ModelArn"))
909
+ ImportModelResponse.struct_class = Types::ImportModelResponse
910
+
871
911
  InputDataConfig.add_member(:s3_uri, Shapes::ShapeRef.new(shape: S3Uri, required: true, location_name: "S3Uri"))
872
912
  InputDataConfig.add_member(:input_format, Shapes::ShapeRef.new(shape: InputFormat, location_name: "InputFormat"))
873
913
  InputDataConfig.add_member(:document_reader_config, Shapes::ShapeRef.new(shape: DocumentReaderConfig, location_name: "DocumentReaderConfig"))
@@ -1110,6 +1150,14 @@ module Aws::Comprehend
1110
1150
  PiiOutputDataConfig.add_member(:kms_key_id, Shapes::ShapeRef.new(shape: KmsKeyId, location_name: "KmsKeyId"))
1111
1151
  PiiOutputDataConfig.struct_class = Types::PiiOutputDataConfig
1112
1152
 
1153
+ PutResourcePolicyRequest.add_member(:resource_arn, Shapes::ShapeRef.new(shape: ComprehendModelArn, required: true, location_name: "ResourceArn"))
1154
+ PutResourcePolicyRequest.add_member(:resource_policy, Shapes::ShapeRef.new(shape: Policy, required: true, location_name: "ResourcePolicy"))
1155
+ PutResourcePolicyRequest.add_member(:policy_revision_id, Shapes::ShapeRef.new(shape: PolicyRevisionId, location_name: "PolicyRevisionId"))
1156
+ PutResourcePolicyRequest.struct_class = Types::PutResourcePolicyRequest
1157
+
1158
+ PutResourcePolicyResponse.add_member(:policy_revision_id, Shapes::ShapeRef.new(shape: PolicyRevisionId, location_name: "PolicyRevisionId"))
1159
+ PutResourcePolicyResponse.struct_class = Types::PutResourcePolicyResponse
1160
+
1113
1161
  RedactionConfig.add_member(:pii_entity_types, Shapes::ShapeRef.new(shape: ListOfPiiEntityTypes, location_name: "PiiEntityTypes"))
1114
1162
  RedactionConfig.add_member(:mask_mode, Shapes::ShapeRef.new(shape: PiiEntitiesDetectionMaskMode, location_name: "MaskMode"))
1115
1163
  RedactionConfig.add_member(:mask_character, Shapes::ShapeRef.new(shape: MaskCharacter, location_name: "MaskCharacter"))
@@ -1614,6 +1662,17 @@ module Aws::Comprehend
1614
1662
  o.errors << Shapes::ShapeRef.new(shape: InternalServerException)
1615
1663
  end)
1616
1664
 
1665
+ api.add_operation(:delete_resource_policy, Seahorse::Model::Operation.new.tap do |o|
1666
+ o.name = "DeleteResourcePolicy"
1667
+ o.http_method = "POST"
1668
+ o.http_request_uri = "/"
1669
+ o.input = Shapes::ShapeRef.new(shape: DeleteResourcePolicyRequest)
1670
+ o.output = Shapes::ShapeRef.new(shape: DeleteResourcePolicyResponse)
1671
+ o.errors << Shapes::ShapeRef.new(shape: InvalidRequestException)
1672
+ o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundException)
1673
+ o.errors << Shapes::ShapeRef.new(shape: InternalServerException)
1674
+ end)
1675
+
1617
1676
  api.add_operation(:describe_document_classification_job, Seahorse::Model::Operation.new.tap do |o|
1618
1677
  o.name = "DescribeDocumentClassificationJob"
1619
1678
  o.http_method = "POST"
@@ -1722,6 +1781,17 @@ module Aws::Comprehend
1722
1781
  o.errors << Shapes::ShapeRef.new(shape: InternalServerException)
1723
1782
  end)
1724
1783
 
1784
+ api.add_operation(:describe_resource_policy, Seahorse::Model::Operation.new.tap do |o|
1785
+ o.name = "DescribeResourcePolicy"
1786
+ o.http_method = "POST"
1787
+ o.http_request_uri = "/"
1788
+ o.input = Shapes::ShapeRef.new(shape: DescribeResourcePolicyRequest)
1789
+ o.output = Shapes::ShapeRef.new(shape: DescribeResourcePolicyResponse)
1790
+ o.errors << Shapes::ShapeRef.new(shape: InvalidRequestException)
1791
+ o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundException)
1792
+ o.errors << Shapes::ShapeRef.new(shape: InternalServerException)
1793
+ end)
1794
+
1725
1795
  api.add_operation(:describe_sentiment_detection_job, Seahorse::Model::Operation.new.tap do |o|
1726
1796
  o.name = "DescribeSentimentDetectionJob"
1727
1797
  o.http_method = "POST"
@@ -1818,6 +1888,23 @@ module Aws::Comprehend
1818
1888
  o.errors << Shapes::ShapeRef.new(shape: InternalServerException)
1819
1889
  end)
1820
1890
 
1891
+ api.add_operation(:import_model, Seahorse::Model::Operation.new.tap do |o|
1892
+ o.name = "ImportModel"
1893
+ o.http_method = "POST"
1894
+ o.http_request_uri = "/"
1895
+ o.input = Shapes::ShapeRef.new(shape: ImportModelRequest)
1896
+ o.output = Shapes::ShapeRef.new(shape: ImportModelResponse)
1897
+ o.errors << Shapes::ShapeRef.new(shape: InvalidRequestException)
1898
+ o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundException)
1899
+ o.errors << Shapes::ShapeRef.new(shape: ResourceInUseException)
1900
+ o.errors << Shapes::ShapeRef.new(shape: ResourceUnavailableException)
1901
+ o.errors << Shapes::ShapeRef.new(shape: TooManyTagsException)
1902
+ o.errors << Shapes::ShapeRef.new(shape: TooManyRequestsException)
1903
+ o.errors << Shapes::ShapeRef.new(shape: ResourceLimitExceededException)
1904
+ o.errors << Shapes::ShapeRef.new(shape: KmsKeyValidationException)
1905
+ o.errors << Shapes::ShapeRef.new(shape: InternalServerException)
1906
+ end)
1907
+
1821
1908
  api.add_operation(:list_document_classification_jobs, Seahorse::Model::Operation.new.tap do |o|
1822
1909
  o.name = "ListDocumentClassificationJobs"
1823
1910
  o.http_method = "POST"
@@ -2048,6 +2135,17 @@ module Aws::Comprehend
2048
2135
  )
2049
2136
  end)
2050
2137
 
2138
+ api.add_operation(:put_resource_policy, Seahorse::Model::Operation.new.tap do |o|
2139
+ o.name = "PutResourcePolicy"
2140
+ o.http_method = "POST"
2141
+ o.http_request_uri = "/"
2142
+ o.input = Shapes::ShapeRef.new(shape: PutResourcePolicyRequest)
2143
+ o.output = Shapes::ShapeRef.new(shape: PutResourcePolicyResponse)
2144
+ o.errors << Shapes::ShapeRef.new(shape: InvalidRequestException)
2145
+ o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundException)
2146
+ o.errors << Shapes::ShapeRef.new(shape: InternalServerException)
2147
+ end)
2148
+
2051
2149
  api.add_operation(:start_document_classification_job, Seahorse::Model::Operation.new.tap do |o|
2052
2150
  o.name = "StartDocumentClassificationJob"
2053
2151
  o.http_method = "POST"
@@ -760,6 +760,7 @@ module Aws::Comprehend
760
760
  # },
761
761
  # mode: "MULTI_CLASS", # accepts MULTI_CLASS, MULTI_LABEL
762
762
  # model_kms_key_id: "KmsKeyId",
763
+ # model_policy: "Policy",
763
764
  # }
764
765
  #
765
766
  # @!attribute [rw] document_classifier_name
@@ -855,6 +856,25 @@ module Aws::Comprehend
855
856
  # `"arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"`
856
857
  # @return [String]
857
858
  #
859
+ # @!attribute [rw] model_policy
860
+ # The resource-based policy to attach to your custom document
861
+ # classifier model. You can use this policy to allow another AWS
862
+ # account to import your custom model.
863
+ #
864
+ # Provide your policy as a JSON body that you enter as a UTF-8 encoded
865
+ # string without line breaks. To provide valid JSON, enclose the
866
+ # attribute names and values in double quotes. If the JSON body is
867
+ # also enclosed in double quotes, then you must escape the double
868
+ # quotes that are inside the policy:
869
+ #
870
+ # `"\{"attribute": "value", "attribute": ["value"]\}"`
871
+ #
872
+ # To avoid escaping quotes, you can use single quotes to enclose the
873
+ # policy and double quotes to enclose the JSON names and values:
874
+ #
875
+ # `'\{"attribute": "value", "attribute": ["value"]\}'`
876
+ # @return [String]
877
+ #
858
878
  # @see http://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/CreateDocumentClassifierRequest AWS API Documentation
859
879
  #
860
880
  class CreateDocumentClassifierRequest < Struct.new(
@@ -869,7 +889,8 @@ module Aws::Comprehend
869
889
  :volume_kms_key_id,
870
890
  :vpc_config,
871
891
  :mode,
872
- :model_kms_key_id)
892
+ :model_kms_key_id,
893
+ :model_policy)
873
894
  SENSITIVE = []
874
895
  include Aws::Structure
875
896
  end
@@ -1019,6 +1040,7 @@ module Aws::Comprehend
1019
1040
  # subnets: ["SubnetId"], # required
1020
1041
  # },
1021
1042
  # model_kms_key_id: "KmsKeyId",
1043
+ # model_policy: "Policy",
1022
1044
  # }
1023
1045
  #
1024
1046
  # @!attribute [rw] recognizer_name
@@ -1104,6 +1126,25 @@ module Aws::Comprehend
1104
1126
  # `"arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"`
1105
1127
  # @return [String]
1106
1128
  #
1129
+ # @!attribute [rw] model_policy
1130
+ # The JSON resource-based policy to attach to your custom entity
1131
+ # recognizer model. You can use this policy to allow another AWS
1132
+ # account to import your custom model.
1133
+ #
1134
+ # Provide your JSON as a UTF-8 encoded string without line breaks. To
1135
+ # provide valid JSON for your policy, enclose the attribute names and
1136
+ # values in double quotes. If the JSON body is also enclosed in double
1137
+ # quotes, then you must escape the double quotes that are inside the
1138
+ # policy:
1139
+ #
1140
+ # `"\{"attribute": "value", "attribute": ["value"]\}"`
1141
+ #
1142
+ # To avoid escaping quotes, you can use single quotes to enclose the
1143
+ # policy and double quotes to enclose the JSON names and values:
1144
+ #
1145
+ # `'\{"attribute": "value", "attribute": ["value"]\}'`
1146
+ # @return [String]
1147
+ #
1107
1148
  # @see http://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/CreateEntityRecognizerRequest AWS API Documentation
1108
1149
  #
1109
1150
  class CreateEntityRecognizerRequest < Struct.new(
@@ -1116,7 +1157,8 @@ module Aws::Comprehend
1116
1157
  :language_code,
1117
1158
  :volume_kms_key_id,
1118
1159
  :vpc_config,
1119
- :model_kms_key_id)
1160
+ :model_kms_key_id,
1161
+ :model_policy)
1120
1162
  SENSITIVE = []
1121
1163
  include Aws::Structure
1122
1164
  end
@@ -1205,6 +1247,36 @@ module Aws::Comprehend
1205
1247
  #
1206
1248
  class DeleteEntityRecognizerResponse < Aws::EmptyStructure; end
1207
1249
 
1250
+ # @note When making an API call, you may pass DeleteResourcePolicyRequest
1251
+ # data as a hash:
1252
+ #
1253
+ # {
1254
+ # resource_arn: "ComprehendModelArn", # required
1255
+ # policy_revision_id: "PolicyRevisionId",
1256
+ # }
1257
+ #
1258
+ # @!attribute [rw] resource_arn
1259
+ # The Amazon Resource Name (ARN) of the custom model version that has
1260
+ # the policy to delete.
1261
+ # @return [String]
1262
+ #
1263
+ # @!attribute [rw] policy_revision_id
1264
+ # The revision ID of the policy to delete.
1265
+ # @return [String]
1266
+ #
1267
+ # @see http://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DeleteResourcePolicyRequest AWS API Documentation
1268
+ #
1269
+ class DeleteResourcePolicyRequest < Struct.new(
1270
+ :resource_arn,
1271
+ :policy_revision_id)
1272
+ SENSITIVE = []
1273
+ include Aws::Structure
1274
+ end
1275
+
1276
+ # @see http://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DeleteResourcePolicyResponse AWS API Documentation
1277
+ #
1278
+ class DeleteResourcePolicyResponse < Aws::EmptyStructure; end
1279
+
1208
1280
  # @note When making an API call, you may pass DescribeDocumentClassificationJobRequest
1209
1281
  # data as a hash:
1210
1282
  #
@@ -1497,6 +1569,54 @@ module Aws::Comprehend
1497
1569
  include Aws::Structure
1498
1570
  end
1499
1571
 
1572
+ # @note When making an API call, you may pass DescribeResourcePolicyRequest
1573
+ # data as a hash:
1574
+ #
1575
+ # {
1576
+ # resource_arn: "ComprehendModelArn", # required
1577
+ # }
1578
+ #
1579
+ # @!attribute [rw] resource_arn
1580
+ # The Amazon Resource Name (ARN) of the policy to describe.
1581
+ # @return [String]
1582
+ #
1583
+ # @see http://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DescribeResourcePolicyRequest AWS API Documentation
1584
+ #
1585
+ class DescribeResourcePolicyRequest < Struct.new(
1586
+ :resource_arn)
1587
+ SENSITIVE = []
1588
+ include Aws::Structure
1589
+ end
1590
+
1591
+ # @!attribute [rw] resource_policy
1592
+ # The JSON body of the resource-based policy.
1593
+ # @return [String]
1594
+ #
1595
+ # @!attribute [rw] creation_time
1596
+ # The time at which the policy was created.
1597
+ # @return [Time]
1598
+ #
1599
+ # @!attribute [rw] last_modified_time
1600
+ # The time at which the policy was last modified.
1601
+ # @return [Time]
1602
+ #
1603
+ # @!attribute [rw] policy_revision_id
1604
+ # The revision ID of the policy. Each time you modify a policy, Amazon
1605
+ # Comprehend assigns a new revision ID, and it deletes the prior
1606
+ # version of the policy.
1607
+ # @return [String]
1608
+ #
1609
+ # @see http://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DescribeResourcePolicyResponse AWS API Documentation
1610
+ #
1611
+ class DescribeResourcePolicyResponse < Struct.new(
1612
+ :resource_policy,
1613
+ :creation_time,
1614
+ :last_modified_time,
1615
+ :policy_revision_id)
1616
+ SENSITIVE = []
1617
+ include Aws::Structure
1618
+ end
1619
+
1500
1620
  # @note When making an API call, you may pass DescribeSentimentDetectionJobRequest
1501
1621
  # data as a hash:
1502
1622
  #
@@ -2321,6 +2441,12 @@ module Aws::Comprehend
2321
2441
  # The version name that you assigned to the document classifier.
2322
2442
  # @return [String]
2323
2443
  #
2444
+ # @!attribute [rw] source_model_arn
2445
+ # The Amazon Resource Name (ARN) of the source model. This model was
2446
+ # imported from a different AWS account to create the document
2447
+ # classifier model in your AWS account.
2448
+ # @return [String]
2449
+ #
2324
2450
  # @see http://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DocumentClassifierProperties AWS API Documentation
2325
2451
  #
2326
2452
  class DocumentClassifierProperties < Struct.new(
@@ -2340,7 +2466,8 @@ module Aws::Comprehend
2340
2466
  :vpc_config,
2341
2467
  :mode,
2342
2468
  :model_kms_key_id,
2343
- :version_name)
2469
+ :version_name,
2470
+ :source_model_arn)
2344
2471
  SENSITIVE = [:classifier_metadata]
2345
2472
  include Aws::Structure
2346
2473
  end
@@ -3400,6 +3527,12 @@ module Aws::Comprehend
3400
3527
  # The version name you assigned to the entity recognizer.
3401
3528
  # @return [String]
3402
3529
  #
3530
+ # @!attribute [rw] source_model_arn
3531
+ # The Amazon Resource Name (ARN) of the source model. This model was
3532
+ # imported from a different AWS account to create the entity
3533
+ # recognizer model in your AWS account.
3534
+ # @return [String]
3535
+ #
3403
3536
  # @see http://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/EntityRecognizerProperties AWS API Documentation
3404
3537
  #
3405
3538
  class EntityRecognizerProperties < Struct.new(
@@ -3417,7 +3550,8 @@ module Aws::Comprehend
3417
3550
  :volume_kms_key_id,
3418
3551
  :vpc_config,
3419
3552
  :model_kms_key_id,
3420
- :version_name)
3553
+ :version_name,
3554
+ :source_model_arn)
3421
3555
  SENSITIVE = [:recognizer_metadata]
3422
3556
  include Aws::Structure
3423
3557
  end
@@ -3647,6 +3781,90 @@ module Aws::Comprehend
3647
3781
  include Aws::Structure
3648
3782
  end
3649
3783
 
3784
+ # @note When making an API call, you may pass ImportModelRequest
3785
+ # data as a hash:
3786
+ #
3787
+ # {
3788
+ # source_model_arn: "ComprehendModelArn", # required
3789
+ # model_name: "ComprehendArnName",
3790
+ # version_name: "VersionName",
3791
+ # model_kms_key_id: "KmsKeyId",
3792
+ # data_access_role_arn: "IamRoleArn",
3793
+ # tags: [
3794
+ # {
3795
+ # key: "TagKey", # required
3796
+ # value: "TagValue",
3797
+ # },
3798
+ # ],
3799
+ # }
3800
+ #
3801
+ # @!attribute [rw] source_model_arn
3802
+ # The Amazon Resource Name (ARN) of the custom model to import.
3803
+ # @return [String]
3804
+ #
3805
+ # @!attribute [rw] model_name
3806
+ # The name to assign to the custom model that is created in Amazon
3807
+ # Comprehend by this import.
3808
+ # @return [String]
3809
+ #
3810
+ # @!attribute [rw] version_name
3811
+ # The version name given to the custom model that is created by this
3812
+ # import. Version names can have a maximum of 256 characters.
3813
+ # Alphanumeric characters, hyphens (-) and underscores (\_) are
3814
+ # allowed. The version name must be unique among all models with the
3815
+ # same classifier name in the account/AWS Region.
3816
+ # @return [String]
3817
+ #
3818
+ # @!attribute [rw] model_kms_key_id
3819
+ # ID for the AWS Key Management Service (KMS) key that Amazon
3820
+ # Comprehend uses to encrypt trained custom models. The ModelKmsKeyId
3821
+ # can be either of the following formats:
3822
+ #
3823
+ # * KMS Key ID: `"1234abcd-12ab-34cd-56ef-1234567890ab"`
3824
+ #
3825
+ # * Amazon Resource Name (ARN) of a KMS Key:
3826
+ # `"arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"`
3827
+ # @return [String]
3828
+ #
3829
+ # @!attribute [rw] data_access_role_arn
3830
+ # The Amazon Resource Name (ARN) of the AWS Identity and Management
3831
+ # (IAM) role that allows Amazon Comprehend to use Amazon Key
3832
+ # Management Service (KMS) to encrypt or decrypt the custom model.
3833
+ # @return [String]
3834
+ #
3835
+ # @!attribute [rw] tags
3836
+ # Tags to be associated with the custom model that is created by this
3837
+ # import. A tag is a key-value pair that adds as a metadata to a
3838
+ # resource used by Amazon Comprehend. For example, a tag with
3839
+ # "Sales" as the key might be added to a resource to indicate its
3840
+ # use by the sales department.
3841
+ # @return [Array<Types::Tag>]
3842
+ #
3843
+ # @see http://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/ImportModelRequest AWS API Documentation
3844
+ #
3845
+ class ImportModelRequest < Struct.new(
3846
+ :source_model_arn,
3847
+ :model_name,
3848
+ :version_name,
3849
+ :model_kms_key_id,
3850
+ :data_access_role_arn,
3851
+ :tags)
3852
+ SENSITIVE = []
3853
+ include Aws::Structure
3854
+ end
3855
+
3856
+ # @!attribute [rw] model_arn
3857
+ # The Amazon Resource Name (ARN) of the custom model being imported.
3858
+ # @return [String]
3859
+ #
3860
+ # @see http://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/ImportModelResponse AWS API Documentation
3861
+ #
3862
+ class ImportModelResponse < Struct.new(
3863
+ :model_arn)
3864
+ SENSITIVE = []
3865
+ include Aws::Structure
3866
+ end
3867
+
3650
3868
  # The input properties for an inference job.
3651
3869
  #
3652
3870
  # @note When making an API call, you may pass InputDataConfig
@@ -4976,6 +5194,67 @@ module Aws::Comprehend
4976
5194
  include Aws::Structure
4977
5195
  end
4978
5196
 
5197
+ # @note When making an API call, you may pass PutResourcePolicyRequest
5198
+ # data as a hash:
5199
+ #
5200
+ # {
5201
+ # resource_arn: "ComprehendModelArn", # required
5202
+ # resource_policy: "Policy", # required
5203
+ # policy_revision_id: "PolicyRevisionId",
5204
+ # }
5205
+ #
5206
+ # @!attribute [rw] resource_arn
5207
+ # The Amazon Resource Name (ARN) of the custom model to attach the
5208
+ # policy to.
5209
+ # @return [String]
5210
+ #
5211
+ # @!attribute [rw] resource_policy
5212
+ # The JSON resource-based policy to attach to your custom model.
5213
+ # Provide your JSON as a UTF-8 encoded string without line breaks. To
5214
+ # provide valid JSON for your policy, enclose the attribute names and
5215
+ # values in double quotes. If the JSON body is also enclosed in double
5216
+ # quotes, then you must escape the double quotes that are inside the
5217
+ # policy:
5218
+ #
5219
+ # `"\{"attribute": "value", "attribute": ["value"]\}"`
5220
+ #
5221
+ # To avoid escaping quotes, you can use single quotes to enclose the
5222
+ # policy and double quotes to enclose the JSON names and values:
5223
+ #
5224
+ # `'\{"attribute": "value", "attribute": ["value"]\}'`
5225
+ # @return [String]
5226
+ #
5227
+ # @!attribute [rw] policy_revision_id
5228
+ # The revision ID that Amazon Comprehend assigned to the policy that
5229
+ # you are updating. If you are creating a new policy that has no prior
5230
+ # version, don't use this parameter. Amazon Comprehend creates the
5231
+ # revision ID for you.
5232
+ # @return [String]
5233
+ #
5234
+ # @see http://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/PutResourcePolicyRequest AWS API Documentation
5235
+ #
5236
+ class PutResourcePolicyRequest < Struct.new(
5237
+ :resource_arn,
5238
+ :resource_policy,
5239
+ :policy_revision_id)
5240
+ SENSITIVE = []
5241
+ include Aws::Structure
5242
+ end
5243
+
5244
+ # @!attribute [rw] policy_revision_id
5245
+ # The revision ID of the policy. Each time you modify a policy, Amazon
5246
+ # Comprehend assigns a new revision ID, and it deletes the prior
5247
+ # version of the policy.
5248
+ # @return [String]
5249
+ #
5250
+ # @see http://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/PutResourcePolicyResponse AWS API Documentation
5251
+ #
5252
+ class PutResourcePolicyResponse < Struct.new(
5253
+ :policy_revision_id)
5254
+ SENSITIVE = []
5255
+ include Aws::Structure
5256
+ end
5257
+
4979
5258
  # Provides configuration parameters for PII entity redaction.
4980
5259
  #
4981
5260
  # @note When making an API call, you may pass RedactionConfig
@@ -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.56.0'
51
+ GEM_VERSION = '1.59.0'
52
52
 
53
53
  end
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.56.0
4
+ version: 1.59.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-12-21 00:00:00.000000000 Z
11
+ date: 2022-02-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-core
@@ -19,7 +19,7 @@ dependencies:
19
19
  version: '3'
20
20
  - - ">="
21
21
  - !ruby/object:Gem::Version
22
- version: 3.125.0
22
+ version: 3.127.0
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -29,7 +29,7 @@ dependencies:
29
29
  version: '3'
30
30
  - - ">="
31
31
  - !ruby/object:Gem::Version
32
- version: 3.125.0
32
+ version: 3.127.0
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: aws-sigv4
35
35
  requirement: !ruby/object:Gem::Requirement