@aws-sdk/client-bedrock 3.703.0 → 3.706.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 (71) hide show
  1. package/README.md +72 -0
  2. package/dist-cjs/index.js +717 -30
  3. package/dist-es/Bedrock.js +18 -0
  4. package/dist-es/commands/CreateMarketplaceModelEndpointCommand.js +22 -0
  5. package/dist-es/commands/CreateModelCustomizationJobCommand.js +2 -1
  6. package/dist-es/commands/DeleteMarketplaceModelEndpointCommand.js +22 -0
  7. package/dist-es/commands/DeregisterMarketplaceModelEndpointCommand.js +22 -0
  8. package/dist-es/commands/GetCustomModelCommand.js +2 -1
  9. package/dist-es/commands/GetMarketplaceModelEndpointCommand.js +22 -0
  10. package/dist-es/commands/GetModelCustomizationJobCommand.js +2 -1
  11. package/dist-es/commands/GetPromptRouterCommand.js +23 -0
  12. package/dist-es/commands/ListMarketplaceModelEndpointsCommand.js +22 -0
  13. package/dist-es/commands/ListPromptRoutersCommand.js +23 -0
  14. package/dist-es/commands/RegisterMarketplaceModelEndpointCommand.js +22 -0
  15. package/dist-es/commands/UpdateMarketplaceModelEndpointCommand.js +22 -0
  16. package/dist-es/commands/index.js +9 -0
  17. package/dist-es/models/models_0.js +173 -20
  18. package/dist-es/pagination/ListMarketplaceModelEndpointsPaginator.js +4 -0
  19. package/dist-es/pagination/ListPromptRoutersPaginator.js +4 -0
  20. package/dist-es/pagination/index.js +2 -0
  21. package/dist-es/protocols/Aws_restJson1.js +317 -1
  22. package/dist-types/Bedrock.d.ts +65 -0
  23. package/dist-types/BedrockClient.d.ts +11 -2
  24. package/dist-types/commands/CreateGuardrailCommand.d.ts +7 -1
  25. package/dist-types/commands/CreateMarketplaceModelEndpointCommand.d.ts +143 -0
  26. package/dist-types/commands/CreateModelCustomizationJobCommand.d.ts +43 -3
  27. package/dist-types/commands/DeleteMarketplaceModelEndpointCommand.d.ts +84 -0
  28. package/dist-types/commands/DeregisterMarketplaceModelEndpointCommand.d.ts +89 -0
  29. package/dist-types/commands/GetCustomModelCommand.d.ts +42 -2
  30. package/dist-types/commands/GetFoundationModelCommand.d.ts +1 -1
  31. package/dist-types/commands/GetGuardrailCommand.d.ts +6 -0
  32. package/dist-types/commands/GetMarketplaceModelEndpointCommand.d.ts +111 -0
  33. package/dist-types/commands/GetModelCustomizationJobCommand.d.ts +43 -3
  34. package/dist-types/commands/GetModelInvocationJobCommand.d.ts +1 -1
  35. package/dist-types/commands/GetModelInvocationLoggingConfigurationCommand.d.ts +1 -0
  36. package/dist-types/commands/GetPromptRouterCommand.d.ts +103 -0
  37. package/dist-types/commands/ListCustomModelsCommand.d.ts +1 -1
  38. package/dist-types/commands/ListFoundationModelsCommand.d.ts +2 -2
  39. package/dist-types/commands/ListMarketplaceModelEndpointsCommand.d.ts +99 -0
  40. package/dist-types/commands/ListModelCustomizationJobsCommand.d.ts +1 -1
  41. package/dist-types/commands/ListModelInvocationJobsCommand.d.ts +1 -1
  42. package/dist-types/commands/ListPromptRoutersCommand.d.ts +106 -0
  43. package/dist-types/commands/PutModelInvocationLoggingConfigurationCommand.d.ts +1 -0
  44. package/dist-types/commands/RegisterMarketplaceModelEndpointCommand.d.ts +116 -0
  45. package/dist-types/commands/StopModelInvocationJobCommand.d.ts +1 -1
  46. package/dist-types/commands/UpdateGuardrailCommand.d.ts +6 -0
  47. package/dist-types/commands/UpdateMarketplaceModelEndpointCommand.d.ts +135 -0
  48. package/dist-types/commands/index.d.ts +9 -0
  49. package/dist-types/models/models_0.d.ts +1163 -139
  50. package/dist-types/pagination/ListMarketplaceModelEndpointsPaginator.d.ts +7 -0
  51. package/dist-types/pagination/ListPromptRoutersPaginator.d.ts +7 -0
  52. package/dist-types/pagination/index.d.ts +2 -0
  53. package/dist-types/protocols/Aws_restJson1.d.ts +81 -0
  54. package/dist-types/ts3.4/Bedrock.d.ts +161 -0
  55. package/dist-types/ts3.4/BedrockClient.d.ts +54 -0
  56. package/dist-types/ts3.4/commands/CreateMarketplaceModelEndpointCommand.d.ts +51 -0
  57. package/dist-types/ts3.4/commands/DeleteMarketplaceModelEndpointCommand.d.ts +51 -0
  58. package/dist-types/ts3.4/commands/DeregisterMarketplaceModelEndpointCommand.d.ts +51 -0
  59. package/dist-types/ts3.4/commands/GetMarketplaceModelEndpointCommand.d.ts +51 -0
  60. package/dist-types/ts3.4/commands/GetPromptRouterCommand.d.ts +50 -0
  61. package/dist-types/ts3.4/commands/ListMarketplaceModelEndpointsCommand.d.ts +51 -0
  62. package/dist-types/ts3.4/commands/ListPromptRoutersCommand.d.ts +51 -0
  63. package/dist-types/ts3.4/commands/RegisterMarketplaceModelEndpointCommand.d.ts +51 -0
  64. package/dist-types/ts3.4/commands/UpdateMarketplaceModelEndpointCommand.d.ts +51 -0
  65. package/dist-types/ts3.4/commands/index.d.ts +9 -0
  66. package/dist-types/ts3.4/models/models_0.d.ts +363 -44
  67. package/dist-types/ts3.4/pagination/ListMarketplaceModelEndpointsPaginator.d.ts +11 -0
  68. package/dist-types/ts3.4/pagination/ListPromptRoutersPaginator.d.ts +11 -0
  69. package/dist-types/ts3.4/pagination/index.d.ts +2 -0
  70. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +108 -0
  71. package/package.json +1 -1
@@ -12,14 +12,6 @@ export class AccessDeniedException extends __BaseException {
12
12
  Object.setPrototypeOf(this, AccessDeniedException.prototype);
13
13
  }
14
14
  }
15
- export const EvaluationJobStatus = {
16
- COMPLETED: "Completed",
17
- DELETING: "Deleting",
18
- FAILED: "Failed",
19
- IN_PROGRESS: "InProgress",
20
- STOPPED: "Stopped",
21
- STOPPING: "Stopping",
22
- };
23
15
  export class ConflictException extends __BaseException {
24
16
  constructor(opts) {
25
17
  super({
@@ -32,6 +24,18 @@ export class ConflictException extends __BaseException {
32
24
  Object.setPrototypeOf(this, ConflictException.prototype);
33
25
  }
34
26
  }
27
+ export var EndpointConfig;
28
+ (function (EndpointConfig) {
29
+ EndpointConfig.visit = (value, visitor) => {
30
+ if (value.sageMaker !== undefined)
31
+ return visitor.sageMaker(value.sageMaker);
32
+ return visitor._(value.$unknown[0], value.$unknown[1]);
33
+ };
34
+ })(EndpointConfig || (EndpointConfig = {}));
35
+ export const Status = {
36
+ INCOMPATIBLE_ENDPOINT: "INCOMPATIBLE_ENDPOINT",
37
+ REGISTERED: "REGISTERED",
38
+ };
35
39
  export class InternalServerException extends __BaseException {
36
40
  constructor(opts) {
37
41
  super({
@@ -56,6 +60,18 @@ export class ResourceNotFoundException extends __BaseException {
56
60
  Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
57
61
  }
58
62
  }
63
+ export class ServiceQuotaExceededException extends __BaseException {
64
+ constructor(opts) {
65
+ super({
66
+ name: "ServiceQuotaExceededException",
67
+ $fault: "client",
68
+ ...opts,
69
+ });
70
+ this.name = "ServiceQuotaExceededException";
71
+ this.$fault = "client";
72
+ Object.setPrototypeOf(this, ServiceQuotaExceededException.prototype);
73
+ }
74
+ }
59
75
  export class ThrottlingException extends __BaseException {
60
76
  constructor(opts) {
61
77
  super({
@@ -80,6 +96,26 @@ export class ValidationException extends __BaseException {
80
96
  Object.setPrototypeOf(this, ValidationException.prototype);
81
97
  }
82
98
  }
99
+ export class ServiceUnavailableException extends __BaseException {
100
+ constructor(opts) {
101
+ super({
102
+ name: "ServiceUnavailableException",
103
+ $fault: "server",
104
+ ...opts,
105
+ });
106
+ this.name = "ServiceUnavailableException";
107
+ this.$fault = "server";
108
+ Object.setPrototypeOf(this, ServiceUnavailableException.prototype);
109
+ }
110
+ }
111
+ export const EvaluationJobStatus = {
112
+ COMPLETED: "Completed",
113
+ DELETING: "Deleting",
114
+ FAILED: "Failed",
115
+ IN_PROGRESS: "InProgress",
116
+ STOPPED: "Stopped",
117
+ STOPPING: "Stopping",
118
+ };
83
119
  export const ApplicationType = {
84
120
  MODEL_EVALUATION: "ModelEvaluation",
85
121
  RAG_EVALUATION: "RagEvaluation",
@@ -140,18 +176,6 @@ export const RetrieveAndGenerateType = {
140
176
  EXTERNAL_SOURCES: "EXTERNAL_SOURCES",
141
177
  KNOWLEDGE_BASE: "KNOWLEDGE_BASE",
142
178
  };
143
- export class ServiceQuotaExceededException extends __BaseException {
144
- constructor(opts) {
145
- super({
146
- name: "ServiceQuotaExceededException",
147
- $fault: "client",
148
- ...opts,
149
- });
150
- this.name = "ServiceQuotaExceededException";
151
- this.$fault = "client";
152
- Object.setPrototypeOf(this, ServiceQuotaExceededException.prototype);
153
- }
154
- }
155
179
  export const EvaluationJobType = {
156
180
  AUTOMATED: "Automated",
157
181
  HUMAN: "Human",
@@ -163,6 +187,10 @@ export const SortOrder = {
163
187
  ASCENDING: "Ascending",
164
188
  DESCENDING: "Descending",
165
189
  };
190
+ export const GuardrailModality = {
191
+ IMAGE: "IMAGE",
192
+ TEXT: "TEXT",
193
+ };
166
194
  export const GuardrailFilterStrength = {
167
195
  HIGH: "HIGH",
168
196
  LOW: "LOW",
@@ -312,12 +340,44 @@ export const ModelInvocationJobStatus = {
312
340
  SUBMITTED: "Submitted",
313
341
  VALIDATING: "Validating",
314
342
  };
343
+ export var CustomizationConfig;
344
+ (function (CustomizationConfig) {
345
+ CustomizationConfig.visit = (value, visitor) => {
346
+ if (value.distillationConfig !== undefined)
347
+ return visitor.distillationConfig(value.distillationConfig);
348
+ return visitor._(value.$unknown[0], value.$unknown[1]);
349
+ };
350
+ })(CustomizationConfig || (CustomizationConfig = {}));
315
351
  export const CustomizationType = {
316
352
  CONTINUED_PRE_TRAINING: "CONTINUED_PRE_TRAINING",
353
+ DISTILLATION: "DISTILLATION",
317
354
  FINE_TUNING: "FINE_TUNING",
318
355
  };
356
+ export var InvocationLogSource;
357
+ (function (InvocationLogSource) {
358
+ InvocationLogSource.visit = (value, visitor) => {
359
+ if (value.s3Uri !== undefined)
360
+ return visitor.s3Uri(value.s3Uri);
361
+ return visitor._(value.$unknown[0], value.$unknown[1]);
362
+ };
363
+ })(InvocationLogSource || (InvocationLogSource = {}));
364
+ export var RequestMetadataFilters;
365
+ (function (RequestMetadataFilters) {
366
+ RequestMetadataFilters.visit = (value, visitor) => {
367
+ if (value.equals !== undefined)
368
+ return visitor.equals(value.equals);
369
+ if (value.notEquals !== undefined)
370
+ return visitor.notEquals(value.notEquals);
371
+ if (value.andAll !== undefined)
372
+ return visitor.andAll(value.andAll);
373
+ if (value.orAll !== undefined)
374
+ return visitor.orAll(value.orAll);
375
+ return visitor._(value.$unknown[0], value.$unknown[1]);
376
+ };
377
+ })(RequestMetadataFilters || (RequestMetadataFilters = {}));
319
378
  export const ModelCustomization = {
320
379
  CONTINUED_PRE_TRAINING: "CONTINUED_PRE_TRAINING",
380
+ DISTILLATION: "DISTILLATION",
321
381
  FINE_TUNING: "FINE_TUNING",
322
382
  };
323
383
  export const InferenceType = {
@@ -333,6 +393,13 @@ export const FoundationModelLifecycleStatus = {
333
393
  ACTIVE: "ACTIVE",
334
394
  LEGACY: "LEGACY",
335
395
  };
396
+ export const PromptRouterStatus = {
397
+ AVAILABLE: "AVAILABLE",
398
+ };
399
+ export const PromptRouterType = {
400
+ CUSTOM: "custom",
401
+ DEFAULT: "default",
402
+ };
336
403
  export const CommitmentDuration = {
337
404
  ONE_MONTH: "OneMonth",
338
405
  SIX_MONTHS: "SixMonths",
@@ -531,6 +598,17 @@ export const StopEvaluationJobRequestFilterSensitiveLog = (obj) => ({
531
598
  ...obj,
532
599
  ...(obj.jobIdentifier && { jobIdentifier: SENSITIVE_STRING }),
533
600
  });
601
+ export const GuardrailContentFilterConfigFilterSensitiveLog = (obj) => ({
602
+ ...obj,
603
+ ...(obj.inputModalities && { inputModalities: SENSITIVE_STRING }),
604
+ ...(obj.outputModalities && { outputModalities: SENSITIVE_STRING }),
605
+ });
606
+ export const GuardrailContentPolicyConfigFilterSensitiveLog = (obj) => ({
607
+ ...obj,
608
+ ...(obj.filtersConfig && {
609
+ filtersConfig: obj.filtersConfig.map((item) => GuardrailContentFilterConfigFilterSensitiveLog(item)),
610
+ }),
611
+ });
534
612
  export const GuardrailTopicConfigFilterSensitiveLog = (obj) => ({
535
613
  ...obj,
536
614
  ...(obj.name && { name: SENSITIVE_STRING }),
@@ -550,6 +628,9 @@ export const CreateGuardrailRequestFilterSensitiveLog = (obj) => ({
550
628
  ...(obj.topicPolicyConfig && {
551
629
  topicPolicyConfig: GuardrailTopicPolicyConfigFilterSensitiveLog(obj.topicPolicyConfig),
552
630
  }),
631
+ ...(obj.contentPolicyConfig && {
632
+ contentPolicyConfig: GuardrailContentPolicyConfigFilterSensitiveLog(obj.contentPolicyConfig),
633
+ }),
553
634
  ...(obj.blockedInputMessaging && { blockedInputMessaging: SENSITIVE_STRING }),
554
635
  ...(obj.blockedOutputsMessaging && { blockedOutputsMessaging: SENSITIVE_STRING }),
555
636
  });
@@ -557,6 +638,15 @@ export const CreateGuardrailVersionRequestFilterSensitiveLog = (obj) => ({
557
638
  ...obj,
558
639
  ...(obj.description && { description: SENSITIVE_STRING }),
559
640
  });
641
+ export const GuardrailContentFilterFilterSensitiveLog = (obj) => ({
642
+ ...obj,
643
+ ...(obj.inputModalities && { inputModalities: SENSITIVE_STRING }),
644
+ ...(obj.outputModalities && { outputModalities: SENSITIVE_STRING }),
645
+ });
646
+ export const GuardrailContentPolicyFilterSensitiveLog = (obj) => ({
647
+ ...obj,
648
+ ...(obj.filters && { filters: obj.filters.map((item) => GuardrailContentFilterFilterSensitiveLog(item)) }),
649
+ });
560
650
  export const GuardrailTopicFilterSensitiveLog = (obj) => ({
561
651
  ...obj,
562
652
  ...(obj.name && { name: SENSITIVE_STRING }),
@@ -572,6 +662,7 @@ export const GetGuardrailResponseFilterSensitiveLog = (obj) => ({
572
662
  ...(obj.name && { name: SENSITIVE_STRING }),
573
663
  ...(obj.description && { description: SENSITIVE_STRING }),
574
664
  ...(obj.topicPolicy && { topicPolicy: GuardrailTopicPolicyFilterSensitiveLog(obj.topicPolicy) }),
665
+ ...(obj.contentPolicy && { contentPolicy: GuardrailContentPolicyFilterSensitiveLog(obj.contentPolicy) }),
575
666
  ...(obj.statusReasons && { statusReasons: SENSITIVE_STRING }),
576
667
  ...(obj.failureRecommendations && { failureRecommendations: SENSITIVE_STRING }),
577
668
  ...(obj.blockedInputMessaging && { blockedInputMessaging: SENSITIVE_STRING }),
@@ -593,6 +684,9 @@ export const UpdateGuardrailRequestFilterSensitiveLog = (obj) => ({
593
684
  ...(obj.topicPolicyConfig && {
594
685
  topicPolicyConfig: GuardrailTopicPolicyConfigFilterSensitiveLog(obj.topicPolicyConfig),
595
686
  }),
687
+ ...(obj.contentPolicyConfig && {
688
+ contentPolicyConfig: GuardrailContentPolicyConfigFilterSensitiveLog(obj.contentPolicyConfig),
689
+ }),
596
690
  ...(obj.blockedInputMessaging && { blockedInputMessaging: SENSITIVE_STRING }),
597
691
  ...(obj.blockedOutputsMessaging && { blockedOutputsMessaging: SENSITIVE_STRING }),
598
692
  });
@@ -633,6 +727,65 @@ export const ListModelInvocationJobsResponseFilterSensitiveLog = (obj) => ({
633
727
  invocationJobSummaries: obj.invocationJobSummaries.map((item) => ModelInvocationJobSummaryFilterSensitiveLog(item)),
634
728
  }),
635
729
  });
730
+ export const RequestMetadataBaseFiltersFilterSensitiveLog = (obj) => ({
731
+ ...obj,
732
+ ...(obj.equals && { equals: SENSITIVE_STRING }),
733
+ ...(obj.notEquals && { notEquals: SENSITIVE_STRING }),
734
+ });
735
+ export const RequestMetadataFiltersFilterSensitiveLog = (obj) => {
736
+ if (obj.equals !== undefined)
737
+ return { equals: SENSITIVE_STRING };
738
+ if (obj.notEquals !== undefined)
739
+ return { notEquals: SENSITIVE_STRING };
740
+ if (obj.andAll !== undefined)
741
+ return { andAll: obj.andAll.map((item) => RequestMetadataBaseFiltersFilterSensitiveLog(item)) };
742
+ if (obj.orAll !== undefined)
743
+ return { orAll: obj.orAll.map((item) => RequestMetadataBaseFiltersFilterSensitiveLog(item)) };
744
+ if (obj.$unknown !== undefined)
745
+ return { [obj.$unknown[0]]: "UNKNOWN" };
746
+ };
747
+ export const InvocationLogsConfigFilterSensitiveLog = (obj) => ({
748
+ ...obj,
749
+ ...(obj.invocationLogSource && { invocationLogSource: obj.invocationLogSource }),
750
+ ...(obj.requestMetadataFilters && {
751
+ requestMetadataFilters: RequestMetadataFiltersFilterSensitiveLog(obj.requestMetadataFilters),
752
+ }),
753
+ });
754
+ export const TrainingDataConfigFilterSensitiveLog = (obj) => ({
755
+ ...obj,
756
+ ...(obj.invocationLogsConfig && {
757
+ invocationLogsConfig: InvocationLogsConfigFilterSensitiveLog(obj.invocationLogsConfig),
758
+ }),
759
+ });
760
+ export const GetCustomModelResponseFilterSensitiveLog = (obj) => ({
761
+ ...obj,
762
+ ...(obj.trainingDataConfig && { trainingDataConfig: TrainingDataConfigFilterSensitiveLog(obj.trainingDataConfig) }),
763
+ ...(obj.customizationConfig && { customizationConfig: obj.customizationConfig }),
764
+ });
765
+ export const GetPromptRouterResponseFilterSensitiveLog = (obj) => ({
766
+ ...obj,
767
+ ...(obj.description && { description: SENSITIVE_STRING }),
768
+ });
769
+ export const PromptRouterSummaryFilterSensitiveLog = (obj) => ({
770
+ ...obj,
771
+ ...(obj.description && { description: SENSITIVE_STRING }),
772
+ });
773
+ export const ListPromptRoutersResponseFilterSensitiveLog = (obj) => ({
774
+ ...obj,
775
+ ...(obj.promptRouterSummaries && {
776
+ promptRouterSummaries: obj.promptRouterSummaries.map((item) => PromptRouterSummaryFilterSensitiveLog(item)),
777
+ }),
778
+ });
779
+ export const CreateModelCustomizationJobRequestFilterSensitiveLog = (obj) => ({
780
+ ...obj,
781
+ ...(obj.trainingDataConfig && { trainingDataConfig: TrainingDataConfigFilterSensitiveLog(obj.trainingDataConfig) }),
782
+ ...(obj.customizationConfig && { customizationConfig: obj.customizationConfig }),
783
+ });
784
+ export const GetModelCustomizationJobResponseFilterSensitiveLog = (obj) => ({
785
+ ...obj,
786
+ ...(obj.trainingDataConfig && { trainingDataConfig: TrainingDataConfigFilterSensitiveLog(obj.trainingDataConfig) }),
787
+ ...(obj.customizationConfig && { customizationConfig: obj.customizationConfig }),
788
+ });
636
789
  export const RetrievalFilterFilterSensitiveLog = (obj) => {
637
790
  if (obj.equals !== undefined)
638
791
  return { equals: obj.equals };
@@ -0,0 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
2
+ import { BedrockClient } from "../BedrockClient";
3
+ import { ListMarketplaceModelEndpointsCommand, } from "../commands/ListMarketplaceModelEndpointsCommand";
4
+ export const paginateListMarketplaceModelEndpoints = createPaginator(BedrockClient, ListMarketplaceModelEndpointsCommand, "nextToken", "nextToken", "maxResults");
@@ -0,0 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
2
+ import { BedrockClient } from "../BedrockClient";
3
+ import { ListPromptRoutersCommand, } from "../commands/ListPromptRoutersCommand";
4
+ export const paginateListPromptRouters = createPaginator(BedrockClient, ListPromptRoutersCommand, "nextToken", "nextToken", "maxResults");
@@ -4,8 +4,10 @@ export * from "./ListEvaluationJobsPaginator";
4
4
  export * from "./ListGuardrailsPaginator";
5
5
  export * from "./ListImportedModelsPaginator";
6
6
  export * from "./ListInferenceProfilesPaginator";
7
+ export * from "./ListMarketplaceModelEndpointsPaginator";
7
8
  export * from "./ListModelCopyJobsPaginator";
8
9
  export * from "./ListModelCustomizationJobsPaginator";
9
10
  export * from "./ListModelImportJobsPaginator";
10
11
  export * from "./ListModelInvocationJobsPaginator";
12
+ export * from "./ListPromptRoutersPaginator";
11
13
  export * from "./ListProvisionedModelThroughputsPaginator";