@aws-sdk/client-simspaceweaver 3.321.1 → 3.323.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/README.md CHANGED
@@ -9,18 +9,18 @@
9
9
 
10
10
  AWS SDK for JavaScript SimSpaceWeaver Client for Node.js, Browser and React Native.
11
11
 
12
- <p>Amazon Web Services SimSpace Weaver (SimSpace Weaver) is a managed service that you can use to build and operate large-scale
12
+ <p>SimSpace Weaver (SimSpace Weaver) is a managed service that you can use to build and operate large-scale
13
13
  spatial simulations in the Amazon Web Services Cloud. For example, you can create a digital twin of a city,
14
- crowd simulations with millions of people and objects, and massilvely-multiplayer games with
14
+ crowd simulations with millions of people and objects, and massively multiplayer games with
15
15
  hundreds of thousands of connected players.
16
16
  For more information about SimSpace Weaver, see the <i>
17
- <a href="https://docs.aws.amazon.com/simspaceweaver/latest/userguide/">Amazon Web Services SimSpace Weaver User Guide</a>
17
+ <a href="https://docs.aws.amazon.com/simspaceweaver/latest/userguide/">SimSpace Weaver User Guide</a>
18
18
  </i>.</p>
19
19
  <p>This API reference describes the API operations and data types that you can use to
20
20
  communicate directly with SimSpace Weaver.</p>
21
- <p>SimSpace Weaver also provides the SimSpace Weaver app SDK, which you use for app development. The SimSpace Weaver
22
- app SDK API reference is included in the SimSpace Weaver app SDK documentation, which is part of the
23
- SimSpace Weaver app SDK distributable package.</p>
21
+ <p>SimSpace Weaver also provides the SimSpace Weaver app SDK, which you use for app development. The
22
+ SimSpace Weaver app SDK API reference is included in the SimSpace Weaver app SDK documentation. This
23
+ documentation is part of the SimSpace Weaver app SDK distributable package.</p>
24
24
 
25
25
  ## Installing
26
26
 
@@ -37,16 +37,16 @@ using your favorite package manager:
37
37
 
38
38
  The AWS SDK is modulized by clients and commands.
39
39
  To send a request, you only need to import the `SimSpaceWeaverClient` and
40
- the commands you need, for example `DeleteAppCommand`:
40
+ the commands you need, for example `CreateSnapshotCommand`:
41
41
 
42
42
  ```js
43
43
  // ES5 example
44
- const { SimSpaceWeaverClient, DeleteAppCommand } = require("@aws-sdk/client-simspaceweaver");
44
+ const { SimSpaceWeaverClient, CreateSnapshotCommand } = require("@aws-sdk/client-simspaceweaver");
45
45
  ```
46
46
 
47
47
  ```ts
48
48
  // ES6+ example
49
- import { SimSpaceWeaverClient, DeleteAppCommand } from "@aws-sdk/client-simspaceweaver";
49
+ import { SimSpaceWeaverClient, CreateSnapshotCommand } from "@aws-sdk/client-simspaceweaver";
50
50
  ```
51
51
 
52
52
  ### Usage
@@ -65,7 +65,7 @@ const client = new SimSpaceWeaverClient({ region: "REGION" });
65
65
  const params = {
66
66
  /** input parameters */
67
67
  };
68
- const command = new DeleteAppCommand(params);
68
+ const command = new CreateSnapshotCommand(params);
69
69
  ```
70
70
 
71
71
  #### Async/await
@@ -144,7 +144,7 @@ const client = new AWS.SimSpaceWeaver({ region: "REGION" });
144
144
 
145
145
  // async/await.
146
146
  try {
147
- const data = await client.deleteApp(params);
147
+ const data = await client.createSnapshot(params);
148
148
  // process data.
149
149
  } catch (error) {
150
150
  // error handling.
@@ -152,7 +152,7 @@ try {
152
152
 
153
153
  // Promises.
154
154
  client
155
- .deleteApp(params)
155
+ .createSnapshot(params)
156
156
  .then((data) => {
157
157
  // process data.
158
158
  })
@@ -161,7 +161,7 @@ client
161
161
  });
162
162
 
163
163
  // callbacks.
164
- client.deleteApp(params, (err, data) => {
164
+ client.createSnapshot(params, (err, data) => {
165
165
  // process err and data.
166
166
  });
167
167
  ```
@@ -217,6 +217,14 @@ see LICENSE for more information.
217
217
 
218
218
  ## Client Commands (Operations List)
219
219
 
220
+ <details>
221
+ <summary>
222
+ CreateSnapshot
223
+ </summary>
224
+
225
+ [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-simspaceweaver/classes/createsnapshotcommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-simspaceweaver/interfaces/createsnapshotcommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-simspaceweaver/interfaces/createsnapshotcommandoutput.html)
226
+
227
+ </details>
220
228
  <details>
221
229
  <summary>
222
230
  DeleteApp
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SimSpaceWeaver = void 0;
4
4
  const smithy_client_1 = require("@aws-sdk/smithy-client");
5
+ const CreateSnapshotCommand_1 = require("./commands/CreateSnapshotCommand");
5
6
  const DeleteAppCommand_1 = require("./commands/DeleteAppCommand");
6
7
  const DeleteSimulationCommand_1 = require("./commands/DeleteSimulationCommand");
7
8
  const DescribeAppCommand_1 = require("./commands/DescribeAppCommand");
@@ -19,6 +20,7 @@ const TagResourceCommand_1 = require("./commands/TagResourceCommand");
19
20
  const UntagResourceCommand_1 = require("./commands/UntagResourceCommand");
20
21
  const SimSpaceWeaverClient_1 = require("./SimSpaceWeaverClient");
21
22
  const commands = {
23
+ CreateSnapshotCommand: CreateSnapshotCommand_1.CreateSnapshotCommand,
22
24
  DeleteAppCommand: DeleteAppCommand_1.DeleteAppCommand,
23
25
  DeleteSimulationCommand: DeleteSimulationCommand_1.DeleteSimulationCommand,
24
26
  DescribeAppCommand: DescribeAppCommand_1.DescribeAppCommand,
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CreateSnapshotCommand = void 0;
4
+ const middleware_endpoint_1 = require("@aws-sdk/middleware-endpoint");
5
+ const middleware_serde_1 = require("@aws-sdk/middleware-serde");
6
+ const smithy_client_1 = require("@aws-sdk/smithy-client");
7
+ const Aws_restJson1_1 = require("../protocols/Aws_restJson1");
8
+ class CreateSnapshotCommand extends smithy_client_1.Command {
9
+ static getEndpointParameterInstructions() {
10
+ return {
11
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
12
+ Endpoint: { type: "builtInParams", name: "endpoint" },
13
+ Region: { type: "builtInParams", name: "region" },
14
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
15
+ };
16
+ }
17
+ constructor(input) {
18
+ super();
19
+ this.input = input;
20
+ }
21
+ resolveMiddleware(clientStack, configuration, options) {
22
+ this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize));
23
+ this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, CreateSnapshotCommand.getEndpointParameterInstructions()));
24
+ const stack = clientStack.concat(this.middlewareStack);
25
+ const { logger } = configuration;
26
+ const clientName = "SimSpaceWeaverClient";
27
+ const commandName = "CreateSnapshotCommand";
28
+ const handlerExecutionContext = {
29
+ logger,
30
+ clientName,
31
+ commandName,
32
+ inputFilterSensitiveLog: (_) => _,
33
+ outputFilterSensitiveLog: (_) => _,
34
+ };
35
+ const { requestHandler } = configuration;
36
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
37
+ }
38
+ serialize(input, context) {
39
+ return (0, Aws_restJson1_1.se_CreateSnapshotCommand)(input, context);
40
+ }
41
+ deserialize(output, context) {
42
+ return (0, Aws_restJson1_1.de_CreateSnapshotCommand)(output, context);
43
+ }
44
+ }
45
+ exports.CreateSnapshotCommand = CreateSnapshotCommand;
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./CreateSnapshotCommand"), exports);
4
5
  tslib_1.__exportStar(require("./DeleteAppCommand"), exports);
5
6
  tslib_1.__exportStar(require("./DeleteSimulationCommand"), exports);
6
7
  tslib_1.__exportStar(require("./DescribeAppCommand"), exports);
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ruleSet = void 0;
4
- const p = "required", q = "fn", r = "argv", s = "ref";
5
- const a = "PartitionResult", b = "tree", c = "error", d = "endpoint", e = { [p]: false, "type": "String" }, f = { [p]: true, "default": false, "type": "Boolean" }, g = { [s]: "Endpoint" }, h = { [q]: "booleanEquals", [r]: [{ [s]: "UseFIPS" }, true] }, i = { [q]: "booleanEquals", [r]: [{ [s]: "UseDualStack" }, true] }, j = {}, k = { [q]: "booleanEquals", [r]: [true, { [q]: "getAttr", [r]: [{ [s]: a }, "supportsFIPS"] }] }, l = { [q]: "booleanEquals", [r]: [true, { [q]: "getAttr", [r]: [{ [s]: a }, "supportsDualStack"] }] }, m = [g], n = [h], o = [i];
6
- const _data = { version: "1.0", parameters: { Region: e, UseDualStack: f, UseFIPS: f, Endpoint: e }, rules: [{ conditions: [{ [q]: "aws.partition", [r]: [{ [s]: "Region" }], assign: a }], type: b, rules: [{ conditions: [{ [q]: "isSet", [r]: m }, { [q]: "parseURL", [r]: m, assign: "url" }], type: b, rules: [{ conditions: n, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: c }, { type: b, rules: [{ conditions: o, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: c }, { endpoint: { url: g, properties: j, headers: j }, type: d }] }] }, { conditions: [h, i], type: b, rules: [{ conditions: [k, l], type: b, rules: [{ endpoint: { url: "https://simspaceweaver-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: j, headers: j }, type: d }] }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: c }] }, { conditions: n, type: b, rules: [{ conditions: [k], type: b, rules: [{ endpoint: { url: "https://simspaceweaver-fips.{Region}.{PartitionResult#dnsSuffix}", properties: j, headers: j }, type: d }] }, { error: "FIPS is enabled but this partition does not support FIPS", type: c }] }, { conditions: o, type: b, rules: [{ conditions: [l], type: b, rules: [{ endpoint: { url: "https://simspaceweaver.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: j, headers: j }, type: d }] }, { error: "DualStack is enabled but this partition does not support DualStack", type: c }] }, { endpoint: { url: "https://simspaceweaver.{Region}.{PartitionResult#dnsSuffix}", properties: j, headers: j }, type: d }] }] };
4
+ const q = "required", r = "fn", s = "argv", t = "ref";
5
+ const a = "isSet", b = "tree", c = "error", d = "endpoint", e = "PartitionResult", f = { [q]: false, "type": "String" }, g = { [q]: true, "default": false, "type": "Boolean" }, h = { [t]: "Endpoint" }, i = { [r]: "booleanEquals", [s]: [{ [t]: "UseFIPS" }, true] }, j = { [r]: "booleanEquals", [s]: [{ [t]: "UseDualStack" }, true] }, k = {}, l = { [r]: "booleanEquals", [s]: [true, { [r]: "getAttr", [s]: [{ [t]: e }, "supportsFIPS"] }] }, m = { [r]: "booleanEquals", [s]: [true, { [r]: "getAttr", [s]: [{ [t]: e }, "supportsDualStack"] }] }, n = [i], o = [j], p = [{ [t]: "Region" }];
6
+ const _data = { version: "1.0", parameters: { Region: f, UseDualStack: g, UseFIPS: g, Endpoint: f }, rules: [{ conditions: [{ [r]: a, [s]: [h] }], type: b, rules: [{ conditions: n, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: c }, { type: b, rules: [{ conditions: o, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: c }, { endpoint: { url: h, properties: k, headers: k }, type: d }] }] }, { type: b, rules: [{ conditions: [{ [r]: a, [s]: p }], type: b, rules: [{ conditions: [{ [r]: "aws.partition", [s]: p, assign: e }], type: b, rules: [{ conditions: [i, j], type: b, rules: [{ conditions: [l, m], type: b, rules: [{ type: b, rules: [{ endpoint: { url: "https://simspaceweaver-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: k, headers: k }, type: d }] }] }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: c }] }, { conditions: n, type: b, rules: [{ conditions: [l], type: b, rules: [{ type: b, rules: [{ endpoint: { url: "https://simspaceweaver-fips.{Region}.{PartitionResult#dnsSuffix}", properties: k, headers: k }, type: d }] }] }, { error: "FIPS is enabled but this partition does not support FIPS", type: c }] }, { conditions: o, type: b, rules: [{ conditions: [m], type: b, rules: [{ type: b, rules: [{ endpoint: { url: "https://simspaceweaver.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: k, headers: k }, type: d }] }] }, { error: "DualStack is enabled but this partition does not support DualStack", type: c }] }, { type: b, rules: [{ endpoint: { url: "https://simspaceweaver.{Region}.{PartitionResult#dnsSuffix}", properties: k, headers: k }, type: d }] }] }] }, { error: "Invalid Configuration: Missing Region", type: c }] }] };
7
7
  exports.ruleSet = _data;
@@ -108,6 +108,7 @@ exports.SimulationStatus = {
108
108
  DELETED: "DELETED",
109
109
  DELETING: "DELETING",
110
110
  FAILED: "FAILED",
111
+ SNAPSHOT_IN_PROGRESS: "SNAPSHOT_IN_PROGRESS",
111
112
  STARTED: "STARTED",
112
113
  STARTING: "STARTING",
113
114
  STOPPED: "STOPPED",
@@ -1,11 +1,33 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_StopSimulationCommand = exports.de_StopClockCommand = exports.de_StopAppCommand = exports.de_StartSimulationCommand = exports.de_StartClockCommand = exports.de_StartAppCommand = exports.de_ListTagsForResourceCommand = exports.de_ListSimulationsCommand = exports.de_ListAppsCommand = exports.de_DescribeSimulationCommand = exports.de_DescribeAppCommand = exports.de_DeleteSimulationCommand = exports.de_DeleteAppCommand = exports.se_UntagResourceCommand = exports.se_TagResourceCommand = exports.se_StopSimulationCommand = exports.se_StopClockCommand = exports.se_StopAppCommand = exports.se_StartSimulationCommand = exports.se_StartClockCommand = exports.se_StartAppCommand = exports.se_ListTagsForResourceCommand = exports.se_ListSimulationsCommand = exports.se_ListAppsCommand = exports.se_DescribeSimulationCommand = exports.se_DescribeAppCommand = exports.se_DeleteSimulationCommand = exports.se_DeleteAppCommand = void 0;
3
+ exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_StopSimulationCommand = exports.de_StopClockCommand = exports.de_StopAppCommand = exports.de_StartSimulationCommand = exports.de_StartClockCommand = exports.de_StartAppCommand = exports.de_ListTagsForResourceCommand = exports.de_ListSimulationsCommand = exports.de_ListAppsCommand = exports.de_DescribeSimulationCommand = exports.de_DescribeAppCommand = exports.de_DeleteSimulationCommand = exports.de_DeleteAppCommand = exports.de_CreateSnapshotCommand = exports.se_UntagResourceCommand = exports.se_TagResourceCommand = exports.se_StopSimulationCommand = exports.se_StopClockCommand = exports.se_StopAppCommand = exports.se_StartSimulationCommand = exports.se_StartClockCommand = exports.se_StartAppCommand = exports.se_ListTagsForResourceCommand = exports.se_ListSimulationsCommand = exports.se_ListAppsCommand = exports.se_DescribeSimulationCommand = exports.se_DescribeAppCommand = exports.se_DeleteSimulationCommand = exports.se_DeleteAppCommand = exports.se_CreateSnapshotCommand = void 0;
4
4
  const protocol_http_1 = require("@aws-sdk/protocol-http");
5
5
  const smithy_client_1 = require("@aws-sdk/smithy-client");
6
6
  const uuid_1 = require("uuid");
7
7
  const models_0_1 = require("../models/models_0");
8
8
  const SimSpaceWeaverServiceException_1 = require("../models/SimSpaceWeaverServiceException");
9
+ const se_CreateSnapshotCommand = async (input, context) => {
10
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
11
+ const headers = {
12
+ "content-type": "application/json",
13
+ };
14
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/createsnapshot";
15
+ let body;
16
+ body = JSON.stringify((0, smithy_client_1.take)(input, {
17
+ Destination: (_) => (0, smithy_client_1._json)(_),
18
+ Simulation: [],
19
+ }));
20
+ return new protocol_http_1.HttpRequest({
21
+ protocol,
22
+ hostname,
23
+ port,
24
+ method: "POST",
25
+ headers,
26
+ path: resolvedPath,
27
+ body,
28
+ });
29
+ };
30
+ exports.se_CreateSnapshotCommand = se_CreateSnapshotCommand;
9
31
  const se_DeleteAppCommand = async (input, context) => {
10
32
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
11
33
  const headers = {};
@@ -212,6 +234,7 @@ const se_StartSimulationCommand = async (input, context) => {
212
234
  Name: [],
213
235
  RoleArn: [],
214
236
  SchemaS3Location: (_) => (0, smithy_client_1._json)(_),
237
+ SnapshotS3Location: (_) => (0, smithy_client_1._json)(_),
215
238
  Tags: (_) => (0, smithy_client_1._json)(_),
216
239
  }));
217
240
  return new protocol_http_1.HttpRequest({
@@ -336,6 +359,48 @@ const se_UntagResourceCommand = async (input, context) => {
336
359
  });
337
360
  };
338
361
  exports.se_UntagResourceCommand = se_UntagResourceCommand;
362
+ const de_CreateSnapshotCommand = async (output, context) => {
363
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
364
+ return de_CreateSnapshotCommandError(output, context);
365
+ }
366
+ const contents = (0, smithy_client_1.map)({
367
+ $metadata: deserializeMetadata(output),
368
+ });
369
+ await collectBody(output.body, context);
370
+ return contents;
371
+ };
372
+ exports.de_CreateSnapshotCommand = de_CreateSnapshotCommand;
373
+ const de_CreateSnapshotCommandError = async (output, context) => {
374
+ const parsedOutput = {
375
+ ...output,
376
+ body: await parseErrorBody(output.body, context),
377
+ };
378
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
379
+ switch (errorCode) {
380
+ case "AccessDeniedException":
381
+ case "com.amazonaws.simspaceweaver#AccessDeniedException":
382
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
383
+ case "ConflictException":
384
+ case "com.amazonaws.simspaceweaver#ConflictException":
385
+ throw await de_ConflictExceptionRes(parsedOutput, context);
386
+ case "InternalServerException":
387
+ case "com.amazonaws.simspaceweaver#InternalServerException":
388
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
389
+ case "ResourceNotFoundException":
390
+ case "com.amazonaws.simspaceweaver#ResourceNotFoundException":
391
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
392
+ case "ValidationException":
393
+ case "com.amazonaws.simspaceweaver#ValidationException":
394
+ throw await de_ValidationExceptionRes(parsedOutput, context);
395
+ default:
396
+ const parsedBody = parsedOutput.body;
397
+ return throwDefaultError({
398
+ output,
399
+ parsedBody,
400
+ errorCode,
401
+ });
402
+ }
403
+ };
339
404
  const de_DeleteAppCommand = async (output, context) => {
340
405
  if (output.statusCode !== 200 && output.statusCode >= 300) {
341
406
  return de_DeleteAppCommandError(output, context);
@@ -490,6 +555,8 @@ const de_DescribeSimulationCommand = async (output, context) => {
490
555
  RoleArn: smithy_client_1.expectString,
491
556
  SchemaError: smithy_client_1.expectString,
492
557
  SchemaS3Location: smithy_client_1._json,
558
+ SnapshotS3Location: smithy_client_1._json,
559
+ StartError: smithy_client_1.expectString,
493
560
  Status: smithy_client_1.expectString,
494
561
  TargetStatus: smithy_client_1.expectString,
495
562
  });
@@ -1,4 +1,5 @@
1
1
  import { createAggregatedClient } from "@aws-sdk/smithy-client";
2
+ import { CreateSnapshotCommand, } from "./commands/CreateSnapshotCommand";
2
3
  import { DeleteAppCommand } from "./commands/DeleteAppCommand";
3
4
  import { DeleteSimulationCommand, } from "./commands/DeleteSimulationCommand";
4
5
  import { DescribeAppCommand } from "./commands/DescribeAppCommand";
@@ -16,6 +17,7 @@ import { TagResourceCommand } from "./commands/TagResourceCommand";
16
17
  import { UntagResourceCommand, } from "./commands/UntagResourceCommand";
17
18
  import { SimSpaceWeaverClient } from "./SimSpaceWeaverClient";
18
19
  const commands = {
20
+ CreateSnapshotCommand,
19
21
  DeleteAppCommand,
20
22
  DeleteSimulationCommand,
21
23
  DescribeAppCommand,
@@ -0,0 +1,41 @@
1
+ import { getEndpointPlugin } from "@aws-sdk/middleware-endpoint";
2
+ import { getSerdePlugin } from "@aws-sdk/middleware-serde";
3
+ import { Command as $Command } from "@aws-sdk/smithy-client";
4
+ import { de_CreateSnapshotCommand, se_CreateSnapshotCommand } from "../protocols/Aws_restJson1";
5
+ export class CreateSnapshotCommand extends $Command {
6
+ static getEndpointParameterInstructions() {
7
+ return {
8
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
9
+ Endpoint: { type: "builtInParams", name: "endpoint" },
10
+ Region: { type: "builtInParams", name: "region" },
11
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
12
+ };
13
+ }
14
+ constructor(input) {
15
+ super();
16
+ this.input = input;
17
+ }
18
+ resolveMiddleware(clientStack, configuration, options) {
19
+ this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
20
+ this.middlewareStack.use(getEndpointPlugin(configuration, CreateSnapshotCommand.getEndpointParameterInstructions()));
21
+ const stack = clientStack.concat(this.middlewareStack);
22
+ const { logger } = configuration;
23
+ const clientName = "SimSpaceWeaverClient";
24
+ const commandName = "CreateSnapshotCommand";
25
+ const handlerExecutionContext = {
26
+ logger,
27
+ clientName,
28
+ commandName,
29
+ inputFilterSensitiveLog: (_) => _,
30
+ outputFilterSensitiveLog: (_) => _,
31
+ };
32
+ const { requestHandler } = configuration;
33
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
34
+ }
35
+ serialize(input, context) {
36
+ return se_CreateSnapshotCommand(input, context);
37
+ }
38
+ deserialize(output, context) {
39
+ return de_CreateSnapshotCommand(output, context);
40
+ }
41
+ }
@@ -1,3 +1,4 @@
1
+ export * from "./CreateSnapshotCommand";
1
2
  export * from "./DeleteAppCommand";
2
3
  export * from "./DeleteSimulationCommand";
3
4
  export * from "./DescribeAppCommand";
@@ -1,4 +1,4 @@
1
- const p = "required", q = "fn", r = "argv", s = "ref";
2
- const a = "PartitionResult", b = "tree", c = "error", d = "endpoint", e = { [p]: false, "type": "String" }, f = { [p]: true, "default": false, "type": "Boolean" }, g = { [s]: "Endpoint" }, h = { [q]: "booleanEquals", [r]: [{ [s]: "UseFIPS" }, true] }, i = { [q]: "booleanEquals", [r]: [{ [s]: "UseDualStack" }, true] }, j = {}, k = { [q]: "booleanEquals", [r]: [true, { [q]: "getAttr", [r]: [{ [s]: a }, "supportsFIPS"] }] }, l = { [q]: "booleanEquals", [r]: [true, { [q]: "getAttr", [r]: [{ [s]: a }, "supportsDualStack"] }] }, m = [g], n = [h], o = [i];
3
- const _data = { version: "1.0", parameters: { Region: e, UseDualStack: f, UseFIPS: f, Endpoint: e }, rules: [{ conditions: [{ [q]: "aws.partition", [r]: [{ [s]: "Region" }], assign: a }], type: b, rules: [{ conditions: [{ [q]: "isSet", [r]: m }, { [q]: "parseURL", [r]: m, assign: "url" }], type: b, rules: [{ conditions: n, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: c }, { type: b, rules: [{ conditions: o, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: c }, { endpoint: { url: g, properties: j, headers: j }, type: d }] }] }, { conditions: [h, i], type: b, rules: [{ conditions: [k, l], type: b, rules: [{ endpoint: { url: "https://simspaceweaver-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: j, headers: j }, type: d }] }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: c }] }, { conditions: n, type: b, rules: [{ conditions: [k], type: b, rules: [{ endpoint: { url: "https://simspaceweaver-fips.{Region}.{PartitionResult#dnsSuffix}", properties: j, headers: j }, type: d }] }, { error: "FIPS is enabled but this partition does not support FIPS", type: c }] }, { conditions: o, type: b, rules: [{ conditions: [l], type: b, rules: [{ endpoint: { url: "https://simspaceweaver.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: j, headers: j }, type: d }] }, { error: "DualStack is enabled but this partition does not support DualStack", type: c }] }, { endpoint: { url: "https://simspaceweaver.{Region}.{PartitionResult#dnsSuffix}", properties: j, headers: j }, type: d }] }] };
1
+ const q = "required", r = "fn", s = "argv", t = "ref";
2
+ const a = "isSet", b = "tree", c = "error", d = "endpoint", e = "PartitionResult", f = { [q]: false, "type": "String" }, g = { [q]: true, "default": false, "type": "Boolean" }, h = { [t]: "Endpoint" }, i = { [r]: "booleanEquals", [s]: [{ [t]: "UseFIPS" }, true] }, j = { [r]: "booleanEquals", [s]: [{ [t]: "UseDualStack" }, true] }, k = {}, l = { [r]: "booleanEquals", [s]: [true, { [r]: "getAttr", [s]: [{ [t]: e }, "supportsFIPS"] }] }, m = { [r]: "booleanEquals", [s]: [true, { [r]: "getAttr", [s]: [{ [t]: e }, "supportsDualStack"] }] }, n = [i], o = [j], p = [{ [t]: "Region" }];
3
+ const _data = { version: "1.0", parameters: { Region: f, UseDualStack: g, UseFIPS: g, Endpoint: f }, rules: [{ conditions: [{ [r]: a, [s]: [h] }], type: b, rules: [{ conditions: n, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: c }, { type: b, rules: [{ conditions: o, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: c }, { endpoint: { url: h, properties: k, headers: k }, type: d }] }] }, { type: b, rules: [{ conditions: [{ [r]: a, [s]: p }], type: b, rules: [{ conditions: [{ [r]: "aws.partition", [s]: p, assign: e }], type: b, rules: [{ conditions: [i, j], type: b, rules: [{ conditions: [l, m], type: b, rules: [{ type: b, rules: [{ endpoint: { url: "https://simspaceweaver-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: k, headers: k }, type: d }] }] }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: c }] }, { conditions: n, type: b, rules: [{ conditions: [l], type: b, rules: [{ type: b, rules: [{ endpoint: { url: "https://simspaceweaver-fips.{Region}.{PartitionResult#dnsSuffix}", properties: k, headers: k }, type: d }] }] }, { error: "FIPS is enabled but this partition does not support FIPS", type: c }] }, { conditions: o, type: b, rules: [{ conditions: [m], type: b, rules: [{ type: b, rules: [{ endpoint: { url: "https://simspaceweaver.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: k, headers: k }, type: d }] }] }, { error: "DualStack is enabled but this partition does not support DualStack", type: c }] }, { type: b, rules: [{ endpoint: { url: "https://simspaceweaver.{Region}.{PartitionResult#dnsSuffix}", properties: k, headers: k }, type: d }] }] }] }, { error: "Invalid Configuration: Missing Region", type: c }] }] };
4
4
  export const ruleSet = _data;
@@ -100,6 +100,7 @@ export const SimulationStatus = {
100
100
  DELETED: "DELETED",
101
101
  DELETING: "DELETING",
102
102
  FAILED: "FAILED",
103
+ SNAPSHOT_IN_PROGRESS: "SNAPSHOT_IN_PROGRESS",
103
104
  STARTED: "STARTED",
104
105
  STARTING: "STARTING",
105
106
  STOPPED: "STOPPED",
@@ -3,6 +3,27 @@ import { _json, decorateServiceException as __decorateServiceException, expectNo
3
3
  import { v4 as generateIdempotencyToken } from "uuid";
4
4
  import { AccessDeniedException, ConflictException, InternalServerException, ResourceNotFoundException, ServiceQuotaExceededException, TooManyTagsException, ValidationException, } from "../models/models_0";
5
5
  import { SimSpaceWeaverServiceException as __BaseException } from "../models/SimSpaceWeaverServiceException";
6
+ export const se_CreateSnapshotCommand = async (input, context) => {
7
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
8
+ const headers = {
9
+ "content-type": "application/json",
10
+ };
11
+ const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/createsnapshot";
12
+ let body;
13
+ body = JSON.stringify(take(input, {
14
+ Destination: (_) => _json(_),
15
+ Simulation: [],
16
+ }));
17
+ return new __HttpRequest({
18
+ protocol,
19
+ hostname,
20
+ port,
21
+ method: "POST",
22
+ headers,
23
+ path: resolvedPath,
24
+ body,
25
+ });
26
+ };
6
27
  export const se_DeleteAppCommand = async (input, context) => {
7
28
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
8
29
  const headers = {};
@@ -200,6 +221,7 @@ export const se_StartSimulationCommand = async (input, context) => {
200
221
  Name: [],
201
222
  RoleArn: [],
202
223
  SchemaS3Location: (_) => _json(_),
224
+ SnapshotS3Location: (_) => _json(_),
203
225
  Tags: (_) => _json(_),
204
226
  }));
205
227
  return new __HttpRequest({
@@ -318,6 +340,47 @@ export const se_UntagResourceCommand = async (input, context) => {
318
340
  body,
319
341
  });
320
342
  };
343
+ export const de_CreateSnapshotCommand = async (output, context) => {
344
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
345
+ return de_CreateSnapshotCommandError(output, context);
346
+ }
347
+ const contents = map({
348
+ $metadata: deserializeMetadata(output),
349
+ });
350
+ await collectBody(output.body, context);
351
+ return contents;
352
+ };
353
+ const de_CreateSnapshotCommandError = async (output, context) => {
354
+ const parsedOutput = {
355
+ ...output,
356
+ body: await parseErrorBody(output.body, context),
357
+ };
358
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
359
+ switch (errorCode) {
360
+ case "AccessDeniedException":
361
+ case "com.amazonaws.simspaceweaver#AccessDeniedException":
362
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
363
+ case "ConflictException":
364
+ case "com.amazonaws.simspaceweaver#ConflictException":
365
+ throw await de_ConflictExceptionRes(parsedOutput, context);
366
+ case "InternalServerException":
367
+ case "com.amazonaws.simspaceweaver#InternalServerException":
368
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
369
+ case "ResourceNotFoundException":
370
+ case "com.amazonaws.simspaceweaver#ResourceNotFoundException":
371
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
372
+ case "ValidationException":
373
+ case "com.amazonaws.simspaceweaver#ValidationException":
374
+ throw await de_ValidationExceptionRes(parsedOutput, context);
375
+ default:
376
+ const parsedBody = parsedOutput.body;
377
+ return throwDefaultError({
378
+ output,
379
+ parsedBody,
380
+ errorCode,
381
+ });
382
+ }
383
+ };
321
384
  export const de_DeleteAppCommand = async (output, context) => {
322
385
  if (output.statusCode !== 200 && output.statusCode >= 300) {
323
386
  return de_DeleteAppCommandError(output, context);
@@ -469,6 +532,8 @@ export const de_DescribeSimulationCommand = async (output, context) => {
469
532
  RoleArn: __expectString,
470
533
  SchemaError: __expectString,
471
534
  SchemaS3Location: _json,
535
+ SnapshotS3Location: _json,
536
+ StartError: __expectString,
472
537
  Status: __expectString,
473
538
  TargetStatus: __expectString,
474
539
  });
@@ -1,4 +1,5 @@
1
1
  import { HttpHandlerOptions as __HttpHandlerOptions } from "@aws-sdk/types";
2
+ import { CreateSnapshotCommandInput, CreateSnapshotCommandOutput } from "./commands/CreateSnapshotCommand";
2
3
  import { DeleteAppCommandInput, DeleteAppCommandOutput } from "./commands/DeleteAppCommand";
3
4
  import { DeleteSimulationCommandInput, DeleteSimulationCommandOutput } from "./commands/DeleteSimulationCommand";
4
5
  import { DescribeAppCommandInput, DescribeAppCommandOutput } from "./commands/DescribeAppCommand";
@@ -16,6 +17,12 @@ import { TagResourceCommandInput, TagResourceCommandOutput } from "./commands/Ta
16
17
  import { UntagResourceCommandInput, UntagResourceCommandOutput } from "./commands/UntagResourceCommand";
17
18
  import { SimSpaceWeaverClient } from "./SimSpaceWeaverClient";
18
19
  export interface SimSpaceWeaver {
20
+ /**
21
+ * @see {@link CreateSnapshotCommand}
22
+ */
23
+ createSnapshot(args: CreateSnapshotCommandInput, options?: __HttpHandlerOptions): Promise<CreateSnapshotCommandOutput>;
24
+ createSnapshot(args: CreateSnapshotCommandInput, cb: (err: any, data?: CreateSnapshotCommandOutput) => void): void;
25
+ createSnapshot(args: CreateSnapshotCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: CreateSnapshotCommandOutput) => void): void;
19
26
  /**
20
27
  * @see {@link DeleteAppCommand}
21
28
  */
@@ -109,18 +116,18 @@ export interface SimSpaceWeaver {
109
116
  }
110
117
  /**
111
118
  * @public
112
- * <p>Amazon Web Services SimSpace Weaver (SimSpace Weaver) is a managed service that you can use to build and operate large-scale
119
+ * <p>SimSpace Weaver (SimSpace Weaver) is a managed service that you can use to build and operate large-scale
113
120
  * spatial simulations in the Amazon Web Services Cloud. For example, you can create a digital twin of a city,
114
- * crowd simulations with millions of people and objects, and massilvely-multiplayer games with
121
+ * crowd simulations with millions of people and objects, and massively multiplayer games with
115
122
  * hundreds of thousands of connected players.
116
123
  * For more information about SimSpace Weaver, see the <i>
117
- * <a href="https://docs.aws.amazon.com/simspaceweaver/latest/userguide/">Amazon Web Services SimSpace Weaver User Guide</a>
124
+ * <a href="https://docs.aws.amazon.com/simspaceweaver/latest/userguide/">SimSpace Weaver User Guide</a>
118
125
  * </i>.</p>
119
126
  * <p>This API reference describes the API operations and data types that you can use to
120
127
  * communicate directly with SimSpace Weaver.</p>
121
- * <p>SimSpace Weaver also provides the SimSpace Weaver app SDK, which you use for app development. The SimSpace Weaver
122
- * app SDK API reference is included in the SimSpace Weaver app SDK documentation, which is part of the
123
- * SimSpace Weaver app SDK distributable package.</p>
128
+ * <p>SimSpace Weaver also provides the SimSpace Weaver app SDK, which you use for app development. The
129
+ * SimSpace Weaver app SDK API reference is included in the SimSpace Weaver app SDK documentation. This
130
+ * documentation is part of the SimSpace Weaver app SDK distributable package.</p>
124
131
  */
125
132
  export declare class SimSpaceWeaver extends SimSpaceWeaverClient implements SimSpaceWeaver {
126
133
  }
@@ -7,6 +7,7 @@ import { UserAgentInputConfig, UserAgentResolvedConfig } from "@aws-sdk/middlewa
7
7
  import { HttpHandler as __HttpHandler } from "@aws-sdk/protocol-http";
8
8
  import { Client as __Client, DefaultsMode as __DefaultsMode, SmithyConfiguration as __SmithyConfiguration, SmithyResolvedConfiguration as __SmithyResolvedConfiguration } from "@aws-sdk/smithy-client";
9
9
  import { BodyLengthCalculator as __BodyLengthCalculator, ChecksumConstructor as __ChecksumConstructor, Credentials as __Credentials, Decoder as __Decoder, Encoder as __Encoder, HashConstructor as __HashConstructor, HttpHandlerOptions as __HttpHandlerOptions, Logger as __Logger, Provider as __Provider, Provider, StreamCollector as __StreamCollector, UrlParser as __UrlParser, UserAgent as __UserAgent } from "@aws-sdk/types";
10
+ import { CreateSnapshotCommandInput, CreateSnapshotCommandOutput } from "./commands/CreateSnapshotCommand";
10
11
  import { DeleteAppCommandInput, DeleteAppCommandOutput } from "./commands/DeleteAppCommand";
11
12
  import { DeleteSimulationCommandInput, DeleteSimulationCommandOutput } from "./commands/DeleteSimulationCommand";
12
13
  import { DescribeAppCommandInput, DescribeAppCommandOutput } from "./commands/DescribeAppCommand";
@@ -26,11 +27,11 @@ import { ClientInputEndpointParameters, ClientResolvedEndpointParameters, Endpoi
26
27
  /**
27
28
  * @public
28
29
  */
29
- export type ServiceInputTypes = DeleteAppCommandInput | DeleteSimulationCommandInput | DescribeAppCommandInput | DescribeSimulationCommandInput | ListAppsCommandInput | ListSimulationsCommandInput | ListTagsForResourceCommandInput | StartAppCommandInput | StartClockCommandInput | StartSimulationCommandInput | StopAppCommandInput | StopClockCommandInput | StopSimulationCommandInput | TagResourceCommandInput | UntagResourceCommandInput;
30
+ export type ServiceInputTypes = CreateSnapshotCommandInput | DeleteAppCommandInput | DeleteSimulationCommandInput | DescribeAppCommandInput | DescribeSimulationCommandInput | ListAppsCommandInput | ListSimulationsCommandInput | ListTagsForResourceCommandInput | StartAppCommandInput | StartClockCommandInput | StartSimulationCommandInput | StopAppCommandInput | StopClockCommandInput | StopSimulationCommandInput | TagResourceCommandInput | UntagResourceCommandInput;
30
31
  /**
31
32
  * @public
32
33
  */
33
- export type ServiceOutputTypes = DeleteAppCommandOutput | DeleteSimulationCommandOutput | DescribeAppCommandOutput | DescribeSimulationCommandOutput | ListAppsCommandOutput | ListSimulationsCommandOutput | ListTagsForResourceCommandOutput | StartAppCommandOutput | StartClockCommandOutput | StartSimulationCommandOutput | StopAppCommandOutput | StopClockCommandOutput | StopSimulationCommandOutput | TagResourceCommandOutput | UntagResourceCommandOutput;
34
+ export type ServiceOutputTypes = CreateSnapshotCommandOutput | DeleteAppCommandOutput | DeleteSimulationCommandOutput | DescribeAppCommandOutput | DescribeSimulationCommandOutput | ListAppsCommandOutput | ListSimulationsCommandOutput | ListTagsForResourceCommandOutput | StartAppCommandOutput | StartClockCommandOutput | StartSimulationCommandOutput | StopAppCommandOutput | StopClockCommandOutput | StopSimulationCommandOutput | TagResourceCommandOutput | UntagResourceCommandOutput;
34
35
  /**
35
36
  * @public
36
37
  */
@@ -158,18 +159,18 @@ export interface SimSpaceWeaverClientResolvedConfig extends SimSpaceWeaverClient
158
159
  }
159
160
  /**
160
161
  * @public
161
- * <p>Amazon Web Services SimSpace Weaver (SimSpace Weaver) is a managed service that you can use to build and operate large-scale
162
+ * <p>SimSpace Weaver (SimSpace Weaver) is a managed service that you can use to build and operate large-scale
162
163
  * spatial simulations in the Amazon Web Services Cloud. For example, you can create a digital twin of a city,
163
- * crowd simulations with millions of people and objects, and massilvely-multiplayer games with
164
+ * crowd simulations with millions of people and objects, and massively multiplayer games with
164
165
  * hundreds of thousands of connected players.
165
166
  * For more information about SimSpace Weaver, see the <i>
166
- * <a href="https://docs.aws.amazon.com/simspaceweaver/latest/userguide/">Amazon Web Services SimSpace Weaver User Guide</a>
167
+ * <a href="https://docs.aws.amazon.com/simspaceweaver/latest/userguide/">SimSpace Weaver User Guide</a>
167
168
  * </i>.</p>
168
169
  * <p>This API reference describes the API operations and data types that you can use to
169
170
  * communicate directly with SimSpace Weaver.</p>
170
- * <p>SimSpace Weaver also provides the SimSpace Weaver app SDK, which you use for app development. The SimSpace Weaver
171
- * app SDK API reference is included in the SimSpace Weaver app SDK documentation, which is part of the
172
- * SimSpace Weaver app SDK distributable package.</p>
171
+ * <p>SimSpace Weaver also provides the SimSpace Weaver app SDK, which you use for app development. The
172
+ * SimSpace Weaver app SDK API reference is included in the SimSpace Weaver app SDK documentation. This
173
+ * documentation is part of the SimSpace Weaver app SDK distributable package.</p>
173
174
  */
174
175
  export declare class SimSpaceWeaverClient extends __Client<__HttpHandlerOptions, ServiceInputTypes, ServiceOutputTypes, SimSpaceWeaverClientResolvedConfig> {
175
176
  /**