From 048d16555e3f52534ead6efe9fe54c19881bd8f0 Mon Sep 17 00:00:00 2001 From: awstools Date: Fri, 22 Nov 2024 19:18:05 +0000 Subject: [PATCH] feat(client-mailmanager): Added new "DeliverToQBusiness" rule action to MailManager RulesSet for ingesting email data into Amazon Q Business customer applications --- .../src/commands/CreateRuleSetCommand.ts | 6 ++ .../src/commands/GetRuleSetCommand.ts | 6 ++ .../src/commands/UpdateRuleSetCommand.ts | 6 ++ .../client-mailmanager/src/models/models_0.ts | 66 +++++++++++++++++++ .../src/protocols/Aws_json1_0.ts | 5 ++ .../sdk-codegen/aws-models/mailmanager.json | 61 +++++++++++++++++ 6 files changed, 150 insertions(+) diff --git a/clients/client-mailmanager/src/commands/CreateRuleSetCommand.ts b/clients/client-mailmanager/src/commands/CreateRuleSetCommand.ts index d7b058603cbc..5e347b23f010 100644 --- a/clients/client-mailmanager/src/commands/CreateRuleSetCommand.ts +++ b/clients/client-mailmanager/src/commands/CreateRuleSetCommand.ts @@ -192,6 +192,12 @@ export interface CreateRuleSetCommandOutput extends CreateRuleSetResponse, __Met * MailboxArn: "STRING_VALUE", // required * RoleArn: "STRING_VALUE", // required * }, + * DeliverToQBusiness: { // DeliverToQBusinessAction + * ActionFailurePolicy: "CONTINUE" || "DROP", + * ApplicationId: "STRING_VALUE", // required + * IndexId: "STRING_VALUE", // required + * RoleArn: "STRING_VALUE", // required + * }, * }, * ], * }, diff --git a/clients/client-mailmanager/src/commands/GetRuleSetCommand.ts b/clients/client-mailmanager/src/commands/GetRuleSetCommand.ts index 7ac6773a480b..90aaebdeb8d2 100644 --- a/clients/client-mailmanager/src/commands/GetRuleSetCommand.ts +++ b/clients/client-mailmanager/src/commands/GetRuleSetCommand.ts @@ -196,6 +196,12 @@ export interface GetRuleSetCommandOutput extends GetRuleSetResponse, __MetadataB * // MailboxArn: "STRING_VALUE", // required * // RoleArn: "STRING_VALUE", // required * // }, + * // DeliverToQBusiness: { // DeliverToQBusinessAction + * // ActionFailurePolicy: "CONTINUE" || "DROP", + * // ApplicationId: "STRING_VALUE", // required + * // IndexId: "STRING_VALUE", // required + * // RoleArn: "STRING_VALUE", // required + * // }, * // }, * // ], * // }, diff --git a/clients/client-mailmanager/src/commands/UpdateRuleSetCommand.ts b/clients/client-mailmanager/src/commands/UpdateRuleSetCommand.ts index 02dd4b9c4160..10fa17dc2036 100644 --- a/clients/client-mailmanager/src/commands/UpdateRuleSetCommand.ts +++ b/clients/client-mailmanager/src/commands/UpdateRuleSetCommand.ts @@ -192,6 +192,12 @@ export interface UpdateRuleSetCommandOutput extends UpdateRuleSetResponse, __Met * MailboxArn: "STRING_VALUE", // required * RoleArn: "STRING_VALUE", // required * }, + * DeliverToQBusiness: { // DeliverToQBusinessAction + * ActionFailurePolicy: "CONTINUE" || "DROP", + * ApplicationId: "STRING_VALUE", // required + * IndexId: "STRING_VALUE", // required + * RoleArn: "STRING_VALUE", // required + * }, * }, * ], * }, diff --git a/clients/client-mailmanager/src/models/models_0.ts b/clients/client-mailmanager/src/models/models_0.ts index 547286388963..84af912d6808 100644 --- a/clients/client-mailmanager/src/models/models_0.ts +++ b/clients/client-mailmanager/src/models/models_0.ts @@ -1421,6 +1421,41 @@ export interface DeliverToMailboxAction { RoleArn: string | undefined; } +/** + *

The action to deliver incoming emails to an Amazon Q Business application for indexing.

+ * @public + */ +export interface DeliverToQBusinessAction { + /** + *

A policy that states what to do in the case of failure. The action will fail if there are + * configuration errors. For example, the specified application has been deleted or the role lacks + * necessary permissions to call the qbusiness:BatchPutDocument API.

+ * @public + */ + ActionFailurePolicy?: ActionFailurePolicy | undefined; + + /** + *

The unique identifier of the Amazon Q Business application instance where the email + * content will be delivered.

+ * @public + */ + ApplicationId: string | undefined; + + /** + *

The identifier of the knowledge base index within the Amazon Q Business application + * where the email content will be stored and indexed.

+ * @public + */ + IndexId: string | undefined; + + /** + *

The Amazon Resource Name (ARN) of the IAM Role to use while delivering to Amazon Q Business. This role must have access + * to the qbusiness:BatchPutDocument API for the given application and index.

+ * @public + */ + RoleArn: string | undefined; +} + /** *

This action causes processing to stop and the email to be dropped. If the action * applies only to certain recipients, only those recipients are dropped, and processing @@ -1552,6 +1587,7 @@ export type RuleAction = | RuleAction.AddHeaderMember | RuleAction.ArchiveMember | RuleAction.DeliverToMailboxMember + | RuleAction.DeliverToQBusinessMember | RuleAction.DropMember | RuleAction.RelayMember | RuleAction.ReplaceRecipientMember @@ -1576,6 +1612,7 @@ export namespace RuleAction { AddHeader?: never; ReplaceRecipient?: never; DeliverToMailbox?: never; + DeliverToQBusiness?: never; $unknown?: never; } @@ -1592,6 +1629,7 @@ export namespace RuleAction { AddHeader?: never; ReplaceRecipient?: never; DeliverToMailbox?: never; + DeliverToQBusiness?: never; $unknown?: never; } @@ -1609,6 +1647,7 @@ export namespace RuleAction { AddHeader?: never; ReplaceRecipient?: never; DeliverToMailbox?: never; + DeliverToQBusiness?: never; $unknown?: never; } @@ -1625,6 +1664,7 @@ export namespace RuleAction { AddHeader?: never; ReplaceRecipient?: never; DeliverToMailbox?: never; + DeliverToQBusiness?: never; $unknown?: never; } @@ -1641,6 +1681,7 @@ export namespace RuleAction { AddHeader?: never; ReplaceRecipient?: never; DeliverToMailbox?: never; + DeliverToQBusiness?: never; $unknown?: never; } @@ -1657,6 +1698,7 @@ export namespace RuleAction { AddHeader: AddHeaderAction; ReplaceRecipient?: never; DeliverToMailbox?: never; + DeliverToQBusiness?: never; $unknown?: never; } @@ -1674,6 +1716,7 @@ export namespace RuleAction { AddHeader?: never; ReplaceRecipient: ReplaceRecipientAction; DeliverToMailbox?: never; + DeliverToQBusiness?: never; $unknown?: never; } @@ -1690,6 +1733,25 @@ export namespace RuleAction { AddHeader?: never; ReplaceRecipient?: never; DeliverToMailbox: DeliverToMailboxAction; + DeliverToQBusiness?: never; + $unknown?: never; + } + + /** + *

This action delivers an email to an Amazon Q Business application for ingestion into + * its knowledge base.

+ * @public + */ + export interface DeliverToQBusinessMember { + Drop?: never; + Relay?: never; + Archive?: never; + WriteToS3?: never; + Send?: never; + AddHeader?: never; + ReplaceRecipient?: never; + DeliverToMailbox?: never; + DeliverToQBusiness: DeliverToQBusinessAction; $unknown?: never; } @@ -1705,6 +1767,7 @@ export namespace RuleAction { AddHeader?: never; ReplaceRecipient?: never; DeliverToMailbox?: never; + DeliverToQBusiness?: never; $unknown: [string, any]; } @@ -1717,6 +1780,7 @@ export namespace RuleAction { AddHeader: (value: AddHeaderAction) => T; ReplaceRecipient: (value: ReplaceRecipientAction) => T; DeliverToMailbox: (value: DeliverToMailboxAction) => T; + DeliverToQBusiness: (value: DeliverToQBusinessAction) => T; _: (name: string, value: any) => T; } @@ -1729,6 +1793,7 @@ export namespace RuleAction { if (value.AddHeader !== undefined) return visitor.AddHeader(value.AddHeader); if (value.ReplaceRecipient !== undefined) return visitor.ReplaceRecipient(value.ReplaceRecipient); if (value.DeliverToMailbox !== undefined) return visitor.DeliverToMailbox(value.DeliverToMailbox); + if (value.DeliverToQBusiness !== undefined) return visitor.DeliverToQBusiness(value.DeliverToQBusiness); return visitor._(value.$unknown[0], value.$unknown[1]); }; } @@ -4888,6 +4953,7 @@ export const RuleActionFilterSensitiveLog = (obj: RuleAction): any => { if (obj.ReplaceRecipient !== undefined) return { ReplaceRecipient: ReplaceRecipientActionFilterSensitiveLog(obj.ReplaceRecipient) }; if (obj.DeliverToMailbox !== undefined) return { DeliverToMailbox: obj.DeliverToMailbox }; + if (obj.DeliverToQBusiness !== undefined) return { DeliverToQBusiness: obj.DeliverToQBusiness }; if (obj.$unknown !== undefined) return { [obj.$unknown[0]]: "UNKNOWN" }; }; diff --git a/clients/client-mailmanager/src/protocols/Aws_json1_0.ts b/clients/client-mailmanager/src/protocols/Aws_json1_0.ts index 60f4533c252d..f44dbd68273d 100644 --- a/clients/client-mailmanager/src/protocols/Aws_json1_0.ts +++ b/clients/client-mailmanager/src/protocols/Aws_json1_0.ts @@ -150,6 +150,7 @@ import { DeleteRuleSetRequest, DeleteTrafficPolicyRequest, DeliverToMailboxAction, + DeliverToQBusinessAction, DropAction, ExportDestinationConfiguration, ExportStatus, @@ -2059,6 +2060,8 @@ const se_CreateTrafficPolicyRequest = (input: CreateTrafficPolicyRequest, contex // se_DeliverToMailboxAction omitted. +// se_DeliverToQBusinessAction omitted. + // se_DropAction omitted. // se_ExportDestinationConfiguration omitted. @@ -2439,6 +2442,8 @@ const de_ArchivesList = (output: any, context: __SerdeContext): Archive[] => { // de_DeliverToMailboxAction omitted. +// de_DeliverToQBusinessAction omitted. + // de_DropAction omitted. // de_EmailReceivedHeadersList omitted. diff --git a/codegen/sdk-codegen/aws-models/mailmanager.json b/codegen/sdk-codegen/aws-models/mailmanager.json index fa29fd342604..00e94466bf00 100644 --- a/codegen/sdk-codegen/aws-models/mailmanager.json +++ b/codegen/sdk-codegen/aws-models/mailmanager.json @@ -1727,6 +1727,41 @@ "smithy.api#documentation": "

This action to delivers an email to a mailbox.

" } }, + "com.amazonaws.mailmanager#DeliverToQBusinessAction": { + "type": "structure", + "members": { + "ActionFailurePolicy": { + "target": "com.amazonaws.mailmanager#ActionFailurePolicy", + "traits": { + "smithy.api#documentation": "

A policy that states what to do in the case of failure. The action will fail if there are\n configuration errors. For example, the specified application has been deleted or the role lacks\n necessary permissions to call the qbusiness:BatchPutDocument API.

" + } + }, + "ApplicationId": { + "target": "com.amazonaws.mailmanager#QBusinessApplicationId", + "traits": { + "smithy.api#documentation": "

The unique identifier of the Amazon Q Business application instance where the email\n content will be delivered.

", + "smithy.api#required": {} + } + }, + "IndexId": { + "target": "com.amazonaws.mailmanager#QBusinessIndexId", + "traits": { + "smithy.api#documentation": "

The identifier of the knowledge base index within the Amazon Q Business application\n where the email content will be stored and indexed.

", + "smithy.api#required": {} + } + }, + "RoleArn": { + "target": "com.amazonaws.mailmanager#IamRoleArn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the IAM Role to use while delivering to Amazon Q Business. This role must have access\n to the qbusiness:BatchPutDocument API for the given application and index.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

The action to deliver incoming emails to an Amazon Q Business application for indexing.

" + } + }, "com.amazonaws.mailmanager#DropAction": { "type": "structure", "members": {}, @@ -5333,6 +5368,26 @@ "target": "com.amazonaws.mailmanager#PolicyStatement" } }, + "com.amazonaws.mailmanager#QBusinessApplicationId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 36, + "max": 36 + }, + "smithy.api#pattern": "^[a-z0-9-]+$" + } + }, + "com.amazonaws.mailmanager#QBusinessIndexId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 36, + "max": 36 + }, + "smithy.api#pattern": "^[a-z0-9-]+$" + } + }, "com.amazonaws.mailmanager#Recipients": { "type": "list", "member": { @@ -5867,6 +5922,12 @@ "traits": { "smithy.api#documentation": "

This action delivers an email to a WorkMail mailbox.

" } + }, + "DeliverToQBusiness": { + "target": "com.amazonaws.mailmanager#DeliverToQBusinessAction", + "traits": { + "smithy.api#documentation": "

This action delivers an email to an Amazon Q Business application for ingestion into\n its knowledge base.

" + } } }, "traits": {