Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

comprehend Update models to latest #2787

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2010-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.
* Copyright 2010-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
Expand Down Expand Up @@ -471,6 +471,30 @@ DeleteEntityRecognizerResult deleteEntityRecognizer(
DeleteEntityRecognizerRequest deleteEntityRecognizerRequest)
throws AmazonClientException, AmazonServiceException;

/**
* <p>
* Deletes a resource-based policy that is attached to a custom model.
* </p>
*
* @param deleteResourcePolicyRequest
* @return deleteResourcePolicyResult The response from the
* DeleteResourcePolicy service method, as returned by Amazon
* Comprehend.
* @throws InvalidRequestException
* @throws ResourceNotFoundException
* @throws InternalServerException
* @throws AmazonClientException If any internal errors are encountered
* inside the client while attempting to make the request or
* handle the response. For example if a network connection is
* not available.
* @throws AmazonServiceException If an error response is returned by Amazon
* Comprehend indicating either a problem with the data in the
* request, or a server side issue.
*/
DeleteResourcePolicyResult deleteResourcePolicy(
DeleteResourcePolicyRequest deleteResourcePolicyRequest) throws AmazonClientException,
AmazonServiceException;

/**
* <p>
* Gets the properties associated with a document classification job. Use
Expand Down Expand Up @@ -701,6 +725,31 @@ DescribePiiEntitiesDetectionJobResult describePiiEntitiesDetectionJob(
DescribePiiEntitiesDetectionJobRequest describePiiEntitiesDetectionJobRequest)
throws AmazonClientException, AmazonServiceException;

/**
* <p>
* Gets the details of a resource-based policy that is attached to a custom
* model, including the JSON body of the policy.
* </p>
*
* @param describeResourcePolicyRequest
* @return describeResourcePolicyResult The response from the
* DescribeResourcePolicy service method, as returned by Amazon
* Comprehend.
* @throws InvalidRequestException
* @throws ResourceNotFoundException
* @throws InternalServerException
* @throws AmazonClientException If any internal errors are encountered
* inside the client while attempting to make the request or
* handle the response. For example if a network connection is
* not available.
* @throws AmazonServiceException If an error response is returned by Amazon
* Comprehend indicating either a problem with the data in the
* request, or a server side issue.
*/
DescribeResourcePolicyResult describeResourcePolicy(
DescribeResourcePolicyRequest describeResourcePolicyRequest)
throws AmazonClientException, AmazonServiceException;

/**
* <p>
* Gets the properties associated with a sentiment detection job. Use this
Expand Down Expand Up @@ -901,6 +950,43 @@ DetectSentimentResult detectSentiment(DetectSentimentRequest detectSentimentRequ
DetectSyntaxResult detectSyntax(DetectSyntaxRequest detectSyntaxRequest)
throws AmazonClientException, AmazonServiceException;

/**
* <p>
* Creates a new custom model that replicates a source custom model that you
* import. The source model can be in your AWS account or another one.
* </p>
* <p>
* If the source model is in another AWS account, then it must have a
* resource-based policy that authorizes you to import it.
* </p>
* <p>
* The source model must be in the same AWS region that you're using when
* you import. You can't import a model that's in a different region.
* </p>
*
* @param importModelRequest
* @return importModelResult The response from the ImportModel service
* method, as returned by Amazon Comprehend.
* @throws InvalidRequestException
* @throws ResourceNotFoundException
* @throws ResourceInUseException
* @throws ResourceUnavailableException
* @throws TooManyTagsException
* @throws TooManyRequestsException
* @throws ResourceLimitExceededException
* @throws KmsKeyValidationException
* @throws InternalServerException
* @throws AmazonClientException If any internal errors are encountered
* inside the client while attempting to make the request or
* handle the response. For example if a network connection is
* not available.
* @throws AmazonServiceException If an error response is returned by Amazon
* Comprehend indicating either a problem with the data in the
* request, or a server side issue.
*/
ImportModelResult importModel(ImportModelRequest importModelRequest)
throws AmazonClientException, AmazonServiceException;

/**
* <p>
* Gets a list of the documentation classification jobs that you have
Expand Down Expand Up @@ -1257,6 +1343,30 @@ ListTopicsDetectionJobsResult listTopicsDetectionJobs(
ListTopicsDetectionJobsRequest listTopicsDetectionJobsRequest)
throws AmazonClientException, AmazonServiceException;

/**
* <p>
* Attaches a resource-based policy to a custom model. You can use this
* policy to authorize an entity in another AWS account to import the custom
* model, which replicates it in Amazon Comprehend in their account.
* </p>
*
* @param putResourcePolicyRequest
* @return putResourcePolicyResult The response from the PutResourcePolicy
* service method, as returned by Amazon Comprehend.
* @throws InvalidRequestException
* @throws ResourceNotFoundException
* @throws InternalServerException
* @throws AmazonClientException If any internal errors are encountered
* inside the client while attempting to make the request or
* handle the response. For example if a network connection is
* not available.
* @throws AmazonServiceException If an error response is returned by Amazon
* Comprehend indicating either a problem with the data in the
* request, or a server side issue.
*/
PutResourcePolicyResult putResourcePolicy(PutResourcePolicyRequest putResourcePolicyRequest)
throws AmazonClientException, AmazonServiceException;

/**
* <p>
* Starts an asynchronous document classification job. Use the operation to
Expand Down
Loading