@aws-sdk/client-bedrock-agentcore 3.899.0 → 3.904.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.
Files changed (42) hide show
  1. package/README.md +40 -0
  2. package/dist-cjs/endpoint/ruleset.js +1 -1
  3. package/dist-cjs/index.js +432 -77
  4. package/dist-es/BedrockAgentCore.js +10 -0
  5. package/dist-es/commands/BatchCreateMemoryRecordsCommand.js +23 -0
  6. package/dist-es/commands/BatchDeleteMemoryRecordsCommand.js +22 -0
  7. package/dist-es/commands/BatchUpdateMemoryRecordsCommand.js +23 -0
  8. package/dist-es/commands/GetAgentCardCommand.js +22 -0
  9. package/dist-es/commands/StopRuntimeSessionCommand.js +22 -0
  10. package/dist-es/commands/index.js +5 -0
  11. package/dist-es/endpoint/ruleset.js +1 -1
  12. package/dist-es/models/models_0.js +111 -56
  13. package/dist-es/protocols/Aws_restJson1.js +193 -6
  14. package/dist-types/BedrockAgentCore.d.ts +35 -0
  15. package/dist-types/BedrockAgentCoreClient.d.ts +7 -2
  16. package/dist-types/commands/BatchCreateMemoryRecordsCommand.d.ts +123 -0
  17. package/dist-types/commands/BatchDeleteMemoryRecordsCommand.d.ts +114 -0
  18. package/dist-types/commands/BatchUpdateMemoryRecordsCommand.d.ts +122 -0
  19. package/dist-types/commands/CreateEventCommand.d.ts +10 -0
  20. package/dist-types/commands/GetAgentCardCommand.d.ts +99 -0
  21. package/dist-types/commands/GetEventCommand.d.ts +5 -0
  22. package/dist-types/commands/GetResourceApiKeyCommand.d.ts +1 -1
  23. package/dist-types/commands/GetResourceOauth2TokenCommand.d.ts +1 -1
  24. package/dist-types/commands/GetWorkloadAccessTokenCommand.d.ts +1 -1
  25. package/dist-types/commands/GetWorkloadAccessTokenForJWTCommand.d.ts +1 -1
  26. package/dist-types/commands/GetWorkloadAccessTokenForUserIdCommand.d.ts +1 -1
  27. package/dist-types/commands/ListEventsCommand.d.ts +18 -0
  28. package/dist-types/commands/StopRuntimeSessionCommand.d.ts +105 -0
  29. package/dist-types/commands/index.d.ts +5 -0
  30. package/dist-types/models/models_0.d.ts +632 -186
  31. package/dist-types/protocols/Aws_restJson1.d.ts +45 -0
  32. package/dist-types/ts3.4/BedrockAgentCore.d.ts +85 -0
  33. package/dist-types/ts3.4/BedrockAgentCoreClient.d.ts +30 -0
  34. package/dist-types/ts3.4/commands/BatchCreateMemoryRecordsCommand.d.ts +51 -0
  35. package/dist-types/ts3.4/commands/BatchDeleteMemoryRecordsCommand.d.ts +51 -0
  36. package/dist-types/ts3.4/commands/BatchUpdateMemoryRecordsCommand.d.ts +51 -0
  37. package/dist-types/ts3.4/commands/GetAgentCardCommand.d.ts +47 -0
  38. package/dist-types/ts3.4/commands/StopRuntimeSessionCommand.d.ts +51 -0
  39. package/dist-types/ts3.4/commands/index.d.ts +5 -0
  40. package/dist-types/ts3.4/models/models_0.d.ts +225 -70
  41. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +60 -0
  42. package/package.json +42 -42
@@ -4,6 +4,49 @@ import { _json, collectBody, decorateServiceException as __decorateServiceExcept
4
4
  import { v4 as generateIdempotencyToken } from "@smithy/uuid";
5
5
  import { BedrockAgentCoreServiceException as __BaseException } from "../models/BedrockAgentCoreServiceException";
6
6
  import { AccessDeniedException, ConflictException, InternalServerException, InvalidInputException, PayloadType, ResourceNotFoundException, RuntimeClientError, ServiceException, ServiceQuotaExceededException, ThrottledException, ThrottlingException, UnauthorizedException, ValidationException, } from "../models/models_0";
7
+ export const se_BatchCreateMemoryRecordsCommand = async (input, context) => {
8
+ const b = rb(input, context);
9
+ const headers = {
10
+ "content-type": "application/json",
11
+ };
12
+ b.bp("/memories/{memoryId}/memoryRecords/batchCreate");
13
+ b.p("memoryId", () => input.memoryId, "{memoryId}", false);
14
+ let body;
15
+ body = JSON.stringify(take(input, {
16
+ clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
17
+ records: (_) => se_MemoryRecordsCreateInputList(_, context),
18
+ }));
19
+ b.m("POST").h(headers).b(body);
20
+ return b.build();
21
+ };
22
+ export const se_BatchDeleteMemoryRecordsCommand = async (input, context) => {
23
+ const b = rb(input, context);
24
+ const headers = {
25
+ "content-type": "application/json",
26
+ };
27
+ b.bp("/memories/{memoryId}/memoryRecords/batchDelete");
28
+ b.p("memoryId", () => input.memoryId, "{memoryId}", false);
29
+ let body;
30
+ body = JSON.stringify(take(input, {
31
+ records: (_) => _json(_),
32
+ }));
33
+ b.m("POST").h(headers).b(body);
34
+ return b.build();
35
+ };
36
+ export const se_BatchUpdateMemoryRecordsCommand = async (input, context) => {
37
+ const b = rb(input, context);
38
+ const headers = {
39
+ "content-type": "application/json",
40
+ };
41
+ b.bp("/memories/{memoryId}/memoryRecords/batchUpdate");
42
+ b.p("memoryId", () => input.memoryId, "{memoryId}", false);
43
+ let body;
44
+ body = JSON.stringify(take(input, {
45
+ records: (_) => se_MemoryRecordsUpdateInputList(_, context),
46
+ }));
47
+ b.m("POST").h(headers).b(body);
48
+ return b.build();
49
+ };
7
50
  export const se_CreateEventCommand = async (input, context) => {
8
51
  const b = rb(input, context);
9
52
  const headers = {
@@ -17,6 +60,7 @@ export const se_CreateEventCommand = async (input, context) => {
17
60
  branch: (_) => _json(_),
18
61
  clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
19
62
  eventTimestamp: (_) => _.getTime() / 1_000,
63
+ metadata: (_) => _json(_),
20
64
  payload: (_) => se_PayloadTypeList(_, context),
21
65
  sessionId: [],
22
66
  }));
@@ -45,6 +89,20 @@ export const se_DeleteMemoryRecordCommand = async (input, context) => {
45
89
  b.m("DELETE").h(headers).b(body);
46
90
  return b.build();
47
91
  };
92
+ export const se_GetAgentCardCommand = async (input, context) => {
93
+ const b = rb(input, context);
94
+ const headers = map({}, isSerializableHeaderValue, {
95
+ [_xabarsi]: input[_rSI] ?? generateIdempotencyToken(),
96
+ });
97
+ b.bp("/runtimes/{agentRuntimeArn}/invocations/.well-known/agent-card.json");
98
+ b.p("agentRuntimeArn", () => input.agentRuntimeArn, "{agentRuntimeArn}", false);
99
+ const query = map({
100
+ [_q]: [, input[_q]],
101
+ });
102
+ let body;
103
+ b.m("GET").h(headers).q(query).b(body);
104
+ return b.build();
105
+ };
48
106
  export const se_GetBrowserSessionCommand = async (input, context) => {
49
107
  const b = rb(input, context);
50
108
  const headers = {};
@@ -390,6 +448,24 @@ export const se_StopCodeInterpreterSessionCommand = async (input, context) => {
390
448
  b.m("PUT").h(headers).q(query).b(body);
391
449
  return b.build();
392
450
  };
451
+ export const se_StopRuntimeSessionCommand = async (input, context) => {
452
+ const b = rb(input, context);
453
+ const headers = map({}, isSerializableHeaderValue, {
454
+ "content-type": "application/json",
455
+ [_xabarsi]: input[_rSI],
456
+ });
457
+ b.bp("/runtimes/{agentRuntimeArn}/stopruntimesession");
458
+ b.p("agentRuntimeArn", () => input.agentRuntimeArn, "{agentRuntimeArn}", false);
459
+ const query = map({
460
+ [_q]: [, input[_q]],
461
+ });
462
+ let body;
463
+ body = JSON.stringify(take(input, {
464
+ clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
465
+ }));
466
+ b.m("POST").h(headers).q(query).b(body);
467
+ return b.build();
468
+ };
393
469
  export const se_UpdateBrowserStreamCommand = async (input, context) => {
394
470
  const b = rb(input, context);
395
471
  const headers = {
@@ -408,6 +484,51 @@ export const se_UpdateBrowserStreamCommand = async (input, context) => {
408
484
  b.m("PUT").h(headers).q(query).b(body);
409
485
  return b.build();
410
486
  };
487
+ export const de_BatchCreateMemoryRecordsCommand = async (output, context) => {
488
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
489
+ return de_CommandError(output, context);
490
+ }
491
+ const contents = map({
492
+ $metadata: deserializeMetadata(output),
493
+ });
494
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
495
+ const doc = take(data, {
496
+ failedRecords: _json,
497
+ successfulRecords: _json,
498
+ });
499
+ Object.assign(contents, doc);
500
+ return contents;
501
+ };
502
+ export const de_BatchDeleteMemoryRecordsCommand = async (output, context) => {
503
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
504
+ return de_CommandError(output, context);
505
+ }
506
+ const contents = map({
507
+ $metadata: deserializeMetadata(output),
508
+ });
509
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
510
+ const doc = take(data, {
511
+ failedRecords: _json,
512
+ successfulRecords: _json,
513
+ });
514
+ Object.assign(contents, doc);
515
+ return contents;
516
+ };
517
+ export const de_BatchUpdateMemoryRecordsCommand = async (output, context) => {
518
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
519
+ return de_CommandError(output, context);
520
+ }
521
+ const contents = map({
522
+ $metadata: deserializeMetadata(output),
523
+ });
524
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
525
+ const doc = take(data, {
526
+ failedRecords: _json,
527
+ successfulRecords: _json,
528
+ });
529
+ Object.assign(contents, doc);
530
+ return contents;
531
+ };
411
532
  export const de_CreateEventCommand = async (output, context) => {
412
533
  if (output.statusCode !== 200 && output.statusCode >= 300) {
413
534
  return de_CommandError(output, context);
@@ -450,6 +571,22 @@ export const de_DeleteMemoryRecordCommand = async (output, context) => {
450
571
  Object.assign(contents, doc);
451
572
  return contents;
452
573
  };
574
+ export const de_GetAgentCardCommand = async (output, context) => {
575
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
576
+ return de_CommandError(output, context);
577
+ }
578
+ const contents = map({
579
+ $metadata: deserializeMetadata(output),
580
+ [_rSI]: [, output.headers[_xabarsi]],
581
+ });
582
+ const data = await collectBodyString(output.body, context);
583
+ contents.agentCard = data;
584
+ contents.agentCard = JSON.parse(data);
585
+ map(contents, {
586
+ statusCode: [, output.statusCode],
587
+ });
588
+ return contents;
589
+ };
453
590
  export const de_GetBrowserSessionCommand = async (output, context) => {
454
591
  if (output.statusCode !== 200 && output.statusCode >= 300) {
455
592
  return de_CommandError(output, context);
@@ -796,6 +933,20 @@ export const de_StopCodeInterpreterSessionCommand = async (output, context) => {
796
933
  Object.assign(contents, doc);
797
934
  return contents;
798
935
  };
936
+ export const de_StopRuntimeSessionCommand = async (output, context) => {
937
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
938
+ return de_CommandError(output, context);
939
+ }
940
+ const contents = map({
941
+ $metadata: deserializeMetadata(output),
942
+ [_rSI]: [, output.headers[_xabarsi]],
943
+ });
944
+ map(contents, {
945
+ statusCode: [, output.statusCode],
946
+ });
947
+ await collectBody(output.body, context);
948
+ return contents;
949
+ };
799
950
  export const de_UpdateBrowserStreamCommand = async (output, context) => {
800
951
  if (output.statusCode !== 200 && output.statusCode >= 300) {
801
952
  return de_CommandError(output, context);
@@ -823,9 +974,6 @@ const de_CommandError = async (output, context) => {
823
974
  case "AccessDeniedException":
824
975
  case "com.amazonaws.bedrockagentcore#AccessDeniedException":
825
976
  throw await de_AccessDeniedExceptionRes(parsedOutput, context);
826
- case "InvalidInputException":
827
- case "com.amazonaws.bedrockagentcore#InvalidInputException":
828
- throw await de_InvalidInputExceptionRes(parsedOutput, context);
829
977
  case "ResourceNotFoundException":
830
978
  case "com.amazonaws.bedrockagentcore#ResourceNotFoundException":
831
979
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
@@ -841,18 +989,21 @@ const de_CommandError = async (output, context) => {
841
989
  case "ValidationException":
842
990
  case "com.amazonaws.bedrockagentcore#ValidationException":
843
991
  throw await de_ValidationExceptionRes(parsedOutput, context);
992
+ case "InvalidInputException":
993
+ case "com.amazonaws.bedrockagentcore#InvalidInputException":
994
+ throw await de_InvalidInputExceptionRes(parsedOutput, context);
844
995
  case "InternalServerException":
845
996
  case "com.amazonaws.bedrockagentcore#InternalServerException":
846
997
  throw await de_InternalServerExceptionRes(parsedOutput, context);
998
+ case "RuntimeClientError":
999
+ case "com.amazonaws.bedrockagentcore#RuntimeClientError":
1000
+ throw await de_RuntimeClientErrorRes(parsedOutput, context);
847
1001
  case "ThrottlingException":
848
1002
  case "com.amazonaws.bedrockagentcore#ThrottlingException":
849
1003
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
850
1004
  case "UnauthorizedException":
851
1005
  case "com.amazonaws.bedrockagentcore#UnauthorizedException":
852
1006
  throw await de_UnauthorizedExceptionRes(parsedOutput, context);
853
- case "RuntimeClientError":
854
- case "com.amazonaws.bedrockagentcore#RuntimeClientError":
855
- throw await de_RuntimeClientErrorRes(parsedOutput, context);
856
1007
  case "ConflictException":
857
1008
  case "com.amazonaws.bedrockagentcore#ConflictException":
858
1009
  throw await de_ConflictExceptionRes(parsedOutput, context);
@@ -1141,6 +1292,38 @@ const se_InputContentBlockList = (input, context) => {
1141
1292
  return se_InputContentBlock(entry, context);
1142
1293
  });
1143
1294
  };
1295
+ const se_MemoryRecordCreateInput = (input, context) => {
1296
+ return take(input, {
1297
+ content: _json,
1298
+ memoryStrategyId: [],
1299
+ namespaces: _json,
1300
+ requestIdentifier: [],
1301
+ timestamp: (_) => _.getTime() / 1_000,
1302
+ });
1303
+ };
1304
+ const se_MemoryRecordsCreateInputList = (input, context) => {
1305
+ return input
1306
+ .filter((e) => e != null)
1307
+ .map((entry) => {
1308
+ return se_MemoryRecordCreateInput(entry, context);
1309
+ });
1310
+ };
1311
+ const se_MemoryRecordsUpdateInputList = (input, context) => {
1312
+ return input
1313
+ .filter((e) => e != null)
1314
+ .map((entry) => {
1315
+ return se_MemoryRecordUpdateInput(entry, context);
1316
+ });
1317
+ };
1318
+ const se_MemoryRecordUpdateInput = (input, context) => {
1319
+ return take(input, {
1320
+ content: _json,
1321
+ memoryRecordId: [],
1322
+ memoryStrategyId: [],
1323
+ namespaces: _json,
1324
+ timestamp: (_) => _.getTime() / 1_000,
1325
+ });
1326
+ };
1144
1327
  const se_PayloadType = (input, context) => {
1145
1328
  return PayloadType.visit(input, {
1146
1329
  blob: (value) => ({ blob: se_Document(value, context) }),
@@ -1168,6 +1351,9 @@ const se_ToolArguments = (input, context) => {
1168
1351
  taskId: [],
1169
1352
  });
1170
1353
  };
1354
+ const de_AgentCard = (output, context) => {
1355
+ return output;
1356
+ };
1171
1357
  const de_BrowserSessionSummaries = (output, context) => {
1172
1358
  const retVal = (output || [])
1173
1359
  .filter((e) => e != null)
@@ -1242,6 +1428,7 @@ const de_Event = (output, context) => {
1242
1428
  eventId: __expectString,
1243
1429
  eventTimestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1244
1430
  memoryId: __expectString,
1431
+ metadata: _json,
1245
1432
  payload: (_) => de_PayloadTypeList(_, context),
1246
1433
  sessionId: __expectString,
1247
1434
  });
@@ -1,8 +1,12 @@
1
1
  import { HttpHandlerOptions as __HttpHandlerOptions } from "@smithy/types";
2
2
  import { BedrockAgentCoreClient } from "./BedrockAgentCoreClient";
3
+ import { BatchCreateMemoryRecordsCommandInput, BatchCreateMemoryRecordsCommandOutput } from "./commands/BatchCreateMemoryRecordsCommand";
4
+ import { BatchDeleteMemoryRecordsCommandInput, BatchDeleteMemoryRecordsCommandOutput } from "./commands/BatchDeleteMemoryRecordsCommand";
5
+ import { BatchUpdateMemoryRecordsCommandInput, BatchUpdateMemoryRecordsCommandOutput } from "./commands/BatchUpdateMemoryRecordsCommand";
3
6
  import { CreateEventCommandInput, CreateEventCommandOutput } from "./commands/CreateEventCommand";
4
7
  import { DeleteEventCommandInput, DeleteEventCommandOutput } from "./commands/DeleteEventCommand";
5
8
  import { DeleteMemoryRecordCommandInput, DeleteMemoryRecordCommandOutput } from "./commands/DeleteMemoryRecordCommand";
9
+ import { GetAgentCardCommandInput, GetAgentCardCommandOutput } from "./commands/GetAgentCardCommand";
6
10
  import { GetBrowserSessionCommandInput, GetBrowserSessionCommandOutput } from "./commands/GetBrowserSessionCommand";
7
11
  import { GetCodeInterpreterSessionCommandInput, GetCodeInterpreterSessionCommandOutput } from "./commands/GetCodeInterpreterSessionCommand";
8
12
  import { GetEventCommandInput, GetEventCommandOutput } from "./commands/GetEventCommand";
@@ -25,8 +29,27 @@ import { StartBrowserSessionCommandInput, StartBrowserSessionCommandOutput } fro
25
29
  import { StartCodeInterpreterSessionCommandInput, StartCodeInterpreterSessionCommandOutput } from "./commands/StartCodeInterpreterSessionCommand";
26
30
  import { StopBrowserSessionCommandInput, StopBrowserSessionCommandOutput } from "./commands/StopBrowserSessionCommand";
27
31
  import { StopCodeInterpreterSessionCommandInput, StopCodeInterpreterSessionCommandOutput } from "./commands/StopCodeInterpreterSessionCommand";
32
+ import { StopRuntimeSessionCommandInput, StopRuntimeSessionCommandOutput } from "./commands/StopRuntimeSessionCommand";
28
33
  import { UpdateBrowserStreamCommandInput, UpdateBrowserStreamCommandOutput } from "./commands/UpdateBrowserStreamCommand";
29
34
  export interface BedrockAgentCore {
35
+ /**
36
+ * @see {@link BatchCreateMemoryRecordsCommand}
37
+ */
38
+ batchCreateMemoryRecords(args: BatchCreateMemoryRecordsCommandInput, options?: __HttpHandlerOptions): Promise<BatchCreateMemoryRecordsCommandOutput>;
39
+ batchCreateMemoryRecords(args: BatchCreateMemoryRecordsCommandInput, cb: (err: any, data?: BatchCreateMemoryRecordsCommandOutput) => void): void;
40
+ batchCreateMemoryRecords(args: BatchCreateMemoryRecordsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: BatchCreateMemoryRecordsCommandOutput) => void): void;
41
+ /**
42
+ * @see {@link BatchDeleteMemoryRecordsCommand}
43
+ */
44
+ batchDeleteMemoryRecords(args: BatchDeleteMemoryRecordsCommandInput, options?: __HttpHandlerOptions): Promise<BatchDeleteMemoryRecordsCommandOutput>;
45
+ batchDeleteMemoryRecords(args: BatchDeleteMemoryRecordsCommandInput, cb: (err: any, data?: BatchDeleteMemoryRecordsCommandOutput) => void): void;
46
+ batchDeleteMemoryRecords(args: BatchDeleteMemoryRecordsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: BatchDeleteMemoryRecordsCommandOutput) => void): void;
47
+ /**
48
+ * @see {@link BatchUpdateMemoryRecordsCommand}
49
+ */
50
+ batchUpdateMemoryRecords(args: BatchUpdateMemoryRecordsCommandInput, options?: __HttpHandlerOptions): Promise<BatchUpdateMemoryRecordsCommandOutput>;
51
+ batchUpdateMemoryRecords(args: BatchUpdateMemoryRecordsCommandInput, cb: (err: any, data?: BatchUpdateMemoryRecordsCommandOutput) => void): void;
52
+ batchUpdateMemoryRecords(args: BatchUpdateMemoryRecordsCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: BatchUpdateMemoryRecordsCommandOutput) => void): void;
30
53
  /**
31
54
  * @see {@link CreateEventCommand}
32
55
  */
@@ -45,6 +68,12 @@ export interface BedrockAgentCore {
45
68
  deleteMemoryRecord(args: DeleteMemoryRecordCommandInput, options?: __HttpHandlerOptions): Promise<DeleteMemoryRecordCommandOutput>;
46
69
  deleteMemoryRecord(args: DeleteMemoryRecordCommandInput, cb: (err: any, data?: DeleteMemoryRecordCommandOutput) => void): void;
47
70
  deleteMemoryRecord(args: DeleteMemoryRecordCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: DeleteMemoryRecordCommandOutput) => void): void;
71
+ /**
72
+ * @see {@link GetAgentCardCommand}
73
+ */
74
+ getAgentCard(args: GetAgentCardCommandInput, options?: __HttpHandlerOptions): Promise<GetAgentCardCommandOutput>;
75
+ getAgentCard(args: GetAgentCardCommandInput, cb: (err: any, data?: GetAgentCardCommandOutput) => void): void;
76
+ getAgentCard(args: GetAgentCardCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetAgentCardCommandOutput) => void): void;
48
77
  /**
49
78
  * @see {@link GetBrowserSessionCommand}
50
79
  */
@@ -177,6 +206,12 @@ export interface BedrockAgentCore {
177
206
  stopCodeInterpreterSession(args: StopCodeInterpreterSessionCommandInput, options?: __HttpHandlerOptions): Promise<StopCodeInterpreterSessionCommandOutput>;
178
207
  stopCodeInterpreterSession(args: StopCodeInterpreterSessionCommandInput, cb: (err: any, data?: StopCodeInterpreterSessionCommandOutput) => void): void;
179
208
  stopCodeInterpreterSession(args: StopCodeInterpreterSessionCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: StopCodeInterpreterSessionCommandOutput) => void): void;
209
+ /**
210
+ * @see {@link StopRuntimeSessionCommand}
211
+ */
212
+ stopRuntimeSession(args: StopRuntimeSessionCommandInput, options?: __HttpHandlerOptions): Promise<StopRuntimeSessionCommandOutput>;
213
+ stopRuntimeSession(args: StopRuntimeSessionCommandInput, cb: (err: any, data?: StopRuntimeSessionCommandOutput) => void): void;
214
+ stopRuntimeSession(args: StopRuntimeSessionCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: StopRuntimeSessionCommandOutput) => void): void;
180
215
  /**
181
216
  * @see {@link UpdateBrowserStreamCommand}
182
217
  */
@@ -8,9 +8,13 @@ import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol
8
8
  import { Client as __Client, DefaultsMode as __DefaultsMode, SmithyConfiguration as __SmithyConfiguration, SmithyResolvedConfiguration as __SmithyResolvedConfiguration } from "@smithy/smithy-client";
9
9
  import { AwsCredentialIdentityProvider, BodyLengthCalculator as __BodyLengthCalculator, CheckOptionalClientConfig as __CheckOptionalClientConfig, ChecksumConstructor as __ChecksumConstructor, Decoder as __Decoder, Encoder as __Encoder, EventStreamSerdeProvider as __EventStreamSerdeProvider, HashConstructor as __HashConstructor, HttpHandlerOptions as __HttpHandlerOptions, Logger as __Logger, Provider as __Provider, Provider, SdkStreamMixinInjector as __SdkStreamMixinInjector, StreamCollector as __StreamCollector, UrlParser as __UrlParser, UserAgent as __UserAgent } from "@smithy/types";
10
10
  import { HttpAuthSchemeInputConfig, HttpAuthSchemeResolvedConfig } from "./auth/httpAuthSchemeProvider";
11
+ import { BatchCreateMemoryRecordsCommandInput, BatchCreateMemoryRecordsCommandOutput } from "./commands/BatchCreateMemoryRecordsCommand";
12
+ import { BatchDeleteMemoryRecordsCommandInput, BatchDeleteMemoryRecordsCommandOutput } from "./commands/BatchDeleteMemoryRecordsCommand";
13
+ import { BatchUpdateMemoryRecordsCommandInput, BatchUpdateMemoryRecordsCommandOutput } from "./commands/BatchUpdateMemoryRecordsCommand";
11
14
  import { CreateEventCommandInput, CreateEventCommandOutput } from "./commands/CreateEventCommand";
12
15
  import { DeleteEventCommandInput, DeleteEventCommandOutput } from "./commands/DeleteEventCommand";
13
16
  import { DeleteMemoryRecordCommandInput, DeleteMemoryRecordCommandOutput } from "./commands/DeleteMemoryRecordCommand";
17
+ import { GetAgentCardCommandInput, GetAgentCardCommandOutput } from "./commands/GetAgentCardCommand";
14
18
  import { GetBrowserSessionCommandInput, GetBrowserSessionCommandOutput } from "./commands/GetBrowserSessionCommand";
15
19
  import { GetCodeInterpreterSessionCommandInput, GetCodeInterpreterSessionCommandOutput } from "./commands/GetCodeInterpreterSessionCommand";
16
20
  import { GetEventCommandInput, GetEventCommandOutput } from "./commands/GetEventCommand";
@@ -33,6 +37,7 @@ import { StartBrowserSessionCommandInput, StartBrowserSessionCommandOutput } fro
33
37
  import { StartCodeInterpreterSessionCommandInput, StartCodeInterpreterSessionCommandOutput } from "./commands/StartCodeInterpreterSessionCommand";
34
38
  import { StopBrowserSessionCommandInput, StopBrowserSessionCommandOutput } from "./commands/StopBrowserSessionCommand";
35
39
  import { StopCodeInterpreterSessionCommandInput, StopCodeInterpreterSessionCommandOutput } from "./commands/StopCodeInterpreterSessionCommand";
40
+ import { StopRuntimeSessionCommandInput, StopRuntimeSessionCommandOutput } from "./commands/StopRuntimeSessionCommand";
36
41
  import { UpdateBrowserStreamCommandInput, UpdateBrowserStreamCommandOutput } from "./commands/UpdateBrowserStreamCommand";
37
42
  import { ClientInputEndpointParameters, ClientResolvedEndpointParameters, EndpointParameters } from "./endpoint/EndpointParameters";
38
43
  import { RuntimeExtension, RuntimeExtensionsConfig } from "./runtimeExtensions";
@@ -40,11 +45,11 @@ export { __Client };
40
45
  /**
41
46
  * @public
42
47
  */
43
- export type ServiceInputTypes = CreateEventCommandInput | DeleteEventCommandInput | DeleteMemoryRecordCommandInput | GetBrowserSessionCommandInput | GetCodeInterpreterSessionCommandInput | GetEventCommandInput | GetMemoryRecordCommandInput | GetResourceApiKeyCommandInput | GetResourceOauth2TokenCommandInput | GetWorkloadAccessTokenCommandInput | GetWorkloadAccessTokenForJWTCommandInput | GetWorkloadAccessTokenForUserIdCommandInput | InvokeAgentRuntimeCommandInput | InvokeCodeInterpreterCommandInput | ListActorsCommandInput | ListBrowserSessionsCommandInput | ListCodeInterpreterSessionsCommandInput | ListEventsCommandInput | ListMemoryRecordsCommandInput | ListSessionsCommandInput | RetrieveMemoryRecordsCommandInput | StartBrowserSessionCommandInput | StartCodeInterpreterSessionCommandInput | StopBrowserSessionCommandInput | StopCodeInterpreterSessionCommandInput | UpdateBrowserStreamCommandInput;
48
+ export type ServiceInputTypes = BatchCreateMemoryRecordsCommandInput | BatchDeleteMemoryRecordsCommandInput | BatchUpdateMemoryRecordsCommandInput | CreateEventCommandInput | DeleteEventCommandInput | DeleteMemoryRecordCommandInput | GetAgentCardCommandInput | GetBrowserSessionCommandInput | GetCodeInterpreterSessionCommandInput | GetEventCommandInput | GetMemoryRecordCommandInput | GetResourceApiKeyCommandInput | GetResourceOauth2TokenCommandInput | GetWorkloadAccessTokenCommandInput | GetWorkloadAccessTokenForJWTCommandInput | GetWorkloadAccessTokenForUserIdCommandInput | InvokeAgentRuntimeCommandInput | InvokeCodeInterpreterCommandInput | ListActorsCommandInput | ListBrowserSessionsCommandInput | ListCodeInterpreterSessionsCommandInput | ListEventsCommandInput | ListMemoryRecordsCommandInput | ListSessionsCommandInput | RetrieveMemoryRecordsCommandInput | StartBrowserSessionCommandInput | StartCodeInterpreterSessionCommandInput | StopBrowserSessionCommandInput | StopCodeInterpreterSessionCommandInput | StopRuntimeSessionCommandInput | UpdateBrowserStreamCommandInput;
44
49
  /**
45
50
  * @public
46
51
  */
47
- export type ServiceOutputTypes = CreateEventCommandOutput | DeleteEventCommandOutput | DeleteMemoryRecordCommandOutput | GetBrowserSessionCommandOutput | GetCodeInterpreterSessionCommandOutput | GetEventCommandOutput | GetMemoryRecordCommandOutput | GetResourceApiKeyCommandOutput | GetResourceOauth2TokenCommandOutput | GetWorkloadAccessTokenCommandOutput | GetWorkloadAccessTokenForJWTCommandOutput | GetWorkloadAccessTokenForUserIdCommandOutput | InvokeAgentRuntimeCommandOutput | InvokeCodeInterpreterCommandOutput | ListActorsCommandOutput | ListBrowserSessionsCommandOutput | ListCodeInterpreterSessionsCommandOutput | ListEventsCommandOutput | ListMemoryRecordsCommandOutput | ListSessionsCommandOutput | RetrieveMemoryRecordsCommandOutput | StartBrowserSessionCommandOutput | StartCodeInterpreterSessionCommandOutput | StopBrowserSessionCommandOutput | StopCodeInterpreterSessionCommandOutput | UpdateBrowserStreamCommandOutput;
52
+ export type ServiceOutputTypes = BatchCreateMemoryRecordsCommandOutput | BatchDeleteMemoryRecordsCommandOutput | BatchUpdateMemoryRecordsCommandOutput | CreateEventCommandOutput | DeleteEventCommandOutput | DeleteMemoryRecordCommandOutput | GetAgentCardCommandOutput | GetBrowserSessionCommandOutput | GetCodeInterpreterSessionCommandOutput | GetEventCommandOutput | GetMemoryRecordCommandOutput | GetResourceApiKeyCommandOutput | GetResourceOauth2TokenCommandOutput | GetWorkloadAccessTokenCommandOutput | GetWorkloadAccessTokenForJWTCommandOutput | GetWorkloadAccessTokenForUserIdCommandOutput | InvokeAgentRuntimeCommandOutput | InvokeCodeInterpreterCommandOutput | ListActorsCommandOutput | ListBrowserSessionsCommandOutput | ListCodeInterpreterSessionsCommandOutput | ListEventsCommandOutput | ListMemoryRecordsCommandOutput | ListSessionsCommandOutput | RetrieveMemoryRecordsCommandOutput | StartBrowserSessionCommandOutput | StartCodeInterpreterSessionCommandOutput | StopBrowserSessionCommandOutput | StopCodeInterpreterSessionCommandOutput | StopRuntimeSessionCommandOutput | UpdateBrowserStreamCommandOutput;
48
53
  /**
49
54
  * @public
50
55
  */
@@ -0,0 +1,123 @@
1
+ import { Command as $Command } from "@smithy/smithy-client";
2
+ import { MetadataBearer as __MetadataBearer } from "@smithy/types";
3
+ import { BedrockAgentCoreClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../BedrockAgentCoreClient";
4
+ import { BatchCreateMemoryRecordsInput, BatchCreateMemoryRecordsOutput } from "../models/models_0";
5
+ /**
6
+ * @public
7
+ */
8
+ export type { __MetadataBearer };
9
+ export { $Command };
10
+ /**
11
+ * @public
12
+ *
13
+ * The input for {@link BatchCreateMemoryRecordsCommand}.
14
+ */
15
+ export interface BatchCreateMemoryRecordsCommandInput extends BatchCreateMemoryRecordsInput {
16
+ }
17
+ /**
18
+ * @public
19
+ *
20
+ * The output of {@link BatchCreateMemoryRecordsCommand}.
21
+ */
22
+ export interface BatchCreateMemoryRecordsCommandOutput extends BatchCreateMemoryRecordsOutput, __MetadataBearer {
23
+ }
24
+ declare const BatchCreateMemoryRecordsCommand_base: {
25
+ new (input: BatchCreateMemoryRecordsCommandInput): import("@smithy/smithy-client").CommandImpl<BatchCreateMemoryRecordsCommandInput, BatchCreateMemoryRecordsCommandOutput, BedrockAgentCoreClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
26
+ new (input: BatchCreateMemoryRecordsCommandInput): import("@smithy/smithy-client").CommandImpl<BatchCreateMemoryRecordsCommandInput, BatchCreateMemoryRecordsCommandOutput, BedrockAgentCoreClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
27
+ getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
28
+ };
29
+ /**
30
+ * <p>Creates multiple memory records in a single batch operation for the specified memory with custom content.</p>
31
+ * @example
32
+ * Use a bare-bones client and the command you need to make an API call.
33
+ * ```javascript
34
+ * import { BedrockAgentCoreClient, BatchCreateMemoryRecordsCommand } from "@aws-sdk/client-bedrock-agentcore"; // ES Modules import
35
+ * // const { BedrockAgentCoreClient, BatchCreateMemoryRecordsCommand } = require("@aws-sdk/client-bedrock-agentcore"); // CommonJS import
36
+ * // import type { BedrockAgentCoreClientConfig } from "@aws-sdk/client-bedrock-agentcore";
37
+ * const config = {}; // type is BedrockAgentCoreClientConfig
38
+ * const client = new BedrockAgentCoreClient(config);
39
+ * const input = { // BatchCreateMemoryRecordsInput
40
+ * memoryId: "STRING_VALUE", // required
41
+ * records: [ // MemoryRecordsCreateInputList // required
42
+ * { // MemoryRecordCreateInput
43
+ * requestIdentifier: "STRING_VALUE", // required
44
+ * namespaces: [ // NamespacesList // required
45
+ * "STRING_VALUE",
46
+ * ],
47
+ * content: { // MemoryContent Union: only one key present
48
+ * text: "STRING_VALUE",
49
+ * },
50
+ * timestamp: new Date("TIMESTAMP"), // required
51
+ * memoryStrategyId: "STRING_VALUE",
52
+ * },
53
+ * ],
54
+ * clientToken: "STRING_VALUE",
55
+ * };
56
+ * const command = new BatchCreateMemoryRecordsCommand(input);
57
+ * const response = await client.send(command);
58
+ * // { // BatchCreateMemoryRecordsOutput
59
+ * // successfulRecords: [ // MemoryRecordsOutputList // required
60
+ * // { // MemoryRecordOutput
61
+ * // memoryRecordId: "STRING_VALUE", // required
62
+ * // status: "SUCCEEDED" || "FAILED", // required
63
+ * // requestIdentifier: "STRING_VALUE",
64
+ * // errorCode: Number("int"),
65
+ * // errorMessage: "STRING_VALUE",
66
+ * // },
67
+ * // ],
68
+ * // failedRecords: [ // required
69
+ * // {
70
+ * // memoryRecordId: "STRING_VALUE", // required
71
+ * // status: "SUCCEEDED" || "FAILED", // required
72
+ * // requestIdentifier: "STRING_VALUE",
73
+ * // errorCode: Number("int"),
74
+ * // errorMessage: "STRING_VALUE",
75
+ * // },
76
+ * // ],
77
+ * // };
78
+ *
79
+ * ```
80
+ *
81
+ * @param BatchCreateMemoryRecordsCommandInput - {@link BatchCreateMemoryRecordsCommandInput}
82
+ * @returns {@link BatchCreateMemoryRecordsCommandOutput}
83
+ * @see {@link BatchCreateMemoryRecordsCommandInput} for command's `input` shape.
84
+ * @see {@link BatchCreateMemoryRecordsCommandOutput} for command's `response` shape.
85
+ * @see {@link BedrockAgentCoreClientResolvedConfig | config} for BedrockAgentCoreClient's `config` shape.
86
+ *
87
+ * @throws {@link AccessDeniedException} (client fault)
88
+ * <p>The exception that occurs when you do not have sufficient permissions to perform an action. Verify that your IAM policy includes the necessary permissions for the operation you are trying to perform.</p>
89
+ *
90
+ * @throws {@link ResourceNotFoundException} (client fault)
91
+ * <p>The exception that occurs when the specified resource does not exist. This can happen when using an invalid identifier or when trying to access a resource that has been deleted.</p>
92
+ *
93
+ * @throws {@link ServiceException} (server fault)
94
+ * <p>The service encountered an internal error. Try your request again later.</p>
95
+ *
96
+ * @throws {@link ServiceQuotaExceededException} (client fault)
97
+ * <p>The exception that occurs when the request would cause a service quota to be exceeded. Review your service quotas and either reduce your request rate or request a quota increase.</p>
98
+ *
99
+ * @throws {@link ThrottledException} (client fault)
100
+ * <p>The request was denied due to request throttling. Reduce the frequency of requests and try again.</p>
101
+ *
102
+ * @throws {@link ValidationException} (client fault)
103
+ * <p>The exception that occurs when the input fails to satisfy the constraints specified by the service. Check the error message for details about which input parameter is invalid and correct your request.</p>
104
+ *
105
+ * @throws {@link BedrockAgentCoreServiceException}
106
+ * <p>Base exception class for all service exceptions from BedrockAgentCore service.</p>
107
+ *
108
+ *
109
+ * @public
110
+ */
111
+ export declare class BatchCreateMemoryRecordsCommand extends BatchCreateMemoryRecordsCommand_base {
112
+ /** @internal type navigation helper, not in runtime. */
113
+ protected static __types: {
114
+ api: {
115
+ input: BatchCreateMemoryRecordsInput;
116
+ output: BatchCreateMemoryRecordsOutput;
117
+ };
118
+ sdk: {
119
+ input: BatchCreateMemoryRecordsCommandInput;
120
+ output: BatchCreateMemoryRecordsCommandOutput;
121
+ };
122
+ };
123
+ }
@@ -0,0 +1,114 @@
1
+ import { Command as $Command } from "@smithy/smithy-client";
2
+ import { MetadataBearer as __MetadataBearer } from "@smithy/types";
3
+ import { BedrockAgentCoreClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../BedrockAgentCoreClient";
4
+ import { BatchDeleteMemoryRecordsInput, BatchDeleteMemoryRecordsOutput } from "../models/models_0";
5
+ /**
6
+ * @public
7
+ */
8
+ export type { __MetadataBearer };
9
+ export { $Command };
10
+ /**
11
+ * @public
12
+ *
13
+ * The input for {@link BatchDeleteMemoryRecordsCommand}.
14
+ */
15
+ export interface BatchDeleteMemoryRecordsCommandInput extends BatchDeleteMemoryRecordsInput {
16
+ }
17
+ /**
18
+ * @public
19
+ *
20
+ * The output of {@link BatchDeleteMemoryRecordsCommand}.
21
+ */
22
+ export interface BatchDeleteMemoryRecordsCommandOutput extends BatchDeleteMemoryRecordsOutput, __MetadataBearer {
23
+ }
24
+ declare const BatchDeleteMemoryRecordsCommand_base: {
25
+ new (input: BatchDeleteMemoryRecordsCommandInput): import("@smithy/smithy-client").CommandImpl<BatchDeleteMemoryRecordsCommandInput, BatchDeleteMemoryRecordsCommandOutput, BedrockAgentCoreClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
26
+ new (input: BatchDeleteMemoryRecordsCommandInput): import("@smithy/smithy-client").CommandImpl<BatchDeleteMemoryRecordsCommandInput, BatchDeleteMemoryRecordsCommandOutput, BedrockAgentCoreClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
27
+ getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
28
+ };
29
+ /**
30
+ * <p>Deletes multiple memory records in a single batch operation from the specified memory.</p>
31
+ * @example
32
+ * Use a bare-bones client and the command you need to make an API call.
33
+ * ```javascript
34
+ * import { BedrockAgentCoreClient, BatchDeleteMemoryRecordsCommand } from "@aws-sdk/client-bedrock-agentcore"; // ES Modules import
35
+ * // const { BedrockAgentCoreClient, BatchDeleteMemoryRecordsCommand } = require("@aws-sdk/client-bedrock-agentcore"); // CommonJS import
36
+ * // import type { BedrockAgentCoreClientConfig } from "@aws-sdk/client-bedrock-agentcore";
37
+ * const config = {}; // type is BedrockAgentCoreClientConfig
38
+ * const client = new BedrockAgentCoreClient(config);
39
+ * const input = { // BatchDeleteMemoryRecordsInput
40
+ * memoryId: "STRING_VALUE", // required
41
+ * records: [ // MemoryRecordsDeleteInputList // required
42
+ * { // MemoryRecordDeleteInput
43
+ * memoryRecordId: "STRING_VALUE", // required
44
+ * },
45
+ * ],
46
+ * };
47
+ * const command = new BatchDeleteMemoryRecordsCommand(input);
48
+ * const response = await client.send(command);
49
+ * // { // BatchDeleteMemoryRecordsOutput
50
+ * // successfulRecords: [ // MemoryRecordsOutputList // required
51
+ * // { // MemoryRecordOutput
52
+ * // memoryRecordId: "STRING_VALUE", // required
53
+ * // status: "SUCCEEDED" || "FAILED", // required
54
+ * // requestIdentifier: "STRING_VALUE",
55
+ * // errorCode: Number("int"),
56
+ * // errorMessage: "STRING_VALUE",
57
+ * // },
58
+ * // ],
59
+ * // failedRecords: [ // required
60
+ * // {
61
+ * // memoryRecordId: "STRING_VALUE", // required
62
+ * // status: "SUCCEEDED" || "FAILED", // required
63
+ * // requestIdentifier: "STRING_VALUE",
64
+ * // errorCode: Number("int"),
65
+ * // errorMessage: "STRING_VALUE",
66
+ * // },
67
+ * // ],
68
+ * // };
69
+ *
70
+ * ```
71
+ *
72
+ * @param BatchDeleteMemoryRecordsCommandInput - {@link BatchDeleteMemoryRecordsCommandInput}
73
+ * @returns {@link BatchDeleteMemoryRecordsCommandOutput}
74
+ * @see {@link BatchDeleteMemoryRecordsCommandInput} for command's `input` shape.
75
+ * @see {@link BatchDeleteMemoryRecordsCommandOutput} for command's `response` shape.
76
+ * @see {@link BedrockAgentCoreClientResolvedConfig | config} for BedrockAgentCoreClient's `config` shape.
77
+ *
78
+ * @throws {@link AccessDeniedException} (client fault)
79
+ * <p>The exception that occurs when you do not have sufficient permissions to perform an action. Verify that your IAM policy includes the necessary permissions for the operation you are trying to perform.</p>
80
+ *
81
+ * @throws {@link ResourceNotFoundException} (client fault)
82
+ * <p>The exception that occurs when the specified resource does not exist. This can happen when using an invalid identifier or when trying to access a resource that has been deleted.</p>
83
+ *
84
+ * @throws {@link ServiceException} (server fault)
85
+ * <p>The service encountered an internal error. Try your request again later.</p>
86
+ *
87
+ * @throws {@link ServiceQuotaExceededException} (client fault)
88
+ * <p>The exception that occurs when the request would cause a service quota to be exceeded. Review your service quotas and either reduce your request rate or request a quota increase.</p>
89
+ *
90
+ * @throws {@link ThrottledException} (client fault)
91
+ * <p>The request was denied due to request throttling. Reduce the frequency of requests and try again.</p>
92
+ *
93
+ * @throws {@link ValidationException} (client fault)
94
+ * <p>The exception that occurs when the input fails to satisfy the constraints specified by the service. Check the error message for details about which input parameter is invalid and correct your request.</p>
95
+ *
96
+ * @throws {@link BedrockAgentCoreServiceException}
97
+ * <p>Base exception class for all service exceptions from BedrockAgentCore service.</p>
98
+ *
99
+ *
100
+ * @public
101
+ */
102
+ export declare class BatchDeleteMemoryRecordsCommand extends BatchDeleteMemoryRecordsCommand_base {
103
+ /** @internal type navigation helper, not in runtime. */
104
+ protected static __types: {
105
+ api: {
106
+ input: BatchDeleteMemoryRecordsInput;
107
+ output: BatchDeleteMemoryRecordsOutput;
108
+ };
109
+ sdk: {
110
+ input: BatchDeleteMemoryRecordsCommandInput;
111
+ output: BatchDeleteMemoryRecordsCommandOutput;
112
+ };
113
+ };
114
+ }