From 4d9c7a12e3b68a83156aa7dd063183cae1c11ed2 Mon Sep 17 00:00:00 2001
From: awstools
You can't create a resource policy statement that allows * cross-account access.
+ *You need to add the CreateResourcePolicy
or UpdateResourcePolicy
+ * action to the bot role in order to call the API.
You need to add the DeleteResourcePolicy
or UpdateResourcePolicy
+ * action to the bot role in order to call the API.
The details on the Bedrock guardrail configuration.
+ * @public + */ +export interface BedrockGuardrailConfiguration { + /** + *The unique guardrail id for the Bedrock guardrail configuration.
+ * @public + */ + identifier: string | undefined; + + /** + *The guardrail version for the Bedrock guardrail configuration.
+ * @public + */ + version: string | undefined; +} + +/** + *The exact response fields given by the Bedrock knowledge store.
+ * @public + */ +export interface BedrockKnowledgeStoreExactResponseFields { + /** + *The answer field used for an exact response from Bedrock Knowledge Store.
+ * @public + */ + answerField?: string; +} + /** *Contains details about the configuration of a Amazon Bedrock knowledge base.
* @public */ export interface BedrockKnowledgeStoreConfiguration { /** - *The ARN of the knowledge base used.
+ *The base ARN of the knowledge base used.
* @public */ bedrockKnowledgeBaseArn: string | undefined; + + /** + *Specifies whether to return an exact response, or to return an answer generated by the model, using the fields you specify from the database.
+ * @public + */ + exactResponse?: boolean; + + /** + *Contains the names of the fields used for an exact response to the user.
+ * @public + */ + exactResponseFields?: BedrockKnowledgeStoreExactResponseFields; } +/** + * @public + * @enum + */ +export const BedrockTraceStatus = { + DISABLED: "DISABLED", + ENABLED: "ENABLED", +} as const; + +/** + * @public + */ +export type BedrockTraceStatus = (typeof BedrockTraceStatus)[keyof typeof BedrockTraceStatus]; + /** *Contains information about the Amazon Bedrock model used to interpret the prompt used in descriptive bot building.
* @public @@ -2959,6 +3015,24 @@ export interface BedrockModelSpecification { * @public */ modelArn: string | undefined; + + /** + *The guardrail configuration in the Bedrock model specification details.
+ * @public + */ + guardrail?: BedrockGuardrailConfiguration; + + /** + *The Bedrock trace status in the Bedrock model specification details.
+ * @public + */ + traceStatus?: BedrockTraceStatus; + + /** + *The custom prompt used in the Bedrock model specification details.
+ * @public + */ + customPrompt?: string; } /** @@ -8128,185 +8202,6 @@ export interface DescribeBotLocaleRequest { localeId: string | undefined; } -/** - * @public - */ -export interface DescribeBotLocaleResponse { - /** - *The identifier of the bot associated with the locale.
- * @public - */ - botId?: string; - - /** - *The version of the bot associated with the - * locale.
- * @public - */ - botVersion?: string; - - /** - *The unique identifier of the described locale.
- * @public - */ - localeId?: string; - - /** - *The name of the locale.
- * @public - */ - localeName?: string; - - /** - *The description of the locale.
- * @public - */ - description?: string; - - /** - *The confidence threshold where Amazon Lex inserts the
- * AMAZON.FallbackIntent
and
- * AMAZON.KendraSearchIntent
intents in the list of
- * possible intents for an utterance.
The Amazon Polly voice Amazon Lex uses for voice interaction with the - * user.
- * @public - */ - voiceSettings?: VoiceSettings; - - /** - *The number of intents defined for the locale.
- * @public - */ - intentsCount?: number; - - /** - *The number of slot types defined for the locale.
- * @public - */ - slotTypesCount?: number; - - /** - *The status of the bot. If the status is Failed
, the
- * reasons for the failure are listed in the failureReasons
- * field.
if botLocaleStatus
is Failed
, Amazon Lex
- * explains why it failed to build the bot.
The date and time that the locale was created.
- * @public - */ - creationDateTime?: Date; - - /** - *The date and time that the locale was last updated.
- * @public - */ - lastUpdatedDateTime?: Date; - - /** - *The date and time that the locale was last submitted for - * building.
- * @public - */ - lastBuildSubmittedDateTime?: Date; - - /** - *History of changes, such as when a locale is used in an alias, that - * have taken place for the locale.
- * @public - */ - botLocaleHistoryEvents?: BotLocaleHistoryEvent[]; - - /** - *Recommended actions to take to resolve an error in the
- * failureReasons
field.
Contains settings for Amazon Bedrock's generative AI features for your bot locale.
- * @public - */ - generativeAISettings?: GenerativeAISettings; -} - -/** - * @public - */ -export interface DescribeBotRecommendationRequest { - /** - *The unique identifier of the bot associated with the bot - * recommendation.
- * @public - */ - botId: string | undefined; - - /** - *The version of the bot associated with the bot - * recommendation.
- * @public - */ - botVersion: string | undefined; - - /** - *The identifier of the language and locale of the bot recommendation - * to describe. The string must match one of the supported locales. For - * more information, see Supported languages.
- * @public - */ - localeId: string | undefined; - - /** - *The identifier of the bot recommendation to describe.
- * @public - */ - botRecommendationId: string | undefined; -} - -/** - *The object representing the passwords that were used to encrypt the - * data related to the bot recommendation, as well as the KMS key ARN used - * to encrypt the associated metadata.
- * @public - */ -export interface EncryptionSetting { - /** - *The KMS key ARN used to encrypt the metadata associated with the bot - * recommendation.
- * @public - */ - kmsKeyArn?: string; - - /** - *The password used to encrypt the recommended bot recommendation - * file.
- * @public - */ - botLocaleExportPassword?: string; - - /** - *The password used to encrypt the associated transcript file.
- * @public - */ - associatedTranscriptsPassword?: string; -} - /** * @internal */ @@ -8314,12 +8209,3 @@ export const CreateExportRequestFilterSensitiveLog = (obj: CreateExportRequest): ...obj, ...(obj.filePassword && { filePassword: SENSITIVE_STRING }), }); - -/** - * @internal - */ -export const EncryptionSettingFilterSensitiveLog = (obj: EncryptionSetting): any => ({ - ...obj, - ...(obj.botLocaleExportPassword && { botLocaleExportPassword: SENSITIVE_STRING }), - ...(obj.associatedTranscriptsPassword && { associatedTranscriptsPassword: SENSITIVE_STRING }), -}); diff --git a/clients/client-lex-models-v2/src/models/models_1.ts b/clients/client-lex-models-v2/src/models/models_1.ts index 4b5be55298418..0153a9c4b8010 100644 --- a/clients/client-lex-models-v2/src/models/models_1.ts +++ b/clients/client-lex-models-v2/src/models/models_1.ts @@ -42,6 +42,7 @@ import { BotFilter, BotImportSpecification, BotLocaleFilter, + BotLocaleHistoryEvent, BotLocaleImportSpecification, BotLocaleSortBy, BotLocaleStatus, @@ -80,8 +81,6 @@ import { DialogAction, DialogCodeHookSettings, ElicitationCodeHookInvocationSetting, - EncryptionSetting, - EncryptionSettingFilterSensitiveLog, ExecutionErrorDetails, ExportResourceSpecification, ExportStatus, @@ -117,6 +116,185 @@ import { WaitAndContinueSpecification, } from "./models_0"; +/** + * @public + */ +export interface DescribeBotLocaleResponse { + /** + *The identifier of the bot associated with the locale.
+ * @public + */ + botId?: string; + + /** + *The version of the bot associated with the + * locale.
+ * @public + */ + botVersion?: string; + + /** + *The unique identifier of the described locale.
+ * @public + */ + localeId?: string; + + /** + *The name of the locale.
+ * @public + */ + localeName?: string; + + /** + *The description of the locale.
+ * @public + */ + description?: string; + + /** + *The confidence threshold where Amazon Lex inserts the
+ * AMAZON.FallbackIntent
and
+ * AMAZON.KendraSearchIntent
intents in the list of
+ * possible intents for an utterance.
The Amazon Polly voice Amazon Lex uses for voice interaction with the + * user.
+ * @public + */ + voiceSettings?: VoiceSettings; + + /** + *The number of intents defined for the locale.
+ * @public + */ + intentsCount?: number; + + /** + *The number of slot types defined for the locale.
+ * @public + */ + slotTypesCount?: number; + + /** + *The status of the bot. If the status is Failed
, the
+ * reasons for the failure are listed in the failureReasons
+ * field.
if botLocaleStatus
is Failed
, Amazon Lex
+ * explains why it failed to build the bot.
The date and time that the locale was created.
+ * @public + */ + creationDateTime?: Date; + + /** + *The date and time that the locale was last updated.
+ * @public + */ + lastUpdatedDateTime?: Date; + + /** + *The date and time that the locale was last submitted for + * building.
+ * @public + */ + lastBuildSubmittedDateTime?: Date; + + /** + *History of changes, such as when a locale is used in an alias, that + * have taken place for the locale.
+ * @public + */ + botLocaleHistoryEvents?: BotLocaleHistoryEvent[]; + + /** + *Recommended actions to take to resolve an error in the
+ * failureReasons
field.
Contains settings for Amazon Bedrock's generative AI features for your bot locale.
+ * @public + */ + generativeAISettings?: GenerativeAISettings; +} + +/** + * @public + */ +export interface DescribeBotRecommendationRequest { + /** + *The unique identifier of the bot associated with the bot + * recommendation.
+ * @public + */ + botId: string | undefined; + + /** + *The version of the bot associated with the bot + * recommendation.
+ * @public + */ + botVersion: string | undefined; + + /** + *The identifier of the language and locale of the bot recommendation + * to describe. The string must match one of the supported locales. For + * more information, see Supported languages.
+ * @public + */ + localeId: string | undefined; + + /** + *The identifier of the bot recommendation to describe.
+ * @public + */ + botRecommendationId: string | undefined; +} + +/** + *The object representing the passwords that were used to encrypt the + * data related to the bot recommendation, as well as the KMS key ARN used + * to encrypt the associated metadata.
+ * @public + */ +export interface EncryptionSetting { + /** + *The KMS key ARN used to encrypt the metadata associated with the bot + * recommendation.
+ * @public + */ + kmsKeyArn?: string; + + /** + *The password used to encrypt the recommended bot recommendation + * file.
+ * @public + */ + botLocaleExportPassword?: string; + + /** + *The password used to encrypt the associated transcript file.
+ * @public + */ + associatedTranscriptsPassword?: string; +} + /** *The object that contains a path format that will be applied when * Amazon Lex reads the transcript file in the bucket you provide. Specify this @@ -9942,6 +10120,15 @@ export interface UpdateIntentResponse { qnAIntentConfiguration?: QnAIntentConfiguration; } +/** + * @internal + */ +export const EncryptionSettingFilterSensitiveLog = (obj: EncryptionSetting): any => ({ + ...obj, + ...(obj.botLocaleExportPassword && { botLocaleExportPassword: SENSITIVE_STRING }), + ...(obj.associatedTranscriptsPassword && { associatedTranscriptsPassword: SENSITIVE_STRING }), +}); + /** * @internal */ diff --git a/clients/client-lex-models-v2/src/protocols/Aws_restJson1.ts b/clients/client-lex-models-v2/src/protocols/Aws_restJson1.ts index 95b476312ba16..e1fb757f7b924 100644 --- a/clients/client-lex-models-v2/src/protocols/Aws_restJson1.ts +++ b/clients/client-lex-models-v2/src/protocols/Aws_restJson1.ts @@ -280,7 +280,9 @@ import { AudioLogDestination, AudioLogSetting, AudioSpecification, + BedrockGuardrailConfiguration, BedrockKnowledgeStoreConfiguration, + BedrockKnowledgeStoreExactResponseFields, BedrockModelSpecification, BotAliasHistoryEvent, BotAliasLocaleSettings, @@ -332,7 +334,6 @@ import { DialogCodeHookSettings, DTMFSpecification, ElicitationCodeHookInvocationSetting, - EncryptionSetting, ExactResponseFields, ExportResourceSpecification, ExternalSourceSetting, @@ -402,6 +403,7 @@ import { DefaultConditionalBranch, DialogCodeHookInvocationSetting, DialogState, + EncryptionSetting, ExportFilter, ExportSortBy, ExportSummary, @@ -5772,8 +5774,12 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont // se_AudioSpecification omitted. +// se_BedrockGuardrailConfiguration omitted. + // se_BedrockKnowledgeStoreConfiguration omitted. +// se_BedrockKnowledgeStoreExactResponseFields omitted. + // se_BedrockModelSpecification omitted. // se_BotAliasLocaleSettings omitted. @@ -6726,8 +6732,12 @@ const de_AnalyticsUtteranceResults = (output: any, context: __SerdeContext): Ana // de_AudioSpecification omitted. +// de_BedrockGuardrailConfiguration omitted. + // de_BedrockKnowledgeStoreConfiguration omitted. +// de_BedrockKnowledgeStoreExactResponseFields omitted. + // de_BedrockModelSpecification omitted. /** diff --git a/codegen/sdk-codegen/aws-models/lex-models-v2.json b/codegen/sdk-codegen/aws-models/lex-models-v2.json index 71d919449eb1d..450bd58661db9 100644 --- a/codegen/sdk-codegen/aws-models/lex-models-v2.json +++ b/codegen/sdk-codegen/aws-models/lex-models-v2.json @@ -2629,6 +2629,44 @@ "smithy.api#output": {} } }, + "com.amazonaws.lexmodelsv2#BedrockGuardrailConfiguration": { + "type": "structure", + "members": { + "identifier": { + "target": "com.amazonaws.lexmodelsv2#BedrockGuardrailIdentifier", + "traits": { + "smithy.api#documentation": "
The unique guardrail id for the Bedrock guardrail configuration.
", + "smithy.api#required": {} + } + }, + "version": { + "target": "com.amazonaws.lexmodelsv2#BedrockGuardrailVersion", + "traits": { + "smithy.api#documentation": "The guardrail version for the Bedrock guardrail configuration.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "The details on the Bedrock guardrail configuration.
" + } + }, + "com.amazonaws.lexmodelsv2#BedrockGuardrailIdentifier": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 2048 + }, + "smithy.api#pattern": "^(([a-z0-9]+)|(arn:aws(-[^:]+)?:bedrock:[a-z0-9-]{1,20}:[0-9]{12}:guardrail/[a-z0-9]+))$" + } + }, + "com.amazonaws.lexmodelsv2#BedrockGuardrailVersion": { + "type": "string", + "traits": { + "smithy.api#pattern": "^(([1-9][0-9]{0,7})|(DRAFT))$" + } + }, "com.amazonaws.lexmodelsv2#BedrockKnowledgeBaseArn": { "type": "string", "traits": { @@ -2645,21 +2683,57 @@ "bedrockKnowledgeBaseArn": { "target": "com.amazonaws.lexmodelsv2#BedrockKnowledgeBaseArn", "traits": { - "smithy.api#documentation": "The ARN of the knowledge base used.
", + "smithy.api#documentation": "The base ARN of the knowledge base used.
", "smithy.api#required": {} } + }, + "exactResponse": { + "target": "com.amazonaws.lexmodelsv2#Boolean", + "traits": { + "smithy.api#default": false, + "smithy.api#documentation": "Specifies whether to return an exact response, or to return an answer generated by the model, using the fields you specify from the database.
" + } + }, + "exactResponseFields": { + "target": "com.amazonaws.lexmodelsv2#BedrockKnowledgeStoreExactResponseFields", + "traits": { + "smithy.api#documentation": "Contains the names of the fields used for an exact response to the user.
" + } } }, "traits": { "smithy.api#documentation": "Contains details about the configuration of a Amazon Bedrock knowledge base.
" } }, + "com.amazonaws.lexmodelsv2#BedrockKnowledgeStoreExactResponseFields": { + "type": "structure", + "members": { + "answerField": { + "target": "com.amazonaws.lexmodelsv2#AnswerField", + "traits": { + "smithy.api#documentation": "The answer field used for an exact response from Bedrock Knowledge Store.
" + } + } + }, + "traits": { + "smithy.api#documentation": "The exact response fields given by the Bedrock knowledge store.
" + } + }, "com.amazonaws.lexmodelsv2#BedrockModelArn": { "type": "string", "traits": { "smithy.api#pattern": "^arn:aws(-[^:]+)?:bedrock:[a-z0-9-]{1,20}::foundation-model\\/[a-z0-9-]{1,63}[.]{1}([a-z0-9-]{1,63}[.]){0,2}[a-z0-9-]{1,63}([:][a-z0-9-]{1,63}){0,2}$" } }, + "com.amazonaws.lexmodelsv2#BedrockModelCustomPrompt": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 4000 + } + } + }, "com.amazonaws.lexmodelsv2#BedrockModelSpecification": { "type": "structure", "members": { @@ -2669,12 +2743,47 @@ "smithy.api#documentation": "The ARN of the foundation model used in descriptive bot building.
", "smithy.api#required": {} } + }, + "guardrail": { + "target": "com.amazonaws.lexmodelsv2#BedrockGuardrailConfiguration", + "traits": { + "smithy.api#documentation": "The guardrail configuration in the Bedrock model specification details.
" + } + }, + "traceStatus": { + "target": "com.amazonaws.lexmodelsv2#BedrockTraceStatus", + "traits": { + "smithy.api#documentation": "The Bedrock trace status in the Bedrock model specification details.
" + } + }, + "customPrompt": { + "target": "com.amazonaws.lexmodelsv2#BedrockModelCustomPrompt", + "traits": { + "smithy.api#documentation": "The custom prompt used in the Bedrock model specification details.
" + } } }, "traits": { "smithy.api#documentation": "Contains information about the Amazon Bedrock model used to interpret the prompt used in descriptive bot building.
" } }, + "com.amazonaws.lexmodelsv2#BedrockTraceStatus": { + "type": "enum", + "members": { + "ENABLED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ENABLED" + } + }, + "DISABLED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DISABLED" + } + } + } + }, "com.amazonaws.lexmodelsv2#Boolean": { "type": "boolean", "traits": { @@ -6154,7 +6263,7 @@ } ], "traits": { - "smithy.api#documentation": "Adds a new resource policy statement to a bot or bot alias. If a\n resource policy exists, the statement is added to the current resource\n policy. If a policy doesn't exist, a new policy is created.
\nYou can't create a resource policy statement that allows\n cross-account access.
", + "smithy.api#documentation": "Adds a new resource policy statement to a bot or bot alias. If a\n resource policy exists, the statement is added to the current resource\n policy. If a policy doesn't exist, a new policy is created.
\nYou can't create a resource policy statement that allows\n cross-account access.
\nYou need to add the CreateResourcePolicy
or UpdateResourcePolicy
\n action to the bot role in order to call the API.
Deletes a policy statement from a resource policy. If you delete the\n last statement from a policy, the policy is deleted. If you specify a\n statement ID that doesn't exist in the policy, or if the bot or bot\n alias doesn't have a policy attached, Amazon Lex returns an\n exception.
", + "smithy.api#documentation": "Deletes a policy statement from a resource policy. If you delete the\n last statement from a policy, the policy is deleted. If you specify a\n statement ID that doesn't exist in the policy, or if the bot or bot\n alias doesn't have a policy attached, Amazon Lex returns an\n exception.
\nYou need to add the DeleteResourcePolicy
or UpdateResourcePolicy
\n action to the bot role in order to call the API.