Skip to content

Commit

Permalink
feat(client-comprehend): Comprehend releases 14 new entity types for …
Browse files Browse the repository at this point in the history
…DetectPiiEntities and ContainsPiiEntities APIs.
  • Loading branch information
awstools committed May 20, 2022
1 parent 1a509b1 commit 598f334
Show file tree
Hide file tree
Showing 10 changed files with 135 additions and 51 deletions.
19 changes: 12 additions & 7 deletions clients/client-comprehend/src/Comprehend.ts
Original file line number Diff line number Diff line change
Expand Up @@ -628,7 +628,8 @@ export class Comprehend extends ComprehendClient {

/**
* <p>Creates a model-specific endpoint for synchronous inference for a previously trained
* custom model </p>
* custom model
* For information about endpoints, see <a href="https://docs.aws.amazon.com/comprehend/latest/dg/manage-endpoints.html">Managing endpoints</a>.</p>
*/
public createEndpoint(
args: CreateEndpointCommandInput,
Expand Down Expand Up @@ -733,7 +734,8 @@ export class Comprehend extends ComprehendClient {

/**
* <p>Deletes a model-specific endpoint for a previously-trained custom model. All endpoints
* must be deleted in order for the model to be deleted.</p>
* must be deleted in order for the model to be deleted.
* For information about endpoints, see <a href="https://docs.aws.amazon.com/comprehend/latest/dg/manage-endpoints.html">Managing endpoints</a>.</p>
*/
public deleteEndpoint(
args: DeleteEndpointCommandInput,
Expand Down Expand Up @@ -934,7 +936,8 @@ export class Comprehend extends ComprehendClient {

/**
* <p>Gets the properties associated with a specific endpoint. Use this operation to get the
* status of an endpoint.</p>
* status of an endpoint.
* For information about endpoints, see <a href="https://docs.aws.amazon.com/comprehend/latest/dg/manage-endpoints.html">Managing endpoints</a>.</p>
*/
public describeEndpoint(
args: DescribeEndpointCommandInput,
Expand Down Expand Up @@ -1617,7 +1620,8 @@ export class Comprehend extends ComprehendClient {
}

/**
* <p>Gets a list of all existing endpoints that you've created.</p>
* <p>Gets a list of all existing endpoints that you've created.
* For information about endpoints, see <a href="https://docs.aws.amazon.com/comprehend/latest/dg/manage-endpoints.html">Managing endpoints</a>.</p>
*/
public listEndpoints(
args: ListEndpointsCommandInput,
Expand Down Expand Up @@ -2498,7 +2502,7 @@ export class Comprehend extends ComprehendClient {

/**
* <p>Stops a sentiment detection job in progress.</p>
* <p>If the job state is <code>IN_PROGRESS</code> the job is marked for termination and put
* <p>If the job state is <code>IN_PROGRESS</code>, the job is marked for termination and put
* into the <code>STOP_REQUESTED</code> state. If the job completes before it can be stopped, it
* is put into the <code>COMPLETED</code> state; otherwise the job is be stopped and put into the
* <code>STOPPED</code> state.</p>
Expand Down Expand Up @@ -2539,7 +2543,7 @@ export class Comprehend extends ComprehendClient {

/**
* <p>Stops a targeted sentiment detection job in progress.</p>
* <p>If the job state is <code>IN_PROGRESS</code> the job is marked for termination and put
* <p>If the job state is <code>IN_PROGRESS</code>, the job is marked for termination and put
* into the <code>STOP_REQUESTED</code> state. If the job completes before it can be stopped, it
* is put into the <code>COMPLETED</code> state; otherwise the job is be stopped and put into the
* <code>STOPPED</code> state.</p>
Expand Down Expand Up @@ -2714,7 +2718,8 @@ export class Comprehend extends ComprehendClient {
}

/**
* <p>Updates information about the specified endpoint.</p>
* <p>Updates information about the specified endpoint.
* For information about endpoints, see <a href="https://docs.aws.amazon.com/comprehend/latest/dg/manage-endpoints.html">Managing endpoints</a>.</p>
*/
public updateEndpoint(
args: UpdateEndpointCommandInput,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ export interface CreateEndpointCommandOutput extends CreateEndpointResponse, __M

/**
* <p>Creates a model-specific endpoint for synchronous inference for a previously trained
* custom model </p>
* custom model
* For information about endpoints, see <a href="https://docs.aws.amazon.com/comprehend/latest/dg/manage-endpoints.html">Managing endpoints</a>.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ export interface DeleteEndpointCommandOutput extends DeleteEndpointResponse, __M

/**
* <p>Deletes a model-specific endpoint for a previously-trained custom model. All endpoints
* must be deleted in order for the model to be deleted.</p>
* must be deleted in order for the model to be deleted.
* For information about endpoints, see <a href="https://docs.aws.amazon.com/comprehend/latest/dg/manage-endpoints.html">Managing endpoints</a>.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ export interface DescribeEndpointCommandOutput extends DescribeEndpointResponse,

/**
* <p>Gets the properties associated with a specific endpoint. Use this operation to get the
* status of an endpoint.</p>
* status of an endpoint.
* For information about endpoints, see <a href="https://docs.aws.amazon.com/comprehend/latest/dg/manage-endpoints.html">Managing endpoints</a>.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ export interface ListEndpointsCommandInput extends ListEndpointsRequest {}
export interface ListEndpointsCommandOutput extends ListEndpointsResponse, __MetadataBearer {}

/**
* <p>Gets a list of all existing endpoints that you've created.</p>
* <p>Gets a list of all existing endpoints that you've created.
* For information about endpoints, see <a href="https://docs.aws.amazon.com/comprehend/latest/dg/manage-endpoints.html">Managing endpoints</a>.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export interface StopSentimentDetectionJobCommandOutput extends StopSentimentDet

/**
* <p>Stops a sentiment detection job in progress.</p>
* <p>If the job state is <code>IN_PROGRESS</code> the job is marked for termination and put
* <p>If the job state is <code>IN_PROGRESS</code>, the job is marked for termination and put
* into the <code>STOP_REQUESTED</code> state. If the job completes before it can be stopped, it
* is put into the <code>COMPLETED</code> state; otherwise the job is be stopped and put into the
* <code>STOPPED</code> state.</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export interface StopTargetedSentimentDetectionJobCommandOutput

/**
* <p>Stops a targeted sentiment detection job in progress.</p>
* <p>If the job state is <code>IN_PROGRESS</code> the job is marked for termination and put
* <p>If the job state is <code>IN_PROGRESS</code>, the job is marked for termination and put
* into the <code>STOP_REQUESTED</code> state. If the job completes before it can be stopped, it
* is put into the <code>COMPLETED</code> state; otherwise the job is be stopped and put into the
* <code>STOPPED</code> state.</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ export interface UpdateEndpointCommandInput extends UpdateEndpointRequest {}
export interface UpdateEndpointCommandOutput extends UpdateEndpointResponse, __MetadataBearer {}

/**
* <p>Updates information about the specified endpoint.</p>
* <p>Updates information about the specified endpoint.
* For information about endpoints, see <a href="https://docs.aws.amazon.com/comprehend/latest/dg/manage-endpoints.html">Managing endpoints</a>.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
45 changes: 30 additions & 15 deletions clients/client-comprehend/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ export class UnsupportedLanguageException extends __BaseException {
export interface BatchDetectKeyPhrasesRequest {
/**
* <p>A list containing the text of the input documents. The list can contain a maximum of 25
* documents. Each document must contain fewer that 5,000 bytes of UTF-8 encoded
* documents. Each document must contain fewer than 5,000 bytes of UTF-8 encoded
* characters.</p>
*/
TextList: string[] | undefined;
Expand Down Expand Up @@ -1028,7 +1028,7 @@ export interface ClassifyDocumentRequest {
Text: string | undefined;

/**
* <p>The Amazon Resource Number (ARN) of the endpoint.</p>
* <p>The Amazon Resource Number (ARN) of the endpoint. For information about endpoints, see <a href="https://docs.aws.amazon.com/comprehend/latest/dg/manage-endpoints.html">Managing endpoints</a>.</p>
*/
EndpointArn: string | undefined;
}
Expand Down Expand Up @@ -1148,7 +1148,7 @@ export interface ContainsPiiEntitiesRequest {
Text: string | undefined;

/**
* <p>The language of the input documents.</p>
* <p>The language of the input documents. Currently, English is the only valid language.</p>
*/
LanguageCode: LanguageCode | string | undefined;
}
Expand All @@ -1170,22 +1170,36 @@ export enum PiiEntityType {
AWS_SECRET_KEY = "AWS_SECRET_KEY",
BANK_ACCOUNT_NUMBER = "BANK_ACCOUNT_NUMBER",
BANK_ROUTING = "BANK_ROUTING",
CA_HEALTH_NUMBER = "CA_HEALTH_NUMBER",
CA_SOCIAL_INSURANCE_NUMBER = "CA_SOCIAL_INSURANCE_NUMBER",
CREDIT_DEBIT_CVV = "CREDIT_DEBIT_CVV",
CREDIT_DEBIT_EXPIRY = "CREDIT_DEBIT_EXPIRY",
CREDIT_DEBIT_NUMBER = "CREDIT_DEBIT_NUMBER",
DATE_TIME = "DATE_TIME",
DRIVER_ID = "DRIVER_ID",
EMAIL = "EMAIL",
INTERNATIONAL_BANK_ACCOUNT_NUMBER = "INTERNATIONAL_BANK_ACCOUNT_NUMBER",
IN_AADHAAR = "IN_AADHAAR",
IN_NREGA = "IN_NREGA",
IN_PERMANENT_ACCOUNT_NUMBER = "IN_PERMANENT_ACCOUNT_NUMBER",
IN_VOTER_NUMBER = "IN_VOTER_NUMBER",
IP_ADDRESS = "IP_ADDRESS",
LICENSE_PLATE = "LICENSE_PLATE",
MAC_ADDRESS = "MAC_ADDRESS",
NAME = "NAME",
PASSPORT_NUMBER = "PASSPORT_NUMBER",
PASSWORD = "PASSWORD",
PHONE = "PHONE",
PIN = "PIN",
SSN = "SSN",
SWIFT_CODE = "SWIFT_CODE",
UK_NATIONAL_HEALTH_SERVICE_NUMBER = "UK_NATIONAL_HEALTH_SERVICE_NUMBER",
UK_NATIONAL_INSURANCE_NUMBER = "UK_NATIONAL_INSURANCE_NUMBER",
UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER = "UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER",
URL = "URL",
USERNAME = "USERNAME",
US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER = "US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER",
VEHICLE_IDENTIFICATION_NUMBER = "VEHICLE_IDENTIFICATION_NUMBER",
}

/**
Expand Down Expand Up @@ -1238,7 +1252,7 @@ export enum DocumentClassifierDataFormat {

/**
* <p>The input properties for training a document classifier. </p>
* <p>For more information on how the input file is formatted, see <a>how-document-classification-training-data</a>. </p>
* <p>For more information on how the input file is formatted, see <a>prep-classifier-data</a>. </p>
*/
export interface DocumentClassifierInputDataConfig {
/**
Expand Down Expand Up @@ -2048,7 +2062,7 @@ export interface CreateEntityRecognizerRequest {
/**
* <p>Configuration parameters for an optional private Virtual Private Cloud (VPC) containing
* the resources you are using for your custom entity recognizer. For more information, see
* <a href="https://docs.aws.amazon.com/vpc/latest/userguide/what-is-amazon-vpc.html">Amazon
* <a href="https://docs.aws.amazon.com/vpc/latest/userguide/what-is-amazon-vpc.html">Amazon
* VPC</a>. </p>
*/
VpcConfig?: VpcConfig;
Expand Down Expand Up @@ -2522,7 +2536,7 @@ export interface DocumentClassificationJobProperties {

/**
* <p> Configuration parameters for a private Virtual Private Cloud (VPC) containing the
* resources you are using for your document classification job. For more information, see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/what-is-amazon-vpc.html">Amazon
* resources you are using for your document classification job. For more information, see <a href="https://docs.aws.amazon.com/vppc/latest/userguide/what-is-amazon-vpc.html">Amazon
* VPC</a>. </p>
*/
VpcConfig?: VpcConfig;
Expand Down Expand Up @@ -2696,7 +2710,7 @@ export interface DocumentClassifierProperties {

/**
* <p> Configuration parameters for a private Virtual Private Cloud (VPC) containing the
* resources you are using for your custom classifier. For more information, see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/what-is-amazon-vpc.html">Amazon
* resources you are using for your custom classifier. For more information, see <a href="https://docs.aws.amazon.com/vppc/latest/userguide/what-is-amazon-vpc.html">Amazon
* VPC</a>. </p>
*/
VpcConfig?: VpcConfig;
Expand Down Expand Up @@ -2871,7 +2885,7 @@ export interface DominantLanguageDetectionJobProperties {
/**
* <p> Configuration parameters for a private Virtual Private Cloud (VPC) containing the
* resources you are using for your dominant language detection job. For more information, see
* <a href="https://docs.aws.amazon.com/vpc/latest/userguide/what-is-amazon-vpc.html">Amazon
* <a href="https://docs.aws.amazon.com/vpc/latest/userguide/what-is-amazon-vpc.html">Amazon
* VPC</a>. </p>
*/
VpcConfig?: VpcConfig;
Expand Down Expand Up @@ -2928,7 +2942,8 @@ export enum EndpointStatus {
}

/**
* <p>Specifies information about the specified endpoint.</p>
* <p>Specifies information about the specified endpoint.
* For information about endpoints, see <a href="https://docs.aws.amazon.com/comprehend/latest/dg/manage-endpoints.html">Managing endpoints</a>.</p>
*/
export interface EndpointProperties {
/**
Expand Down Expand Up @@ -4450,6 +4465,7 @@ export interface DetectEntitiesRequest {
* model instead of the default model that is used by Amazon Comprehend.</p>
* <p>If you specify an endpoint, Amazon Comprehend uses the language of your custom model, and
* it ignores any language code that you provide in your request.</p>
* <p>For information about endpoints, see <a href="https://docs.aws.amazon.com/comprehend/latest/dg/manage-endpoints.html">Managing endpoints</a>.</p>
*/
EndpointArn?: string;
}
Expand Down Expand Up @@ -4536,7 +4552,7 @@ export interface DetectPiiEntitiesRequest {
Text: string | undefined;

/**
* <p>The language of the input documents.</p>
* <p>The language of the input documents. Currently, English is the only valid language.</p>
*/
LanguageCode: LanguageCode | string | undefined;
}
Expand Down Expand Up @@ -6178,7 +6194,7 @@ export interface StartDocumentClassificationJobRequest {
/**
* <p>Configuration parameters for an optional private Virtual Private Cloud (VPC) containing
* the resources you are using for your document classification job. For more information, see
* <a href="https://docs.aws.amazon.com/vpc/latest/userguide/what-is-amazon-vpc.html">Amazon
* <a href="https://docs.aws.amazon.com/vpc/latest/userguide/what-is-amazon-vpc.html">Amazon
* VPC</a>. </p>
*/
VpcConfig?: VpcConfig;
Expand Down Expand Up @@ -6665,7 +6681,7 @@ export interface StartKeyPhrasesDetectionJobRequest {
/**
* <p> Configuration parameters for an optional private Virtual Private Cloud (VPC) containing
* the resources you are using for your key phrases detection job. For more information, see
* <a href="https://docs.aws.amazon.com/vpc/latest/userguide/what-is-amazon-vpc.html">Amazon
* <a href="https://docs.aws.amazon.com/vpc/latest/userguide/what-is-amazon-vpc.html">Amazon
* VPC</a>. </p>
*/
VpcConfig?: VpcConfig;
Expand Down Expand Up @@ -6774,7 +6790,7 @@ export interface StartPiiEntitiesDetectionJobRequest {
JobName?: string;

/**
* <p>The language of the input documents.</p>
* <p>The language of the input documents. Currently, English is the only valid language.</p>
*/
LanguageCode: LanguageCode | string | undefined;

Expand Down Expand Up @@ -6985,8 +7001,7 @@ export interface StartTargetedSentimentDetectionJobRequest {
JobName?: string;

/**
* <p>The language of the input documents. You can specify any of the primary languages
* supported by Amazon Comprehend. All documents must be in the same language.</p>
* <p>The language of the input documents. Currently, English is the only valid language.</p>
*/
LanguageCode: LanguageCode | string | undefined;

Expand Down
Loading

0 comments on commit 598f334

Please sign in to comment.