diff --git a/CHANGELOG.md b/CHANGELOG.md index 1e537170a56..b2d2ff73687 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,11 @@ +Release v1.27.3 (2020-01-08) +=== + +### Service Client Updates +* `service/ce`: Updates service documentation +* `service/fms`: Updates service API and documentation +* `service/translate`: Updates service API, documentation, and paginators + Release v1.27.2 (2020-01-07) === diff --git a/aws/version.go b/aws/version.go index 616f9de01fa..2156747bac5 100644 --- a/aws/version.go +++ b/aws/version.go @@ -5,4 +5,4 @@ package aws const SDKName = "aws-sdk-go" // SDKVersion is the version of this SDK -const SDKVersion = "1.27.2" +const SDKVersion = "1.27.3" diff --git a/models/apis/ce/2017-10-25/docs-2.json b/models/apis/ce/2017-10-25/docs-2.json index b7db1692bfc..5c3a0724755 100644 --- a/models/apis/ce/2017-10-25/docs-2.json +++ b/models/apis/ce/2017-10-25/docs-2.json @@ -2,9 +2,9 @@ "version": "2.0", "service": "
The Cost Explorer API enables you to programmatically query your cost and usage data. You can query for aggregated data such as total monthly costs or total daily usage. You can also query for granular data, such as the number of daily write operations for Amazon DynamoDB database tables in your production environment.
Service Endpoint
The Cost Explorer API provides the following endpoint:
https://ce.us-east-1.amazonaws.com
For information about costs associated with the Cost Explorer API, see AWS Cost Management Pricing.
", "operations": { - "CreateCostCategoryDefinition": "Cost Category is in preview release for AWS Billing and Cost Management and is subject to change. Your use of Cost Categories is subject to the Beta Service Participation terms of the AWS Service Terms (Section 1.10).
Creates a new Cost Category with the requested name and rules.
", - "DeleteCostCategoryDefinition": "Cost Category is in preview release for AWS Billing and Cost Management and is subject to change. Your use of Cost Categories is subject to the Beta Service Participation terms of the AWS Service Terms (Section 1.10).
Deletes a Cost Category. Expenses from this month going forward will no longer be categorized with this Cost Category.
", - "DescribeCostCategoryDefinition": "Cost Category is in preview release for AWS Billing and Cost Management and is subject to change. Your use of Cost Categories is subject to the Beta Service Participation terms of the AWS Service Terms (Section 1.10).
Returns the name, ARN, rules, definition, and effective dates of a Cost Category that's defined in the account.
You have the option to use EffectiveOn
to return a Cost Category that is active on a specific date. If there is no EffectiveOn
specified, you’ll see a Cost Category that is effective on the current date. If Cost Category is still effective, EffectiveEnd
is omitted in the response.
Cost Category is in public beta for AWS Billing and Cost Management and is subject to change. Your use of Cost Categories is subject to the Beta Service Participation terms of the AWS Service Terms (Section 1.10).
Creates a new Cost Category with the requested name and rules.
", + "DeleteCostCategoryDefinition": "Cost Category is in public beta for AWS Billing and Cost Management and is subject to change. Your use of Cost Categories is subject to the Beta Service Participation terms of the AWS Service Terms (Section 1.10).
Deletes a Cost Category. Expenses from this month going forward will no longer be categorized with this Cost Category.
", + "DescribeCostCategoryDefinition": "Cost Category is in public beta for AWS Billing and Cost Management and is subject to change. Your use of Cost Categories is subject to the Beta Service Participation terms of the AWS Service Terms (Section 1.10).
Returns the name, ARN, rules, definition, and effective dates of a Cost Category that's defined in the account.
You have the option to use EffectiveOn
to return a Cost Category that is active on a specific date. If there is no EffectiveOn
specified, you’ll see a Cost Category that is effective on the current date. If Cost Category is still effective, EffectiveEnd
is omitted in the response.
Retrieves cost and usage metrics for your account. You can specify which cost and usage-related metric, such as BlendedCosts
or UsageQuantity
, that you want the request to return. You can also filter and group your data by various dimensions, such as SERVICE
or AZ
, in a specific time range. For a complete list of valid dimensions, see the GetDimensionValues operation. Master accounts in an organization in AWS Organizations have access to all member accounts.
Retrieves cost and usage metrics with resources for your account. You can specify which cost and usage-related metric, such as BlendedCosts
or UsageQuantity
, that you want the request to return. You can also filter and group your data by various dimensions, such as SERVICE
or AZ
, in a specific time range. For a complete list of valid dimensions, see the GetDimensionValues operation. Master accounts in an organization in AWS Organizations have access to all member accounts. This API is currently available for the Amazon Elastic Compute Cloud – Compute service only.
This is an opt-in only feature. You can enable this feature from the Cost Explorer Settings page. For information on how to access the Settings page, see Controlling Access for Cost Explorer in the AWS Billing and Cost Management User Guide.
Retrieves a forecast for how much Amazon Web Services predicts that you will spend over the forecast time period that you select, based on your past costs.
", @@ -19,8 +19,8 @@ "GetSavingsPlansUtilizationDetails": "Retrieves attribute data along with aggregate utilization and savings data for a given time period. This doesn't support granular or grouped data (daily/monthly) in response. You can't retrieve data by dates in a single response similar to GetSavingsPlanUtilization
, but you have the option to make multiple calls to GetSavingsPlanUtilizationDetails
by providing individual dates. You can use GetDimensionValues
in SAVINGS_PLANS
to determine the possible dimension values.
GetSavingsPlanUtilizationDetails
internally groups data by SavingsPlansArn
.
Queries for available tag keys and tag values for a specified period. You can search the tag values for an arbitrary string.
", "GetUsageForecast": "Retrieves a forecast for how much Amazon Web Services predicts that you will use over the forecast time period that you select, based on your past usage.
", - "ListCostCategoryDefinitions": "Cost Category is in preview release for AWS Billing and Cost Management and is subject to change. Your use of Cost Categories is subject to the Beta Service Participation terms of the AWS Service Terms (Section 1.10).
Returns the name, ARN and effective dates of all Cost Categories defined in the account. You have the option to use EffectiveOn
to return a list of Cost Categories that were active on a specific date. If there is no EffectiveOn
specified, you’ll see Cost Categories that are effective on the current date. If Cost Category is still effective, EffectiveEnd
is omitted in the response.
Cost Category is in preview release for AWS Billing and Cost Management and is subject to change. Your use of Cost Categories is subject to the Beta Service Participation terms of the AWS Service Terms (Section 1.10).
Updates an existing Cost Category. Changes made to the Cost Category rules will be used to categorize the current month’s expenses and future expenses. This won’t change categorization for the previous months.
" + "ListCostCategoryDefinitions": "Cost Category is in public beta for AWS Billing and Cost Management and is subject to change. Your use of Cost Categories is subject to the Beta Service Participation terms of the AWS Service Terms (Section 1.10).
Returns the name, ARN and effective dates of all Cost Categories defined in the account. You have the option to use EffectiveOn
to return a list of Cost Categories that were active on a specific date. If there is no EffectiveOn
specified, you’ll see Cost Categories that are effective on the current date. If Cost Category is still effective, EffectiveEnd
is omitted in the response.
Cost Category is in public beta for AWS Billing and Cost Management and is subject to change. Your use of Cost Categories is subject to the Beta Service Participation terms of the AWS Service Terms (Section 1.10).
Updates an existing Cost Category. Changes made to the Cost Category rules will be used to categorize the current month’s expenses and future expenses. This won’t change categorization for the previous months.
" }, "shapes": { "AccountScope": { @@ -89,7 +89,7 @@ } }, "CostCategory": { - "base": "Cost Category is in preview release for AWS Billing and Cost Management and is subject to change. Your use of Cost Categories is subject to the Beta Service Participation terms of the AWS Service Terms (Section 1.10).
The structure of Cost Categories. This includes detailed metadata and the set of rules for the CostCategory
object.
Cost Category is in public beta for AWS Billing and Cost Management and is subject to change. Your use of Cost Categories is subject to the Beta Service Participation terms of the AWS Service Terms (Section 1.10).
The structure of Cost Categories. This includes detailed metadata and the set of rules for the CostCategory
object.
Cost Category is in preview release for AWS Billing and Cost Management and is subject to change. Your use of Cost Categories is subject to the Beta Service Participation terms of the AWS Service Terms (Section 1.10).
A reference to a Cost Category containing only enough information to identify the Cost Category.
You can use this information to retrieve the full Cost Category information using DescribeCostCategory
.
Cost Category is in public beta for AWS Billing and Cost Management and is subject to change. Your use of Cost Categories is subject to the Beta Service Participation terms of the AWS Service Terms (Section 1.10).
A reference to a Cost Category containing only enough information to identify the Cost Category.
You can use this information to retrieve the full Cost Category information using DescribeCostCategory
.
Cost Category is in preview release for AWS Billing and Cost Management and is subject to change. Your use of Cost Categories is subject to the Beta Service Participation terms of the AWS Service Terms (Section 1.10).
Rules are processed in order. If there are multiple rules that match the line item, then the first rule to match is used to determine that Cost Category value.
", + "base": "Cost Category is in public beta for AWS Billing and Cost Management and is subject to change. Your use of Cost Categories is subject to the Beta Service Participation terms of the AWS Service Terms (Section 1.10).
Rules are processed in order. If there are multiple rules that match the line item, then the first rule to match is used to determine that Cost Category value.
", "refs": { "CostCategoryRulesList$member": null } @@ -133,8 +133,8 @@ "base": null, "refs": { "CostCategory$Rules": "Rules are processed in order. If there are multiple rules that match the line item, then the first rule to match is used to determine that Cost Category value.
", - "CreateCostCategoryDefinitionRequest$Rules": "Rules are processed in order. If there are multiple rules that match the line item, then the first rule to match is used to determine that Cost Category value.
", - "UpdateCostCategoryDefinitionRequest$Rules": "Rules are processed in order. If there are multiple rules that match the line item, then the first rule to match is used to determine that Cost Category value.
" + "CreateCostCategoryDefinitionRequest$Rules": " CreateCostCategoryDefinition
supports dimensions, Tags, and nested expressions. Currently the only dimensions supported is LINKED_ACCOUNT
.
Root level OR
is not supported. We recommend you create a separate rule instead.
Rules are processed in order. If there are multiple rules that match the line item, then the first rule to match is used to determine that Cost Category value.
", + "UpdateCostCategoryDefinitionRequest$Rules": " UpdateCostCategoryDefinition
supports dimensions, Tags, and nested expressions. Currently the only dimensions supported is LINKED_ACCOUNT
.
Root level OR
is not supported. We recommend you create a separate rule instead.
Rules are processed in order. If there are multiple rules that match the line item, then the first rule to match is used to determine that Cost Category value.
" } }, "CostCategoryValue": { @@ -144,9 +144,9 @@ } }, "CostCategoryValues": { - "base": "Cost Category is in preview release for AWS Billing and Cost Management and is subject to change. Your use of Cost Categories is subject to the Beta Service Participation terms of the AWS Service Terms (Section 1.10).
The values that are available for Cost Categories.
", + "base": "Cost Category is in public beta for AWS Billing and Cost Management and is subject to change. Your use of Cost Categories is subject to the Beta Service Participation terms of the AWS Service Terms (Section 1.10).
The values that are available for Cost Categories.
", "refs": { - "Expression$CostCategories": "Cost Category is in preview release for AWS Billing and Cost Management and is subject to change. Your use of Cost Categories is subject to the Beta Service Participation terms of the AWS Service Terms (Section 1.10).
The specific CostCategory
used for Expression
.
Cost Category is in public beta for AWS Billing and Cost Management and is subject to change. Your use of Cost Categories is subject to the Beta Service Participation terms of the AWS Service Terms (Section 1.10).
The specific CostCategory
used for Expression
.
Returns an array of PolicyComplianceStatus
objects in the response. Use PolicyComplianceStatus
to get a summary of which member accounts are protected by the specified policy.
Returns a MemberAccounts
object that lists the member accounts in the administrator's AWS organization.
The ListMemberAccounts
must be submitted by the account that is set as the AWS Firewall Manager administrator.
Returns an array of PolicySummary
objects in the response.
Retrieves the list of tags for the specified AWS resource.
", "PutNotificationChannel": "Designates the IAM role and Amazon Simple Notification Service (SNS) topic that AWS Firewall Manager uses to record SNS logs.
", - "PutPolicy": "Creates an AWS Firewall Manager policy.
Firewall Manager provides the following types of policies:
A Shield Advanced policy, which applies Shield Advanced protection to specified accounts and resources
An AWS WAF policy, which contains a rule group and defines which resources are to be protected by that rule group
A security group policy, which manages VPC security groups across your AWS organization.
Each policy is specific to one of the three types. If you want to enforce more than one policy type across accounts, you can create multiple policies. You can create multiple policies for each type.
You must be subscribed to Shield Advanced to create a Shield Advanced policy. For more information about subscribing to Shield Advanced, see CreateSubscription.
" + "PutPolicy": "Creates an AWS Firewall Manager policy.
Firewall Manager provides the following types of policies:
A Shield Advanced policy, which applies Shield Advanced protection to specified accounts and resources
An AWS WAF policy, which contains a rule group and defines which resources are to be protected by that rule group
A security group policy, which manages VPC security groups across your AWS organization.
Each policy is specific to one of the three types. If you want to enforce more than one policy type across accounts, you can create multiple policies. You can create multiple policies for each type.
You must be subscribed to Shield Advanced to create a Shield Advanced policy. For more information about subscribing to Shield Advanced, see CreateSubscription.
", + "TagResource": "Adds one or more tags to an AWS resource.
", + "UntagResource": "Removes one or more tags from an AWS resource.
" }, "shapes": { "AWSAccountId": { @@ -254,6 +257,16 @@ "refs": { } }, + "ListTagsForResourceRequest": { + "base": null, + "refs": { + } + }, + "ListTagsForResourceResponse": { + "base": null, + "refs": { + } + }, "ManagedServiceData": { "base": null, "refs": { @@ -379,10 +392,13 @@ "GetNotificationChannelResponse$SnsTopicArn": "The SNS topic that records AWS Firewall Manager activity.
", "GetNotificationChannelResponse$SnsRoleName": "The IAM role that is used by AWS Firewall Manager to record activity to SNS.
", "GetPolicyResponse$PolicyArn": "The Amazon Resource Name (ARN) of the specified policy.
", + "ListTagsForResourceRequest$ResourceArn": "The Amazon Resource Name (ARN) of the resource to return tags for. The Firewall Manager policy is the only AWS resource that supports tagging, so this ARN is a policy ARN..
", "PolicySummary$PolicyArn": "The Amazon Resource Name (ARN) of the specified policy.
", "PutNotificationChannelRequest$SnsTopicArn": "The Amazon Resource Name (ARN) of the SNS topic that collects notifications from AWS Firewall Manager.
", "PutNotificationChannelRequest$SnsRoleName": "The Amazon Resource Name (ARN) of the IAM role that allows Amazon SNS to record AWS Firewall Manager activity.
", - "PutPolicyResponse$PolicyArn": "The Amazon Resource Name (ARN) of the policy that was created.
" + "PutPolicyResponse$PolicyArn": "The Amazon Resource Name (ARN) of the policy that was created.
", + "TagResourceRequest$ResourceArn": "The Amazon Resource Name (ARN) of the resource. The Firewall Manager policy is the only AWS resource that supports tagging, so this ARN is a policy ARN.
", + "UntagResourceRequest$ResourceArn": "The Amazon Resource Name (ARN) of the resource. The Firewall Manager policy is the only AWS resource that supports tagging, so this ARN is a policy ARN.
" } }, "ResourceCount": { @@ -416,6 +432,18 @@ "ResourceTags$member": null } }, + "ResourceTagKey": { + "base": null, + "refs": { + "ResourceTag$Key": "The resource tag key.
" + } + }, + "ResourceTagValue": { + "base": null, + "refs": { + "ResourceTag$Value": "The resource tag value.
" + } + }, "ResourceTags": { "base": null, "refs": { @@ -451,16 +479,47 @@ "SecurityServicePolicyData$Type": "The service that the policy is using to protect the resources. This specifies the type of policy that is created, either an AWS WAF policy, a Shield Advanced policy, or a security group policy. For security group policies, Firewall Manager supports one security group for each common policy and for each content audit policy. This is an adjustable limit that you can increase by contacting AWS Support.
" } }, + "Tag": { + "base": "A collection of key:value pairs associated with an AWS resource. The key:value pair can be anything you define. Typically, the tag key represents a category (such as \"environment\") and the tag value represents a specific value within that category (such as \"test,\" \"development,\" or \"production\"). You can add up to 50 tags to each AWS resource.
", + "refs": { + "TagList$member": null + } + }, "TagKey": { "base": null, "refs": { - "ResourceTag$Key": "The resource tag key.
" + "Tag$Key": "Part of the key:value pair that defines a tag. You can use a tag key to describe a category of information, such as \"customer.\" Tag keys are case-sensitive.
", + "TagKeyList$member": null + } + }, + "TagKeyList": { + "base": null, + "refs": { + "UntagResourceRequest$TagKeys": "The keys of the tags to remove from the resource.
" + } + }, + "TagList": { + "base": null, + "refs": { + "ListTagsForResourceResponse$TagList": "The tags associated with the resource.
", + "PutPolicyRequest$TagList": "The tags to add to the AWS resource.
", + "TagResourceRequest$TagList": "The tags to add to the resource.
" + } + }, + "TagResourceRequest": { + "base": null, + "refs": { + } + }, + "TagResourceResponse": { + "base": null, + "refs": { } }, "TagValue": { "base": null, "refs": { - "ResourceTag$Value": "The resource tag value.
" + "Tag$Value": "Part of the key:value pair that defines a tag. You can use a tag value to describe a specific value within a category, such as \"companyA\" or \"companyB.\" Tag values are case-sensitive.
" } }, "TimeStamp": { @@ -472,6 +531,16 @@ "PolicyComplianceStatus$LastUpdated": "Timestamp of the last update to the EvaluationResult
objects.
Provides translation between one source language and another of the same set of languages.
", "operations": { "DeleteTerminology": "A synchronous action that deletes a custom terminology.
", + "DescribeTextTranslationJob": "Gets the properties associated with an asycnhronous batch translation job including name, ID, status, source and target languages, input/output S3 buckets, and so on.
", "GetTerminology": "Retrieves a custom terminology.
", "ImportTerminology": "Creates or updates a custom terminology, depending on whether or not one already exists for the given terminology name. Importing a terminology with the same name as an existing one will merge the terminologies based on the chosen merge strategy. Currently, the only supported merge strategy is OVERWRITE, and so the imported terminology will overwrite an existing terminology of the same name.
If you import a terminology that overwrites an existing one, the new terminology take up to 10 minutes to fully propagate and be available for use in a translation due to cache policies with the DataPlane service that performs the translations.
", "ListTerminologies": "Provides a list of custom terminologies associated with your account.
", - "TranslateText": "Translates input text from the source language to the target language. It is not necessary to use English (en) as either the source or the target language but not all language combinations are supported by Amazon Translate. For more information, see Supported Language Pairs.
Arabic (ar)
Chinese (Simplified) (zh)
Chinese (Traditional) (zh-TW)
Czech (cs)
Danish (da)
Dutch (nl)
English (en)
Finnish (fi)
French (fr)
German (de)
Hebrew (he)
Indonesian (id)
Italian (it)
Japanese (ja)
Korean (ko)
Polish (pl)
Portuguese (pt)
Russian (ru)
Spanish (es)
Swedish (sv)
Turkish (tr)
To have Amazon Translate determine the source language of your text, you can specify auto
in the SourceLanguageCode
field. If you specify auto
, Amazon Translate will call Amazon Comprehend to determine the source language.
Gets a list of the batch translation jobs that you have submitted.
", + "StartTextTranslationJob": "Starts an asynchronous batch translation job. Batch translation jobs can be used to translate large volumes of text across multiple documents at once. For more information, see async.
Batch translation jobs can be described with the DescribeTextTranslationJob operation, listed with the ListTextTranslationJobs operation, and stopped with the StopTextTranslationJob operation.
Amazon Translate does not support batch translation of multiple source languages at once.
Stops an asynchronous batch translation job that is in progress.
If the job's state is IN_PROGRESS
, the job will be marked for termination and put into the STOP_REQUESTED
state. If the job completes before it can be stopped, it is put into the COMPLETED
state. Otherwise, the job is put into the STOPPED
state.
Asynchronous batch translation jobs are started with the StartTextTranslationJob operation. You can use the DescribeTextTranslationJob or ListTextTranslationJobs operations to get a batch translation job's JobId
.
Translates input text from the source language to the target language. For a list of available languages and language codes, see what-is-languages.
" }, "shapes": { "AppliedTerminology": { @@ -27,11 +31,33 @@ "TranslateTextRequest$Text": "The text to translate. The text string can be a maximum of 5,000 bytes long. Depending on your character set, this may be fewer than 5,000 characters.
" } }, + "ClientTokenString": { + "base": null, + "refs": { + "StartTextTranslationJobRequest$ClientToken": "The client token of the EC2 instance calling the request. This token is auto-generated when using the Amazon Translate SDK. Otherwise, use the DescribeInstances EC2 operation to retreive an instance's client token. For more information, see Client Tokens in the EC2 User Guide.
" + } + }, + "ContentType": { + "base": null, + "refs": { + "InputDataConfig$ContentType": "The multipurpose internet mail extension (MIME) type of the input files. Valid values are text/plain
for plaintext files and text/html
for HTML files.
The Amazon Resource Name (ARN) of an AWS Identity Access and Management (IAM) role that grants Amazon Translate read access to your input data. For more nformation, see identity-and-access-management.
", + "TextTranslationJobProperties$DataAccessRoleArn": "The Amazon Resource Name (ARN) of an AWS Identity Access and Management (IAM) role that granted Amazon Translate read access to the job's input data.
" + } + }, "ImportTerminologyRequest": { "base": null, "refs": { @@ -83,15 +116,30 @@ "refs": { } }, + "InputDataConfig": { + "base": "The input configuration properties for requesting a batch translation job.
", + "refs": { + "StartTextTranslationJobRequest$InputDataConfig": "Specifies the format and S3 location of the input documents for the translation job.
", + "TextTranslationJobProperties$InputDataConfig": "The input configuration properties that were specified when the job was requested.
" + } + }, "Integer": { "base": null, "refs": { + "JobDetails$TranslatedDocumentsCount": "The number of documents successfully processed during a translation job.
", + "JobDetails$DocumentsWithErrorsCount": "The number of documents that could not be processed during a translation job.
", + "JobDetails$InputDocumentsCount": "The number of documents used as input in a translation job.
", "TerminologyProperties$SizeBytes": "The size of the file used when importing a custom terminology.
", "TerminologyProperties$TermCount": "The number of terms included in the custom terminology.
" } }, "InternalServerException": { - "base": "An internal server error occurred. Retry your request.
", + "base": "An internal server error occurred. Retry your request.
", + "refs": { + } + }, + "InvalidFilterException": { + "base": "The filter specified for the operation is invalid. Specify a different filter.
", "refs": { } }, @@ -105,15 +153,51 @@ "refs": { } }, + "JobDetails": { + "base": "The number of documents successfully and unsuccessfully processed during a translation job.
", + "refs": { + "TextTranslationJobProperties$JobDetails": "The number of documents successfully and unsuccessfully processed during the translation job.
" + } + }, + "JobId": { + "base": null, + "refs": { + "DescribeTextTranslationJobRequest$JobId": "The identifier that Amazon Translate generated for the job. The StartTextTranslationJob operation returns this identifier in its response.
", + "StartTextTranslationJobResponse$JobId": "The identifier generated for the job. To get the status of a job, use this ID with the DescribeTextTranslationJob operation.
", + "StopTextTranslationJobRequest$JobId": "The job ID of the job to be stopped.
", + "StopTextTranslationJobResponse$JobId": "The job ID of the stopped batch translation job.
", + "TextTranslationJobProperties$JobId": "The ID of the translation job.
" + } + }, + "JobName": { + "base": null, + "refs": { + "StartTextTranslationJobRequest$JobName": "The name of the batch translation job to be performed.
", + "TextTranslationJobFilter$JobName": "Filters the list of jobs by name.
", + "TextTranslationJobProperties$JobName": "The user-defined name of the translation job.
" + } + }, + "JobStatus": { + "base": null, + "refs": { + "StartTextTranslationJobResponse$JobStatus": "The status of the job. Possible values include:
SUBMITTED
- The job has been received and is queued for processing.
IN_PROGRESS
- Amazon Translate is processing the job.
COMPLETED
- The job was successfully completed and the output is available.
COMPLETED_WITH_ERRORS
- The job was completed with errors. The errors can be analyzed in the job's output.
FAILED
- The job did not complete. To get details, use the DescribeTextTranslationJob operation.
STOP_REQUESTED
- The user who started the job has requested that it be stopped.
STOPPED
- The job has been stopped.
The status of the designated job. Upon successful completion, the job's status will be STOPPED
.
Filters the list of jobs based by job status.
", + "TextTranslationJobProperties$JobStatus": "The status of the translation job.
" + } + }, "LanguageCodeString": { "base": null, "refs": { "DetectedLanguageLowConfidenceException$DetectedLanguageCode": "The language code of the auto-detected language from Amazon Comprehend.
", "LanguageCodeStringList$member": null, + "StartTextTranslationJobRequest$SourceLanguageCode": "The language code of the input language. For a list of language codes, see what-is-languages.
Amazon Translate does not automatically detect a source language during batch translation jobs.
", + "TargetLanguageCodeStringList$member": null, "TerminologyProperties$SourceLanguageCode": "The language code for the source text of the translation request for which the custom terminology is being used.
", - "TranslateTextRequest$SourceLanguageCode": "The language code for the language of the source text. The language must be a language supported by Amazon Translate.
To have Amazon Translate determine the source language of your text, you can specify auto
in the SourceLanguageCode
field. If you specify auto
, Amazon Translate will call Amazon Comprehend to determine the source language.
The language code of the language of the source text. The language must be a language supported by Amazon Translate.
", + "TranslateTextRequest$SourceLanguageCode": "The language code for the language of the source text. The language must be a language supported by Amazon Translate. For a list of language codes, see what-is-languages.
To have Amazon Translate determine the source language of your text, you can specify auto
in the SourceLanguageCode
field. If you specify auto
, Amazon Translate will call Amazon Comprehend to determine the source language.
The language code requested for the language of the target text. The language must be a language supported by Amazon Translate.
", - "TranslateTextResponse$SourceLanguageCode": "The language code for the language of the source text.
", + "TranslateTextResponse$SourceLanguageCode": "The language code for the language of the source text.
", "TranslateTextResponse$TargetLanguageCode": "The language code for the language of the target text.
", "UnsupportedLanguagePairException$SourceLanguageCode": "The language code for the language of the input text.
", "UnsupportedLanguagePairException$TargetLanguageCode": "The language code for the language of the translated text.
" @@ -140,10 +224,21 @@ "refs": { } }, + "ListTextTranslationJobsRequest": { + "base": null, + "refs": { + } + }, + "ListTextTranslationJobsResponse": { + "base": null, + "refs": { + } + }, "MaxResultsInteger": { "base": null, "refs": { - "ListTerminologiesRequest$MaxResults": "The maximum number of custom terminologies returned per list request.
" + "ListTerminologiesRequest$MaxResults": "The maximum number of custom terminologies returned per list request.
", + "ListTextTranslationJobsRequest$MaxResults": "The maximum number of results to return in each page. The default value is 100.
" } }, "MergeStrategy": { @@ -156,7 +251,16 @@ "base": null, "refs": { "ListTerminologiesRequest$NextToken": "If the result of the request to ListTerminologies was truncated, include the NextToken to fetch the next group of custom terminologies.
", - "ListTerminologiesResponse$NextToken": "If the response to the ListTerminologies was truncated, the NextToken fetches the next group of custom terminologies.
" + "ListTerminologiesResponse$NextToken": "If the response to the ListTerminologies was truncated, the NextToken fetches the next group of custom terminologies.
", + "ListTextTranslationJobsRequest$NextToken": "The token to request the next page of results.
", + "ListTextTranslationJobsResponse$NextToken": "The token to use to retreive the next page of results. This value is null
when there are no more results to return.
The output configuration properties for a batch translation job.
", + "refs": { + "StartTextTranslationJobRequest$OutputDataConfig": "Specifies the S3 folder to which your job output will be saved.
", + "TextTranslationJobProperties$OutputDataConfig": "The output configuration properties that were specified when the job was requested.
" } }, "ResourceName": { @@ -173,12 +277,21 @@ "ResourceNameList": { "base": null, "refs": { - "TranslateTextRequest$TerminologyNames": "The TerminologyNames list that is taken as input to the TranslateText request. This has a minimum length of 0 and a maximum length of 1.
" + "StartTextTranslationJobRequest$TerminologyNames": "The name of the terminology to use in the batch translation job. For a list of available terminologies, use the ListTerminologies operation.
", + "TextTranslationJobProperties$TerminologyNames": "A list containing the names of the terminologies applied to a translation job. Only one terminology can be applied per StartTextTranslationJob request at this time.
", + "TranslateTextRequest$TerminologyNames": "The name of the terminology list file to be used in the TranslateText request. You can use 1 terminology list at most in a TranslateText
request. Terminology lists can contain a maximum of 256 terms.
The resource you are looking for has not been found. Review the resource you're looking for and see if a different resource will accomplish your needs before retrying the revised request. .
", + "base": "The resource you are looking for has not been found. Review the resource you're looking for and see if a different resource will accomplish your needs before retrying the revised request.
", + "refs": { + } + }, + "S3Uri": { + "base": null, "refs": { + "InputDataConfig$S3Uri": "The URI of the AWS S3 folder that contains the input file. The folder must be in the same Region as the API endpoint you are calling.
", + "OutputDataConfig$S3Uri": "The URI of the S3 folder that contains a translation job's output file. The folder must be in the same Region as the API endpoint that you are calling.
" } }, "ServiceUnavailableException": { @@ -186,11 +299,32 @@ "refs": { } }, + "StartTextTranslationJobRequest": { + "base": null, + "refs": { + } + }, + "StartTextTranslationJobResponse": { + "base": null, + "refs": { + } + }, + "StopTextTranslationJobRequest": { + "base": null, + "refs": { + } + }, + "StopTextTranslationJobResponse": { + "base": null, + "refs": { + } + }, "String": { "base": null, "refs": { "DetectedLanguageLowConfidenceException$Message": null, "InternalServerException$Message": null, + "InvalidFilterException$Message": null, "InvalidParameterValueException$Message": null, "InvalidRequestException$Message": null, "LimitExceededException$Message": null, @@ -202,10 +336,17 @@ "TerminologyDataLocation$Location": "The location of the custom terminology data.
", "TextSizeLimitExceededException$Message": null, "TooManyRequestsException$Message": null, - "TranslateTextResponse$TranslatedText": "The the translated text. The maximum length of this text is 5kb.
", + "TranslateTextResponse$TranslatedText": "The translated text.
", "UnsupportedLanguagePairException$Message": null } }, + "TargetLanguageCodeStringList": { + "base": null, + "refs": { + "StartTextTranslationJobRequest$TargetLanguageCodes": "The language code of the output language.
", + "TextTranslationJobProperties$TargetLanguageCodes": "The language code of the language of the target text. The language must be a language supported by Amazon Translate.
" + } + }, "Term": { "base": "The term being translated by the custom terminology.
", "refs": { @@ -246,7 +387,7 @@ "TerminologyFile": { "base": null, "refs": { - "TerminologyData$File": "The file containing the custom terminology data.
" + "TerminologyData$File": "The file containing the custom terminology data. Your version of the AWS SDK performs a Base64-encoding on this field before sending a request to the AWS service. Users of the SDK should not perform Base64-encoding themselves.
" } }, "TerminologyProperties": { @@ -268,11 +409,34 @@ "refs": { } }, + "TextTranslationJobFilter": { + "base": "Provides information for filtering a list of translation jobs. For more information, see ListTextTranslationJobs.
", + "refs": { + "ListTextTranslationJobsRequest$Filter": "The parameters that specify which batch translation jobs to retrieve. Filters include job name, job status, and submission time. You can only set one filter at a time.
" + } + }, + "TextTranslationJobProperties": { + "base": "Provides information about a translation job.
", + "refs": { + "DescribeTextTranslationJobResponse$TextTranslationJobProperties": "An object that contains the properties associated with an asynchronous batch translation job.
", + "TextTranslationJobPropertiesList$member": null + } + }, + "TextTranslationJobPropertiesList": { + "base": null, + "refs": { + "ListTextTranslationJobsResponse$TextTranslationJobPropertiesList": "A list containing the properties of each job that is returned.
" + } + }, "Timestamp": { "base": null, "refs": { "TerminologyProperties$CreatedAt": "The time at which the custom terminology was created, based on the timestamp.
", - "TerminologyProperties$LastUpdatedAt": "The time at which the custom terminology was last update, based on the timestamp.
" + "TerminologyProperties$LastUpdatedAt": "The time at which the custom terminology was last update, based on the timestamp.
", + "TextTranslationJobFilter$SubmittedBeforeTime": "Filters the list of jobs based on the time that the job was submitted for processing and returns only the jobs submitted before the specified time. Jobs are returned in ascending order, oldest to newest.
", + "TextTranslationJobFilter$SubmittedAfterTime": "Filters the list of jobs based on the time that the job was submitted for processing and returns only the jobs submitted after the specified time. Jobs are returned in descending order, newest to oldest.
", + "TextTranslationJobProperties$SubmittedTime": "The time at which the translation job was submitted.
", + "TextTranslationJobProperties$EndTime": "The time at which the translation job ended.
" } }, "TooManyRequestsException": { @@ -290,6 +454,12 @@ "refs": { } }, + "UnboundedLengthString": { + "base": null, + "refs": { + "TextTranslationJobProperties$Message": "An explanation of any errors that may have occured during the translation job.
" + } + }, "UnsupportedLanguagePairException": { "base": "Amazon Translate does not support translation from the language of the source text into the requested target language. For more information, see how-to-error-msg.
", "refs": { diff --git a/models/apis/translate/2017-07-01/paginators-1.json b/models/apis/translate/2017-07-01/paginators-1.json index 5677bd8e4a2..67f44714aca 100644 --- a/models/apis/translate/2017-07-01/paginators-1.json +++ b/models/apis/translate/2017-07-01/paginators-1.json @@ -1,4 +1,14 @@ { "pagination": { + "ListTerminologies": { + "input_token": "NextToken", + "limit_key": "MaxResults", + "output_token": "NextToken" + }, + "ListTextTranslationJobs": { + "input_token": "NextToken", + "limit_key": "MaxResults", + "output_token": "NextToken" + } } -} +} \ No newline at end of file diff --git a/service/costexplorer/api.go b/service/costexplorer/api.go index c6077adcd40..ff7ddbaef76 100644 --- a/service/costexplorer/api.go +++ b/service/costexplorer/api.go @@ -55,9 +55,9 @@ func (c *CostExplorer) CreateCostCategoryDefinitionRequest(input *CreateCostCate // CreateCostCategoryDefinition API operation for AWS Cost Explorer Service. // // -// Cost Category is in preview release for AWS Billing and Cost Management -// and is subject to change. Your use of Cost Categories is subject to the -// Beta Service Participation terms of the AWS Service Terms (https://aws.amazon.com/service-terms/) +// Cost Category is in public beta for AWS Billing and Cost Management and +// is subject to change. Your use of Cost Categories is subject to the Beta +// Service Participation terms of the AWS Service Terms (https://aws.amazon.com/service-terms/) // (Section 1.10). // // Creates a new Cost Category with the requested name and rules. @@ -144,9 +144,9 @@ func (c *CostExplorer) DeleteCostCategoryDefinitionRequest(input *DeleteCostCate // DeleteCostCategoryDefinition API operation for AWS Cost Explorer Service. // // -// Cost Category is in preview release for AWS Billing and Cost Management -// and is subject to change. Your use of Cost Categories is subject to the -// Beta Service Participation terms of the AWS Service Terms (https://aws.amazon.com/service-terms/) +// Cost Category is in public beta for AWS Billing and Cost Management and +// is subject to change. Your use of Cost Categories is subject to the Beta +// Service Participation terms of the AWS Service Terms (https://aws.amazon.com/service-terms/) // (Section 1.10). // // Deletes a Cost Category. Expenses from this month going forward will no longer @@ -233,9 +233,9 @@ func (c *CostExplorer) DescribeCostCategoryDefinitionRequest(input *DescribeCost // DescribeCostCategoryDefinition API operation for AWS Cost Explorer Service. // // -// Cost Category is in preview release for AWS Billing and Cost Management -// and is subject to change. Your use of Cost Categories is subject to the -// Beta Service Participation terms of the AWS Service Terms (https://aws.amazon.com/service-terms/) +// Cost Category is in public beta for AWS Billing and Cost Management and +// is subject to change. Your use of Cost Categories is subject to the Beta +// Service Participation terms of the AWS Service Terms (https://aws.amazon.com/service-terms/) // (Section 1.10). // // Returns the name, ARN, rules, definition, and effective dates of a Cost Category @@ -1756,9 +1756,9 @@ func (c *CostExplorer) ListCostCategoryDefinitionsRequest(input *ListCostCategor // ListCostCategoryDefinitions API operation for AWS Cost Explorer Service. // // -// Cost Category is in preview release for AWS Billing and Cost Management -// and is subject to change. Your use of Cost Categories is subject to the -// Beta Service Participation terms of the AWS Service Terms (https://aws.amazon.com/service-terms/) +// Cost Category is in public beta for AWS Billing and Cost Management and +// is subject to change. Your use of Cost Categories is subject to the Beta +// Service Participation terms of the AWS Service Terms (https://aws.amazon.com/service-terms/) // (Section 1.10). // // Returns the name, ARN and effective dates of all Cost Categories defined @@ -1846,9 +1846,9 @@ func (c *CostExplorer) UpdateCostCategoryDefinitionRequest(input *UpdateCostCate // UpdateCostCategoryDefinition API operation for AWS Cost Explorer Service. // // -// Cost Category is in preview release for AWS Billing and Cost Management -// and is subject to change. Your use of Cost Categories is subject to the -// Beta Service Participation terms of the AWS Service Terms (https://aws.amazon.com/service-terms/) +// Cost Category is in public beta for AWS Billing and Cost Management and +// is subject to change. Your use of Cost Categories is subject to the Beta +// Service Participation terms of the AWS Service Terms (https://aws.amazon.com/service-terms/) // (Section 1.10). // // Updates an existing Cost Category. Changes made to the Cost Category rules @@ -1896,9 +1896,9 @@ func (c *CostExplorer) UpdateCostCategoryDefinitionWithContext(ctx aws.Context, } // -// Cost Category is in preview release for AWS Billing and Cost Management -// and is subject to change. Your use of Cost Categories is subject to the -// Beta Service Participation terms of the AWS Service Terms (https://aws.amazon.com/service-terms/) +// Cost Category is in public beta for AWS Billing and Cost Management and +// is subject to change. Your use of Cost Categories is subject to the Beta +// Service Participation terms of the AWS Service Terms (https://aws.amazon.com/service-terms/) // (Section 1.10). // // The structure of Cost Categories. This includes detailed metadata and the @@ -1984,9 +1984,9 @@ func (s *CostCategory) SetRules(v []*CostCategoryRule) *CostCategory { } // -// Cost Category is in preview release for AWS Billing and Cost Management -// and is subject to change. Your use of Cost Categories is subject to the -// Beta Service Participation terms of the AWS Service Terms (https://aws.amazon.com/service-terms/) +// Cost Category is in public beta for AWS Billing and Cost Management and +// is subject to change. Your use of Cost Categories is subject to the Beta +// Service Participation terms of the AWS Service Terms (https://aws.amazon.com/service-terms/) // (Section 1.10). // // A reference to a Cost Category containing only enough information to identify @@ -2045,9 +2045,9 @@ func (s *CostCategoryReference) SetName(v string) *CostCategoryReference { } // -// Cost Category is in preview release for AWS Billing and Cost Management -// and is subject to change. Your use of Cost Categories is subject to the -// Beta Service Participation terms of the AWS Service Terms (https://aws.amazon.com/service-terms/) +// Cost Category is in public beta for AWS Billing and Cost Management and +// is subject to change. Your use of Cost Categories is subject to the Beta +// Service Participation terms of the AWS Service Terms (https://aws.amazon.com/service-terms/) // (Section 1.10). // // Rules are processed in order. If there are multiple rules that match the @@ -2118,9 +2118,9 @@ func (s *CostCategoryRule) SetValue(v string) *CostCategoryRule { } // -// Cost Category is in preview release for AWS Billing and Cost Management -// and is subject to change. Your use of Cost Categories is subject to the -// Beta Service Participation terms of the AWS Service Terms (https://aws.amazon.com/service-terms/) +// Cost Category is in public beta for AWS Billing and Cost Management and +// is subject to change. Your use of Cost Categories is subject to the Beta +// Service Participation terms of the AWS Service Terms (https://aws.amazon.com/service-terms/) // (Section 1.10). // // The values that are available for Cost Categories. @@ -2405,6 +2405,11 @@ type CreateCostCategoryDefinitionInput struct { // RuleVersion is a required field RuleVersion *string `type:"string" required:"true" enum:"CostCategoryRuleVersion"` + // CreateCostCategoryDefinition supports dimensions, Tags, and nested expressions. + // Currently the only dimensions supported is LINKED_ACCOUNT. + // + // Root level OR is not supported. We recommend you create a separate rule instead. + // // Rules are processed in order. If there are multiple rules that match the // line item, then the first rule to match is used to determine that Cost Category // value. @@ -2802,9 +2807,9 @@ type DescribeCostCategoryDefinitionOutput struct { _ struct{} `type:"structure"` // - // Cost Category is in preview release for AWS Billing and Cost Management - // and is subject to change. Your use of Cost Categories is subject to the - // Beta Service Participation terms of the AWS Service Terms (https://aws.amazon.com/service-terms/) + // Cost Category is in public beta for AWS Billing and Cost Management and + // is subject to change. Your use of Cost Categories is subject to the Beta + // Service Participation terms of the AWS Service Terms (https://aws.amazon.com/service-terms/) // (Section 1.10). // // The structure of Cost Categories. This includes detailed metadata and the @@ -3319,9 +3324,9 @@ type Expression struct { // Return results that match both Dimension objects. And []*Expression `type:"list"` - // Cost Category is in preview release for AWS Billing and Cost Management - // and is subject to change. Your use of Cost Categories is subject to the - // Beta Service Participation terms of the AWS Service Terms (https://aws.amazon.com/service-terms/) + // Cost Category is in public beta for AWS Billing and Cost Management and + // is subject to change. Your use of Cost Categories is subject to the Beta + // Service Participation terms of the AWS Service Terms (https://aws.amazon.com/service-terms/) // (Section 1.10). // // The specific CostCategory used for Expression. @@ -8147,6 +8152,11 @@ type UpdateCostCategoryDefinitionInput struct { // RuleVersion is a required field RuleVersion *string `type:"string" required:"true" enum:"CostCategoryRuleVersion"` + // UpdateCostCategoryDefinition supports dimensions, Tags, and nested expressions. + // Currently the only dimensions supported is LINKED_ACCOUNT. + // + // Root level OR is not supported. We recommend you create a separate rule instead. + // // Rules are processed in order. If there are multiple rules that match the // line item, then the first rule to match is used to determine that Cost Category // value. diff --git a/service/fms/api.go b/service/fms/api.go index 400e17a7f72..e829fed156c 100644 --- a/service/fms/api.go +++ b/service/fms/api.go @@ -1269,6 +1269,97 @@ func (c *FMS) ListPoliciesPagesWithContext(ctx aws.Context, input *ListPoliciesI return p.Err() } +const opListTagsForResource = "ListTagsForResource" + +// ListTagsForResourceRequest generates a "aws/request.Request" representing the +// client's request for the ListTagsForResource operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListTagsForResource for more information on using the ListTagsForResource +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListTagsForResourceRequest method. +// req, resp := client.ListTagsForResourceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/ListTagsForResource +func (c *FMS) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *ListTagsForResourceOutput) { + op := &request.Operation{ + Name: opListTagsForResource, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ListTagsForResourceInput{} + } + + output = &ListTagsForResourceOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListTagsForResource API operation for Firewall Management Service. +// +// Retrieves the list of tags for the specified AWS resource. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Firewall Management Service's +// API operation ListTagsForResource for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource was not found. +// +// * ErrCodeInvalidOperationException "InvalidOperationException" +// The operation failed because there was nothing to do. For example, you might +// have submitted an AssociateAdminAccount request, but the account ID that +// you submitted was already set as the AWS Firewall Manager administrator. +// +// * ErrCodeInternalErrorException "InternalErrorException" +// The operation failed because of a system problem, even though the request +// was valid. Retry your request. +// +// * ErrCodeInvalidInputException "InvalidInputException" +// The parameters of the request were invalid. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/ListTagsForResource +func (c *FMS) ListTagsForResource(input *ListTagsForResourceInput) (*ListTagsForResourceOutput, error) { + req, out := c.ListTagsForResourceRequest(input) + return out, req.Send() +} + +// ListTagsForResourceWithContext is the same as ListTagsForResource with the addition of +// the ability to pass a context and additional request options. +// +// See ListTagsForResource for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *FMS) ListTagsForResourceWithContext(ctx aws.Context, input *ListTagsForResourceInput, opts ...request.Option) (*ListTagsForResourceOutput, error) { + req, out := c.ListTagsForResourceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opPutNotificationChannel = "PutNotificationChannel" // PutNotificationChannelRequest generates a "aws/request.Request" representing the @@ -1478,6 +1569,196 @@ func (c *FMS) PutPolicyWithContext(ctx aws.Context, input *PutPolicyInput, opts return out, req.Send() } +const opTagResource = "TagResource" + +// TagResourceRequest generates a "aws/request.Request" representing the +// client's request for the TagResource operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See TagResource for more information on using the TagResource +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the TagResourceRequest method. +// req, resp := client.TagResourceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/TagResource +func (c *FMS) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) { + op := &request.Operation{ + Name: opTagResource, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &TagResourceInput{} + } + + output = &TagResourceOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// TagResource API operation for Firewall Management Service. +// +// Adds one or more tags to an AWS resource. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Firewall Management Service's +// API operation TagResource for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource was not found. +// +// * ErrCodeInvalidOperationException "InvalidOperationException" +// The operation failed because there was nothing to do. For example, you might +// have submitted an AssociateAdminAccount request, but the account ID that +// you submitted was already set as the AWS Firewall Manager administrator. +// +// * ErrCodeInternalErrorException "InternalErrorException" +// The operation failed because of a system problem, even though the request +// was valid. Retry your request. +// +// * ErrCodeInvalidInputException "InvalidInputException" +// The parameters of the request were invalid. +// +// * ErrCodeLimitExceededException "LimitExceededException" +// The operation exceeds a resource limit, for example, the maximum number of +// policy objects that you can create for an AWS account. For more information, +// see Firewall Manager Limits (https://docs.aws.amazon.com/waf/latest/developerguide/fms-limits.html) +// in the AWS WAF Developer Guide. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/TagResource +func (c *FMS) TagResource(input *TagResourceInput) (*TagResourceOutput, error) { + req, out := c.TagResourceRequest(input) + return out, req.Send() +} + +// TagResourceWithContext is the same as TagResource with the addition of +// the ability to pass a context and additional request options. +// +// See TagResource for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *FMS) TagResourceWithContext(ctx aws.Context, input *TagResourceInput, opts ...request.Option) (*TagResourceOutput, error) { + req, out := c.TagResourceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUntagResource = "UntagResource" + +// UntagResourceRequest generates a "aws/request.Request" representing the +// client's request for the UntagResource operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UntagResource for more information on using the UntagResource +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the UntagResourceRequest method. +// req, resp := client.UntagResourceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/UntagResource +func (c *FMS) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) { + op := &request.Operation{ + Name: opUntagResource, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UntagResourceInput{} + } + + output = &UntagResourceOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// UntagResource API operation for Firewall Management Service. +// +// Removes one or more tags from an AWS resource. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Firewall Management Service's +// API operation UntagResource for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The specified resource was not found. +// +// * ErrCodeInvalidOperationException "InvalidOperationException" +// The operation failed because there was nothing to do. For example, you might +// have submitted an AssociateAdminAccount request, but the account ID that +// you submitted was already set as the AWS Firewall Manager administrator. +// +// * ErrCodeInternalErrorException "InternalErrorException" +// The operation failed because of a system problem, even though the request +// was valid. Retry your request. +// +// * ErrCodeInvalidInputException "InvalidInputException" +// The parameters of the request were invalid. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/UntagResource +func (c *FMS) UntagResource(input *UntagResourceInput) (*UntagResourceOutput, error) { + req, out := c.UntagResourceRequest(input) + return out, req.Send() +} + +// UntagResourceWithContext is the same as UntagResource with the addition of +// the ability to pass a context and additional request options. +// +// See UntagResource for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *FMS) UntagResourceWithContext(ctx aws.Context, input *UntagResourceInput, opts ...request.Option) (*UntagResourceOutput, error) { + req, out := c.UntagResourceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + type AssociateAdminAccountInput struct { _ struct{} `type:"structure"` @@ -2497,6 +2778,72 @@ func (s *ListPoliciesOutput) SetPolicyList(v []*PolicySummary) *ListPoliciesOutp return s } +type ListTagsForResourceInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the resource to return tags for. The Firewall + // Manager policy is the only AWS resource that supports tagging, so this ARN + // is a policy ARN.. + // + // ResourceArn is a required field + ResourceArn *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s ListTagsForResourceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListTagsForResourceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListTagsForResourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListTagsForResourceInput"} + if s.ResourceArn == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceArn")) + } + if s.ResourceArn != nil && len(*s.ResourceArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResourceArn sets the ResourceArn field's value. +func (s *ListTagsForResourceInput) SetResourceArn(v string) *ListTagsForResourceInput { + s.ResourceArn = &v + return s +} + +type ListTagsForResourceOutput struct { + _ struct{} `type:"structure"` + + // The tags associated with the resource. + TagList []*Tag `type:"list"` +} + +// String returns the string representation +func (s ListTagsForResourceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListTagsForResourceOutput) GoString() string { + return s.String() +} + +// SetTagList sets the TagList field's value. +func (s *ListTagsForResourceOutput) SetTagList(v []*Tag) *ListTagsForResourceOutput { + s.TagList = v + return s +} + // An AWS Firewall Manager policy. type Policy struct { _ struct{} `type:"structure"` @@ -3027,6 +3374,9 @@ type PutPolicyInput struct { // // Policy is a required field Policy *Policy `type:"structure" required:"true"` + + // The tags to add to the AWS resource. + TagList []*Tag `type:"list"` } // String returns the string representation @@ -3050,6 +3400,16 @@ func (s *PutPolicyInput) Validate() error { invalidParams.AddNested("Policy", err.(request.ErrInvalidParams)) } } + if s.TagList != nil { + for i, v := range s.TagList { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TagList", i), err.(request.ErrInvalidParams)) + } + } + } if invalidParams.Len() > 0 { return invalidParams @@ -3063,6 +3423,12 @@ func (s *PutPolicyInput) SetPolicy(v *Policy) *PutPolicyInput { return s } +// SetTagList sets the TagList field's value. +func (s *PutPolicyInput) SetTagList(v []*Tag) *PutPolicyInput { + s.TagList = v + return s +} + type PutPolicyOutput struct { _ struct{} `type:"structure"` @@ -3228,6 +3594,219 @@ func (s *SecurityServicePolicyData) SetType(v string) *SecurityServicePolicyData return s } +// A collection of key:value pairs associated with an AWS resource. The key:value +// pair can be anything you define. Typically, the tag key represents a category +// (such as "environment") and the tag value represents a specific value within +// that category (such as "test," "development," or "production"). You can add +// up to 50 tags to each AWS resource. +type Tag struct { + _ struct{} `type:"structure"` + + // Part of the key:value pair that defines a tag. You can use a tag key to describe + // a category of information, such as "customer." Tag keys are case-sensitive. + // + // Key is a required field + Key *string `min:"1" type:"string" required:"true"` + + // Part of the key:value pair that defines a tag. You can use a tag value to + // describe a specific value within a category, such as "companyA" or "companyB." + // Tag values are case-sensitive. + // + // Value is a required field + Value *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s Tag) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Tag) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *Tag) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Tag"} + if s.Key == nil { + invalidParams.Add(request.NewErrParamRequired("Key")) + } + if s.Key != nil && len(*s.Key) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Key", 1)) + } + if s.Value == nil { + invalidParams.Add(request.NewErrParamRequired("Value")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetKey sets the Key field's value. +func (s *Tag) SetKey(v string) *Tag { + s.Key = &v + return s +} + +// SetValue sets the Value field's value. +func (s *Tag) SetValue(v string) *Tag { + s.Value = &v + return s +} + +type TagResourceInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the resource. The Firewall Manager policy + // is the only AWS resource that supports tagging, so this ARN is a policy ARN. + // + // ResourceArn is a required field + ResourceArn *string `min:"1" type:"string" required:"true"` + + // The tags to add to the resource. + // + // TagList is a required field + TagList []*Tag `type:"list" required:"true"` +} + +// String returns the string representation +func (s TagResourceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TagResourceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *TagResourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "TagResourceInput"} + if s.ResourceArn == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceArn")) + } + if s.ResourceArn != nil && len(*s.ResourceArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1)) + } + if s.TagList == nil { + invalidParams.Add(request.NewErrParamRequired("TagList")) + } + if s.TagList != nil { + for i, v := range s.TagList { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TagList", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResourceArn sets the ResourceArn field's value. +func (s *TagResourceInput) SetResourceArn(v string) *TagResourceInput { + s.ResourceArn = &v + return s +} + +// SetTagList sets the TagList field's value. +func (s *TagResourceInput) SetTagList(v []*Tag) *TagResourceInput { + s.TagList = v + return s +} + +type TagResourceOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s TagResourceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TagResourceOutput) GoString() string { + return s.String() +} + +type UntagResourceInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the resource. The Firewall Manager policy + // is the only AWS resource that supports tagging, so this ARN is a policy ARN. + // + // ResourceArn is a required field + ResourceArn *string `min:"1" type:"string" required:"true"` + + // The keys of the tags to remove from the resource. + // + // TagKeys is a required field + TagKeys []*string `type:"list" required:"true"` +} + +// String returns the string representation +func (s UntagResourceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UntagResourceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UntagResourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UntagResourceInput"} + if s.ResourceArn == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceArn")) + } + if s.ResourceArn != nil && len(*s.ResourceArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1)) + } + if s.TagKeys == nil { + invalidParams.Add(request.NewErrParamRequired("TagKeys")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResourceArn sets the ResourceArn field's value. +func (s *UntagResourceInput) SetResourceArn(v string) *UntagResourceInput { + s.ResourceArn = &v + return s +} + +// SetTagKeys sets the TagKeys field's value. +func (s *UntagResourceInput) SetTagKeys(v []*string) *UntagResourceInput { + s.TagKeys = v + return s +} + +type UntagResourceOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s UntagResourceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UntagResourceOutput) GoString() string { + return s.String() +} + const ( // AccountRoleStatusReady is a AccountRoleStatus enum value AccountRoleStatusReady = "READY" diff --git a/service/fms/fmsiface/interface.go b/service/fms/fmsiface/interface.go index e82bdd07dd8..bd425c553dc 100644 --- a/service/fms/fmsiface/interface.go +++ b/service/fms/fmsiface/interface.go @@ -117,6 +117,10 @@ type FMSAPI interface { ListPoliciesPages(*fms.ListPoliciesInput, func(*fms.ListPoliciesOutput, bool) bool) error ListPoliciesPagesWithContext(aws.Context, *fms.ListPoliciesInput, func(*fms.ListPoliciesOutput, bool) bool, ...request.Option) error + ListTagsForResource(*fms.ListTagsForResourceInput) (*fms.ListTagsForResourceOutput, error) + ListTagsForResourceWithContext(aws.Context, *fms.ListTagsForResourceInput, ...request.Option) (*fms.ListTagsForResourceOutput, error) + ListTagsForResourceRequest(*fms.ListTagsForResourceInput) (*request.Request, *fms.ListTagsForResourceOutput) + PutNotificationChannel(*fms.PutNotificationChannelInput) (*fms.PutNotificationChannelOutput, error) PutNotificationChannelWithContext(aws.Context, *fms.PutNotificationChannelInput, ...request.Option) (*fms.PutNotificationChannelOutput, error) PutNotificationChannelRequest(*fms.PutNotificationChannelInput) (*request.Request, *fms.PutNotificationChannelOutput) @@ -124,6 +128,14 @@ type FMSAPI interface { PutPolicy(*fms.PutPolicyInput) (*fms.PutPolicyOutput, error) PutPolicyWithContext(aws.Context, *fms.PutPolicyInput, ...request.Option) (*fms.PutPolicyOutput, error) PutPolicyRequest(*fms.PutPolicyInput) (*request.Request, *fms.PutPolicyOutput) + + TagResource(*fms.TagResourceInput) (*fms.TagResourceOutput, error) + TagResourceWithContext(aws.Context, *fms.TagResourceInput, ...request.Option) (*fms.TagResourceOutput, error) + TagResourceRequest(*fms.TagResourceInput) (*request.Request, *fms.TagResourceOutput) + + UntagResource(*fms.UntagResourceInput) (*fms.UntagResourceOutput, error) + UntagResourceWithContext(aws.Context, *fms.UntagResourceInput, ...request.Option) (*fms.UntagResourceOutput, error) + UntagResourceRequest(*fms.UntagResourceInput) (*request.Request, *fms.UntagResourceOutput) } var _ FMSAPI = (*fms.FMS)(nil) diff --git a/service/translate/api.go b/service/translate/api.go index 87caf248573..3b9f8d71285 100644 --- a/service/translate/api.go +++ b/service/translate/api.go @@ -70,7 +70,7 @@ func (c *Translate) DeleteTerminologyRequest(input *DeleteTerminologyInput) (req // * ErrCodeResourceNotFoundException "ResourceNotFoundException" // The resource you are looking for has not been found. Review the resource // you're looking for and see if a different resource will accomplish your needs -// before retrying the revised request. . +// before retrying the revised request. // // * ErrCodeTooManyRequestsException "TooManyRequestsException" // You have made too many requests within a short period of time. Wait for a @@ -101,6 +101,96 @@ func (c *Translate) DeleteTerminologyWithContext(ctx aws.Context, input *DeleteT return out, req.Send() } +const opDescribeTextTranslationJob = "DescribeTextTranslationJob" + +// DescribeTextTranslationJobRequest generates a "aws/request.Request" representing the +// client's request for the DescribeTextTranslationJob operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DescribeTextTranslationJob for more information on using the DescribeTextTranslationJob +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DescribeTextTranslationJobRequest method. +// req, resp := client.DescribeTextTranslationJobRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/DescribeTextTranslationJob +func (c *Translate) DescribeTextTranslationJobRequest(input *DescribeTextTranslationJobInput) (req *request.Request, output *DescribeTextTranslationJobOutput) { + op := &request.Operation{ + Name: opDescribeTextTranslationJob, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeTextTranslationJobInput{} + } + + output = &DescribeTextTranslationJobOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeTextTranslationJob API operation for Amazon Translate. +// +// Gets the properties associated with an asycnhronous batch translation job +// including name, ID, status, source and target languages, input/output S3 +// buckets, and so on. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Translate's +// API operation DescribeTextTranslationJob for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The resource you are looking for has not been found. Review the resource +// you're looking for and see if a different resource will accomplish your needs +// before retrying the revised request. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// You have made too many requests within a short period of time. Wait for a +// short time and then try your request again. +// +// * ErrCodeInternalServerException "InternalServerException" +// An internal server error occurred. Retry your request. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/DescribeTextTranslationJob +func (c *Translate) DescribeTextTranslationJob(input *DescribeTextTranslationJobInput) (*DescribeTextTranslationJobOutput, error) { + req, out := c.DescribeTextTranslationJobRequest(input) + return out, req.Send() +} + +// DescribeTextTranslationJobWithContext is the same as DescribeTextTranslationJob with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeTextTranslationJob for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Translate) DescribeTextTranslationJobWithContext(ctx aws.Context, input *DescribeTextTranslationJobInput, opts ...request.Option) (*DescribeTextTranslationJobOutput, error) { + req, out := c.DescribeTextTranslationJobRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opGetTerminology = "GetTerminology" // GetTerminologyRequest generates a "aws/request.Request" representing the @@ -158,7 +248,7 @@ func (c *Translate) GetTerminologyRequest(input *GetTerminologyInput) (req *requ // * ErrCodeResourceNotFoundException "ResourceNotFoundException" // The resource you are looking for has not been found. Review the resource // you're looking for and see if a different resource will accomplish your needs -// before retrying the revised request. . +// before retrying the revised request. // // * ErrCodeInvalidParameterValueException "InvalidParameterValueException" // The value of the parameter is invalid. Review the value of the parameter @@ -324,6 +414,12 @@ func (c *Translate) ListTerminologiesRequest(input *ListTerminologiesInput) (req Name: opListTerminologies, HTTPMethod: "POST", HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, } if input == nil { @@ -380,117 +476,269 @@ func (c *Translate) ListTerminologiesWithContext(ctx aws.Context, input *ListTer return out, req.Send() } -const opText = "TranslateText" +// ListTerminologiesPages iterates over the pages of a ListTerminologies operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListTerminologies method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a ListTerminologies operation. +// pageNum := 0 +// err := client.ListTerminologiesPages(params, +// func(page *translate.ListTerminologiesOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *Translate) ListTerminologiesPages(input *ListTerminologiesInput, fn func(*ListTerminologiesOutput, bool) bool) error { + return c.ListTerminologiesPagesWithContext(aws.BackgroundContext(), input, fn) +} -// TextRequest generates a "aws/request.Request" representing the -// client's request for the Text operation. The "output" return +// ListTerminologiesPagesWithContext same as ListTerminologiesPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Translate) ListTerminologiesPagesWithContext(ctx aws.Context, input *ListTerminologiesInput, fn func(*ListTerminologiesOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListTerminologiesInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListTerminologiesRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + for p.Next() { + if !fn(p.Page().(*ListTerminologiesOutput), !p.HasNextPage()) { + break + } + } + + return p.Err() +} + +const opListTextTranslationJobs = "ListTextTranslationJobs" + +// ListTextTranslationJobsRequest generates a "aws/request.Request" representing the +// client's request for the ListTextTranslationJobs operation. The "output" return // value will be populated with the request's response once the request completes // successfully. // // Use "Send" method on the returned Request to send the API call to the service. // the "output" return value is not valid until after Send returns without error. // -// See Text for more information on using the Text +// See ListTextTranslationJobs for more information on using the ListTextTranslationJobs // API call, and error handling. // // This method is useful when you want to inject custom logic or configuration // into the SDK's request lifecycle. Such as custom headers, or retry logic. // // -// // Example sending a request using the TextRequest method. -// req, resp := client.TextRequest(params) +// // Example sending a request using the ListTextTranslationJobsRequest method. +// req, resp := client.ListTextTranslationJobsRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/Text -func (c *Translate) TextRequest(input *TextInput) (req *request.Request, output *TextOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/ListTextTranslationJobs +func (c *Translate) ListTextTranslationJobsRequest(input *ListTextTranslationJobsInput) (req *request.Request, output *ListTextTranslationJobsOutput) { op := &request.Operation{ - Name: opText, + Name: opListTextTranslationJobs, HTTPMethod: "POST", HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, } if input == nil { - input = &TextInput{} + input = &ListTextTranslationJobsInput{} } - output = &TextOutput{} + output = &ListTextTranslationJobsOutput{} req = c.newRequest(op, input, output) return } -// Text API operation for Amazon Translate. +// ListTextTranslationJobs API operation for Amazon Translate. // -// Translates input text from the source language to the target language. It -// is not necessary to use English (en) as either the source or the target language -// but not all language combinations are supported by Amazon Translate. For -// more information, see Supported Language Pairs (http://docs.aws.amazon.com/translate/latest/dg/pairs.html). +// Gets a list of the batch translation jobs that you have submitted. // -// * Arabic (ar) +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Translate's +// API operation ListTextTranslationJobs for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidRequestException "InvalidRequestException" +// The request that you made is invalid. Check your request to determine why +// it's invalid and then retry the request. // -// * Chinese (Simplified) (zh) +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// You have made too many requests within a short period of time. Wait for a +// short time and then try your request again. // -// * Chinese (Traditional) (zh-TW) +// * ErrCodeInvalidFilterException "InvalidFilterException" +// The filter specified for the operation is invalid. Specify a different filter. // -// * Czech (cs) +// * ErrCodeInternalServerException "InternalServerException" +// An internal server error occurred. Retry your request. // -// * Danish (da) +// See also, https://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/ListTextTranslationJobs +func (c *Translate) ListTextTranslationJobs(input *ListTextTranslationJobsInput) (*ListTextTranslationJobsOutput, error) { + req, out := c.ListTextTranslationJobsRequest(input) + return out, req.Send() +} + +// ListTextTranslationJobsWithContext is the same as ListTextTranslationJobs with the addition of +// the ability to pass a context and additional request options. // -// * Dutch (nl) +// See ListTextTranslationJobs for details on how to use this API operation. // -// * English (en) +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Translate) ListTextTranslationJobsWithContext(ctx aws.Context, input *ListTextTranslationJobsInput, opts ...request.Option) (*ListTextTranslationJobsOutput, error) { + req, out := c.ListTextTranslationJobsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListTextTranslationJobsPages iterates over the pages of a ListTextTranslationJobs operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. // -// * Finnish (fi) +// See ListTextTranslationJobs method for more information on how to use this operation. // -// * French (fr) +// Note: This operation can generate multiple requests to a service. // -// * German (de) +// // Example iterating over at most 3 pages of a ListTextTranslationJobs operation. +// pageNum := 0 +// err := client.ListTextTranslationJobsPages(params, +// func(page *translate.ListTextTranslationJobsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) // -// * Hebrew (he) +func (c *Translate) ListTextTranslationJobsPages(input *ListTextTranslationJobsInput, fn func(*ListTextTranslationJobsOutput, bool) bool) error { + return c.ListTextTranslationJobsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListTextTranslationJobsPagesWithContext same as ListTextTranslationJobsPages except +// it takes a Context and allows setting request options on the pages. // -// * Indonesian (id) +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Translate) ListTextTranslationJobsPagesWithContext(ctx aws.Context, input *ListTextTranslationJobsInput, fn func(*ListTextTranslationJobsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListTextTranslationJobsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListTextTranslationJobsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + for p.Next() { + if !fn(p.Page().(*ListTextTranslationJobsOutput), !p.HasNextPage()) { + break + } + } + + return p.Err() +} + +const opStartTextTranslationJob = "StartTextTranslationJob" + +// StartTextTranslationJobRequest generates a "aws/request.Request" representing the +// client's request for the StartTextTranslationJob operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. // -// * Italian (it) +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. // -// * Japanese (ja) +// See StartTextTranslationJob for more information on using the StartTextTranslationJob +// API call, and error handling. // -// * Korean (ko) +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. // -// * Polish (pl) // -// * Portuguese (pt) +// // Example sending a request using the StartTextTranslationJobRequest method. +// req, resp := client.StartTextTranslationJobRequest(params) // -// * Russian (ru) +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } // -// * Spanish (es) +// See also, https://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/StartTextTranslationJob +func (c *Translate) StartTextTranslationJobRequest(input *StartTextTranslationJobInput) (req *request.Request, output *StartTextTranslationJobOutput) { + op := &request.Operation{ + Name: opStartTextTranslationJob, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &StartTextTranslationJobInput{} + } + + output = &StartTextTranslationJobOutput{} + req = c.newRequest(op, input, output) + return +} + +// StartTextTranslationJob API operation for Amazon Translate. // -// * Swedish (sv) +// Starts an asynchronous batch translation job. Batch translation jobs can +// be used to translate large volumes of text across multiple documents at once. +// For more information, see async. // -// * Turkish (tr) +// Batch translation jobs can be described with the DescribeTextTranslationJob +// operation, listed with the ListTextTranslationJobs operation, and stopped +// with the StopTextTranslationJob operation. // -// To have Amazon Translate determine the source language of your text, you -// can specify auto in the SourceLanguageCode field. If you specify auto, Amazon -// Translate will call Amazon Comprehend to determine the source language. +// Amazon Translate does not support batch translation of multiple source languages +// at once. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about // the error. // // See the AWS API reference guide for Amazon Translate's -// API operation Text for usage and error information. +// API operation StartTextTranslationJob for usage and error information. // // Returned Error Codes: -// * ErrCodeInvalidRequestException "InvalidRequestException" -// The request that you made is invalid. Check your request to determine why -// it's invalid and then retry the request. -// -// * ErrCodeTextSizeLimitExceededException "TextSizeLimitExceededException" -// The size of the text you submitted exceeds the size limit. Reduce the size -// of the text or use a smaller document and then retry your request. -// // * ErrCodeTooManyRequestsException "TooManyRequestsException" // You have made too many requests within a short period of time. Wait for a // short time and then try your request again. @@ -499,92 +747,294 @@ func (c *Translate) TextRequest(input *TextInput) (req *request.Request, output // Amazon Translate does not support translation from the language of the source // text into the requested target language. For more information, see how-to-error-msg. // -// * ErrCodeDetectedLanguageLowConfidenceException "DetectedLanguageLowConfidenceException" -// The confidence that Amazon Comprehend accurately detected the source language -// is low. If a low confidence level is acceptable for your application, you -// can use the language in the exception to call Amazon Translate again. For -// more information, see the DetectDominantLanguage (https://docs.aws.amazon.com/comprehend/latest/dg/API_DetectDominantLanguage.html) -// operation in the Amazon Comprehend Developer Guide. +// * ErrCodeInvalidRequestException "InvalidRequestException" +// The request that you made is invalid. Check your request to determine why +// it's invalid and then retry the request. // // * ErrCodeResourceNotFoundException "ResourceNotFoundException" // The resource you are looking for has not been found. Review the resource // you're looking for and see if a different resource will accomplish your needs -// before retrying the revised request. . +// before retrying the revised request. // // * ErrCodeInternalServerException "InternalServerException" // An internal server error occurred. Retry your request. // -// * ErrCodeServiceUnavailableException "ServiceUnavailableException" -// The Amazon Translate service is temporarily unavailable. Please wait a bit -// and then retry your request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/Text -func (c *Translate) Text(input *TextInput) (*TextOutput, error) { - req, out := c.TextRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/StartTextTranslationJob +func (c *Translate) StartTextTranslationJob(input *StartTextTranslationJobInput) (*StartTextTranslationJobOutput, error) { + req, out := c.StartTextTranslationJobRequest(input) return out, req.Send() } -// TextWithContext is the same as Text with the addition of +// StartTextTranslationJobWithContext is the same as StartTextTranslationJob with the addition of // the ability to pass a context and additional request options. // -// See Text for details on how to use this API operation. +// See StartTextTranslationJob for details on how to use this API operation. // // The context must be non-nil and will be used for request cancellation. If // the context is nil a panic will occur. In the future the SDK may create // sub-contexts for http.Requests. See https://golang.org/pkg/context/ // for more information on using Contexts. -func (c *Translate) TextWithContext(ctx aws.Context, input *TextInput, opts ...request.Option) (*TextOutput, error) { - req, out := c.TextRequest(input) +func (c *Translate) StartTextTranslationJobWithContext(ctx aws.Context, input *StartTextTranslationJobInput, opts ...request.Option) (*StartTextTranslationJobOutput, error) { + req, out := c.StartTextTranslationJobRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -// The custom terminology applied to the input text by Amazon Translate for -// the translated text response. This is optional in the response and will only -// be present if you specified terminology input in the request. Currently, -// only one terminology can be applied per TranslateText request. -type AppliedTerminology struct { - _ struct{} `type:"structure"` - - // The name of the custom terminology applied to the input text by Amazon Translate - // for the translated text response. - Name *string `min:"1" type:"string"` - - // The specific terms of the custom terminology applied to the input text by - // Amazon Translate for the translated text response. A maximum of 250 terms - // will be returned, and the specific terms applied will be the first 250 terms - // in the source text. - Terms []*Term `type:"list"` -} - -// String returns the string representation -func (s AppliedTerminology) String() string { - return awsutil.Prettify(s) -} +const opStopTextTranslationJob = "StopTextTranslationJob" -// GoString returns the string representation -func (s AppliedTerminology) GoString() string { - return s.String() -} +// StopTextTranslationJobRequest generates a "aws/request.Request" representing the +// client's request for the StopTextTranslationJob operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See StopTextTranslationJob for more information on using the StopTextTranslationJob +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the StopTextTranslationJobRequest method. +// req, resp := client.StopTextTranslationJobRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/StopTextTranslationJob +func (c *Translate) StopTextTranslationJobRequest(input *StopTextTranslationJobInput) (req *request.Request, output *StopTextTranslationJobOutput) { + op := &request.Operation{ + Name: opStopTextTranslationJob, + HTTPMethod: "POST", + HTTPPath: "/", + } -// SetName sets the Name field's value. -func (s *AppliedTerminology) SetName(v string) *AppliedTerminology { - s.Name = &v - return s -} + if input == nil { + input = &StopTextTranslationJobInput{} + } -// SetTerms sets the Terms field's value. -func (s *AppliedTerminology) SetTerms(v []*Term) *AppliedTerminology { - s.Terms = v - return s + output = &StopTextTranslationJobOutput{} + req = c.newRequest(op, input, output) + return } -type DeleteTerminologyInput struct { - _ struct{} `type:"structure"` - - // The name of the custom terminology being deleted. - // +// StopTextTranslationJob API operation for Amazon Translate. +// +// Stops an asynchronous batch translation job that is in progress. +// +// If the job's state is IN_PROGRESS, the job will be marked for termination +// and put into the STOP_REQUESTED state. If the job completes before it can +// be stopped, it is put into the COMPLETED state. Otherwise, the job is put +// into the STOPPED state. +// +// Asynchronous batch translation jobs are started with the StartTextTranslationJob +// operation. You can use the DescribeTextTranslationJob or ListTextTranslationJobs +// operations to get a batch translation job's JobId. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Translate's +// API operation StopTextTranslationJob for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The resource you are looking for has not been found. Review the resource +// you're looking for and see if a different resource will accomplish your needs +// before retrying the revised request. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// You have made too many requests within a short period of time. Wait for a +// short time and then try your request again. +// +// * ErrCodeInternalServerException "InternalServerException" +// An internal server error occurred. Retry your request. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/StopTextTranslationJob +func (c *Translate) StopTextTranslationJob(input *StopTextTranslationJobInput) (*StopTextTranslationJobOutput, error) { + req, out := c.StopTextTranslationJobRequest(input) + return out, req.Send() +} + +// StopTextTranslationJobWithContext is the same as StopTextTranslationJob with the addition of +// the ability to pass a context and additional request options. +// +// See StopTextTranslationJob for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Translate) StopTextTranslationJobWithContext(ctx aws.Context, input *StopTextTranslationJobInput, opts ...request.Option) (*StopTextTranslationJobOutput, error) { + req, out := c.StopTextTranslationJobRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opText = "TranslateText" + +// TextRequest generates a "aws/request.Request" representing the +// client's request for the Text operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See Text for more information on using the Text +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the TextRequest method. +// req, resp := client.TextRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/Text +func (c *Translate) TextRequest(input *TextInput) (req *request.Request, output *TextOutput) { + op := &request.Operation{ + Name: opText, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &TextInput{} + } + + output = &TextOutput{} + req = c.newRequest(op, input, output) + return +} + +// Text API operation for Amazon Translate. +// +// Translates input text from the source language to the target language. For +// a list of available languages and language codes, see what-is-languages. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Translate's +// API operation Text for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidRequestException "InvalidRequestException" +// The request that you made is invalid. Check your request to determine why +// it's invalid and then retry the request. +// +// * ErrCodeTextSizeLimitExceededException "TextSizeLimitExceededException" +// The size of the text you submitted exceeds the size limit. Reduce the size +// of the text or use a smaller document and then retry your request. +// +// * ErrCodeTooManyRequestsException "TooManyRequestsException" +// You have made too many requests within a short period of time. Wait for a +// short time and then try your request again. +// +// * ErrCodeUnsupportedLanguagePairException "UnsupportedLanguagePairException" +// Amazon Translate does not support translation from the language of the source +// text into the requested target language. For more information, see how-to-error-msg. +// +// * ErrCodeDetectedLanguageLowConfidenceException "DetectedLanguageLowConfidenceException" +// The confidence that Amazon Comprehend accurately detected the source language +// is low. If a low confidence level is acceptable for your application, you +// can use the language in the exception to call Amazon Translate again. For +// more information, see the DetectDominantLanguage (https://docs.aws.amazon.com/comprehend/latest/dg/API_DetectDominantLanguage.html) +// operation in the Amazon Comprehend Developer Guide. +// +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// The resource you are looking for has not been found. Review the resource +// you're looking for and see if a different resource will accomplish your needs +// before retrying the revised request. +// +// * ErrCodeInternalServerException "InternalServerException" +// An internal server error occurred. Retry your request. +// +// * ErrCodeServiceUnavailableException "ServiceUnavailableException" +// The Amazon Translate service is temporarily unavailable. Please wait a bit +// and then retry your request. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/translate-2017-07-01/Text +func (c *Translate) Text(input *TextInput) (*TextOutput, error) { + req, out := c.TextRequest(input) + return out, req.Send() +} + +// TextWithContext is the same as Text with the addition of +// the ability to pass a context and additional request options. +// +// See Text for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Translate) TextWithContext(ctx aws.Context, input *TextInput, opts ...request.Option) (*TextOutput, error) { + req, out := c.TextRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// The custom terminology applied to the input text by Amazon Translate for +// the translated text response. This is optional in the response and will only +// be present if you specified terminology input in the request. Currently, +// only one terminology can be applied per TranslateText request. +type AppliedTerminology struct { + _ struct{} `type:"structure"` + + // The name of the custom terminology applied to the input text by Amazon Translate + // for the translated text response. + Name *string `min:"1" type:"string"` + + // The specific terms of the custom terminology applied to the input text by + // Amazon Translate for the translated text response. A maximum of 250 terms + // will be returned, and the specific terms applied will be the first 250 terms + // in the source text. + Terms []*Term `type:"list"` +} + +// String returns the string representation +func (s AppliedTerminology) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AppliedTerminology) GoString() string { + return s.String() +} + +// SetName sets the Name field's value. +func (s *AppliedTerminology) SetName(v string) *AppliedTerminology { + s.Name = &v + return s +} + +// SetTerms sets the Terms field's value. +func (s *AppliedTerminology) SetTerms(v []*Term) *AppliedTerminology { + s.Terms = v + return s +} + +type DeleteTerminologyInput struct { + _ struct{} `type:"structure"` + + // The name of the custom terminology being deleted. + // // Name is a required field Name *string `min:"1" type:"string" required:"true"` } @@ -635,6 +1085,72 @@ func (s DeleteTerminologyOutput) GoString() string { return s.String() } +type DescribeTextTranslationJobInput struct { + _ struct{} `type:"structure"` + + // The identifier that Amazon Translate generated for the job. The StartTextTranslationJob + // operation returns this identifier in its response. + // + // JobId is a required field + JobId *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeTextTranslationJobInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeTextTranslationJobInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeTextTranslationJobInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeTextTranslationJobInput"} + if s.JobId == nil { + invalidParams.Add(request.NewErrParamRequired("JobId")) + } + if s.JobId != nil && len(*s.JobId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("JobId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetJobId sets the JobId field's value. +func (s *DescribeTextTranslationJobInput) SetJobId(v string) *DescribeTextTranslationJobInput { + s.JobId = &v + return s +} + +type DescribeTextTranslationJobOutput struct { + _ struct{} `type:"structure"` + + // An object that contains the properties associated with an asynchronous batch + // translation job. + TextTranslationJobProperties *TextTranslationJobProperties `type:"structure"` +} + +// String returns the string representation +func (s DescribeTextTranslationJobOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeTextTranslationJobOutput) GoString() string { + return s.String() +} + +// SetTextTranslationJobProperties sets the TextTranslationJobProperties field's value. +func (s *DescribeTextTranslationJobOutput) SetTextTranslationJobProperties(v *TextTranslationJobProperties) *DescribeTextTranslationJobOutput { + s.TextTranslationJobProperties = v + return s +} + // The encryption key used to encrypt the custom terminologies used by Amazon // Translate. type EncryptionKey struct { @@ -782,66 +1298,543 @@ func (s *GetTerminologyOutput) SetTerminologyProperties(v *TerminologyProperties return s } -type ImportTerminologyInput struct { +type ImportTerminologyInput struct { + _ struct{} `type:"structure"` + + // The description of the custom terminology being imported. + Description *string `type:"string"` + + // The encryption key for the custom terminology being imported. + EncryptionKey *EncryptionKey `type:"structure"` + + // The merge strategy of the custom terminology being imported. Currently, only + // the OVERWRITE merge strategy is supported. In this case, the imported terminology + // will overwrite an existing terminology of the same name. + // + // MergeStrategy is a required field + MergeStrategy *string `type:"string" required:"true" enum:"MergeStrategy"` + + // The name of the custom terminology being imported. + // + // Name is a required field + Name *string `min:"1" type:"string" required:"true"` + + // The terminology data for the custom terminology being imported. + // + // TerminologyData is a required field + TerminologyData *TerminologyData `type:"structure" required:"true"` +} + +// String returns the string representation +func (s ImportTerminologyInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ImportTerminologyInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ImportTerminologyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ImportTerminologyInput"} + if s.MergeStrategy == nil { + invalidParams.Add(request.NewErrParamRequired("MergeStrategy")) + } + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.Name != nil && len(*s.Name) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Name", 1)) + } + if s.TerminologyData == nil { + invalidParams.Add(request.NewErrParamRequired("TerminologyData")) + } + if s.EncryptionKey != nil { + if err := s.EncryptionKey.Validate(); err != nil { + invalidParams.AddNested("EncryptionKey", err.(request.ErrInvalidParams)) + } + } + if s.TerminologyData != nil { + if err := s.TerminologyData.Validate(); err != nil { + invalidParams.AddNested("TerminologyData", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDescription sets the Description field's value. +func (s *ImportTerminologyInput) SetDescription(v string) *ImportTerminologyInput { + s.Description = &v + return s +} + +// SetEncryptionKey sets the EncryptionKey field's value. +func (s *ImportTerminologyInput) SetEncryptionKey(v *EncryptionKey) *ImportTerminologyInput { + s.EncryptionKey = v + return s +} + +// SetMergeStrategy sets the MergeStrategy field's value. +func (s *ImportTerminologyInput) SetMergeStrategy(v string) *ImportTerminologyInput { + s.MergeStrategy = &v + return s +} + +// SetName sets the Name field's value. +func (s *ImportTerminologyInput) SetName(v string) *ImportTerminologyInput { + s.Name = &v + return s +} + +// SetTerminologyData sets the TerminologyData field's value. +func (s *ImportTerminologyInput) SetTerminologyData(v *TerminologyData) *ImportTerminologyInput { + s.TerminologyData = v + return s +} + +type ImportTerminologyOutput struct { + _ struct{} `type:"structure"` + + // The properties of the custom terminology being imported. + TerminologyProperties *TerminologyProperties `type:"structure"` +} + +// String returns the string representation +func (s ImportTerminologyOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ImportTerminologyOutput) GoString() string { + return s.String() +} + +// SetTerminologyProperties sets the TerminologyProperties field's value. +func (s *ImportTerminologyOutput) SetTerminologyProperties(v *TerminologyProperties) *ImportTerminologyOutput { + s.TerminologyProperties = v + return s +} + +// The input configuration properties for requesting a batch translation job. +type InputDataConfig struct { + _ struct{} `type:"structure"` + + // The multipurpose internet mail extension (MIME) type of the input files. + // Valid values are text/plain for plaintext files and text/html for HTML files. + // + // ContentType is a required field + ContentType *string `type:"string" required:"true"` + + // The URI of the AWS S3 folder that contains the input file. The folder must + // be in the same Region as the API endpoint you are calling. + // + // S3Uri is a required field + S3Uri *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s InputDataConfig) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s InputDataConfig) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *InputDataConfig) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "InputDataConfig"} + if s.ContentType == nil { + invalidParams.Add(request.NewErrParamRequired("ContentType")) + } + if s.S3Uri == nil { + invalidParams.Add(request.NewErrParamRequired("S3Uri")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetContentType sets the ContentType field's value. +func (s *InputDataConfig) SetContentType(v string) *InputDataConfig { + s.ContentType = &v + return s +} + +// SetS3Uri sets the S3Uri field's value. +func (s *InputDataConfig) SetS3Uri(v string) *InputDataConfig { + s.S3Uri = &v + return s +} + +// The number of documents successfully and unsuccessfully processed during +// a translation job. +type JobDetails struct { + _ struct{} `type:"structure"` + + // The number of documents that could not be processed during a translation + // job. + DocumentsWithErrorsCount *int64 `type:"integer"` + + // The number of documents used as input in a translation job. + InputDocumentsCount *int64 `type:"integer"` + + // The number of documents successfully processed during a translation job. + TranslatedDocumentsCount *int64 `type:"integer"` +} + +// String returns the string representation +func (s JobDetails) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s JobDetails) GoString() string { + return s.String() +} + +// SetDocumentsWithErrorsCount sets the DocumentsWithErrorsCount field's value. +func (s *JobDetails) SetDocumentsWithErrorsCount(v int64) *JobDetails { + s.DocumentsWithErrorsCount = &v + return s +} + +// SetInputDocumentsCount sets the InputDocumentsCount field's value. +func (s *JobDetails) SetInputDocumentsCount(v int64) *JobDetails { + s.InputDocumentsCount = &v + return s +} + +// SetTranslatedDocumentsCount sets the TranslatedDocumentsCount field's value. +func (s *JobDetails) SetTranslatedDocumentsCount(v int64) *JobDetails { + s.TranslatedDocumentsCount = &v + return s +} + +type ListTerminologiesInput struct { + _ struct{} `type:"structure"` + + // The maximum number of custom terminologies returned per list request. + MaxResults *int64 `min:"1" type:"integer"` + + // If the result of the request to ListTerminologies was truncated, include + // the NextToken to fetch the next group of custom terminologies. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s ListTerminologiesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListTerminologiesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListTerminologiesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListTerminologiesInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListTerminologiesInput) SetMaxResults(v int64) *ListTerminologiesInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListTerminologiesInput) SetNextToken(v string) *ListTerminologiesInput { + s.NextToken = &v + return s +} + +type ListTerminologiesOutput struct { + _ struct{} `type:"structure"` + + // If the response to the ListTerminologies was truncated, the NextToken fetches + // the next group of custom terminologies. + NextToken *string `type:"string"` + + // The properties list of the custom terminologies returned on the list request. + TerminologyPropertiesList []*TerminologyProperties `type:"list"` +} + +// String returns the string representation +func (s ListTerminologiesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListTerminologiesOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *ListTerminologiesOutput) SetNextToken(v string) *ListTerminologiesOutput { + s.NextToken = &v + return s +} + +// SetTerminologyPropertiesList sets the TerminologyPropertiesList field's value. +func (s *ListTerminologiesOutput) SetTerminologyPropertiesList(v []*TerminologyProperties) *ListTerminologiesOutput { + s.TerminologyPropertiesList = v + return s +} + +type ListTextTranslationJobsInput struct { + _ struct{} `type:"structure"` + + // The parameters that specify which batch translation jobs to retrieve. Filters + // include job name, job status, and submission time. You can only set one filter + // at a time. + Filter *TextTranslationJobFilter `type:"structure"` + + // The maximum number of results to return in each page. The default value is + // 100. + MaxResults *int64 `min:"1" type:"integer"` + + // The token to request the next page of results. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s ListTextTranslationJobsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListTextTranslationJobsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListTextTranslationJobsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListTextTranslationJobsInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + if s.Filter != nil { + if err := s.Filter.Validate(); err != nil { + invalidParams.AddNested("Filter", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetFilter sets the Filter field's value. +func (s *ListTextTranslationJobsInput) SetFilter(v *TextTranslationJobFilter) *ListTextTranslationJobsInput { + s.Filter = v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListTextTranslationJobsInput) SetMaxResults(v int64) *ListTextTranslationJobsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListTextTranslationJobsInput) SetNextToken(v string) *ListTextTranslationJobsInput { + s.NextToken = &v + return s +} + +type ListTextTranslationJobsOutput struct { + _ struct{} `type:"structure"` + + // The token to use to retreive the next page of results. This value is null + // when there are no more results to return. + NextToken *string `type:"string"` + + // A list containing the properties of each job that is returned. + TextTranslationJobPropertiesList []*TextTranslationJobProperties `type:"list"` +} + +// String returns the string representation +func (s ListTextTranslationJobsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListTextTranslationJobsOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *ListTextTranslationJobsOutput) SetNextToken(v string) *ListTextTranslationJobsOutput { + s.NextToken = &v + return s +} + +// SetTextTranslationJobPropertiesList sets the TextTranslationJobPropertiesList field's value. +func (s *ListTextTranslationJobsOutput) SetTextTranslationJobPropertiesList(v []*TextTranslationJobProperties) *ListTextTranslationJobsOutput { + s.TextTranslationJobPropertiesList = v + return s +} + +// The output configuration properties for a batch translation job. +type OutputDataConfig struct { + _ struct{} `type:"structure"` + + // The URI of the S3 folder that contains a translation job's output file. The + // folder must be in the same Region as the API endpoint that you are calling. + // + // S3Uri is a required field + S3Uri *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s OutputDataConfig) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s OutputDataConfig) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *OutputDataConfig) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "OutputDataConfig"} + if s.S3Uri == nil { + invalidParams.Add(request.NewErrParamRequired("S3Uri")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetS3Uri sets the S3Uri field's value. +func (s *OutputDataConfig) SetS3Uri(v string) *OutputDataConfig { + s.S3Uri = &v + return s +} + +type StartTextTranslationJobInput struct { _ struct{} `type:"structure"` - // The description of the custom terminology being imported. - Description *string `type:"string"` + // The client token of the EC2 instance calling the request. This token is auto-generated + // when using the Amazon Translate SDK. Otherwise, use the DescribeInstances + // (docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeInstances.html) + // EC2 operation to retreive an instance's client token. For more information, + // see Client Tokens (docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html#client-tokens) + // in the EC2 User Guide. + ClientToken *string `min:"1" type:"string" idempotencyToken:"true"` + + // The Amazon Resource Name (ARN) of an AWS Identity Access and Management (IAM) + // role that grants Amazon Translate read access to your input data. For more + // nformation, see identity-and-access-management. + // + // DataAccessRoleArn is a required field + DataAccessRoleArn *string `min:"20" type:"string" required:"true"` - // The encryption key for the custom terminology being imported. - EncryptionKey *EncryptionKey `type:"structure"` + // Specifies the format and S3 location of the input documents for the translation + // job. + // + // InputDataConfig is a required field + InputDataConfig *InputDataConfig `type:"structure" required:"true"` - // The merge strategy of the custom terminology being imported. Currently, only - // the OVERWRITE merge strategy is supported. In this case, the imported terminology - // will overwrite an existing terminology of the same name. + // The name of the batch translation job to be performed. + JobName *string `min:"1" type:"string"` + + // Specifies the S3 folder to which your job output will be saved. // - // MergeStrategy is a required field - MergeStrategy *string `type:"string" required:"true" enum:"MergeStrategy"` + // OutputDataConfig is a required field + OutputDataConfig *OutputDataConfig `type:"structure" required:"true"` - // The name of the custom terminology being imported. + // The language code of the input language. For a list of language codes, see + // what-is-languages. // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` + // Amazon Translate does not automatically detect a source language during batch + // translation jobs. + // + // SourceLanguageCode is a required field + SourceLanguageCode *string `min:"2" type:"string" required:"true"` - // The terminology data for the custom terminology being imported. + // The language code of the output language. // - // TerminologyData is a required field - TerminologyData *TerminologyData `type:"structure" required:"true"` + // TargetLanguageCodes is a required field + TargetLanguageCodes []*string `min:"1" type:"list" required:"true"` + + // The name of the terminology to use in the batch translation job. For a list + // of available terminologies, use the ListTerminologies operation. + TerminologyNames []*string `type:"list"` } // String returns the string representation -func (s ImportTerminologyInput) String() string { +func (s StartTextTranslationJobInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ImportTerminologyInput) GoString() string { +func (s StartTextTranslationJobInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *ImportTerminologyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ImportTerminologyInput"} - if s.MergeStrategy == nil { - invalidParams.Add(request.NewErrParamRequired("MergeStrategy")) +func (s *StartTextTranslationJobInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "StartTextTranslationJobInput"} + if s.ClientToken != nil && len(*s.ClientToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ClientToken", 1)) } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) + if s.DataAccessRoleArn == nil { + invalidParams.Add(request.NewErrParamRequired("DataAccessRoleArn")) } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) + if s.DataAccessRoleArn != nil && len(*s.DataAccessRoleArn) < 20 { + invalidParams.Add(request.NewErrParamMinLen("DataAccessRoleArn", 20)) } - if s.TerminologyData == nil { - invalidParams.Add(request.NewErrParamRequired("TerminologyData")) + if s.InputDataConfig == nil { + invalidParams.Add(request.NewErrParamRequired("InputDataConfig")) } - if s.EncryptionKey != nil { - if err := s.EncryptionKey.Validate(); err != nil { - invalidParams.AddNested("EncryptionKey", err.(request.ErrInvalidParams)) + if s.JobName != nil && len(*s.JobName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("JobName", 1)) + } + if s.OutputDataConfig == nil { + invalidParams.Add(request.NewErrParamRequired("OutputDataConfig")) + } + if s.SourceLanguageCode == nil { + invalidParams.Add(request.NewErrParamRequired("SourceLanguageCode")) + } + if s.SourceLanguageCode != nil && len(*s.SourceLanguageCode) < 2 { + invalidParams.Add(request.NewErrParamMinLen("SourceLanguageCode", 2)) + } + if s.TargetLanguageCodes == nil { + invalidParams.Add(request.NewErrParamRequired("TargetLanguageCodes")) + } + if s.TargetLanguageCodes != nil && len(s.TargetLanguageCodes) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TargetLanguageCodes", 1)) + } + if s.InputDataConfig != nil { + if err := s.InputDataConfig.Validate(); err != nil { + invalidParams.AddNested("InputDataConfig", err.(request.ErrInvalidParams)) } } - if s.TerminologyData != nil { - if err := s.TerminologyData.Validate(); err != nil { - invalidParams.AddNested("TerminologyData", err.(request.ErrInvalidParams)) + if s.OutputDataConfig != nil { + if err := s.OutputDataConfig.Validate(); err != nil { + invalidParams.AddNested("OutputDataConfig", err.(request.ErrInvalidParams)) } } @@ -851,85 +1844,131 @@ func (s *ImportTerminologyInput) Validate() error { return nil } -// SetDescription sets the Description field's value. -func (s *ImportTerminologyInput) SetDescription(v string) *ImportTerminologyInput { - s.Description = &v +// SetClientToken sets the ClientToken field's value. +func (s *StartTextTranslationJobInput) SetClientToken(v string) *StartTextTranslationJobInput { + s.ClientToken = &v return s } -// SetEncryptionKey sets the EncryptionKey field's value. -func (s *ImportTerminologyInput) SetEncryptionKey(v *EncryptionKey) *ImportTerminologyInput { - s.EncryptionKey = v +// SetDataAccessRoleArn sets the DataAccessRoleArn field's value. +func (s *StartTextTranslationJobInput) SetDataAccessRoleArn(v string) *StartTextTranslationJobInput { + s.DataAccessRoleArn = &v return s } -// SetMergeStrategy sets the MergeStrategy field's value. -func (s *ImportTerminologyInput) SetMergeStrategy(v string) *ImportTerminologyInput { - s.MergeStrategy = &v +// SetInputDataConfig sets the InputDataConfig field's value. +func (s *StartTextTranslationJobInput) SetInputDataConfig(v *InputDataConfig) *StartTextTranslationJobInput { + s.InputDataConfig = v return s } -// SetName sets the Name field's value. -func (s *ImportTerminologyInput) SetName(v string) *ImportTerminologyInput { - s.Name = &v +// SetJobName sets the JobName field's value. +func (s *StartTextTranslationJobInput) SetJobName(v string) *StartTextTranslationJobInput { + s.JobName = &v return s } -// SetTerminologyData sets the TerminologyData field's value. -func (s *ImportTerminologyInput) SetTerminologyData(v *TerminologyData) *ImportTerminologyInput { - s.TerminologyData = v +// SetOutputDataConfig sets the OutputDataConfig field's value. +func (s *StartTextTranslationJobInput) SetOutputDataConfig(v *OutputDataConfig) *StartTextTranslationJobInput { + s.OutputDataConfig = v return s } -type ImportTerminologyOutput struct { +// SetSourceLanguageCode sets the SourceLanguageCode field's value. +func (s *StartTextTranslationJobInput) SetSourceLanguageCode(v string) *StartTextTranslationJobInput { + s.SourceLanguageCode = &v + return s +} + +// SetTargetLanguageCodes sets the TargetLanguageCodes field's value. +func (s *StartTextTranslationJobInput) SetTargetLanguageCodes(v []*string) *StartTextTranslationJobInput { + s.TargetLanguageCodes = v + return s +} + +// SetTerminologyNames sets the TerminologyNames field's value. +func (s *StartTextTranslationJobInput) SetTerminologyNames(v []*string) *StartTextTranslationJobInput { + s.TerminologyNames = v + return s +} + +type StartTextTranslationJobOutput struct { _ struct{} `type:"structure"` - // The properties of the custom terminology being imported. - TerminologyProperties *TerminologyProperties `type:"structure"` + // The identifier generated for the job. To get the status of a job, use this + // ID with the DescribeTextTranslationJob operation. + JobId *string `min:"1" type:"string"` + + // The status of the job. Possible values include: + // + // * SUBMITTED - The job has been received and is queued for processing. + // + // * IN_PROGRESS - Amazon Translate is processing the job. + // + // * COMPLETED - The job was successfully completed and the output is available. + // + // * COMPLETED_WITH_ERRORS - The job was completed with errors. The errors + // can be analyzed in the job's output. + // + // * FAILED - The job did not complete. To get details, use the DescribeTextTranslationJob + // operation. + // + // * STOP_REQUESTED - The user who started the job has requested that it + // be stopped. + // + // * STOPPED - The job has been stopped. + JobStatus *string `type:"string" enum:"JobStatus"` } // String returns the string representation -func (s ImportTerminologyOutput) String() string { +func (s StartTextTranslationJobOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ImportTerminologyOutput) GoString() string { +func (s StartTextTranslationJobOutput) GoString() string { return s.String() } -// SetTerminologyProperties sets the TerminologyProperties field's value. -func (s *ImportTerminologyOutput) SetTerminologyProperties(v *TerminologyProperties) *ImportTerminologyOutput { - s.TerminologyProperties = v +// SetJobId sets the JobId field's value. +func (s *StartTextTranslationJobOutput) SetJobId(v string) *StartTextTranslationJobOutput { + s.JobId = &v return s } -type ListTerminologiesInput struct { - _ struct{} `type:"structure"` +// SetJobStatus sets the JobStatus field's value. +func (s *StartTextTranslationJobOutput) SetJobStatus(v string) *StartTextTranslationJobOutput { + s.JobStatus = &v + return s +} - // The maximum number of custom terminologies returned per list request. - MaxResults *int64 `min:"1" type:"integer"` +type StopTextTranslationJobInput struct { + _ struct{} `type:"structure"` - // If the result of the request to ListTerminologies was truncated, include - // the NextToken to fetch the next group of custom terminologies. - NextToken *string `type:"string"` + // The job ID of the job to be stopped. + // + // JobId is a required field + JobId *string `min:"1" type:"string" required:"true"` } // String returns the string representation -func (s ListTerminologiesInput) String() string { +func (s StopTextTranslationJobInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ListTerminologiesInput) GoString() string { +func (s StopTextTranslationJobInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *ListTerminologiesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListTerminologiesInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) +func (s *StopTextTranslationJobInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "StopTextTranslationJobInput"} + if s.JobId == nil { + invalidParams.Add(request.NewErrParamRequired("JobId")) + } + if s.JobId != nil && len(*s.JobId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("JobId", 1)) } if invalidParams.Len() > 0 { @@ -938,48 +1977,42 @@ func (s *ListTerminologiesInput) Validate() error { return nil } -// SetMaxResults sets the MaxResults field's value. -func (s *ListTerminologiesInput) SetMaxResults(v int64) *ListTerminologiesInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListTerminologiesInput) SetNextToken(v string) *ListTerminologiesInput { - s.NextToken = &v +// SetJobId sets the JobId field's value. +func (s *StopTextTranslationJobInput) SetJobId(v string) *StopTextTranslationJobInput { + s.JobId = &v return s } -type ListTerminologiesOutput struct { +type StopTextTranslationJobOutput struct { _ struct{} `type:"structure"` - // If the response to the ListTerminologies was truncated, the NextToken fetches - // the next group of custom terminologies. - NextToken *string `type:"string"` + // The job ID of the stopped batch translation job. + JobId *string `min:"1" type:"string"` - // The properties list of the custom terminologies returned on the list request. - TerminologyPropertiesList []*TerminologyProperties `type:"list"` + // The status of the designated job. Upon successful completion, the job's status + // will be STOPPED. + JobStatus *string `type:"string" enum:"JobStatus"` } // String returns the string representation -func (s ListTerminologiesOutput) String() string { +func (s StopTextTranslationJobOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s ListTerminologiesOutput) GoString() string { +func (s StopTextTranslationJobOutput) GoString() string { return s.String() } -// SetNextToken sets the NextToken field's value. -func (s *ListTerminologiesOutput) SetNextToken(v string) *ListTerminologiesOutput { - s.NextToken = &v +// SetJobId sets the JobId field's value. +func (s *StopTextTranslationJobOutput) SetJobId(v string) *StopTextTranslationJobOutput { + s.JobId = &v return s } -// SetTerminologyPropertiesList sets the TerminologyPropertiesList field's value. -func (s *ListTerminologiesOutput) SetTerminologyPropertiesList(v []*TerminologyProperties) *ListTerminologiesOutput { - s.TerminologyPropertiesList = v +// SetJobStatus sets the JobStatus field's value. +func (s *StopTextTranslationJobOutput) SetJobStatus(v string) *StopTextTranslationJobOutput { + s.JobStatus = &v return s } @@ -1020,7 +2053,9 @@ func (s *Term) SetTargetText(v string) *Term { type TerminologyData struct { _ struct{} `type:"structure"` - // The file containing the custom terminology data. + // The file containing the custom terminology data. Your version of the AWS + // SDK performs a Base64-encoding on this field before sending a request to + // the AWS service. Users of the SDK should not perform Base64-encoding themselves. // // File is automatically base64 encoded/decoded by the SDK. // @@ -1219,11 +2254,13 @@ type TextInput struct { _ struct{} `type:"structure"` // The language code for the language of the source text. The language must - // be a language supported by Amazon Translate. + // be a language supported by Amazon Translate. For a list of language codes, + // see what-is-languages. // // To have Amazon Translate determine the source language of your text, you // can specify auto in the SourceLanguageCode field. If you specify auto, Amazon - // Translate will call Amazon Comprehend to determine the source language. + // Translate will call Amazon Comprehend (https://docs.aws.amazon.com/comprehend/latest/dg/comprehend-general.html) + // to determine the source language. // // SourceLanguageCode is a required field SourceLanguageCode *string `min:"2" type:"string" required:"true"` @@ -1234,8 +2271,9 @@ type TextInput struct { // TargetLanguageCode is a required field TargetLanguageCode *string `min:"2" type:"string" required:"true"` - // The TerminologyNames list that is taken as input to the TranslateText request. - // This has a minimum length of 0 and a maximum length of 1. + // The name of the terminology list file to be used in the TranslateText request. + // You can use 1 terminology list at most in a TranslateText request. Terminology + // lists can contain a maximum of 256 terms. TerminologyNames []*string `type:"list"` // The text to translate. The text string can be a maximum of 5,000 bytes long. @@ -1324,7 +2362,7 @@ type TextOutput struct { // TargetLanguageCode is a required field TargetLanguageCode *string `min:"2" type:"string" required:"true"` - // The the translated text. The maximum length of this text is 5kb. + // The translated text. // // TranslatedText is a required field TranslatedText *string `type:"string" required:"true"` @@ -1364,11 +2402,243 @@ func (s *TextOutput) SetTranslatedText(v string) *TextOutput { return s } +// Provides information for filtering a list of translation jobs. For more information, +// see ListTextTranslationJobs. +type TextTranslationJobFilter struct { + _ struct{} `type:"structure"` + + // Filters the list of jobs by name. + JobName *string `min:"1" type:"string"` + + // Filters the list of jobs based by job status. + JobStatus *string `type:"string" enum:"JobStatus"` + + // Filters the list of jobs based on the time that the job was submitted for + // processing and returns only the jobs submitted after the specified time. + // Jobs are returned in descending order, newest to oldest. + SubmittedAfterTime *time.Time `type:"timestamp"` + + // Filters the list of jobs based on the time that the job was submitted for + // processing and returns only the jobs submitted before the specified time. + // Jobs are returned in ascending order, oldest to newest. + SubmittedBeforeTime *time.Time `type:"timestamp"` +} + +// String returns the string representation +func (s TextTranslationJobFilter) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TextTranslationJobFilter) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *TextTranslationJobFilter) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "TextTranslationJobFilter"} + if s.JobName != nil && len(*s.JobName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("JobName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetJobName sets the JobName field's value. +func (s *TextTranslationJobFilter) SetJobName(v string) *TextTranslationJobFilter { + s.JobName = &v + return s +} + +// SetJobStatus sets the JobStatus field's value. +func (s *TextTranslationJobFilter) SetJobStatus(v string) *TextTranslationJobFilter { + s.JobStatus = &v + return s +} + +// SetSubmittedAfterTime sets the SubmittedAfterTime field's value. +func (s *TextTranslationJobFilter) SetSubmittedAfterTime(v time.Time) *TextTranslationJobFilter { + s.SubmittedAfterTime = &v + return s +} + +// SetSubmittedBeforeTime sets the SubmittedBeforeTime field's value. +func (s *TextTranslationJobFilter) SetSubmittedBeforeTime(v time.Time) *TextTranslationJobFilter { + s.SubmittedBeforeTime = &v + return s +} + +// Provides information about a translation job. +type TextTranslationJobProperties struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of an AWS Identity Access and Management (IAM) + // role that granted Amazon Translate read access to the job's input data. + DataAccessRoleArn *string `min:"20" type:"string"` + + // The time at which the translation job ended. + EndTime *time.Time `type:"timestamp"` + + // The input configuration properties that were specified when the job was requested. + InputDataConfig *InputDataConfig `type:"structure"` + + // The number of documents successfully and unsuccessfully processed during + // the translation job. + JobDetails *JobDetails `type:"structure"` + + // The ID of the translation job. + JobId *string `min:"1" type:"string"` + + // The user-defined name of the translation job. + JobName *string `min:"1" type:"string"` + + // The status of the translation job. + JobStatus *string `type:"string" enum:"JobStatus"` + + // An explanation of any errors that may have occured during the translation + // job. + Message *string `type:"string"` + + // The output configuration properties that were specified when the job was + // requested. + OutputDataConfig *OutputDataConfig `type:"structure"` + + // The language code of the language of the source text. The language must be + // a language supported by Amazon Translate. + SourceLanguageCode *string `min:"2" type:"string"` + + // The time at which the translation job was submitted. + SubmittedTime *time.Time `type:"timestamp"` + + // The language code of the language of the target text. The language must be + // a language supported by Amazon Translate. + TargetLanguageCodes []*string `min:"1" type:"list"` + + // A list containing the names of the terminologies applied to a translation + // job. Only one terminology can be applied per StartTextTranslationJob request + // at this time. + TerminologyNames []*string `type:"list"` +} + +// String returns the string representation +func (s TextTranslationJobProperties) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TextTranslationJobProperties) GoString() string { + return s.String() +} + +// SetDataAccessRoleArn sets the DataAccessRoleArn field's value. +func (s *TextTranslationJobProperties) SetDataAccessRoleArn(v string) *TextTranslationJobProperties { + s.DataAccessRoleArn = &v + return s +} + +// SetEndTime sets the EndTime field's value. +func (s *TextTranslationJobProperties) SetEndTime(v time.Time) *TextTranslationJobProperties { + s.EndTime = &v + return s +} + +// SetInputDataConfig sets the InputDataConfig field's value. +func (s *TextTranslationJobProperties) SetInputDataConfig(v *InputDataConfig) *TextTranslationJobProperties { + s.InputDataConfig = v + return s +} + +// SetJobDetails sets the JobDetails field's value. +func (s *TextTranslationJobProperties) SetJobDetails(v *JobDetails) *TextTranslationJobProperties { + s.JobDetails = v + return s +} + +// SetJobId sets the JobId field's value. +func (s *TextTranslationJobProperties) SetJobId(v string) *TextTranslationJobProperties { + s.JobId = &v + return s +} + +// SetJobName sets the JobName field's value. +func (s *TextTranslationJobProperties) SetJobName(v string) *TextTranslationJobProperties { + s.JobName = &v + return s +} + +// SetJobStatus sets the JobStatus field's value. +func (s *TextTranslationJobProperties) SetJobStatus(v string) *TextTranslationJobProperties { + s.JobStatus = &v + return s +} + +// SetMessage sets the Message field's value. +func (s *TextTranslationJobProperties) SetMessage(v string) *TextTranslationJobProperties { + s.Message = &v + return s +} + +// SetOutputDataConfig sets the OutputDataConfig field's value. +func (s *TextTranslationJobProperties) SetOutputDataConfig(v *OutputDataConfig) *TextTranslationJobProperties { + s.OutputDataConfig = v + return s +} + +// SetSourceLanguageCode sets the SourceLanguageCode field's value. +func (s *TextTranslationJobProperties) SetSourceLanguageCode(v string) *TextTranslationJobProperties { + s.SourceLanguageCode = &v + return s +} + +// SetSubmittedTime sets the SubmittedTime field's value. +func (s *TextTranslationJobProperties) SetSubmittedTime(v time.Time) *TextTranslationJobProperties { + s.SubmittedTime = &v + return s +} + +// SetTargetLanguageCodes sets the TargetLanguageCodes field's value. +func (s *TextTranslationJobProperties) SetTargetLanguageCodes(v []*string) *TextTranslationJobProperties { + s.TargetLanguageCodes = v + return s +} + +// SetTerminologyNames sets the TerminologyNames field's value. +func (s *TextTranslationJobProperties) SetTerminologyNames(v []*string) *TextTranslationJobProperties { + s.TerminologyNames = v + return s +} + const ( // EncryptionKeyTypeKms is a EncryptionKeyType enum value EncryptionKeyTypeKms = "KMS" ) +const ( + // JobStatusSubmitted is a JobStatus enum value + JobStatusSubmitted = "SUBMITTED" + + // JobStatusInProgress is a JobStatus enum value + JobStatusInProgress = "IN_PROGRESS" + + // JobStatusCompleted is a JobStatus enum value + JobStatusCompleted = "COMPLETED" + + // JobStatusCompletedWithError is a JobStatus enum value + JobStatusCompletedWithError = "COMPLETED_WITH_ERROR" + + // JobStatusFailed is a JobStatus enum value + JobStatusFailed = "FAILED" + + // JobStatusStopRequested is a JobStatus enum value + JobStatusStopRequested = "STOP_REQUESTED" + + // JobStatusStopped is a JobStatus enum value + JobStatusStopped = "STOPPED" +) + const ( // MergeStrategyOverwrite is a MergeStrategy enum value MergeStrategyOverwrite = "OVERWRITE" diff --git a/service/translate/errors.go b/service/translate/errors.go index 818028a182c..24972c5a217 100644 --- a/service/translate/errors.go +++ b/service/translate/errors.go @@ -20,6 +20,12 @@ const ( // An internal server error occurred. Retry your request. ErrCodeInternalServerException = "InternalServerException" + // ErrCodeInvalidFilterException for service response error code + // "InvalidFilterException". + // + // The filter specified for the operation is invalid. Specify a different filter. + ErrCodeInvalidFilterException = "InvalidFilterException" + // ErrCodeInvalidParameterValueException for service response error code // "InvalidParameterValueException". // @@ -46,7 +52,7 @@ const ( // // The resource you are looking for has not been found. Review the resource // you're looking for and see if a different resource will accomplish your needs - // before retrying the revised request. . + // before retrying the revised request. ErrCodeResourceNotFoundException = "ResourceNotFoundException" // ErrCodeServiceUnavailableException for service response error code diff --git a/service/translate/translateiface/interface.go b/service/translate/translateiface/interface.go index ea20f6fddf9..2ce30a68e8d 100644 --- a/service/translate/translateiface/interface.go +++ b/service/translate/translateiface/interface.go @@ -64,6 +64,10 @@ type TranslateAPI interface { DeleteTerminologyWithContext(aws.Context, *translate.DeleteTerminologyInput, ...request.Option) (*translate.DeleteTerminologyOutput, error) DeleteTerminologyRequest(*translate.DeleteTerminologyInput) (*request.Request, *translate.DeleteTerminologyOutput) + DescribeTextTranslationJob(*translate.DescribeTextTranslationJobInput) (*translate.DescribeTextTranslationJobOutput, error) + DescribeTextTranslationJobWithContext(aws.Context, *translate.DescribeTextTranslationJobInput, ...request.Option) (*translate.DescribeTextTranslationJobOutput, error) + DescribeTextTranslationJobRequest(*translate.DescribeTextTranslationJobInput) (*request.Request, *translate.DescribeTextTranslationJobOutput) + GetTerminology(*translate.GetTerminologyInput) (*translate.GetTerminologyOutput, error) GetTerminologyWithContext(aws.Context, *translate.GetTerminologyInput, ...request.Option) (*translate.GetTerminologyOutput, error) GetTerminologyRequest(*translate.GetTerminologyInput) (*request.Request, *translate.GetTerminologyOutput) @@ -76,6 +80,24 @@ type TranslateAPI interface { ListTerminologiesWithContext(aws.Context, *translate.ListTerminologiesInput, ...request.Option) (*translate.ListTerminologiesOutput, error) ListTerminologiesRequest(*translate.ListTerminologiesInput) (*request.Request, *translate.ListTerminologiesOutput) + ListTerminologiesPages(*translate.ListTerminologiesInput, func(*translate.ListTerminologiesOutput, bool) bool) error + ListTerminologiesPagesWithContext(aws.Context, *translate.ListTerminologiesInput, func(*translate.ListTerminologiesOutput, bool) bool, ...request.Option) error + + ListTextTranslationJobs(*translate.ListTextTranslationJobsInput) (*translate.ListTextTranslationJobsOutput, error) + ListTextTranslationJobsWithContext(aws.Context, *translate.ListTextTranslationJobsInput, ...request.Option) (*translate.ListTextTranslationJobsOutput, error) + ListTextTranslationJobsRequest(*translate.ListTextTranslationJobsInput) (*request.Request, *translate.ListTextTranslationJobsOutput) + + ListTextTranslationJobsPages(*translate.ListTextTranslationJobsInput, func(*translate.ListTextTranslationJobsOutput, bool) bool) error + ListTextTranslationJobsPagesWithContext(aws.Context, *translate.ListTextTranslationJobsInput, func(*translate.ListTextTranslationJobsOutput, bool) bool, ...request.Option) error + + StartTextTranslationJob(*translate.StartTextTranslationJobInput) (*translate.StartTextTranslationJobOutput, error) + StartTextTranslationJobWithContext(aws.Context, *translate.StartTextTranslationJobInput, ...request.Option) (*translate.StartTextTranslationJobOutput, error) + StartTextTranslationJobRequest(*translate.StartTextTranslationJobInput) (*request.Request, *translate.StartTextTranslationJobOutput) + + StopTextTranslationJob(*translate.StopTextTranslationJobInput) (*translate.StopTextTranslationJobOutput, error) + StopTextTranslationJobWithContext(aws.Context, *translate.StopTextTranslationJobInput, ...request.Option) (*translate.StopTextTranslationJobOutput, error) + StopTextTranslationJobRequest(*translate.StopTextTranslationJobInput) (*request.Request, *translate.StopTextTranslationJobOutput) + Text(*translate.TextInput) (*translate.TextOutput, error) TextWithContext(aws.Context, *translate.TextInput, ...request.Option) (*translate.TextOutput, error) TextRequest(*translate.TextInput) (*request.Request, *translate.TextOutput)