@aws-sdk/client-rekognition 3.434.0 → 3.436.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.
@@ -4,6 +4,7 @@ exports.getRuntimeConfig = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const package_json_1 = tslib_1.__importDefault(require("../package.json"));
6
6
  const client_sts_1 = require("@aws-sdk/client-sts");
7
+ const core_1 = require("@aws-sdk/core");
7
8
  const credential_provider_node_1 = require("@aws-sdk/credential-provider-node");
8
9
  const util_user_agent_node_1 = require("@aws-sdk/util-user-agent-node");
9
10
  const config_resolver_1 = require("@smithy/config-resolver");
@@ -22,6 +23,7 @@ const getRuntimeConfig = (config) => {
22
23
  const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config);
23
24
  const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);
24
25
  const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);
26
+ (0, core_1.emitWarningIfUnsupportedVersion)(process.version);
25
27
  return {
26
28
  ...clientSharedValues,
27
29
  ...config,
@@ -6,17 +6,19 @@ const url_parser_1 = require("@smithy/url-parser");
6
6
  const util_base64_1 = require("@smithy/util-base64");
7
7
  const util_utf8_1 = require("@smithy/util-utf8");
8
8
  const endpointResolver_1 = require("./endpoint/endpointResolver");
9
- const getRuntimeConfig = (config) => ({
10
- apiVersion: "2016-06-27",
11
- base64Decoder: config?.base64Decoder ?? util_base64_1.fromBase64,
12
- base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64,
13
- disableHostPrefix: config?.disableHostPrefix ?? false,
14
- endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver,
15
- extensions: config?.extensions ?? [],
16
- logger: config?.logger ?? new smithy_client_1.NoOpLogger(),
17
- serviceId: config?.serviceId ?? "Rekognition",
18
- urlParser: config?.urlParser ?? url_parser_1.parseUrl,
19
- utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8,
20
- utf8Encoder: config?.utf8Encoder ?? util_utf8_1.toUtf8,
21
- });
9
+ const getRuntimeConfig = (config) => {
10
+ return {
11
+ apiVersion: "2016-06-27",
12
+ base64Decoder: config?.base64Decoder ?? util_base64_1.fromBase64,
13
+ base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64,
14
+ disableHostPrefix: config?.disableHostPrefix ?? false,
15
+ endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver,
16
+ extensions: config?.extensions ?? [],
17
+ logger: config?.logger ?? new smithy_client_1.NoOpLogger(),
18
+ serviceId: config?.serviceId ?? "Rekognition",
19
+ urlParser: config?.urlParser ?? url_parser_1.parseUrl,
20
+ utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8,
21
+ utf8Encoder: config?.utf8Encoder ?? util_utf8_1.toUtf8,
22
+ };
23
+ };
22
24
  exports.getRuntimeConfig = getRuntimeConfig;
@@ -1,5 +1,6 @@
1
1
  import packageInfo from "../package.json";
2
2
  import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts";
3
+ import { emitWarningIfUnsupportedVersion as awsCheckVersion } from "@aws-sdk/core";
3
4
  import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node";
4
5
  import { defaultUserAgent } from "@aws-sdk/util-user-agent-node";
5
6
  import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, } from "@smithy/config-resolver";
@@ -18,6 +19,7 @@ export const getRuntimeConfig = (config) => {
18
19
  const defaultsMode = resolveDefaultsModeConfig(config);
19
20
  const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
20
21
  const clientSharedValues = getSharedRuntimeConfig(config);
22
+ awsCheckVersion(process.version);
21
23
  return {
22
24
  ...clientSharedValues,
23
25
  ...config,
@@ -3,16 +3,18 @@ import { parseUrl } from "@smithy/url-parser";
3
3
  import { fromBase64, toBase64 } from "@smithy/util-base64";
4
4
  import { fromUtf8, toUtf8 } from "@smithy/util-utf8";
5
5
  import { defaultEndpointResolver } from "./endpoint/endpointResolver";
6
- export const getRuntimeConfig = (config) => ({
7
- apiVersion: "2016-06-27",
8
- base64Decoder: config?.base64Decoder ?? fromBase64,
9
- base64Encoder: config?.base64Encoder ?? toBase64,
10
- disableHostPrefix: config?.disableHostPrefix ?? false,
11
- endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,
12
- extensions: config?.extensions ?? [],
13
- logger: config?.logger ?? new NoOpLogger(),
14
- serviceId: config?.serviceId ?? "Rekognition",
15
- urlParser: config?.urlParser ?? parseUrl,
16
- utf8Decoder: config?.utf8Decoder ?? fromUtf8,
17
- utf8Encoder: config?.utf8Encoder ?? toUtf8,
18
- });
6
+ export const getRuntimeConfig = (config) => {
7
+ return {
8
+ apiVersion: "2016-06-27",
9
+ base64Decoder: config?.base64Decoder ?? fromBase64,
10
+ base64Encoder: config?.base64Encoder ?? toBase64,
11
+ disableHostPrefix: config?.disableHostPrefix ?? false,
12
+ endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,
13
+ extensions: config?.extensions ?? [],
14
+ logger: config?.logger ?? new NoOpLogger(),
15
+ serviceId: config?.serviceId ?? "Rekognition",
16
+ urlParser: config?.urlParser ?? parseUrl,
17
+ utf8Decoder: config?.utf8Decoder ?? fromUtf8,
18
+ utf8Encoder: config?.utf8Encoder ?? toUtf8,
19
+ };
20
+ };
@@ -111,6 +111,54 @@ export interface GetMediaAnalysisJobCommandOutput extends GetMediaAnalysisJobRes
111
111
  * @throws {@link RekognitionServiceException}
112
112
  * <p>Base exception class for all service exceptions from Rekognition service.</p>
113
113
  *
114
+ * @example GetMediaAnalysisJob
115
+ * ```javascript
116
+ * // Retrieves the results for a given media analysis job.
117
+ * const input = {
118
+ * "JobId": "861a0645d98ef88efb75477628c011c04942d9d5f58faf2703c393c8cf8c1537"
119
+ * };
120
+ * const command = new GetMediaAnalysisJobCommand(input);
121
+ * const response = await client.send(command);
122
+ * /* response ==
123
+ * {
124
+ * "CompletionTimestamp": "2023-07-28T08:05:51.958000-07:00",
125
+ * "CreationTimestamp": "2023-07-28T08:05:51.958000-06:00",
126
+ * "Input": {
127
+ * "S3Object": {
128
+ * "Bucket": "input-bucket",
129
+ * "Name": "input-manifest.json"
130
+ * }
131
+ * },
132
+ * "JobId": "861a0645d98ef88efb75477628c011c04942d9d5f58faf2703c393c8cf8c1537",
133
+ * "JobName": "job-name",
134
+ * "ManifestSummary": {
135
+ * "S3Object": {
136
+ * "Bucket": "output-bucket",
137
+ * "Name": "output-location/861a0645d98ef88efb75477628c011c04942d9d5f58faf2703c393c8cf8c1537-manifest-summary.json"
138
+ * }
139
+ * },
140
+ * "OperationsConfig": {
141
+ * "DetectModerationLabels": {
142
+ * "MinConfidence": 50,
143
+ * "ProjectVersion": "arn:aws:rekognition:us-east-1:111122223333:project/my-project/version/1/1690556751958"
144
+ * }
145
+ * },
146
+ * "OutputConfig": {
147
+ * "S3Bucket": "output-bucket",
148
+ * "S3KeyPrefix": "output-location"
149
+ * },
150
+ * "Results": {
151
+ * "S3Object": {
152
+ * "Bucket": "output-bucket",
153
+ * "Name": "output-location/861a0645d98ef88efb75477628c011c04942d9d5f58faf2703c393c8cf8c1537-results.jsonl"
154
+ * }
155
+ * },
156
+ * "Status": "SUCCEEDED"
157
+ * }
158
+ * *\/
159
+ * // example id: getmediaanalysisjob-1697650068124
160
+ * ```
161
+ *
114
162
  */
115
163
  export declare class GetMediaAnalysisJobCommand extends $Command<GetMediaAnalysisJobCommandInput, GetMediaAnalysisJobCommandOutput, RekognitionClientResolvedConfig> {
116
164
  readonly input: GetMediaAnalysisJobCommandInput;
@@ -116,6 +116,58 @@ export interface ListMediaAnalysisJobsCommandOutput extends ListMediaAnalysisJob
116
116
  * @throws {@link RekognitionServiceException}
117
117
  * <p>Base exception class for all service exceptions from Rekognition service.</p>
118
118
  *
119
+ * @example ListMediaAnalysisJobs
120
+ * ```javascript
121
+ * // Returns a list of media analysis jobs.
122
+ * const input = {
123
+ * "MaxResults": 10
124
+ * };
125
+ * const command = new ListMediaAnalysisJobsCommand(input);
126
+ * const response = await client.send(command);
127
+ * /* response ==
128
+ * {
129
+ * "MediaAnalysisJobs": [
130
+ * {
131
+ * "CompletionTimestamp": "2023-07-28T08:05:51.958000-07:00",
132
+ * "CreationTimestamp": "2023-07-28T08:05:51.958000-06:00",
133
+ * "Input": {
134
+ * "S3Object": {
135
+ * "Bucket": "input-bucket",
136
+ * "Name": "input-manifest.json"
137
+ * }
138
+ * },
139
+ * "JobId": "861a0645d98ef88efb75477628c011c04942d9d5f58faf2703c393c8cf8c1537",
140
+ * "JobName": "job-name",
141
+ * "ManifestSummary": {
142
+ * "S3Object": {
143
+ * "Bucket": "output-bucket",
144
+ * "Name": "output-location/861a0645d98ef88efb75477628c011c04942d9d5f58faf2703c393c8cf8c1537-manifest-summary.json"
145
+ * }
146
+ * },
147
+ * "OperationsConfig": {
148
+ * "DetectModerationLabels": {
149
+ * "MinConfidence": 50,
150
+ * "ProjectVersion": "arn:aws:rekognition:us-east-1:111122223333:project/my-project/version/1/1690556751958"
151
+ * }
152
+ * },
153
+ * "OutputConfig": {
154
+ * "S3Bucket": "output-bucket",
155
+ * "S3KeyPrefix": "output-location"
156
+ * },
157
+ * "Results": {
158
+ * "S3Object": {
159
+ * "Bucket": "output-bucket",
160
+ * "Name": "output-location/861a0645d98ef88efb75477628c011c04942d9d5f58faf2703c393c8cf8c1537-results.jsonl"
161
+ * }
162
+ * },
163
+ * "Status": "SUCCEEDED"
164
+ * }
165
+ * ]
166
+ * }
167
+ * *\/
168
+ * // example id: listmediaanalysisjobs-1697650653077
169
+ * ```
170
+ *
119
171
  */
120
172
  export declare class ListMediaAnalysisJobsCommand extends $Command<ListMediaAnalysisJobsCommandInput, ListMediaAnalysisJobsCommandOutput, RekognitionClientResolvedConfig> {
121
173
  readonly input: ListMediaAnalysisJobsCommandInput;
@@ -112,6 +112,38 @@ export interface StartMediaAnalysisJobCommandOutput extends StartMediaAnalysisJo
112
112
  * @throws {@link RekognitionServiceException}
113
113
  * <p>Base exception class for all service exceptions from Rekognition service.</p>
114
114
  *
115
+ * @example StartMediaAnalysisJob
116
+ * ```javascript
117
+ * // Initiates a new media analysis job.
118
+ * const input = {
119
+ * "Input": {
120
+ * "S3Object": {
121
+ * "Bucket": "input-bucket",
122
+ * "Name": "input-manifest.json"
123
+ * }
124
+ * },
125
+ * "JobName": "job-name",
126
+ * "OperationsConfig": {
127
+ * "DetectModerationLabels": {
128
+ * "MinConfidence": 50,
129
+ * "ProjectVersion": "arn:aws:rekognition:us-east-1:111122223333:project/my-project/version/1/1690556751958"
130
+ * }
131
+ * },
132
+ * "OutputConfig": {
133
+ * "S3Bucket": "output-bucket",
134
+ * "S3KeyPrefix": "output-location"
135
+ * }
136
+ * };
137
+ * const command = new StartMediaAnalysisJobCommand(input);
138
+ * const response = await client.send(command);
139
+ * /* response ==
140
+ * {
141
+ * "JobId": "861a0645d98ef88efb75477628c011c04942d9d5f58faf2703c393c8cf8c1537"
142
+ * }
143
+ * *\/
144
+ * // example id: startmediaanalysisjob-1697651090922
145
+ * ```
146
+ *
115
147
  */
116
148
  export declare class StartMediaAnalysisJobCommand extends $Command<StartMediaAnalysisJobCommandInput, StartMediaAnalysisJobCommandOutput, RekognitionClientResolvedConfig> {
117
149
  readonly input: StartMediaAnalysisJobCommandInput;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-rekognition",
3
3
  "description": "AWS SDK for JavaScript Rekognition Client for Node.js, Browser and React Native",
4
- "version": "3.434.0",
4
+ "version": "3.436.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "tsc -p tsconfig.cjs.json",
@@ -21,8 +21,9 @@
21
21
  "dependencies": {
22
22
  "@aws-crypto/sha256-browser": "3.0.0",
23
23
  "@aws-crypto/sha256-js": "3.0.0",
24
- "@aws-sdk/client-sts": "3.433.0",
25
- "@aws-sdk/credential-provider-node": "3.433.0",
24
+ "@aws-sdk/client-sts": "3.436.0",
25
+ "@aws-sdk/core": "3.436.0",
26
+ "@aws-sdk/credential-provider-node": "3.436.0",
26
27
  "@aws-sdk/middleware-host-header": "3.433.0",
27
28
  "@aws-sdk/middleware-logger": "3.433.0",
28
29
  "@aws-sdk/middleware-recursion-detection": "3.433.0",