@aws-sdk/client-bedrock-runtime 3.1068.0 → 3.1070.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 (32) hide show
  1. package/README.md +7 -0
  2. package/dist-cjs/auth/httpAuthSchemeProvider.js +11 -17
  3. package/dist-cjs/endpoint/bdd.js +2 -5
  4. package/dist-cjs/endpoint/endpointResolver.js +7 -11
  5. package/dist-cjs/index.js +147 -99
  6. package/dist-cjs/models/BedrockRuntimeServiceException.js +4 -8
  7. package/dist-cjs/models/errors.js +25 -40
  8. package/dist-cjs/runtimeConfig.browser.js +27 -31
  9. package/dist-cjs/runtimeConfig.js +40 -44
  10. package/dist-cjs/runtimeConfig.native.js +6 -9
  11. package/dist-cjs/runtimeConfig.shared.js +22 -26
  12. package/dist-cjs/schemas/schemas_0.js +688 -315
  13. package/dist-es/BedrockRuntime.js +2 -0
  14. package/dist-es/commands/InvokeGuardrailChecksCommand.js +16 -0
  15. package/dist-es/commands/index.js +1 -0
  16. package/dist-es/models/enums.js +50 -0
  17. package/dist-es/schemas/schemas_0.js +204 -16
  18. package/dist-types/BedrockRuntime.d.ts +7 -0
  19. package/dist-types/BedrockRuntimeClient.d.ts +3 -2
  20. package/dist-types/commands/InvokeGuardrailChecksCommand.d.ts +164 -0
  21. package/dist-types/commands/index.d.ts +1 -0
  22. package/dist-types/models/enums.d.ts +82 -0
  23. package/dist-types/models/models_0.d.ts +348 -1
  24. package/dist-types/schemas/schemas_0.d.ts +23 -0
  25. package/dist-types/ts3.4/BedrockRuntime.d.ts +17 -0
  26. package/dist-types/ts3.4/BedrockRuntimeClient.d.ts +6 -0
  27. package/dist-types/ts3.4/commands/InvokeGuardrailChecksCommand.d.ts +53 -0
  28. package/dist-types/ts3.4/commands/index.d.ts +1 -0
  29. package/dist-types/ts3.4/models/enums.d.ts +58 -0
  30. package/dist-types/ts3.4/models/models_0.d.ts +101 -0
  31. package/dist-types/ts3.4/schemas/schemas_0.d.ts +23 -0
  32. package/package.json +18 -18
@@ -0,0 +1,164 @@
1
+ import { Command as $Command } from "@smithy/core/client";
2
+ import type { MetadataBearer as __MetadataBearer } from "@smithy/types";
3
+ import type { BedrockRuntimeClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../BedrockRuntimeClient";
4
+ import type { InvokeGuardrailChecksRequest, InvokeGuardrailChecksResponse } from "../models/models_0";
5
+ /**
6
+ * @public
7
+ */
8
+ export type { __MetadataBearer };
9
+ export { $Command };
10
+ /**
11
+ * @public
12
+ *
13
+ * The input for {@link InvokeGuardrailChecksCommand}.
14
+ */
15
+ export interface InvokeGuardrailChecksCommandInput extends InvokeGuardrailChecksRequest {
16
+ }
17
+ /**
18
+ * @public
19
+ *
20
+ * The output of {@link InvokeGuardrailChecksCommand}.
21
+ */
22
+ export interface InvokeGuardrailChecksCommandOutput extends InvokeGuardrailChecksResponse, __MetadataBearer {
23
+ }
24
+ declare const InvokeGuardrailChecksCommand_base: {
25
+ new (input: InvokeGuardrailChecksCommandInput): import("@smithy/core/client").CommandImpl<InvokeGuardrailChecksCommandInput, InvokeGuardrailChecksCommandOutput, BedrockRuntimeClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
26
+ new (input: InvokeGuardrailChecksCommandInput): import("@smithy/core/client").CommandImpl<InvokeGuardrailChecksCommandInput, InvokeGuardrailChecksCommandOutput, BedrockRuntimeClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
27
+ getEndpointParameterInstructions(): {
28
+ [x: string]: unknown;
29
+ };
30
+ };
31
+ /**
32
+ * <p>Evaluates messages against inline guardrail checks. You specify the check configurations directly in the request, and Amazon Bedrock returns per-check results with severity or confidence scores.</p>
33
+ * @example
34
+ * Use a bare-bones client and the command you need to make an API call.
35
+ * ```javascript
36
+ * import { BedrockRuntimeClient, InvokeGuardrailChecksCommand } from "@aws-sdk/client-bedrock-runtime"; // ES Modules import
37
+ * // const { BedrockRuntimeClient, InvokeGuardrailChecksCommand } = require("@aws-sdk/client-bedrock-runtime"); // CommonJS import
38
+ * // import type { BedrockRuntimeClientConfig } from "@aws-sdk/client-bedrock-runtime";
39
+ * const config = {}; // type is BedrockRuntimeClientConfig
40
+ * const client = new BedrockRuntimeClient(config);
41
+ * const input = { // InvokeGuardrailChecksRequest
42
+ * messages: [ // GuardrailChecksMessageList // required
43
+ * { // GuardrailChecksMessage
44
+ * role: "user" || "assistant" || "system", // required
45
+ * content: [ // GuardrailChecksContentBlockList // required
46
+ * { // GuardrailChecksContentBlock Union: only one key present
47
+ * text: "STRING_VALUE",
48
+ * },
49
+ * ],
50
+ * },
51
+ * ],
52
+ * checks: { // GuardrailChecksConfig
53
+ * contentFilter: { // GuardrailChecksContentFilterConfig
54
+ * categories: [ // GuardrailChecksContentFilterCategoryConfigList // required
55
+ * { // GuardrailChecksContentFilterCategoryConfig
56
+ * category: "VIOLENCE" || "HATE" || "SEXUAL" || "MISCONDUCT" || "INSULTS", // required
57
+ * },
58
+ * ],
59
+ * },
60
+ * promptAttack: { // GuardrailChecksPromptAttackConfig
61
+ * categories: [ // GuardrailChecksPromptAttackCategoryConfigList // required
62
+ * { // GuardrailChecksPromptAttackCategoryConfig
63
+ * category: "JAILBREAK" || "PROMPT_INJECTION" || "PROMPT_LEAKAGE", // required
64
+ * },
65
+ * ],
66
+ * },
67
+ * sensitiveInformation: { // GuardrailChecksSensitiveInformationConfig
68
+ * entities: [ // GuardrailChecksSensitiveInformationEntityConfigList // required
69
+ * { // GuardrailChecksSensitiveInformationEntityConfig
70
+ * type: "ADDRESS" || "AGE" || "AWS_ACCESS_KEY" || "AWS_SECRET_KEY" || "CA_HEALTH_NUMBER" || "CA_SOCIAL_INSURANCE_NUMBER" || "CREDIT_DEBIT_CARD_CVV" || "CREDIT_DEBIT_CARD_EXPIRY" || "CREDIT_DEBIT_CARD_NUMBER" || "DRIVER_ID" || "EMAIL" || "INTERNATIONAL_BANK_ACCOUNT_NUMBER" || "IP_ADDRESS" || "LICENSE_PLATE" || "MAC_ADDRESS" || "NAME" || "PASSWORD" || "PHONE" || "PIN" || "SWIFT_CODE" || "UK_NATIONAL_HEALTH_SERVICE_NUMBER" || "UK_NATIONAL_INSURANCE_NUMBER" || "UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER" || "URL" || "USERNAME" || "US_BANK_ACCOUNT_NUMBER" || "US_BANK_ROUTING_NUMBER" || "US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER" || "US_PASSPORT_NUMBER" || "US_SOCIAL_SECURITY_NUMBER" || "VEHICLE_IDENTIFICATION_NUMBER", // required
71
+ * },
72
+ * ],
73
+ * },
74
+ * },
75
+ * };
76
+ * const command = new InvokeGuardrailChecksCommand(input);
77
+ * const response = await client.send(command);
78
+ * // { // InvokeGuardrailChecksResponse
79
+ * // results: { // GuardrailChecksResults
80
+ * // contentFilter: { // GuardrailChecksContentFilterResult
81
+ * // results: [ // GuardrailChecksContentFilterResultList // required
82
+ * // { // GuardrailChecksContentFilterResultEntry
83
+ * // category: "VIOLENCE" || "HATE" || "SEXUAL" || "MISCONDUCT" || "INSULTS", // required
84
+ * // severityScore: Number("double"), // required
85
+ * // },
86
+ * // ],
87
+ * // },
88
+ * // promptAttack: { // GuardrailChecksPromptAttackResult
89
+ * // results: [ // GuardrailChecksPromptAttackResultList // required
90
+ * // { // GuardrailChecksPromptAttackResultEntry
91
+ * // category: "JAILBREAK" || "PROMPT_INJECTION" || "PROMPT_LEAKAGE", // required
92
+ * // severityScore: Number("double"), // required
93
+ * // },
94
+ * // ],
95
+ * // },
96
+ * // sensitiveInformation: { // GuardrailChecksSensitiveInformationResult
97
+ * // results: [ // GuardrailChecksSensitiveInformationResultList // required
98
+ * // { // GuardrailChecksSensitiveInformationResultEntry
99
+ * // type: "ADDRESS" || "AGE" || "AWS_ACCESS_KEY" || "AWS_SECRET_KEY" || "CA_HEALTH_NUMBER" || "CA_SOCIAL_INSURANCE_NUMBER" || "CREDIT_DEBIT_CARD_CVV" || "CREDIT_DEBIT_CARD_EXPIRY" || "CREDIT_DEBIT_CARD_NUMBER" || "DRIVER_ID" || "EMAIL" || "INTERNATIONAL_BANK_ACCOUNT_NUMBER" || "IP_ADDRESS" || "LICENSE_PLATE" || "MAC_ADDRESS" || "NAME" || "PASSWORD" || "PHONE" || "PIN" || "SWIFT_CODE" || "UK_NATIONAL_HEALTH_SERVICE_NUMBER" || "UK_NATIONAL_INSURANCE_NUMBER" || "UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER" || "URL" || "USERNAME" || "US_BANK_ACCOUNT_NUMBER" || "US_BANK_ROUTING_NUMBER" || "US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER" || "US_PASSPORT_NUMBER" || "US_SOCIAL_SECURITY_NUMBER" || "VEHICLE_IDENTIFICATION_NUMBER", // required
100
+ * // confidenceScore: Number("double"), // required
101
+ * // beginOffset: Number("int"), // required
102
+ * // endOffset: Number("int"), // required
103
+ * // messageIndex: Number("int"), // required
104
+ * // contentIndex: Number("int"), // required
105
+ * // },
106
+ * // ],
107
+ * // truncated: true || false,
108
+ * // },
109
+ * // },
110
+ * // usage: { // GuardrailChecksUsageResults
111
+ * // contentFilter: { // GuardrailChecksContentFilterUsage
112
+ * // textUnits: Number("int"), // required
113
+ * // },
114
+ * // promptAttack: { // GuardrailChecksPromptAttackUsage
115
+ * // textUnits: Number("int"), // required
116
+ * // },
117
+ * // sensitiveInformation: { // GuardrailChecksSensitiveInformationUsage
118
+ * // textUnits: Number("int"), // required
119
+ * // },
120
+ * // },
121
+ * // };
122
+ *
123
+ * ```
124
+ *
125
+ * @param InvokeGuardrailChecksCommandInput - {@link InvokeGuardrailChecksCommandInput}
126
+ * @returns {@link InvokeGuardrailChecksCommandOutput}
127
+ * @see {@link InvokeGuardrailChecksCommandInput} for command's `input` shape.
128
+ * @see {@link InvokeGuardrailChecksCommandOutput} for command's `response` shape.
129
+ * @see {@link BedrockRuntimeClientResolvedConfig | config} for BedrockRuntimeClient's `config` shape.
130
+ *
131
+ * @throws {@link AccessDeniedException} (client fault)
132
+ * <p>The request is denied because you do not have sufficient permissions to perform the requested action. For troubleshooting this error, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-access-denied">AccessDeniedException</a> in the Amazon Bedrock User Guide</p>
133
+ *
134
+ * @throws {@link InternalServerException} (server fault)
135
+ * <p>An internal server error occurred. For troubleshooting this error, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-internal-failure">InternalFailure</a> in the Amazon Bedrock User Guide</p>
136
+ *
137
+ * @throws {@link ServiceUnavailableException} (server fault)
138
+ * <p>The service isn't currently available. For troubleshooting this error, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-service-unavailable">ServiceUnavailable</a> in the Amazon Bedrock User Guide</p>
139
+ *
140
+ * @throws {@link ThrottlingException} (client fault)
141
+ * <p>Your request was denied due to exceeding the account quotas for <i>Amazon Bedrock</i>. For troubleshooting this error, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-throttling-exception">ThrottlingException</a> in the Amazon Bedrock User Guide</p>
142
+ *
143
+ * @throws {@link ValidationException} (client fault)
144
+ * <p>The input fails to satisfy the constraints specified by <i>Amazon Bedrock</i>. For troubleshooting this error, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-validation-error">ValidationError</a> in the Amazon Bedrock User Guide</p>
145
+ *
146
+ * @throws {@link BedrockRuntimeServiceException}
147
+ * <p>Base exception class for all service exceptions from BedrockRuntime service.</p>
148
+ *
149
+ *
150
+ * @public
151
+ */
152
+ export declare class InvokeGuardrailChecksCommand extends InvokeGuardrailChecksCommand_base {
153
+ /** @internal type navigation helper, not in runtime. */
154
+ protected static __types: {
155
+ api: {
156
+ input: InvokeGuardrailChecksRequest;
157
+ output: InvokeGuardrailChecksResponse;
158
+ };
159
+ sdk: {
160
+ input: InvokeGuardrailChecksCommandInput;
161
+ output: InvokeGuardrailChecksCommandOutput;
162
+ };
163
+ };
164
+ }
@@ -3,6 +3,7 @@ export * from "./ConverseCommand";
3
3
  export * from "./ConverseStreamCommand";
4
4
  export * from "./CountTokensCommand";
5
5
  export * from "./GetAsyncInvokeCommand";
6
+ export * from "./InvokeGuardrailChecksCommand";
6
7
  export * from "./InvokeModelCommand";
7
8
  export * from "./InvokeModelWithBidirectionalStreamCommand";
8
9
  export * from "./InvokeModelWithResponseStreamCommand";
@@ -312,6 +312,88 @@ export declare const GuardrailManagedWordType: {
312
312
  * @public
313
313
  */
314
314
  export type GuardrailManagedWordType = (typeof GuardrailManagedWordType)[keyof typeof GuardrailManagedWordType];
315
+ /**
316
+ * @public
317
+ * @enum
318
+ */
319
+ export declare const GuardrailChecksContentFilterCategory: {
320
+ readonly HATE: "HATE";
321
+ readonly INSULTS: "INSULTS";
322
+ readonly MISCONDUCT: "MISCONDUCT";
323
+ readonly SEXUAL: "SEXUAL";
324
+ readonly VIOLENCE: "VIOLENCE";
325
+ };
326
+ /**
327
+ * @public
328
+ */
329
+ export type GuardrailChecksContentFilterCategory = (typeof GuardrailChecksContentFilterCategory)[keyof typeof GuardrailChecksContentFilterCategory];
330
+ /**
331
+ * @public
332
+ * @enum
333
+ */
334
+ export declare const GuardrailChecksPromptAttackCategory: {
335
+ readonly JAILBREAK: "JAILBREAK";
336
+ readonly PROMPT_INJECTION: "PROMPT_INJECTION";
337
+ readonly PROMPT_LEAKAGE: "PROMPT_LEAKAGE";
338
+ };
339
+ /**
340
+ * @public
341
+ */
342
+ export type GuardrailChecksPromptAttackCategory = (typeof GuardrailChecksPromptAttackCategory)[keyof typeof GuardrailChecksPromptAttackCategory];
343
+ /**
344
+ * @public
345
+ * @enum
346
+ */
347
+ export declare const GuardrailChecksSensitiveInformationEntityType: {
348
+ readonly ADDRESS: "ADDRESS";
349
+ readonly AGE: "AGE";
350
+ readonly AWS_ACCESS_KEY: "AWS_ACCESS_KEY";
351
+ readonly AWS_SECRET_KEY: "AWS_SECRET_KEY";
352
+ readonly CA_HEALTH_NUMBER: "CA_HEALTH_NUMBER";
353
+ readonly CA_SOCIAL_INSURANCE_NUMBER: "CA_SOCIAL_INSURANCE_NUMBER";
354
+ readonly CREDIT_DEBIT_CARD_CVV: "CREDIT_DEBIT_CARD_CVV";
355
+ readonly CREDIT_DEBIT_CARD_EXPIRY: "CREDIT_DEBIT_CARD_EXPIRY";
356
+ readonly CREDIT_DEBIT_CARD_NUMBER: "CREDIT_DEBIT_CARD_NUMBER";
357
+ readonly DRIVER_ID: "DRIVER_ID";
358
+ readonly EMAIL: "EMAIL";
359
+ readonly INTERNATIONAL_BANK_ACCOUNT_NUMBER: "INTERNATIONAL_BANK_ACCOUNT_NUMBER";
360
+ readonly IP_ADDRESS: "IP_ADDRESS";
361
+ readonly LICENSE_PLATE: "LICENSE_PLATE";
362
+ readonly MAC_ADDRESS: "MAC_ADDRESS";
363
+ readonly NAME: "NAME";
364
+ readonly PASSWORD: "PASSWORD";
365
+ readonly PHONE: "PHONE";
366
+ readonly PIN: "PIN";
367
+ readonly SWIFT_CODE: "SWIFT_CODE";
368
+ readonly UK_NATIONAL_HEALTH_SERVICE_NUMBER: "UK_NATIONAL_HEALTH_SERVICE_NUMBER";
369
+ readonly UK_NATIONAL_INSURANCE_NUMBER: "UK_NATIONAL_INSURANCE_NUMBER";
370
+ readonly UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER: "UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER";
371
+ readonly URL: "URL";
372
+ readonly USERNAME: "USERNAME";
373
+ readonly US_BANK_ACCOUNT_NUMBER: "US_BANK_ACCOUNT_NUMBER";
374
+ readonly US_BANK_ROUTING_NUMBER: "US_BANK_ROUTING_NUMBER";
375
+ readonly US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER: "US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER";
376
+ readonly US_PASSPORT_NUMBER: "US_PASSPORT_NUMBER";
377
+ readonly US_SOCIAL_SECURITY_NUMBER: "US_SOCIAL_SECURITY_NUMBER";
378
+ readonly VEHICLE_IDENTIFICATION_NUMBER: "VEHICLE_IDENTIFICATION_NUMBER";
379
+ };
380
+ /**
381
+ * @public
382
+ */
383
+ export type GuardrailChecksSensitiveInformationEntityType = (typeof GuardrailChecksSensitiveInformationEntityType)[keyof typeof GuardrailChecksSensitiveInformationEntityType];
384
+ /**
385
+ * @public
386
+ * @enum
387
+ */
388
+ export declare const GuardrailChecksRole: {
389
+ readonly ASSISTANT: "assistant";
390
+ readonly SYSTEM: "system";
391
+ readonly USER: "user";
392
+ };
393
+ /**
394
+ * @public
395
+ */
396
+ export type GuardrailChecksRole = (typeof GuardrailChecksRole)[keyof typeof GuardrailChecksRole];
315
397
  /**
316
398
  * @public
317
399
  * @enum
@@ -1,5 +1,5 @@
1
1
  import type { DocumentType as __DocumentType } from "@smithy/types";
2
- import type { AsyncInvokeStatus, AudioFormat, CachePointType, CacheTTL, ConversationRole, DocumentFormat, GuardrailAction, GuardrailAutomatedReasoningLogicWarningType, GuardrailContentFilterConfidence, GuardrailContentFilterStrength, GuardrailContentFilterType, GuardrailContentPolicyAction, GuardrailContentQualifier, GuardrailContentSource, GuardrailContextualGroundingFilterType, GuardrailContextualGroundingPolicyAction, GuardrailConverseContentQualifier, GuardrailConverseImageFormat, GuardrailImageFormat, GuardrailManagedWordType, GuardrailOrigin, GuardrailOutputScope, GuardrailOwnership, GuardrailPiiEntityType, GuardrailSensitiveInformationPolicyAction, GuardrailStreamProcessingMode, GuardrailTopicPolicyAction, GuardrailTopicType, GuardrailTrace, GuardrailWordPolicyAction, ImageFormat, OutputFormatType, PerformanceConfigLatency, ServiceTierType, SortAsyncInvocationBy, SortOrder, StopReason, ToolResultStatus, ToolUseType, Trace, VideoFormat } from "./enums";
2
+ import type { AsyncInvokeStatus, AudioFormat, CachePointType, CacheTTL, ConversationRole, DocumentFormat, GuardrailAction, GuardrailAutomatedReasoningLogicWarningType, GuardrailChecksContentFilterCategory, GuardrailChecksPromptAttackCategory, GuardrailChecksRole, GuardrailChecksSensitiveInformationEntityType, GuardrailContentFilterConfidence, GuardrailContentFilterStrength, GuardrailContentFilterType, GuardrailContentPolicyAction, GuardrailContentQualifier, GuardrailContentSource, GuardrailContextualGroundingFilterType, GuardrailContextualGroundingPolicyAction, GuardrailConverseContentQualifier, GuardrailConverseImageFormat, GuardrailImageFormat, GuardrailManagedWordType, GuardrailOrigin, GuardrailOutputScope, GuardrailOwnership, GuardrailPiiEntityType, GuardrailSensitiveInformationPolicyAction, GuardrailStreamProcessingMode, GuardrailTopicPolicyAction, GuardrailTopicType, GuardrailTrace, GuardrailWordPolicyAction, ImageFormat, OutputFormatType, PerformanceConfigLatency, ServiceTierType, SortAsyncInvocationBy, SortOrder, StopReason, ToolResultStatus, ToolUseType, Trace, VideoFormat } from "./enums";
3
3
  import type { InternalServerException, ModelStreamErrorException, ModelTimeoutException, ServiceUnavailableException, ThrottlingException, ValidationException } from "./errors";
4
4
  /**
5
5
  * @public
@@ -1302,6 +1302,353 @@ export interface ApplyGuardrailResponse {
1302
1302
  */
1303
1303
  guardrailCoverage?: GuardrailCoverage | undefined;
1304
1304
  }
1305
+ /**
1306
+ * <p>The configuration for a single content filter category to evaluate.</p>
1307
+ * @public
1308
+ */
1309
+ export interface GuardrailChecksContentFilterCategoryConfig {
1310
+ /**
1311
+ * <p>The content filter category to evaluate.</p>
1312
+ * @public
1313
+ */
1314
+ category: GuardrailChecksContentFilterCategory | undefined;
1315
+ }
1316
+ /**
1317
+ * <p>The configuration for the content filter check, specifying which categories to evaluate.</p>
1318
+ * @public
1319
+ */
1320
+ export interface GuardrailChecksContentFilterConfig {
1321
+ /**
1322
+ * <p>The content filter categories to evaluate.</p>
1323
+ * @public
1324
+ */
1325
+ categories: GuardrailChecksContentFilterCategoryConfig[] | undefined;
1326
+ }
1327
+ /**
1328
+ * <p>The configuration for a single prompt attack category to evaluate.</p>
1329
+ * @public
1330
+ */
1331
+ export interface GuardrailChecksPromptAttackCategoryConfig {
1332
+ /**
1333
+ * <p>The prompt attack category to evaluate.</p>
1334
+ * @public
1335
+ */
1336
+ category: GuardrailChecksPromptAttackCategory | undefined;
1337
+ }
1338
+ /**
1339
+ * <p>The configuration for the prompt attack check, specifying which categories to evaluate.</p>
1340
+ * @public
1341
+ */
1342
+ export interface GuardrailChecksPromptAttackConfig {
1343
+ /**
1344
+ * <p>The prompt attack categories to evaluate.</p>
1345
+ * @public
1346
+ */
1347
+ categories: GuardrailChecksPromptAttackCategoryConfig[] | undefined;
1348
+ }
1349
+ /**
1350
+ * <p>The configuration for a single sensitive information entity type to detect.</p>
1351
+ * @public
1352
+ */
1353
+ export interface GuardrailChecksSensitiveInformationEntityConfig {
1354
+ /**
1355
+ * <p>The PII entity type to detect.</p>
1356
+ * @public
1357
+ */
1358
+ type: GuardrailChecksSensitiveInformationEntityType | undefined;
1359
+ }
1360
+ /**
1361
+ * <p>The configuration for the sensitive information check, specifying which entity types to detect.</p>
1362
+ * @public
1363
+ */
1364
+ export interface GuardrailChecksSensitiveInformationConfig {
1365
+ /**
1366
+ * <p>The sensitive information entity types to detect.</p>
1367
+ * @public
1368
+ */
1369
+ entities: GuardrailChecksSensitiveInformationEntityConfig[] | undefined;
1370
+ }
1371
+ /**
1372
+ * <p>The configuration for inline guardrail checks. Specify one or more check types to run against the messages.</p>
1373
+ * @public
1374
+ */
1375
+ export interface GuardrailChecksConfig {
1376
+ /**
1377
+ * <p>The content filter check configuration.</p>
1378
+ * @public
1379
+ */
1380
+ contentFilter?: GuardrailChecksContentFilterConfig | undefined;
1381
+ /**
1382
+ * <p>The prompt attack check configuration.</p>
1383
+ * @public
1384
+ */
1385
+ promptAttack?: GuardrailChecksPromptAttackConfig | undefined;
1386
+ /**
1387
+ * <p>The sensitive information check configuration.</p>
1388
+ * @public
1389
+ */
1390
+ sensitiveInformation?: GuardrailChecksSensitiveInformationConfig | undefined;
1391
+ }
1392
+ /**
1393
+ * <p>A content block within a message to evaluate.</p>
1394
+ * @public
1395
+ */
1396
+ export type GuardrailChecksContentBlock = GuardrailChecksContentBlock.TextMember | GuardrailChecksContentBlock.$UnknownMember;
1397
+ /**
1398
+ * @public
1399
+ */
1400
+ export declare namespace GuardrailChecksContentBlock {
1401
+ /**
1402
+ * <p>The text content to evaluate.</p>
1403
+ * @public
1404
+ */
1405
+ interface TextMember {
1406
+ text: string;
1407
+ $unknown?: never;
1408
+ }
1409
+ /**
1410
+ * @public
1411
+ */
1412
+ interface $UnknownMember {
1413
+ text?: never;
1414
+ $unknown: [string, any];
1415
+ }
1416
+ /**
1417
+ * @deprecated unused in schema-serde mode.
1418
+ *
1419
+ */
1420
+ interface Visitor<T> {
1421
+ text: (value: string) => T;
1422
+ _: (name: string, value: any) => T;
1423
+ }
1424
+ }
1425
+ /**
1426
+ * <p>A message to evaluate against guardrail checks, containing a role and content blocks.</p>
1427
+ * @public
1428
+ */
1429
+ export interface GuardrailChecksMessage {
1430
+ /**
1431
+ * <p>The role of the message sender.</p>
1432
+ * @public
1433
+ */
1434
+ role: GuardrailChecksRole | undefined;
1435
+ /**
1436
+ * <p>The content blocks for the message.</p>
1437
+ * @public
1438
+ */
1439
+ content: GuardrailChecksContentBlock[] | undefined;
1440
+ }
1441
+ /**
1442
+ * @public
1443
+ */
1444
+ export interface InvokeGuardrailChecksRequest {
1445
+ /**
1446
+ * <p>The messages to evaluate against the specified guardrail checks. Each message includes a role and one or more content blocks.</p>
1447
+ * @public
1448
+ */
1449
+ messages: GuardrailChecksMessage[] | undefined;
1450
+ /**
1451
+ * <p>The inline check configurations that specify which guardrail checks to run against the messages.</p>
1452
+ * @public
1453
+ */
1454
+ checks: GuardrailChecksConfig | undefined;
1455
+ }
1456
+ /**
1457
+ * <p>The evaluation result for a single content filter category.</p>
1458
+ * @public
1459
+ */
1460
+ export interface GuardrailChecksContentFilterResultEntry {
1461
+ /**
1462
+ * <p>The content filter category that was evaluated.</p>
1463
+ * @public
1464
+ */
1465
+ category: GuardrailChecksContentFilterCategory | undefined;
1466
+ /**
1467
+ * <p>The severity score for the category, ranging from 0.0 to 1.0. Higher values indicate greater severity.</p>
1468
+ * @public
1469
+ */
1470
+ severityScore: number | undefined;
1471
+ }
1472
+ /**
1473
+ * <p>The content filter check results.</p>
1474
+ * @public
1475
+ */
1476
+ export interface GuardrailChecksContentFilterResult {
1477
+ /**
1478
+ * <p>The per-category content filter results.</p>
1479
+ * @public
1480
+ */
1481
+ results: GuardrailChecksContentFilterResultEntry[] | undefined;
1482
+ }
1483
+ /**
1484
+ * <p>The evaluation result for a single prompt attack category.</p>
1485
+ * @public
1486
+ */
1487
+ export interface GuardrailChecksPromptAttackResultEntry {
1488
+ /**
1489
+ * <p>The prompt attack category that was evaluated.</p>
1490
+ * @public
1491
+ */
1492
+ category: GuardrailChecksPromptAttackCategory | undefined;
1493
+ /**
1494
+ * <p>The severity score for the category, ranging from 0.0 to 1.0. Higher values indicate greater severity.</p>
1495
+ * @public
1496
+ */
1497
+ severityScore: number | undefined;
1498
+ }
1499
+ /**
1500
+ * <p>The prompt attack check results.</p>
1501
+ * @public
1502
+ */
1503
+ export interface GuardrailChecksPromptAttackResult {
1504
+ /**
1505
+ * <p>The per-category prompt attack results.</p>
1506
+ * @public
1507
+ */
1508
+ results: GuardrailChecksPromptAttackResultEntry[] | undefined;
1509
+ }
1510
+ /**
1511
+ * <p>The detection result for a single sensitive information entity found in the evaluated messages.</p>
1512
+ * @public
1513
+ */
1514
+ export interface GuardrailChecksSensitiveInformationResultEntry {
1515
+ /**
1516
+ * <p>The PII entity type that was detected.</p>
1517
+ * @public
1518
+ */
1519
+ type: GuardrailChecksSensitiveInformationEntityType | undefined;
1520
+ /**
1521
+ * <p>The confidence score for the detection, ranging from 0.0 to 1.0. Higher values indicate greater confidence.</p>
1522
+ * @public
1523
+ */
1524
+ confidenceScore: number | undefined;
1525
+ /**
1526
+ * <p>The start character offset of the detected entity within the content block.</p>
1527
+ * @public
1528
+ */
1529
+ beginOffset: number | undefined;
1530
+ /**
1531
+ * <p>The end character offset of the detected entity within the content block.</p>
1532
+ * @public
1533
+ */
1534
+ endOffset: number | undefined;
1535
+ /**
1536
+ * <p>The zero-based index of the message in the input messages array where the entity was detected.</p>
1537
+ * @public
1538
+ */
1539
+ messageIndex: number | undefined;
1540
+ /**
1541
+ * <p>The zero-based index of the content block within the message where the entity was detected.</p>
1542
+ * @public
1543
+ */
1544
+ contentIndex: number | undefined;
1545
+ }
1546
+ /**
1547
+ * <p>The sensitive information check results.</p>
1548
+ * @public
1549
+ */
1550
+ export interface GuardrailChecksSensitiveInformationResult {
1551
+ /**
1552
+ * <p>The detected sensitive information entities.</p>
1553
+ * @public
1554
+ */
1555
+ results: GuardrailChecksSensitiveInformationResultEntry[] | undefined;
1556
+ /**
1557
+ * <p>Specifies whether the results were truncated because the number of detected entities exceeded the maximum limit.</p>
1558
+ * @public
1559
+ */
1560
+ truncated?: boolean | undefined;
1561
+ }
1562
+ /**
1563
+ * <p>The results from the guardrail checks evaluation, organized by check type.</p>
1564
+ * @public
1565
+ */
1566
+ export interface GuardrailChecksResults {
1567
+ /**
1568
+ * <p>The content filter check results.</p>
1569
+ * @public
1570
+ */
1571
+ contentFilter?: GuardrailChecksContentFilterResult | undefined;
1572
+ /**
1573
+ * <p>The prompt attack check results.</p>
1574
+ * @public
1575
+ */
1576
+ promptAttack?: GuardrailChecksPromptAttackResult | undefined;
1577
+ /**
1578
+ * <p>The sensitive information check results.</p>
1579
+ * @public
1580
+ */
1581
+ sensitiveInformation?: GuardrailChecksSensitiveInformationResult | undefined;
1582
+ }
1583
+ /**
1584
+ * <p>The text unit usage for the content filter check.</p>
1585
+ * @public
1586
+ */
1587
+ export interface GuardrailChecksContentFilterUsage {
1588
+ /**
1589
+ * <p>The number of text units consumed by the content filter check.</p>
1590
+ * @public
1591
+ */
1592
+ textUnits: number | undefined;
1593
+ }
1594
+ /**
1595
+ * <p>The text unit usage for the prompt attack check.</p>
1596
+ * @public
1597
+ */
1598
+ export interface GuardrailChecksPromptAttackUsage {
1599
+ /**
1600
+ * <p>The number of text units consumed by the prompt attack check.</p>
1601
+ * @public
1602
+ */
1603
+ textUnits: number | undefined;
1604
+ }
1605
+ /**
1606
+ * <p>The text unit usage for the sensitive information check.</p>
1607
+ * @public
1608
+ */
1609
+ export interface GuardrailChecksSensitiveInformationUsage {
1610
+ /**
1611
+ * <p>The number of text units consumed by the sensitive information check.</p>
1612
+ * @public
1613
+ */
1614
+ textUnits: number | undefined;
1615
+ }
1616
+ /**
1617
+ * <p>The text unit usage for the guardrail checks evaluation, organized by check type.</p>
1618
+ * @public
1619
+ */
1620
+ export interface GuardrailChecksUsageResults {
1621
+ /**
1622
+ * <p>The text unit usage for the content filter check.</p>
1623
+ * @public
1624
+ */
1625
+ contentFilter?: GuardrailChecksContentFilterUsage | undefined;
1626
+ /**
1627
+ * <p>The text unit usage for the prompt attack check.</p>
1628
+ * @public
1629
+ */
1630
+ promptAttack?: GuardrailChecksPromptAttackUsage | undefined;
1631
+ /**
1632
+ * <p>The text unit usage for the sensitive information check.</p>
1633
+ * @public
1634
+ */
1635
+ sensitiveInformation?: GuardrailChecksSensitiveInformationUsage | undefined;
1636
+ }
1637
+ /**
1638
+ * @public
1639
+ */
1640
+ export interface InvokeGuardrailChecksResponse {
1641
+ /**
1642
+ * <p>The per-check results containing findings from the guardrail evaluation.</p>
1643
+ * @public
1644
+ */
1645
+ results: GuardrailChecksResults | undefined;
1646
+ /**
1647
+ * <p>The per-check text unit consumption for the guardrail evaluation.</p>
1648
+ * @public
1649
+ */
1650
+ usage: GuardrailChecksUsageResults | undefined;
1651
+ }
1305
1652
  /**
1306
1653
  * <p>Configuration information for a guardrail that you use with the <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_Converse.html">Converse</a> operation.</p>
1307
1654
  * @public
@@ -74,6 +74,25 @@ export declare var GuardrailAutomatedReasoningTranslation$: StaticStructureSchem
74
74
  export declare var GuardrailAutomatedReasoningTranslationAmbiguousFinding$: StaticStructureSchema;
75
75
  export declare var GuardrailAutomatedReasoningTranslationOption$: StaticStructureSchema;
76
76
  export declare var GuardrailAutomatedReasoningValidFinding$: StaticStructureSchema;
77
+ export declare var GuardrailChecksConfig$: StaticStructureSchema;
78
+ export declare var GuardrailChecksContentFilterCategoryConfig$: StaticStructureSchema;
79
+ export declare var GuardrailChecksContentFilterConfig$: StaticStructureSchema;
80
+ export declare var GuardrailChecksContentFilterResult$: StaticStructureSchema;
81
+ export declare var GuardrailChecksContentFilterResultEntry$: StaticStructureSchema;
82
+ export declare var GuardrailChecksContentFilterUsage$: StaticStructureSchema;
83
+ export declare var GuardrailChecksMessage$: StaticStructureSchema;
84
+ export declare var GuardrailChecksPromptAttackCategoryConfig$: StaticStructureSchema;
85
+ export declare var GuardrailChecksPromptAttackConfig$: StaticStructureSchema;
86
+ export declare var GuardrailChecksPromptAttackResult$: StaticStructureSchema;
87
+ export declare var GuardrailChecksPromptAttackResultEntry$: StaticStructureSchema;
88
+ export declare var GuardrailChecksPromptAttackUsage$: StaticStructureSchema;
89
+ export declare var GuardrailChecksResults$: StaticStructureSchema;
90
+ export declare var GuardrailChecksSensitiveInformationConfig$: StaticStructureSchema;
91
+ export declare var GuardrailChecksSensitiveInformationEntityConfig$: StaticStructureSchema;
92
+ export declare var GuardrailChecksSensitiveInformationResult$: StaticStructureSchema;
93
+ export declare var GuardrailChecksSensitiveInformationResultEntry$: StaticStructureSchema;
94
+ export declare var GuardrailChecksSensitiveInformationUsage$: StaticStructureSchema;
95
+ export declare var GuardrailChecksUsageResults$: StaticStructureSchema;
77
96
  export declare var GuardrailConfiguration$: StaticStructureSchema;
78
97
  export declare var GuardrailContentFilter$: StaticStructureSchema;
79
98
  export declare var GuardrailContentPolicyAssessment$: StaticStructureSchema;
@@ -103,6 +122,8 @@ export declare var ImageBlock$: StaticStructureSchema;
103
122
  export declare var ImageBlockDelta$: StaticStructureSchema;
104
123
  export declare var ImageBlockStart$: StaticStructureSchema;
105
124
  export declare var InferenceConfiguration$: StaticStructureSchema;
125
+ export declare var InvokeGuardrailChecksRequest$: StaticStructureSchema;
126
+ export declare var InvokeGuardrailChecksResponse$: StaticStructureSchema;
106
127
  export declare var InvokeModelRequest$: StaticStructureSchema;
107
128
  export declare var InvokeModelResponse$: StaticStructureSchema;
108
129
  export declare var InvokeModelTokensRequest$: StaticStructureSchema;
@@ -156,6 +177,7 @@ export declare var CountTokensInput$: StaticUnionSchema;
156
177
  export declare var DocumentContentBlock$: StaticUnionSchema;
157
178
  export declare var DocumentSource$: StaticUnionSchema;
158
179
  export declare var GuardrailAutomatedReasoningFinding$: StaticUnionSchema;
180
+ export declare var GuardrailChecksContentBlock$: StaticUnionSchema;
159
181
  export declare var GuardrailContentBlock$: StaticUnionSchema;
160
182
  export declare var GuardrailConverseContentBlock$: StaticUnionSchema;
161
183
  export declare var GuardrailConverseImageSource$: StaticUnionSchema;
@@ -180,6 +202,7 @@ export declare var Converse$: StaticOperationSchema;
180
202
  export declare var ConverseStream$: StaticOperationSchema;
181
203
  export declare var CountTokens$: StaticOperationSchema;
182
204
  export declare var GetAsyncInvoke$: StaticOperationSchema;
205
+ export declare var InvokeGuardrailChecks$: StaticOperationSchema;
183
206
  export declare var InvokeModel$: StaticOperationSchema;
184
207
  export declare var InvokeModelWithBidirectionalStream$: StaticOperationSchema;
185
208
  export declare var InvokeModelWithResponseStream$: StaticOperationSchema;