aws-sdk-comprehend 1.54.0 → 1.58.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ffb1d1ac81a271d0d057d9b99eac0064c4178fd2c04bd4f7641bbbc47cd444c2
4
- data.tar.gz: e3878e19d09f445eee0c3b734f8e5b37e79972b9ba9e6cfd9074a48691dcf5ca
3
+ metadata.gz: 2ec5735718fc3eaf23440ab18f4ade3d29391eaf7fde2972ef70ec75a1049e27
4
+ data.tar.gz: b7ac60515580b749a00794be7fb5826c147f96f49cdd6a7812cf5d32fab3b7ec
5
5
  SHA512:
6
- metadata.gz: 6c69cdfdf5ac467f97842bb15639e6cc6c6da70b2ac43fcb01d535f9ce9b8c1902c2f3b678348c1d8b51d2ed44c376f9ada9940970dbf3c0d407630a7e4098f4
7
- data.tar.gz: bab7c98f800a3a1f320ee7f12b6c40b634c9bde1f8a1823b4fcc3094223f8fd80f1766f65424627b22f7bce47f9568ff84718e495b9fc5c7ef9cbf64ff514c09
6
+ metadata.gz: 9125de7a4c2674e9d2aa9ff34b4852b87d11ad1cade537946c86e68391af0a3cbf41571b6311fcded62165ed749c54273813deeac31e62ce04ac30a73fd5bb23
7
+ data.tar.gz: 189807a266da35c12358f209cc8732bbf2a6ba37de73fa01c1e0fdb2bcd6959797e1eef1a8aa7997fb1be17467cf63265122e6aafa74a4692656727ac4d949fa
data/CHANGELOG.md CHANGED
@@ -1,6 +1,26 @@
1
1
  Unreleased Changes
2
2
  ------------------
3
3
 
4
+ 1.58.0 (2022-02-03)
5
+ ------------------
6
+
7
+ * Feature - Code Generated Changes, see `./build_tools` or `aws-sdk-core`'s CHANGELOG.md for details.
8
+
9
+ 1.57.0 (2022-02-02)
10
+ ------------------
11
+
12
+ * Feature - Amazon Comprehend now supports sharing and importing custom trained models from one AWS account to another within the same region.
13
+
14
+ 1.56.0 (2021-12-21)
15
+ ------------------
16
+
17
+ * Feature - Code Generated Changes, see `./build_tools` or `aws-sdk-core`'s CHANGELOG.md for details.
18
+
19
+ 1.55.0 (2021-11-30)
20
+ ------------------
21
+
22
+ * Feature - Code Generated Changes, see `./build_tools` or `aws-sdk-core`'s CHANGELOG.md for details.
23
+
4
24
  1.54.0 (2021-11-04)
5
25
  ------------------
6
26
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.54.0
1
+ 1.58.0
@@ -27,6 +27,8 @@ 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/defaults_mode.rb'
31
+ require 'aws-sdk-core/plugins/recursion_detection.rb'
30
32
  require 'aws-sdk-core/plugins/signature_v4.rb'
31
33
  require 'aws-sdk-core/plugins/protocols/json_rpc.rb'
32
34
 
@@ -73,6 +75,8 @@ module Aws::Comprehend
73
75
  add_plugin(Aws::Plugins::ClientMetricsSendPlugin)
74
76
  add_plugin(Aws::Plugins::TransferEncoding)
75
77
  add_plugin(Aws::Plugins::HttpChecksum)
78
+ add_plugin(Aws::Plugins::DefaultsMode)
79
+ add_plugin(Aws::Plugins::RecursionDetection)
76
80
  add_plugin(Aws::Plugins::SignatureV4)
77
81
  add_plugin(Aws::Plugins::Protocols::JsonRpc)
78
82
 
@@ -119,7 +123,9 @@ module Aws::Comprehend
119
123
  # * EC2/ECS IMDS instance profile - When used by default, the timeouts
120
124
  # are very aggressive. Construct and pass an instance of
121
125
  # `Aws::InstanceProfileCredentails` or `Aws::ECSCredentials` to
122
- # enable retries and extended timeouts.
126
+ # enable retries and extended timeouts. Instance profile credential
127
+ # fetching can be disabled by setting ENV['AWS_EC2_METADATA_DISABLED']
128
+ # to true.
123
129
  #
124
130
  # @option options [required, String] :region
125
131
  # The AWS region to connect to. The configured `:region` is
@@ -173,6 +179,10 @@ module Aws::Comprehend
173
179
  # Used only in `standard` and adaptive retry modes. Specifies whether to apply
174
180
  # a clock skew correction and retry requests with skewed client clocks.
175
181
  #
182
+ # @option options [String] :defaults_mode ("legacy")
183
+ # See {Aws::DefaultsModeConfiguration} for a list of the
184
+ # accepted modes and the configuration defaults that are included.
185
+ #
176
186
  # @option options [Boolean] :disable_host_prefix_injection (false)
177
187
  # Set to true to disable SDK automatically adding host prefix
178
188
  # to default service endpoint when available.
@@ -305,7 +315,7 @@ module Aws::Comprehend
305
315
  # seconds to wait when opening a HTTP session before raising a
306
316
  # `Timeout::Error`.
307
317
  #
308
- # @option options [Integer] :http_read_timeout (60) The default
318
+ # @option options [Float] :http_read_timeout (60) The default
309
319
  # number of seconds to wait for response data. This value can
310
320
  # safely be set per-request on the session.
311
321
  #
@@ -321,6 +331,9 @@ module Aws::Comprehend
321
331
  # disables this behaviour. This value can safely be set per
322
332
  # request on the session.
323
333
  #
334
+ # @option options [Float] :ssl_timeout (nil) Sets the SSL timeout
335
+ # in seconds.
336
+ #
324
337
  # @option options [Boolean] :http_wire_trace (false) When `true`,
325
338
  # HTTP debug output will be sent to the `:logger`.
326
339
  #
@@ -754,6 +767,24 @@ module Aws::Comprehend
754
767
  # * Amazon Resource Name (ARN) of a KMS Key:
755
768
  # `"arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"`
756
769
  #
770
+ # @option params [String] :model_policy
771
+ # The resource-based policy to attach to your custom document classifier
772
+ # model. You can use this policy to allow another AWS account to import
773
+ # your custom model.
774
+ #
775
+ # Provide your policy as a JSON body that you enter as a UTF-8 encoded
776
+ # string without line breaks. To provide valid JSON, enclose the
777
+ # attribute names and values in double quotes. If the JSON body is also
778
+ # enclosed in double quotes, then you must escape the double quotes that
779
+ # are inside the policy:
780
+ #
781
+ # `"\{"attribute": "value", "attribute": ["value"]\}"`
782
+ #
783
+ # To avoid escaping quotes, you can use single quotes to enclose the
784
+ # policy and double quotes to enclose the JSON names and values:
785
+ #
786
+ # `'\{"attribute": "value", "attribute": ["value"]\}'`
787
+ #
757
788
  # @return [Types::CreateDocumentClassifierResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
758
789
  #
759
790
  # * {Types::CreateDocumentClassifierResponse#document_classifier_arn #document_classifier_arn} => String
@@ -799,6 +830,7 @@ module Aws::Comprehend
799
830
  # },
800
831
  # mode: "MULTI_CLASS", # accepts MULTI_CLASS, MULTI_LABEL
801
832
  # model_kms_key_id: "KmsKeyId",
833
+ # model_policy: "Policy",
802
834
  # })
803
835
  #
804
836
  # @example Response structure
@@ -959,6 +991,24 @@ module Aws::Comprehend
959
991
  # * Amazon Resource Name (ARN) of a KMS Key:
960
992
  # `"arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"`
961
993
  #
994
+ # @option params [String] :model_policy
995
+ # The JSON resource-based policy to attach to your custom entity
996
+ # recognizer model. You can use this policy to allow another AWS account
997
+ # to import your custom model.
998
+ #
999
+ # Provide your JSON as a UTF-8 encoded string without line breaks. To
1000
+ # provide valid JSON for your policy, enclose the attribute names and
1001
+ # values in double quotes. If the JSON body is also enclosed in double
1002
+ # quotes, then you must escape the double quotes that are inside the
1003
+ # policy:
1004
+ #
1005
+ # `"\{"attribute": "value", "attribute": ["value"]\}"`
1006
+ #
1007
+ # To avoid escaping quotes, you can use single quotes to enclose the
1008
+ # policy and double quotes to enclose the JSON names and values:
1009
+ #
1010
+ # `'\{"attribute": "value", "attribute": ["value"]\}'`
1011
+ #
962
1012
  # @return [Types::CreateEntityRecognizerResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
963
1013
  #
964
1014
  # * {Types::CreateEntityRecognizerResponse#entity_recognizer_arn #entity_recognizer_arn} => String
@@ -1013,6 +1063,7 @@ module Aws::Comprehend
1013
1063
  # subnets: ["SubnetId"], # required
1014
1064
  # },
1015
1065
  # model_kms_key_id: "KmsKeyId",
1066
+ # model_policy: "Policy",
1016
1067
  # })
1017
1068
  #
1018
1069
  # @example Response structure
@@ -1115,6 +1166,33 @@ module Aws::Comprehend
1115
1166
  req.send_request(options)
1116
1167
  end
1117
1168
 
1169
+ # Deletes a resource-based policy that is attached to a custom model.
1170
+ #
1171
+ # @option params [required, String] :resource_arn
1172
+ # The Amazon Resource Name (ARN) of the custom model version that has
1173
+ # the policy to delete.
1174
+ #
1175
+ # @option params [String] :policy_revision_id
1176
+ # The revision ID of the policy to delete.
1177
+ #
1178
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
1179
+ #
1180
+ # @example Request syntax with placeholder values
1181
+ #
1182
+ # resp = client.delete_resource_policy({
1183
+ # resource_arn: "ComprehendModelArn", # required
1184
+ # policy_revision_id: "PolicyRevisionId",
1185
+ # })
1186
+ #
1187
+ # @see http://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DeleteResourcePolicy AWS API Documentation
1188
+ #
1189
+ # @overload delete_resource_policy(params = {})
1190
+ # @param [Hash] params ({})
1191
+ def delete_resource_policy(params = {}, options = {})
1192
+ req = build_request(:delete_resource_policy, params)
1193
+ req.send_request(options)
1194
+ end
1195
+
1118
1196
  # Gets the properties associated with a document classification job. Use
1119
1197
  # this operation to get the status of a classification job.
1120
1198
  #
@@ -1226,6 +1304,7 @@ module Aws::Comprehend
1226
1304
  # resp.document_classifier_properties.mode #=> String, one of "MULTI_CLASS", "MULTI_LABEL"
1227
1305
  # resp.document_classifier_properties.model_kms_key_id #=> String
1228
1306
  # resp.document_classifier_properties.version_name #=> String
1307
+ # resp.document_classifier_properties.source_model_arn #=> String
1229
1308
  #
1230
1309
  # @see http://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DescribeDocumentClassifier AWS API Documentation
1231
1310
  #
@@ -1440,6 +1519,7 @@ module Aws::Comprehend
1440
1519
  # resp.entity_recognizer_properties.vpc_config.subnets[0] #=> String
1441
1520
  # resp.entity_recognizer_properties.model_kms_key_id #=> String
1442
1521
  # resp.entity_recognizer_properties.version_name #=> String
1522
+ # resp.entity_recognizer_properties.source_model_arn #=> String
1443
1523
  #
1444
1524
  # @see http://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DescribeEntityRecognizer AWS API Documentation
1445
1525
  #
@@ -1598,6 +1678,41 @@ module Aws::Comprehend
1598
1678
  req.send_request(options)
1599
1679
  end
1600
1680
 
1681
+ # Gets the details of a resource-based policy that is attached to a
1682
+ # custom model, including the JSON body of the policy.
1683
+ #
1684
+ # @option params [required, String] :resource_arn
1685
+ # The Amazon Resource Name (ARN) of the policy to describe.
1686
+ #
1687
+ # @return [Types::DescribeResourcePolicyResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1688
+ #
1689
+ # * {Types::DescribeResourcePolicyResponse#resource_policy #resource_policy} => String
1690
+ # * {Types::DescribeResourcePolicyResponse#creation_time #creation_time} => Time
1691
+ # * {Types::DescribeResourcePolicyResponse#last_modified_time #last_modified_time} => Time
1692
+ # * {Types::DescribeResourcePolicyResponse#policy_revision_id #policy_revision_id} => String
1693
+ #
1694
+ # @example Request syntax with placeholder values
1695
+ #
1696
+ # resp = client.describe_resource_policy({
1697
+ # resource_arn: "ComprehendModelArn", # required
1698
+ # })
1699
+ #
1700
+ # @example Response structure
1701
+ #
1702
+ # resp.resource_policy #=> String
1703
+ # resp.creation_time #=> Time
1704
+ # resp.last_modified_time #=> Time
1705
+ # resp.policy_revision_id #=> String
1706
+ #
1707
+ # @see http://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/DescribeResourcePolicy AWS API Documentation
1708
+ #
1709
+ # @overload describe_resource_policy(params = {})
1710
+ # @param [Hash] params ({})
1711
+ def describe_resource_policy(params = {}, options = {})
1712
+ req = build_request(:describe_resource_policy, params)
1713
+ req.send_request(options)
1714
+ end
1715
+
1601
1716
  # Gets the properties associated with a sentiment detection job. Use
1602
1717
  # this operation to get the status of a detection job.
1603
1718
  #
@@ -1953,6 +2068,86 @@ module Aws::Comprehend
1953
2068
  req.send_request(options)
1954
2069
  end
1955
2070
 
2071
+ # Creates a new custom model that replicates a source custom model that
2072
+ # you import. The source model can be in your AWS account or another
2073
+ # one.
2074
+ #
2075
+ # If the source model is in another AWS account, then it must have a
2076
+ # resource-based policy that authorizes you to import it.
2077
+ #
2078
+ # The source model must be in the same AWS region that you're using
2079
+ # when you import. You can't import a model that's in a different
2080
+ # region.
2081
+ #
2082
+ # @option params [required, String] :source_model_arn
2083
+ # The Amazon Resource Name (ARN) of the custom model to import.
2084
+ #
2085
+ # @option params [String] :model_name
2086
+ # The name to assign to the custom model that is created in Amazon
2087
+ # Comprehend by this import.
2088
+ #
2089
+ # @option params [String] :version_name
2090
+ # The version name given to the custom model that is created by this
2091
+ # import. Version names can have a maximum of 256 characters.
2092
+ # Alphanumeric characters, hyphens (-) and underscores (\_) are allowed.
2093
+ # The version name must be unique among all models with the same
2094
+ # classifier name in the account/AWS Region.
2095
+ #
2096
+ # @option params [String] :model_kms_key_id
2097
+ # ID for the AWS Key Management Service (KMS) key that Amazon Comprehend
2098
+ # uses to encrypt trained custom models. The ModelKmsKeyId can be either
2099
+ # of the following formats:
2100
+ #
2101
+ # * KMS Key ID: `"1234abcd-12ab-34cd-56ef-1234567890ab"`
2102
+ #
2103
+ # * Amazon Resource Name (ARN) of a KMS Key:
2104
+ # `"arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"`
2105
+ #
2106
+ # @option params [String] :data_access_role_arn
2107
+ # The Amazon Resource Name (ARN) of the AWS Identity and Management
2108
+ # (IAM) role that allows Amazon Comprehend to use Amazon Key Management
2109
+ # Service (KMS) to encrypt or decrypt the custom model.
2110
+ #
2111
+ # @option params [Array<Types::Tag>] :tags
2112
+ # Tags to be associated with the custom model that is created by this
2113
+ # import. A tag is a key-value pair that adds as a metadata to a
2114
+ # resource used by Amazon Comprehend. For example, a tag with "Sales"
2115
+ # as the key might be added to a resource to indicate its use by the
2116
+ # sales department.
2117
+ #
2118
+ # @return [Types::ImportModelResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
2119
+ #
2120
+ # * {Types::ImportModelResponse#model_arn #model_arn} => String
2121
+ #
2122
+ # @example Request syntax with placeholder values
2123
+ #
2124
+ # resp = client.import_model({
2125
+ # source_model_arn: "ComprehendModelArn", # required
2126
+ # model_name: "ComprehendArnName",
2127
+ # version_name: "VersionName",
2128
+ # model_kms_key_id: "KmsKeyId",
2129
+ # data_access_role_arn: "IamRoleArn",
2130
+ # tags: [
2131
+ # {
2132
+ # key: "TagKey", # required
2133
+ # value: "TagValue",
2134
+ # },
2135
+ # ],
2136
+ # })
2137
+ #
2138
+ # @example Response structure
2139
+ #
2140
+ # resp.model_arn #=> String
2141
+ #
2142
+ # @see http://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/ImportModel AWS API Documentation
2143
+ #
2144
+ # @overload import_model(params = {})
2145
+ # @param [Hash] params ({})
2146
+ def import_model(params = {}, options = {})
2147
+ req = build_request(:import_model, params)
2148
+ req.send_request(options)
2149
+ end
2150
+
1956
2151
  # Gets a list of the documentation classification jobs that you have
1957
2152
  # submitted.
1958
2153
  #
@@ -2146,6 +2341,7 @@ module Aws::Comprehend
2146
2341
  # resp.document_classifier_properties_list[0].mode #=> String, one of "MULTI_CLASS", "MULTI_LABEL"
2147
2342
  # resp.document_classifier_properties_list[0].model_kms_key_id #=> String
2148
2343
  # resp.document_classifier_properties_list[0].version_name #=> String
2344
+ # resp.document_classifier_properties_list[0].source_model_arn #=> String
2149
2345
  # resp.next_token #=> String
2150
2346
  #
2151
2347
  # @see http://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/ListDocumentClassifiers AWS API Documentation
@@ -2486,6 +2682,7 @@ module Aws::Comprehend
2486
2682
  # resp.entity_recognizer_properties_list[0].vpc_config.subnets[0] #=> String
2487
2683
  # resp.entity_recognizer_properties_list[0].model_kms_key_id #=> String
2488
2684
  # resp.entity_recognizer_properties_list[0].version_name #=> String
2685
+ # resp.entity_recognizer_properties_list[0].source_model_arn #=> String
2489
2686
  # resp.next_token #=> String
2490
2687
  #
2491
2688
  # @see http://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/ListEntityRecognizers AWS API Documentation
@@ -2873,6 +3070,60 @@ module Aws::Comprehend
2873
3070
  req.send_request(options)
2874
3071
  end
2875
3072
 
3073
+ # Attaches a resource-based policy to a custom model. You can use this
3074
+ # policy to authorize an entity in another AWS account to import the
3075
+ # custom model, which replicates it in Amazon Comprehend in their
3076
+ # account.
3077
+ #
3078
+ # @option params [required, String] :resource_arn
3079
+ # The Amazon Resource Name (ARN) of the custom model to attach the
3080
+ # policy to.
3081
+ #
3082
+ # @option params [required, String] :resource_policy
3083
+ # The JSON resource-based policy to attach to your custom model. Provide
3084
+ # your JSON as a UTF-8 encoded string without line breaks. To provide
3085
+ # valid JSON for your policy, enclose the attribute names and values in
3086
+ # double quotes. If the JSON body is also enclosed in double quotes,
3087
+ # then you must escape the double quotes that are inside the policy:
3088
+ #
3089
+ # `"\{"attribute": "value", "attribute": ["value"]\}"`
3090
+ #
3091
+ # To avoid escaping quotes, you can use single quotes to enclose the
3092
+ # policy and double quotes to enclose the JSON names and values:
3093
+ #
3094
+ # `'\{"attribute": "value", "attribute": ["value"]\}'`
3095
+ #
3096
+ # @option params [String] :policy_revision_id
3097
+ # The revision ID that Amazon Comprehend assigned to the policy that you
3098
+ # are updating. If you are creating a new policy that has no prior
3099
+ # version, don't use this parameter. Amazon Comprehend creates the
3100
+ # revision ID for you.
3101
+ #
3102
+ # @return [Types::PutResourcePolicyResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
3103
+ #
3104
+ # * {Types::PutResourcePolicyResponse#policy_revision_id #policy_revision_id} => String
3105
+ #
3106
+ # @example Request syntax with placeholder values
3107
+ #
3108
+ # resp = client.put_resource_policy({
3109
+ # resource_arn: "ComprehendModelArn", # required
3110
+ # resource_policy: "Policy", # required
3111
+ # policy_revision_id: "PolicyRevisionId",
3112
+ # })
3113
+ #
3114
+ # @example Response structure
3115
+ #
3116
+ # resp.policy_revision_id #=> String
3117
+ #
3118
+ # @see http://docs.aws.amazon.com/goto/WebAPI/comprehend-2017-11-27/PutResourcePolicy AWS API Documentation
3119
+ #
3120
+ # @overload put_resource_policy(params = {})
3121
+ # @param [Hash] params ({})
3122
+ def put_resource_policy(params = {}, options = {})
3123
+ req = build_request(:put_resource_policy, params)
3124
+ req.send_request(options)
3125
+ end
3126
+
2876
3127
  # Starts an asynchronous document classification job. Use the operation
2877
3128
  # to track the progress of the job.
2878
3129
  #
@@ -4151,7 +4402,7 @@ module Aws::Comprehend
4151
4402
  params: params,
4152
4403
  config: config)
4153
4404
  context[:gem_name] = 'aws-sdk-comprehend'
4154
- context[:gem_version] = '1.54.0'
4405
+ context[:gem_version] = '1.58.0'
4155
4406
  Seahorse::Client::Request.new(handlers, context)
4156
4407
  end
4157
4408
 
@@ -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.54.0'
51
+ GEM_VERSION = '1.58.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.54.0
4
+ version: 1.58.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-11-04 00:00:00.000000000 Z
11
+ date: 2022-02-03 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.122.0
22
+ version: 3.126.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.122.0
32
+ version: 3.126.0
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: aws-sigv4
35
35
  requirement: !ruby/object:Gem::Requirement