aws-sdk-comprehend 1.56.0 → 1.57.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: 041011f1ca41235c1453186ea87622a7a8727208494fb1408d86474a8567cc36
4
+ data.tar.gz: 7116df2071cdfa3f84bafcef3ef53ae49256c442d80125fe87af85640685826f
5
5
  SHA512:
6
- metadata.gz: cb7d498679e24b31e4ae6ef7162017ae3d87122ac09396b8084ad822e4a7c933fedef9896201906a4f44345a460daf500ddc71e5aa5314c42dfe5c77d1eb6ad8
7
- data.tar.gz: c3cc4d24f2263ae646a4f339e2fee17141ee9428f9b0a91ef7436e6144581a133da9e0da099def9d9532c1013fb0d681292f273304355210e1fffb20b9ee0b15
6
+ metadata.gz: 9562095c1a358e6d6d7e41f0e3a57bd762816cfad1fc9e70d4a7fec9effb15d0d5f31c69dd25d666959000f8572be40c204a1a9a622b6c3dbcfa5172060d4a51
7
+ data.tar.gz: 69118632497cf47ac49b50d03eddb52e4ba31737c48136c739845508aeb8eeccb0bb4c67ab7ecee52f47d3c82905a035cc9784f429e4630be1182cf3d305e037
data/CHANGELOG.md CHANGED
@@ -1,6 +1,11 @@
1
1
  Unreleased Changes
2
2
  ------------------
3
3
 
4
+ 1.57.0 (2022-02-02)
5
+ ------------------
6
+
7
+ * Feature - Amazon Comprehend now supports sharing and importing custom trained models from one AWS account to another within the same region.
8
+
4
9
  1.56.0 (2021-12-21)
5
10
  ------------------
6
11
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.56.0
1
+ 1.57.0
@@ -765,6 +765,24 @@ module Aws::Comprehend
765
765
  # * Amazon Resource Name (ARN) of a KMS Key:
766
766
  # `"arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"`
767
767
  #
768
+ # @option params [String] :model_policy
769
+ # The resource-based policy to attach to your custom document classifier
770
+ # model. You can use this policy to allow another AWS account to import
771
+ # your custom model.
772
+ #
773
+ # Provide your policy as a JSON body that you enter as a UTF-8 encoded
774
+ # string without line breaks. To provide valid JSON, enclose the
775
+ # attribute names and values in double quotes. If the JSON body is also
776
+ # enclosed in double quotes, then you must escape the double quotes that
777
+ # are inside the policy:
778
+ #
779
+ # `"\{"attribute": "value", "attribute": ["value"]\}"`
780
+ #
781
+ # To avoid escaping quotes, you can use single quotes to enclose the
782
+ # policy and double quotes to enclose the JSON names and values:
783
+ #
784
+ # `'\{"attribute": "value", "attribute": ["value"]\}'`
785
+ #
768
786
  # @return [Types::CreateDocumentClassifierResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
769
787
  #
770
788
  # * {Types::CreateDocumentClassifierResponse#document_classifier_arn #document_classifier_arn} => String
@@ -810,6 +828,7 @@ module Aws::Comprehend
810
828
  # },
811
829
  # mode: "MULTI_CLASS", # accepts MULTI_CLASS, MULTI_LABEL
812
830
  # model_kms_key_id: "KmsKeyId",
831
+ # model_policy: "Policy",
813
832
  # })
814
833
  #
815
834
  # @example Response structure
@@ -970,6 +989,24 @@ module Aws::Comprehend
970
989
  # * Amazon Resource Name (ARN) of a KMS Key:
971
990
  # `"arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"`
972
991
  #
992
+ # @option params [String] :model_policy
993
+ # The JSON resource-based policy to attach to your custom entity
994
+ # recognizer model. You can use this policy to allow another AWS account
995
+ # to import your custom model.
996
+ #
997
+ # Provide your JSON as a UTF-8 encoded string without line breaks. To
998
+ # provide valid JSON for your policy, enclose the attribute names and
999
+ # values in double quotes. If the JSON body is also enclosed in double
1000
+ # quotes, then you must escape the double quotes that are inside the
1001
+ # policy:
1002
+ #
1003
+ # `"\{"attribute": "value", "attribute": ["value"]\}"`
1004
+ #
1005
+ # To avoid escaping quotes, you can use single quotes to enclose the
1006
+ # policy and double quotes to enclose the JSON names and values:
1007
+ #
1008
+ # `'\{"attribute": "value", "attribute": ["value"]\}'`
1009
+ #
973
1010
  # @return [Types::CreateEntityRecognizerResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
974
1011
  #
975
1012
  # * {Types::CreateEntityRecognizerResponse#entity_recognizer_arn #entity_recognizer_arn} => String
@@ -1024,6 +1061,7 @@ module Aws::Comprehend
1024
1061
  # subnets: ["SubnetId"], # required
1025
1062
  # },
1026
1063
  # model_kms_key_id: "KmsKeyId",
1064
+ # model_policy: "Policy",
1027
1065
  # })
1028
1066
  #
1029
1067
  # @example Response structure
@@ -1126,6 +1164,33 @@ module Aws::Comprehend
1126
1164
  req.send_request(options)
1127
1165
  end
1128
1166
 
1167
+ # Deletes a resource-based policy that is attached to a custom model.
1168
+ #
1169
+ # @option params [required, String] :resource_arn
1170
+ # The Amazon Resource Name (ARN) of the custom model version that has
1171
+ # the policy to delete.
1172
+ #
1173
+ # @option params [String] :policy_revision_id
1174
+ # The revision ID of the policy to delete.
1175
+ #
1176
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
1177
+ #
1178
+ # @example Request syntax with placeholder values
1179
+ #
1180
+ # resp = client.delete_resource_policy({
1181
+ # resource_arn: "ComprehendModelArn", # required
1182
+ # policy_revision_id: "PolicyRevisionId",
1183
+ # })
1184
+ #
1185
+ # @see http://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DeleteResourcePolicy AWS API Documentation
1186
+ #
1187
+ # @overload delete_resource_policy(params = {})
1188
+ # @param [Hash] params ({})
1189
+ def delete_resource_policy(params = {}, options = {})
1190
+ req = build_request(:delete_resource_policy, params)
1191
+ req.send_request(options)
1192
+ end
1193
+
1129
1194
  # Gets the properties associated with a document classification job. Use
1130
1195
  # this operation to get the status of a classification job.
1131
1196
  #
@@ -1237,6 +1302,7 @@ module Aws::Comprehend
1237
1302
  # resp.document_classifier_properties.mode #=> String, one of "MULTI_CLASS", "MULTI_LABEL"
1238
1303
  # resp.document_classifier_properties.model_kms_key_id #=> String
1239
1304
  # resp.document_classifier_properties.version_name #=> String
1305
+ # resp.document_classifier_properties.source_model_arn #=> String
1240
1306
  #
1241
1307
  # @see http://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DescribeDocumentClassifier AWS API Documentation
1242
1308
  #
@@ -1451,6 +1517,7 @@ module Aws::Comprehend
1451
1517
  # resp.entity_recognizer_properties.vpc_config.subnets[0] #=> String
1452
1518
  # resp.entity_recognizer_properties.model_kms_key_id #=> String
1453
1519
  # resp.entity_recognizer_properties.version_name #=> String
1520
+ # resp.entity_recognizer_properties.source_model_arn #=> String
1454
1521
  #
1455
1522
  # @see http://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DescribeEntityRecognizer AWS API Documentation
1456
1523
  #
@@ -1609,6 +1676,41 @@ module Aws::Comprehend
1609
1676
  req.send_request(options)
1610
1677
  end
1611
1678
 
1679
+ # Gets the details of a resource-based policy that is attached to a
1680
+ # custom model, including the JSON body of the policy.
1681
+ #
1682
+ # @option params [required, String] :resource_arn
1683
+ # The Amazon Resource Name (ARN) of the policy to describe.
1684
+ #
1685
+ # @return [Types::DescribeResourcePolicyResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1686
+ #
1687
+ # * {Types::DescribeResourcePolicyResponse#resource_policy #resource_policy} => String
1688
+ # * {Types::DescribeResourcePolicyResponse#creation_time #creation_time} => Time
1689
+ # * {Types::DescribeResourcePolicyResponse#last_modified_time #last_modified_time} => Time
1690
+ # * {Types::DescribeResourcePolicyResponse#policy_revision_id #policy_revision_id} => String
1691
+ #
1692
+ # @example Request syntax with placeholder values
1693
+ #
1694
+ # resp = client.describe_resource_policy({
1695
+ # resource_arn: "ComprehendModelArn", # required
1696
+ # })
1697
+ #
1698
+ # @example Response structure
1699
+ #
1700
+ # resp.resource_policy #=> String
1701
+ # resp.creation_time #=> Time
1702
+ # resp.last_modified_time #=> Time
1703
+ # resp.policy_revision_id #=> String
1704
+ #
1705
+ # @see http://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DescribeResourcePolicy AWS API Documentation
1706
+ #
1707
+ # @overload describe_resource_policy(params = {})
1708
+ # @param [Hash] params ({})
1709
+ def describe_resource_policy(params = {}, options = {})
1710
+ req = build_request(:describe_resource_policy, params)
1711
+ req.send_request(options)
1712
+ end
1713
+
1612
1714
  # Gets the properties associated with a sentiment detection job. Use
1613
1715
  # this operation to get the status of a detection job.
1614
1716
  #
@@ -1964,6 +2066,86 @@ module Aws::Comprehend
1964
2066
  req.send_request(options)
1965
2067
  end
1966
2068
 
2069
+ # Creates a new custom model that replicates a source custom model that
2070
+ # you import. The source model can be in your AWS account or another
2071
+ # one.
2072
+ #
2073
+ # If the source model is in another AWS account, then it must have a
2074
+ # resource-based policy that authorizes you to import it.
2075
+ #
2076
+ # The source model must be in the same AWS region that you're using
2077
+ # when you import. You can't import a model that's in a different
2078
+ # region.
2079
+ #
2080
+ # @option params [required, String] :source_model_arn
2081
+ # The Amazon Resource Name (ARN) of the custom model to import.
2082
+ #
2083
+ # @option params [String] :model_name
2084
+ # The name to assign to the custom model that is created in Amazon
2085
+ # Comprehend by this import.
2086
+ #
2087
+ # @option params [String] :version_name
2088
+ # The version name given to the custom model that is created by this
2089
+ # import. Version names can have a maximum of 256 characters.
2090
+ # Alphanumeric characters, hyphens (-) and underscores (\_) are allowed.
2091
+ # The version name must be unique among all models with the same
2092
+ # classifier name in the account/AWS Region.
2093
+ #
2094
+ # @option params [String] :model_kms_key_id
2095
+ # ID for the AWS Key Management Service (KMS) key that Amazon Comprehend
2096
+ # uses to encrypt trained custom models. The ModelKmsKeyId can be either
2097
+ # of the following formats:
2098
+ #
2099
+ # * KMS Key ID: `"1234abcd-12ab-34cd-56ef-1234567890ab"`
2100
+ #
2101
+ # * Amazon Resource Name (ARN) of a KMS Key:
2102
+ # `"arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"`
2103
+ #
2104
+ # @option params [String] :data_access_role_arn
2105
+ # The Amazon Resource Name (ARN) of the AWS Identity and Management
2106
+ # (IAM) role that allows Amazon Comprehend to use Amazon Key Management
2107
+ # Service (KMS) to encrypt or decrypt the custom model.
2108
+ #
2109
+ # @option params [Array<Types::Tag>] :tags
2110
+ # Tags to be associated with the custom model that is created by this
2111
+ # import. A tag is a key-value pair that adds as a metadata to a
2112
+ # resource used by Amazon Comprehend. For example, a tag with "Sales"
2113
+ # as the key might be added to a resource to indicate its use by the
2114
+ # sales department.
2115
+ #
2116
+ # @return [Types::ImportModelResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
2117
+ #
2118
+ # * {Types::ImportModelResponse#model_arn #model_arn} => String
2119
+ #
2120
+ # @example Request syntax with placeholder values
2121
+ #
2122
+ # resp = client.import_model({
2123
+ # source_model_arn: "ComprehendModelArn", # required
2124
+ # model_name: "ComprehendArnName",
2125
+ # version_name: "VersionName",
2126
+ # model_kms_key_id: "KmsKeyId",
2127
+ # data_access_role_arn: "IamRoleArn",
2128
+ # tags: [
2129
+ # {
2130
+ # key: "TagKey", # required
2131
+ # value: "TagValue",
2132
+ # },
2133
+ # ],
2134
+ # })
2135
+ #
2136
+ # @example Response structure
2137
+ #
2138
+ # resp.model_arn #=> String
2139
+ #
2140
+ # @see http://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/ImportModel AWS API Documentation
2141
+ #
2142
+ # @overload import_model(params = {})
2143
+ # @param [Hash] params ({})
2144
+ def import_model(params = {}, options = {})
2145
+ req = build_request(:import_model, params)
2146
+ req.send_request(options)
2147
+ end
2148
+
1967
2149
  # Gets a list of the documentation classification jobs that you have
1968
2150
  # submitted.
1969
2151
  #
@@ -2157,6 +2339,7 @@ module Aws::Comprehend
2157
2339
  # resp.document_classifier_properties_list[0].mode #=> String, one of "MULTI_CLASS", "MULTI_LABEL"
2158
2340
  # resp.document_classifier_properties_list[0].model_kms_key_id #=> String
2159
2341
  # resp.document_classifier_properties_list[0].version_name #=> String
2342
+ # resp.document_classifier_properties_list[0].source_model_arn #=> String
2160
2343
  # resp.next_token #=> String
2161
2344
  #
2162
2345
  # @see http://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/ListDocumentClassifiers AWS API Documentation
@@ -2497,6 +2680,7 @@ module Aws::Comprehend
2497
2680
  # resp.entity_recognizer_properties_list[0].vpc_config.subnets[0] #=> String
2498
2681
  # resp.entity_recognizer_properties_list[0].model_kms_key_id #=> String
2499
2682
  # resp.entity_recognizer_properties_list[0].version_name #=> String
2683
+ # resp.entity_recognizer_properties_list[0].source_model_arn #=> String
2500
2684
  # resp.next_token #=> String
2501
2685
  #
2502
2686
  # @see http://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/ListEntityRecognizers AWS API Documentation
@@ -2884,6 +3068,60 @@ module Aws::Comprehend
2884
3068
  req.send_request(options)
2885
3069
  end
2886
3070
 
3071
+ # Attaches a resource-based policy to a custom model. You can use this
3072
+ # policy to authorize an entity in another AWS account to import the
3073
+ # custom model, which replicates it in Amazon Comprehend in their
3074
+ # account.
3075
+ #
3076
+ # @option params [required, String] :resource_arn
3077
+ # The Amazon Resource Name (ARN) of the custom model to attach the
3078
+ # policy to.
3079
+ #
3080
+ # @option params [required, String] :resource_policy
3081
+ # The JSON resource-based policy to attach to your custom model. Provide
3082
+ # your JSON as a UTF-8 encoded string without line breaks. To provide
3083
+ # valid JSON for your policy, enclose the attribute names and values in
3084
+ # double quotes. If the JSON body is also enclosed in double quotes,
3085
+ # then you must escape the double quotes that are inside the policy:
3086
+ #
3087
+ # `"\{"attribute": "value", "attribute": ["value"]\}"`
3088
+ #
3089
+ # To avoid escaping quotes, you can use single quotes to enclose the
3090
+ # policy and double quotes to enclose the JSON names and values:
3091
+ #
3092
+ # `'\{"attribute": "value", "attribute": ["value"]\}'`
3093
+ #
3094
+ # @option params [String] :policy_revision_id
3095
+ # The revision ID that Amazon Comprehend assigned to the policy that you
3096
+ # are updating. If you are creating a new policy that has no prior
3097
+ # version, don't use this parameter. Amazon Comprehend creates the
3098
+ # revision ID for you.
3099
+ #
3100
+ # @return [Types::PutResourcePolicyResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
3101
+ #
3102
+ # * {Types::PutResourcePolicyResponse#policy_revision_id #policy_revision_id} => String
3103
+ #
3104
+ # @example Request syntax with placeholder values
3105
+ #
3106
+ # resp = client.put_resource_policy({
3107
+ # resource_arn: "ComprehendModelArn", # required
3108
+ # resource_policy: "Policy", # required
3109
+ # policy_revision_id: "PolicyRevisionId",
3110
+ # })
3111
+ #
3112
+ # @example Response structure
3113
+ #
3114
+ # resp.policy_revision_id #=> String
3115
+ #
3116
+ # @see http://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/PutResourcePolicy AWS API Documentation
3117
+ #
3118
+ # @overload put_resource_policy(params = {})
3119
+ # @param [Hash] params ({})
3120
+ def put_resource_policy(params = {}, options = {})
3121
+ req = build_request(:put_resource_policy, params)
3122
+ req.send_request(options)
3123
+ end
3124
+
2887
3125
  # Starts an asynchronous document classification job. Use the operation
2888
3126
  # to track the progress of the job.
2889
3127
  #
@@ -4162,7 +4400,7 @@ module Aws::Comprehend
4162
4400
  params: params,
4163
4401
  config: config)
4164
4402
  context[:gem_name] = 'aws-sdk-comprehend'
4165
- context[:gem_version] = '1.56.0'
4403
+ context[:gem_version] = '1.57.0'
4166
4404
  Seahorse::Client::Request.new(handlers, context)
4167
4405
  end
4168
4406
 
@@ -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.57.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.57.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-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-core