@aws-sdk/client-translate 3.185.0 → 3.188.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/README.md +1 -2
- package/dist-es/Translate.js +74 -81
- package/dist-es/TranslateClient.js +22 -28
- package/dist-es/commands/CreateParallelDataCommand.js +21 -28
- package/dist-es/commands/DeleteParallelDataCommand.js +21 -28
- package/dist-es/commands/DeleteTerminologyCommand.js +22 -29
- package/dist-es/commands/DescribeTextTranslationJobCommand.js +21 -28
- package/dist-es/commands/GetParallelDataCommand.js +21 -28
- package/dist-es/commands/GetTerminologyCommand.js +21 -28
- package/dist-es/commands/ImportTerminologyCommand.js +21 -28
- package/dist-es/commands/ListLanguagesCommand.js +21 -28
- package/dist-es/commands/ListParallelDataCommand.js +21 -28
- package/dist-es/commands/ListTagsForResourceCommand.js +21 -28
- package/dist-es/commands/ListTerminologiesCommand.js +21 -28
- package/dist-es/commands/ListTextTranslationJobsCommand.js +21 -28
- package/dist-es/commands/StartTextTranslationJobCommand.js +21 -28
- package/dist-es/commands/StopTextTranslationJobCommand.js +21 -28
- package/dist-es/commands/TagResourceCommand.js +21 -28
- package/dist-es/commands/TranslateTextCommand.js +21 -28
- package/dist-es/commands/UntagResourceCommand.js +21 -28
- package/dist-es/commands/UpdateParallelDataCommand.js +21 -28
- package/dist-es/endpoints.js +8 -8
- package/dist-es/models/TranslateServiceException.js +5 -10
- package/dist-es/models/models_0.js +342 -237
- package/dist-es/pagination/ListLanguagesPaginator.js +25 -68
- package/dist-es/pagination/ListParallelDataPaginator.js +25 -68
- package/dist-es/pagination/ListTerminologiesPaginator.js +25 -68
- package/dist-es/pagination/ListTextTranslationJobsPaginator.js +25 -68
- package/dist-es/protocols/Aws_json1_1.js +1407 -1765
- package/dist-es/runtimeConfig.browser.js +26 -12
- package/dist-es/runtimeConfig.js +30 -12
- package/dist-es/runtimeConfig.native.js +8 -5
- package/dist-es/runtimeConfig.shared.js +8 -11
- package/dist-types/Translate.d.ts +25 -6
- package/dist-types/TranslateClient.d.ts +1 -2
- package/dist-types/commands/ListTagsForResourceCommand.d.ts +19 -0
- package/dist-types/commands/StartTextTranslationJobCommand.d.ts +7 -3
- package/dist-types/commands/TagResourceCommand.d.ts +20 -0
- package/dist-types/commands/TranslateTextCommand.d.ts +1 -1
- package/dist-types/commands/UntagResourceCommand.d.ts +19 -0
- package/dist-types/models/models_0.d.ts +94 -22
- package/package.json +33 -33
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { __assign, __awaiter, __generator } from "tslib";
|
|
2
1
|
import packageInfo from "../package.json";
|
|
3
2
|
import { Sha256 } from "@aws-crypto/sha256-browser";
|
|
4
3
|
import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver";
|
|
@@ -12,15 +11,30 @@ import { fromUtf8, toUtf8 } from "@aws-sdk/util-utf8-browser";
|
|
|
12
11
|
import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
|
|
13
12
|
import { loadConfigsForDefaultMode } from "@aws-sdk/smithy-client";
|
|
14
13
|
import { resolveDefaultsModeConfig } from "@aws-sdk/util-defaults-mode-browser";
|
|
15
|
-
export
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
14
|
+
export const getRuntimeConfig = (config) => {
|
|
15
|
+
const defaultsMode = resolveDefaultsModeConfig(config);
|
|
16
|
+
const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
|
|
17
|
+
const clientSharedValues = getSharedRuntimeConfig(config);
|
|
18
|
+
return {
|
|
19
|
+
...clientSharedValues,
|
|
20
|
+
...config,
|
|
21
|
+
runtime: "browser",
|
|
22
|
+
defaultsMode,
|
|
23
|
+
base64Decoder: config?.base64Decoder ?? fromBase64,
|
|
24
|
+
base64Encoder: config?.base64Encoder ?? toBase64,
|
|
25
|
+
bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
|
|
26
|
+
credentialDefaultProvider: config?.credentialDefaultProvider ?? ((_) => () => Promise.reject(new Error("Credential is missing"))),
|
|
27
|
+
defaultUserAgentProvider: config?.defaultUserAgentProvider ??
|
|
28
|
+
defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
|
|
29
|
+
maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS,
|
|
30
|
+
region: config?.region ?? invalidProvider("Region is missing"),
|
|
31
|
+
requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider),
|
|
32
|
+
retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE),
|
|
33
|
+
sha256: config?.sha256 ?? Sha256,
|
|
34
|
+
streamCollector: config?.streamCollector ?? streamCollector,
|
|
35
|
+
useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)),
|
|
36
|
+
useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)),
|
|
37
|
+
utf8Decoder: config?.utf8Decoder ?? fromUtf8,
|
|
38
|
+
utf8Encoder: config?.utf8Encoder ?? toUtf8,
|
|
39
|
+
};
|
|
26
40
|
};
|
package/dist-es/runtimeConfig.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { __assign, __awaiter, __generator } from "tslib";
|
|
2
1
|
import packageInfo from "../package.json";
|
|
3
2
|
import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts";
|
|
4
3
|
import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, } from "@aws-sdk/config-resolver";
|
|
@@ -15,16 +14,35 @@ import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shar
|
|
|
15
14
|
import { loadConfigsForDefaultMode } from "@aws-sdk/smithy-client";
|
|
16
15
|
import { resolveDefaultsModeConfig } from "@aws-sdk/util-defaults-mode-node";
|
|
17
16
|
import { emitWarningIfUnsupportedVersion } from "@aws-sdk/smithy-client";
|
|
18
|
-
export
|
|
19
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
|
17
|
+
export const getRuntimeConfig = (config) => {
|
|
20
18
|
emitWarningIfUnsupportedVersion(process.version);
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
return
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
19
|
+
const defaultsMode = resolveDefaultsModeConfig(config);
|
|
20
|
+
const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
|
|
21
|
+
const clientSharedValues = getSharedRuntimeConfig(config);
|
|
22
|
+
return {
|
|
23
|
+
...clientSharedValues,
|
|
24
|
+
...config,
|
|
25
|
+
runtime: "node",
|
|
26
|
+
defaultsMode,
|
|
27
|
+
base64Decoder: config?.base64Decoder ?? fromBase64,
|
|
28
|
+
base64Encoder: config?.base64Encoder ?? toBase64,
|
|
29
|
+
bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
|
|
30
|
+
credentialDefaultProvider: config?.credentialDefaultProvider ?? decorateDefaultCredentialProvider(credentialDefaultProvider),
|
|
31
|
+
defaultUserAgentProvider: config?.defaultUserAgentProvider ??
|
|
32
|
+
defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
|
|
33
|
+
maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS),
|
|
34
|
+
region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS),
|
|
35
|
+
requestHandler: config?.requestHandler ?? new RequestHandler(defaultConfigProvider),
|
|
36
|
+
retryMode: config?.retryMode ??
|
|
37
|
+
loadNodeConfig({
|
|
38
|
+
...NODE_RETRY_MODE_CONFIG_OPTIONS,
|
|
39
|
+
default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE,
|
|
40
|
+
}),
|
|
41
|
+
sha256: config?.sha256 ?? Hash.bind(null, "sha256"),
|
|
42
|
+
streamCollector: config?.streamCollector ?? streamCollector,
|
|
43
|
+
useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS),
|
|
44
|
+
useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS),
|
|
45
|
+
utf8Decoder: config?.utf8Decoder ?? fromUtf8,
|
|
46
|
+
utf8Encoder: config?.utf8Encoder ?? toUtf8,
|
|
47
|
+
};
|
|
30
48
|
};
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
import { __assign } from "tslib";
|
|
2
1
|
import { Sha256 } from "@aws-crypto/sha256-js";
|
|
3
2
|
import { getRuntimeConfig as getBrowserRuntimeConfig } from "./runtimeConfig.browser";
|
|
4
|
-
export
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
export const getRuntimeConfig = (config) => {
|
|
4
|
+
const browserDefaults = getBrowserRuntimeConfig(config);
|
|
5
|
+
return {
|
|
6
|
+
...browserDefaults,
|
|
7
|
+
...config,
|
|
8
|
+
runtime: "react-native",
|
|
9
|
+
sha256: config?.sha256 ?? Sha256,
|
|
10
|
+
};
|
|
8
11
|
};
|
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
import { parseUrl } from "@aws-sdk/url-parser";
|
|
2
2
|
import { defaultRegionInfoProvider } from "./endpoints";
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
urlParser: (_e = config === null || config === void 0 ? void 0 : config.urlParser) !== null && _e !== void 0 ? _e : parseUrl,
|
|
12
|
-
});
|
|
13
|
-
};
|
|
3
|
+
export const getRuntimeConfig = (config) => ({
|
|
4
|
+
apiVersion: "2017-07-01",
|
|
5
|
+
disableHostPrefix: config?.disableHostPrefix ?? false,
|
|
6
|
+
logger: config?.logger ?? {},
|
|
7
|
+
regionInfoProvider: config?.regionInfoProvider ?? defaultRegionInfoProvider,
|
|
8
|
+
serviceId: config?.serviceId ?? "Translate",
|
|
9
|
+
urlParser: config?.urlParser ?? parseUrl,
|
|
10
|
+
});
|
|
@@ -19,8 +19,7 @@ import { UntagResourceCommandInput, UntagResourceCommandOutput } from "./command
|
|
|
19
19
|
import { UpdateParallelDataCommandInput, UpdateParallelDataCommandOutput } from "./commands/UpdateParallelDataCommand";
|
|
20
20
|
import { TranslateClient } from "./TranslateClient";
|
|
21
21
|
/**
|
|
22
|
-
* <p>Provides translation
|
|
23
|
-
* languages.</p>
|
|
22
|
+
* <p>Provides language translation for input text in the source language to the specified target language.</p>
|
|
24
23
|
*/
|
|
25
24
|
export declare class Translate extends TranslateClient {
|
|
26
25
|
/**
|
|
@@ -88,6 +87,11 @@ export declare class Translate extends TranslateClient {
|
|
|
88
87
|
listParallelData(args: ListParallelDataCommandInput, options?: __HttpHandlerOptions): Promise<ListParallelDataCommandOutput>;
|
|
89
88
|
listParallelData(args: ListParallelDataCommandInput, cb: (err: any, data?: ListParallelDataCommandOutput) => void): void;
|
|
90
89
|
listParallelData(args: ListParallelDataCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListParallelDataCommandOutput) => void): void;
|
|
90
|
+
/**
|
|
91
|
+
* <p>Lists all tags associated with a given Amazon Translate resource.
|
|
92
|
+
* For more information, see <a href="https://docs.aws.amazon.com/translate/latest/dg/tagging.html">
|
|
93
|
+
* Tagging your resources</a>.</p>
|
|
94
|
+
*/
|
|
91
95
|
listTagsForResource(args: ListTagsForResourceCommandInput, options?: __HttpHandlerOptions): Promise<ListTagsForResourceCommandOutput>;
|
|
92
96
|
listTagsForResource(args: ListTagsForResourceCommandInput, cb: (err: any, data?: ListTagsForResourceCommandOutput) => void): void;
|
|
93
97
|
listTagsForResource(args: ListTagsForResourceCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListTagsForResourceCommandOutput) => void): void;
|
|
@@ -104,9 +108,13 @@ export declare class Translate extends TranslateClient {
|
|
|
104
108
|
listTextTranslationJobs(args: ListTextTranslationJobsCommandInput, cb: (err: any, data?: ListTextTranslationJobsCommandOutput) => void): void;
|
|
105
109
|
listTextTranslationJobs(args: ListTextTranslationJobsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListTextTranslationJobsCommandOutput) => void): void;
|
|
106
110
|
/**
|
|
107
|
-
* <p>Starts an asynchronous batch translation job.
|
|
108
|
-
* translate large volumes of text across multiple documents at once.
|
|
109
|
-
*
|
|
111
|
+
* <p>Starts an asynchronous batch translation job. Use batch translation jobs to
|
|
112
|
+
* translate large volumes of text across multiple documents at once.
|
|
113
|
+
* For batch translation, the input documents must share the same source language. You can specify one
|
|
114
|
+
* or more target languages. Batch translation translates each input document into each of the target languages.
|
|
115
|
+
* For more information, see
|
|
116
|
+
* <a href="https://docs.aws.amazon.com/translate/latest/dg/async.html">Asynchronous batch processing</a>
|
|
117
|
+
* </p>
|
|
110
118
|
*
|
|
111
119
|
* <p>Batch translation jobs can be described with the <a>DescribeTextTranslationJob</a> operation, listed with the <a>ListTextTranslationJobs</a> operation, and stopped with the <a>StopTextTranslationJob</a> operation.</p>
|
|
112
120
|
* <note>
|
|
@@ -128,16 +136,27 @@ export declare class Translate extends TranslateClient {
|
|
|
128
136
|
stopTextTranslationJob(args: StopTextTranslationJobCommandInput, options?: __HttpHandlerOptions): Promise<StopTextTranslationJobCommandOutput>;
|
|
129
137
|
stopTextTranslationJob(args: StopTextTranslationJobCommandInput, cb: (err: any, data?: StopTextTranslationJobCommandOutput) => void): void;
|
|
130
138
|
stopTextTranslationJob(args: StopTextTranslationJobCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: StopTextTranslationJobCommandOutput) => void): void;
|
|
139
|
+
/**
|
|
140
|
+
* <p>Associates a specific tag with a resource. A tag is a key-value pair
|
|
141
|
+
* that adds as a metadata to a resource.
|
|
142
|
+
* For more information, see <a href="https://docs.aws.amazon.com/translate/latest/dg/tagging.html">
|
|
143
|
+
* Tagging your resources</a>.</p>
|
|
144
|
+
*/
|
|
131
145
|
tagResource(args: TagResourceCommandInput, options?: __HttpHandlerOptions): Promise<TagResourceCommandOutput>;
|
|
132
146
|
tagResource(args: TagResourceCommandInput, cb: (err: any, data?: TagResourceCommandOutput) => void): void;
|
|
133
147
|
tagResource(args: TagResourceCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: TagResourceCommandOutput) => void): void;
|
|
134
148
|
/**
|
|
135
149
|
* <p>Translates input text from the source language to the target language. For a list of
|
|
136
|
-
* available languages and language codes, see <a
|
|
150
|
+
* available languages and language codes, see <a href="https://docs.aws.amazon.com/translate/latest/dg/what-is-languages.html">Supported languages</a>.</p>
|
|
137
151
|
*/
|
|
138
152
|
translateText(args: TranslateTextCommandInput, options?: __HttpHandlerOptions): Promise<TranslateTextCommandOutput>;
|
|
139
153
|
translateText(args: TranslateTextCommandInput, cb: (err: any, data?: TranslateTextCommandOutput) => void): void;
|
|
140
154
|
translateText(args: TranslateTextCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: TranslateTextCommandOutput) => void): void;
|
|
155
|
+
/**
|
|
156
|
+
* <p>Removes a specific tag associated with an Amazon Translate resource.
|
|
157
|
+
* For more information, see <a href="https://docs.aws.amazon.com/translate/latest/dg/tagging.html">
|
|
158
|
+
* Tagging your resources</a>.</p>
|
|
159
|
+
*/
|
|
141
160
|
untagResource(args: UntagResourceCommandInput, options?: __HttpHandlerOptions): Promise<UntagResourceCommandOutput>;
|
|
142
161
|
untagResource(args: UntagResourceCommandInput, cb: (err: any, data?: UntagResourceCommandOutput) => void): void;
|
|
143
162
|
untagResource(args: UntagResourceCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: UntagResourceCommandOutput) => void): void;
|
|
@@ -144,8 +144,7 @@ declare type TranslateClientResolvedConfigType = __SmithyResolvedConfiguration<_
|
|
|
144
144
|
export interface TranslateClientResolvedConfig extends TranslateClientResolvedConfigType {
|
|
145
145
|
}
|
|
146
146
|
/**
|
|
147
|
-
* <p>Provides translation
|
|
148
|
-
* languages.</p>
|
|
147
|
+
* <p>Provides language translation for input text in the source language to the specified target language.</p>
|
|
149
148
|
*/
|
|
150
149
|
export declare class TranslateClient extends __Client<__HttpHandlerOptions, ServiceInputTypes, ServiceOutputTypes, TranslateClientResolvedConfig> {
|
|
151
150
|
/**
|
|
@@ -6,6 +6,25 @@ export interface ListTagsForResourceCommandInput extends ListTagsForResourceRequ
|
|
|
6
6
|
}
|
|
7
7
|
export interface ListTagsForResourceCommandOutput extends ListTagsForResourceResponse, __MetadataBearer {
|
|
8
8
|
}
|
|
9
|
+
/**
|
|
10
|
+
* <p>Lists all tags associated with a given Amazon Translate resource.
|
|
11
|
+
* For more information, see <a href="https://docs.aws.amazon.com/translate/latest/dg/tagging.html">
|
|
12
|
+
* Tagging your resources</a>.</p>
|
|
13
|
+
* @example
|
|
14
|
+
* Use a bare-bones client and the command you need to make an API call.
|
|
15
|
+
* ```javascript
|
|
16
|
+
* import { TranslateClient, ListTagsForResourceCommand } from "@aws-sdk/client-translate"; // ES Modules import
|
|
17
|
+
* // const { TranslateClient, ListTagsForResourceCommand } = require("@aws-sdk/client-translate"); // CommonJS import
|
|
18
|
+
* const client = new TranslateClient(config);
|
|
19
|
+
* const command = new ListTagsForResourceCommand(input);
|
|
20
|
+
* const response = await client.send(command);
|
|
21
|
+
* ```
|
|
22
|
+
*
|
|
23
|
+
* @see {@link ListTagsForResourceCommandInput} for command's `input` shape.
|
|
24
|
+
* @see {@link ListTagsForResourceCommandOutput} for command's `response` shape.
|
|
25
|
+
* @see {@link TranslateClientResolvedConfig | config} for TranslateClient's `config` shape.
|
|
26
|
+
*
|
|
27
|
+
*/
|
|
9
28
|
export declare class ListTagsForResourceCommand extends $Command<ListTagsForResourceCommandInput, ListTagsForResourceCommandOutput, TranslateClientResolvedConfig> {
|
|
10
29
|
readonly input: ListTagsForResourceCommandInput;
|
|
11
30
|
constructor(input: ListTagsForResourceCommandInput);
|
|
@@ -7,9 +7,13 @@ export interface StartTextTranslationJobCommandInput extends StartTextTranslatio
|
|
|
7
7
|
export interface StartTextTranslationJobCommandOutput extends StartTextTranslationJobResponse, __MetadataBearer {
|
|
8
8
|
}
|
|
9
9
|
/**
|
|
10
|
-
* <p>Starts an asynchronous batch translation job.
|
|
11
|
-
* translate large volumes of text across multiple documents at once.
|
|
12
|
-
*
|
|
10
|
+
* <p>Starts an asynchronous batch translation job. Use batch translation jobs to
|
|
11
|
+
* translate large volumes of text across multiple documents at once.
|
|
12
|
+
* For batch translation, the input documents must share the same source language. You can specify one
|
|
13
|
+
* or more target languages. Batch translation translates each input document into each of the target languages.
|
|
14
|
+
* For more information, see
|
|
15
|
+
* <a href="https://docs.aws.amazon.com/translate/latest/dg/async.html">Asynchronous batch processing</a>
|
|
16
|
+
* </p>
|
|
13
17
|
*
|
|
14
18
|
* <p>Batch translation jobs can be described with the <a>DescribeTextTranslationJob</a> operation, listed with the <a>ListTextTranslationJobs</a> operation, and stopped with the <a>StopTextTranslationJob</a> operation.</p>
|
|
15
19
|
* <note>
|
|
@@ -6,6 +6,26 @@ export interface TagResourceCommandInput extends TagResourceRequest {
|
|
|
6
6
|
}
|
|
7
7
|
export interface TagResourceCommandOutput extends TagResourceResponse, __MetadataBearer {
|
|
8
8
|
}
|
|
9
|
+
/**
|
|
10
|
+
* <p>Associates a specific tag with a resource. A tag is a key-value pair
|
|
11
|
+
* that adds as a metadata to a resource.
|
|
12
|
+
* For more information, see <a href="https://docs.aws.amazon.com/translate/latest/dg/tagging.html">
|
|
13
|
+
* Tagging your resources</a>.</p>
|
|
14
|
+
* @example
|
|
15
|
+
* Use a bare-bones client and the command you need to make an API call.
|
|
16
|
+
* ```javascript
|
|
17
|
+
* import { TranslateClient, TagResourceCommand } from "@aws-sdk/client-translate"; // ES Modules import
|
|
18
|
+
* // const { TranslateClient, TagResourceCommand } = require("@aws-sdk/client-translate"); // CommonJS import
|
|
19
|
+
* const client = new TranslateClient(config);
|
|
20
|
+
* const command = new TagResourceCommand(input);
|
|
21
|
+
* const response = await client.send(command);
|
|
22
|
+
* ```
|
|
23
|
+
*
|
|
24
|
+
* @see {@link TagResourceCommandInput} for command's `input` shape.
|
|
25
|
+
* @see {@link TagResourceCommandOutput} for command's `response` shape.
|
|
26
|
+
* @see {@link TranslateClientResolvedConfig | config} for TranslateClient's `config` shape.
|
|
27
|
+
*
|
|
28
|
+
*/
|
|
9
29
|
export declare class TagResourceCommand extends $Command<TagResourceCommandInput, TagResourceCommandOutput, TranslateClientResolvedConfig> {
|
|
10
30
|
readonly input: TagResourceCommandInput;
|
|
11
31
|
constructor(input: TagResourceCommandInput);
|
|
@@ -8,7 +8,7 @@ export interface TranslateTextCommandOutput extends TranslateTextResponse, __Met
|
|
|
8
8
|
}
|
|
9
9
|
/**
|
|
10
10
|
* <p>Translates input text from the source language to the target language. For a list of
|
|
11
|
-
* available languages and language codes, see <a
|
|
11
|
+
* available languages and language codes, see <a href="https://docs.aws.amazon.com/translate/latest/dg/what-is-languages.html">Supported languages</a>.</p>
|
|
12
12
|
* @example
|
|
13
13
|
* Use a bare-bones client and the command you need to make an API call.
|
|
14
14
|
* ```javascript
|
|
@@ -6,6 +6,25 @@ export interface UntagResourceCommandInput extends UntagResourceRequest {
|
|
|
6
6
|
}
|
|
7
7
|
export interface UntagResourceCommandOutput extends UntagResourceResponse, __MetadataBearer {
|
|
8
8
|
}
|
|
9
|
+
/**
|
|
10
|
+
* <p>Removes a specific tag associated with an Amazon Translate resource.
|
|
11
|
+
* For more information, see <a href="https://docs.aws.amazon.com/translate/latest/dg/tagging.html">
|
|
12
|
+
* Tagging your resources</a>.</p>
|
|
13
|
+
* @example
|
|
14
|
+
* Use a bare-bones client and the command you need to make an API call.
|
|
15
|
+
* ```javascript
|
|
16
|
+
* import { TranslateClient, UntagResourceCommand } from "@aws-sdk/client-translate"; // ES Modules import
|
|
17
|
+
* // const { TranslateClient, UntagResourceCommand } = require("@aws-sdk/client-translate"); // CommonJS import
|
|
18
|
+
* const client = new TranslateClient(config);
|
|
19
|
+
* const command = new UntagResourceCommand(input);
|
|
20
|
+
* const response = await client.send(command);
|
|
21
|
+
* ```
|
|
22
|
+
*
|
|
23
|
+
* @see {@link UntagResourceCommandInput} for command's `input` shape.
|
|
24
|
+
* @see {@link UntagResourceCommandOutput} for command's `response` shape.
|
|
25
|
+
* @see {@link TranslateClientResolvedConfig | config} for TranslateClient's `config` shape.
|
|
26
|
+
*
|
|
27
|
+
*/
|
|
9
28
|
export declare class UntagResourceCommand extends $Command<UntagResourceCommandInput, UntagResourceCommandOutput, TranslateClientResolvedConfig> {
|
|
10
29
|
readonly input: UntagResourceCommandInput;
|
|
11
30
|
constructor(input: UntagResourceCommandInput);
|
|
@@ -92,8 +92,18 @@ export interface ParallelDataConfig {
|
|
|
92
92
|
*/
|
|
93
93
|
Format: ParallelDataFormat | string | undefined;
|
|
94
94
|
}
|
|
95
|
+
/**
|
|
96
|
+
* <p>A key-value pair that adds as a metadata to a resource used by Amazon Translate. </p>
|
|
97
|
+
*/
|
|
95
98
|
export interface Tag {
|
|
99
|
+
/**
|
|
100
|
+
* <p>The initial part of a key-value pair that forms a tag associated with a given resource.
|
|
101
|
+
* </p>
|
|
102
|
+
*/
|
|
96
103
|
Key: string | undefined;
|
|
104
|
+
/**
|
|
105
|
+
* <p> The second part of a key-value pair that forms a tag associated with a given resource.</p>
|
|
106
|
+
*/
|
|
97
107
|
Value: string | undefined;
|
|
98
108
|
}
|
|
99
109
|
export interface CreateParallelDataRequest {
|
|
@@ -119,6 +129,12 @@ export interface CreateParallelDataRequest {
|
|
|
119
129
|
* Amazon Translate through an AWS SDK.</p>
|
|
120
130
|
*/
|
|
121
131
|
ClientToken?: string;
|
|
132
|
+
/**
|
|
133
|
+
* <p>Tags to be associated with this resource. A tag is a key-value pair that
|
|
134
|
+
* adds metadata to a resource. Each tag key for the resource must be unique.
|
|
135
|
+
* For more information, see <a href="https://docs.aws.amazon.com/translate/latest/dg/tagging.html">
|
|
136
|
+
* Tagging your resources</a>.</p>
|
|
137
|
+
*/
|
|
122
138
|
Tags?: Tag[];
|
|
123
139
|
}
|
|
124
140
|
export declare enum ParallelDataStatus {
|
|
@@ -203,6 +219,9 @@ export declare class TooManyRequestsException extends __BaseException {
|
|
|
203
219
|
*/
|
|
204
220
|
constructor(opts: __ExceptionOptionType<TooManyRequestsException, __BaseException>);
|
|
205
221
|
}
|
|
222
|
+
/**
|
|
223
|
+
* <p>You have added too many tags to this resource. The maximum is 50 tags.</p>
|
|
224
|
+
*/
|
|
206
225
|
export declare class TooManyTagsException extends __BaseException {
|
|
207
226
|
readonly name: "TooManyTagsException";
|
|
208
227
|
readonly $fault: "client";
|
|
@@ -366,20 +385,21 @@ export declare enum Profanity {
|
|
|
366
385
|
MASK = "MASK"
|
|
367
386
|
}
|
|
368
387
|
/**
|
|
369
|
-
* <p>
|
|
388
|
+
* <p>Optional settings that configure the translation output. Use these settings for
|
|
389
|
+
* real time translations and asynchronous translation jobs.</p>
|
|
370
390
|
*/
|
|
371
391
|
export interface TranslationSettings {
|
|
372
392
|
/**
|
|
373
|
-
* <p>You can optionally specify the desired level of
|
|
374
|
-
*
|
|
393
|
+
* <p>You can optionally specify the desired level of formality for translations
|
|
394
|
+
* to supported target languages. The formality
|
|
375
395
|
* setting controls the level of formal language usage (also known as <a href="https://en.wikipedia.org/wiki/Register_(sociolinguistics)">register</a>) in the
|
|
376
396
|
* translation output. You can set the value to informal or formal. If you don't specify a value for
|
|
377
397
|
* formality, or if the target language doesn't support formality, the translation will
|
|
378
398
|
* ignore the formality setting.</p>
|
|
379
|
-
* <p>
|
|
380
|
-
*
|
|
381
|
-
* <p>For target languages that support formality, see <a href="https://docs.aws.amazon.com/translate/latest/dg/
|
|
382
|
-
*
|
|
399
|
+
* <p> If you specify multiple target languages for the job, translate ignores
|
|
400
|
+
* the formality setting for any unsupported target language.</p>
|
|
401
|
+
* <p>For a list of target languages that support formality, see <a href="https://docs.aws.amazon.com/translate/latest/dg/customizing-translations-formality.html">Setting Formality</a>
|
|
402
|
+
* in the Amazon Translate Developer Guide.</p>
|
|
383
403
|
*/
|
|
384
404
|
Formality?: Formality | string;
|
|
385
405
|
/**
|
|
@@ -389,8 +409,13 @@ export interface TranslationSettings {
|
|
|
389
409
|
* “?$#@$“. This 5-character sequence is used for each profane word or phrase, regardless of the
|
|
390
410
|
* length or number of words.</p>
|
|
391
411
|
* <p>Amazon Translate doesn't detect profanity in all of its supported languages. For languages
|
|
392
|
-
* that support profanity detection, see <a href="https://docs.aws.amazon.com/translate/latest/dg/
|
|
393
|
-
*
|
|
412
|
+
* that support profanity detection, see <a href="https://docs.aws.amazon.com/translate/latest/dg/customizing-translations-profanity.html">Masking
|
|
413
|
+
* profanity</a> in the Amazon Translate Developer Guide.</p>
|
|
414
|
+
* <p>If you specify multiple target languages for the job, all the
|
|
415
|
+
* target languages must support profanity masking. If any of the
|
|
416
|
+
* target languages don't support profanity masking, the
|
|
417
|
+
* translation job won't mask profanity for any target
|
|
418
|
+
* language.</p>
|
|
394
419
|
*/
|
|
395
420
|
Profanity?: Profanity | string;
|
|
396
421
|
}
|
|
@@ -778,7 +803,8 @@ export declare enum MergeStrategy {
|
|
|
778
803
|
OVERWRITE = "OVERWRITE"
|
|
779
804
|
}
|
|
780
805
|
/**
|
|
781
|
-
* <p>The data associated with the custom terminology. For information about the custom terminology file, see
|
|
806
|
+
* <p>The data associated with the custom terminology. For information about the custom terminology file, see
|
|
807
|
+
* <a href="https://docs.aws.amazon.com/translate/latest/dg/creating-custom-terminology.html">
|
|
782
808
|
* Creating a Custom Terminology</a>.</p>
|
|
783
809
|
*/
|
|
784
810
|
export interface TerminologyData {
|
|
@@ -838,6 +864,12 @@ export interface ImportTerminologyRequest {
|
|
|
838
864
|
* <p>The encryption key for the custom terminology being imported.</p>
|
|
839
865
|
*/
|
|
840
866
|
EncryptionKey?: EncryptionKey;
|
|
867
|
+
/**
|
|
868
|
+
* <p>Tags to be associated with this resource. A tag is a key-value pair that
|
|
869
|
+
* adds metadata to a resource. Each tag key for the resource must be unique.
|
|
870
|
+
* For more information, see <a href="https://docs.aws.amazon.com/translate/latest/dg/tagging.html">
|
|
871
|
+
* Tagging your resources</a>.</p>
|
|
872
|
+
*/
|
|
841
873
|
Tags?: Tag[];
|
|
842
874
|
}
|
|
843
875
|
export interface ImportTerminologyResponse {
|
|
@@ -946,9 +978,19 @@ export interface ListParallelDataResponse {
|
|
|
946
978
|
NextToken?: string;
|
|
947
979
|
}
|
|
948
980
|
export interface ListTagsForResourceRequest {
|
|
981
|
+
/**
|
|
982
|
+
* <p>The Amazon Resource Name (ARN) of the given Amazon Translate resource you are querying.
|
|
983
|
+
* </p>
|
|
984
|
+
*/
|
|
949
985
|
ResourceArn: string | undefined;
|
|
950
986
|
}
|
|
951
987
|
export interface ListTagsForResourceResponse {
|
|
988
|
+
/**
|
|
989
|
+
* <p>Tags associated with the Amazon Translate resource being queried. A tag is a key-value
|
|
990
|
+
* pair that adds as a metadata to a resource used by Amazon Translate. For example, a tag with
|
|
991
|
+
* "Sales" as the key might be added to a resource to indicate its use by the sales department.
|
|
992
|
+
* </p>
|
|
993
|
+
*/
|
|
952
994
|
Tags?: Tag[];
|
|
953
995
|
}
|
|
954
996
|
export interface ListTerminologiesRequest {
|
|
@@ -1053,30 +1095,42 @@ export interface StartTextTranslationJobRequest {
|
|
|
1053
1095
|
OutputDataConfig: OutputDataConfig | undefined;
|
|
1054
1096
|
/**
|
|
1055
1097
|
* <p>The Amazon Resource Name (ARN) of an AWS Identity Access and Management (IAM) role
|
|
1056
|
-
* that grants Amazon Translate read access to your input data. For more information, see
|
|
1098
|
+
* that grants Amazon Translate read access to your input data. For more information, see
|
|
1099
|
+
* <a href="https://docs.aws.amazon.com/translate/latest/dg/identity-and-access-management.html">Identity and access management </a>.</p>
|
|
1057
1100
|
*/
|
|
1058
1101
|
DataAccessRoleArn: string | undefined;
|
|
1059
1102
|
/**
|
|
1060
|
-
* <p>The language code of the input language. For a list of language codes, see
|
|
1061
|
-
*
|
|
1062
|
-
*
|
|
1103
|
+
* <p>The language code of the input language. For a list of language codes, see
|
|
1104
|
+
* <a href="https://docs.aws.amazon.com/translate/latest/dg/what-is-languages.html">Supported languages</a>.</p>
|
|
1105
|
+
* <p>Amazon Translate does not automatically detect a source language during batch translation jobs.</p>
|
|
1063
1106
|
*/
|
|
1064
1107
|
SourceLanguageCode: string | undefined;
|
|
1065
1108
|
/**
|
|
1066
|
-
* <p>The
|
|
1109
|
+
* <p>The target languages of the translation job. Enter up to 10 language codes.
|
|
1110
|
+
* Each input file is translated into each target language.</p>
|
|
1111
|
+
* <p>Each language code is two or five characters long. For a list of language codes, see
|
|
1112
|
+
* <a href="https://docs.aws.amazon.com/translate/latest/dg/what-is-languages.html">Supported languages</a>.</p>
|
|
1067
1113
|
*/
|
|
1068
1114
|
TargetLanguageCodes: string[] | undefined;
|
|
1069
1115
|
/**
|
|
1070
1116
|
* <p>The name of a custom terminology resource to add to the translation job. This resource
|
|
1071
1117
|
* lists examples source terms and the desired translation for each term.</p>
|
|
1072
1118
|
* <p>This parameter accepts only one custom terminology resource.</p>
|
|
1119
|
+
* <p>If you specify multiple target languages for the
|
|
1120
|
+
* job, translate uses the designated terminology for each
|
|
1121
|
+
* requested target language that has an entry for the source term
|
|
1122
|
+
* in the terminology file.</p>
|
|
1073
1123
|
* <p>For a list of available custom terminology resources, use the <a>ListTerminologies</a> operation.</p>
|
|
1074
|
-
* <p>For more information, see <a
|
|
1124
|
+
* <p>For more information, see <a href="https://docs.aws.amazon.com/translate/latest/dg/how-custom-terminology.html">Custom terminology</a>.</p>
|
|
1075
1125
|
*/
|
|
1076
1126
|
TerminologyNames?: string[];
|
|
1077
1127
|
/**
|
|
1078
1128
|
* <p>The name of a parallel data resource to add to the translation job. This resource consists
|
|
1079
|
-
* of examples that show how you want segments of text to be translated.
|
|
1129
|
+
* of examples that show how you want segments of text to be translated.
|
|
1130
|
+
* If you specify multiple target languages for
|
|
1131
|
+
* the job, the parallel data file must include translations for
|
|
1132
|
+
* all the target languages.</p>
|
|
1133
|
+
* <p>When you add parallel
|
|
1080
1134
|
* data to a translation job, you create an <i>Active Custom Translation</i> job. </p>
|
|
1081
1135
|
* <p>This parameter accepts only one parallel data resource.</p>
|
|
1082
1136
|
* <note>
|
|
@@ -1084,7 +1138,8 @@ export interface StartTextTranslationJobRequest {
|
|
|
1084
1138
|
* use parallel data. For more information, see <a href="http://aws.amazon.com/translate/pricing/">Amazon Translate pricing</a>.</p>
|
|
1085
1139
|
* </note>
|
|
1086
1140
|
* <p>For a list of available parallel data resources, use the <a>ListParallelData</a> operation.</p>
|
|
1087
|
-
* <p>For more information, see <a
|
|
1141
|
+
* <p>For more information, see <a href="https://docs.aws.amazon.com/translate/latest/dg/customizing-translations-parallel-data.html">
|
|
1142
|
+
* Customizing your translations with parallel data</a>.</p>
|
|
1088
1143
|
*/
|
|
1089
1144
|
ParallelDataNames?: string[];
|
|
1090
1145
|
/**
|
|
@@ -1093,8 +1148,8 @@ export interface StartTextTranslationJobRequest {
|
|
|
1093
1148
|
*/
|
|
1094
1149
|
ClientToken?: string;
|
|
1095
1150
|
/**
|
|
1096
|
-
* <p>Settings to configure your translation output, including the option to
|
|
1097
|
-
*
|
|
1151
|
+
* <p>Settings to configure your translation output, including the option to set the formality
|
|
1152
|
+
* level of the output text and the option to mask profane words and phrases.</p>
|
|
1098
1153
|
*/
|
|
1099
1154
|
Settings?: TranslationSettings;
|
|
1100
1155
|
}
|
|
@@ -1145,7 +1200,7 @@ export interface StartTextTranslationJobResponse {
|
|
|
1145
1200
|
}
|
|
1146
1201
|
/**
|
|
1147
1202
|
* <p>Amazon Translate does not support translation from the language of the source text into the requested
|
|
1148
|
-
* target language. For more information, see <a
|
|
1203
|
+
* target language. For more information, see <a href="https://docs.aws.amazon.com/translate/latest/dg/how-to-error-msg.html">Error messages</a>. </p>
|
|
1149
1204
|
*/
|
|
1150
1205
|
export declare class UnsupportedLanguagePairException extends __BaseException {
|
|
1151
1206
|
readonly name: "UnsupportedLanguagePairException";
|
|
@@ -1182,7 +1237,15 @@ export interface StopTextTranslationJobResponse {
|
|
|
1182
1237
|
JobStatus?: JobStatus | string;
|
|
1183
1238
|
}
|
|
1184
1239
|
export interface TagResourceRequest {
|
|
1240
|
+
/**
|
|
1241
|
+
* <p>The Amazon Resource Name (ARN) of the given Amazon Translate resource to which you want
|
|
1242
|
+
* to associate the tags. </p>
|
|
1243
|
+
*/
|
|
1185
1244
|
ResourceArn: string | undefined;
|
|
1245
|
+
/**
|
|
1246
|
+
* <p>Tags being associated with a specific Amazon Translate resource. There can be a maximum
|
|
1247
|
+
* of 50 tags (both existing and pending) associated with a specific resource.</p>
|
|
1248
|
+
*/
|
|
1186
1249
|
Tags: Tag[] | undefined;
|
|
1187
1250
|
}
|
|
1188
1251
|
export interface TagResourceResponse {
|
|
@@ -1246,7 +1309,7 @@ export interface TranslateTextRequest {
|
|
|
1246
1309
|
TerminologyNames?: string[];
|
|
1247
1310
|
/**
|
|
1248
1311
|
* <p>The language code for the language of the source text. The language must be a language
|
|
1249
|
-
* supported by Amazon Translate. For a list of language codes, see <a
|
|
1312
|
+
* supported by Amazon Translate. For a list of language codes, see <a href="https://docs.aws.amazon.com/translate/latest/dg/what-is-languages.html">Supported languages</a>.</p>
|
|
1250
1313
|
* <p>To have Amazon Translate determine the source language of your text, you can specify
|
|
1251
1314
|
* <code>auto</code> in the <code>SourceLanguageCode</code> field. If you specify
|
|
1252
1315
|
* <code>auto</code>, Amazon Translate will call <a href="https://docs.aws.amazon.com/comprehend/latest/dg/comprehend-general.html">Amazon
|
|
@@ -1292,7 +1355,16 @@ export interface TranslateTextResponse {
|
|
|
1292
1355
|
AppliedSettings?: TranslationSettings;
|
|
1293
1356
|
}
|
|
1294
1357
|
export interface UntagResourceRequest {
|
|
1358
|
+
/**
|
|
1359
|
+
* <p> The Amazon Resource Name (ARN) of the given Amazon Translate resource from which you
|
|
1360
|
+
* want to remove the tags. </p>
|
|
1361
|
+
*/
|
|
1295
1362
|
ResourceArn: string | undefined;
|
|
1363
|
+
/**
|
|
1364
|
+
* <p>The initial part of a key-value pair that forms a tag being removed from a given resource.
|
|
1365
|
+
* Keys must be unique and cannot be duplicated for a particular resource.
|
|
1366
|
+
* </p>
|
|
1367
|
+
*/
|
|
1296
1368
|
TagKeys: string[] | undefined;
|
|
1297
1369
|
}
|
|
1298
1370
|
export interface UntagResourceResponse {
|