Skip to content

Commit

Permalink
feat(client-mailmanager): Added new "DeliverToQBusiness" rule action …
Browse files Browse the repository at this point in the history
…to MailManager RulesSet for ingesting email data into Amazon Q Business customer applications
  • Loading branch information
awstools committed Nov 22, 2024
1 parent dbe3f07 commit 048d165
Show file tree
Hide file tree
Showing 6 changed files with 150 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
* },
* },
* ],
* },
Expand Down
6 changes: 6 additions & 0 deletions clients/client-mailmanager/src/commands/GetRuleSetCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
* // },
* // },
* // ],
* // },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
* },
* },
* ],
* },
Expand Down
66 changes: 66 additions & 0 deletions clients/client-mailmanager/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1421,6 +1421,41 @@ export interface DeliverToMailboxAction {
RoleArn: string | undefined;
}

/**
* <p>The action to deliver incoming emails to an Amazon Q Business application for indexing.</p>
* @public
*/
export interface DeliverToQBusinessAction {
/**
* <p>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.</p>
* @public
*/
ActionFailurePolicy?: ActionFailurePolicy | undefined;

/**
* <p>The unique identifier of the Amazon Q Business application instance where the email
* content will be delivered.</p>
* @public
*/
ApplicationId: string | undefined;

/**
* <p>The identifier of the knowledge base index within the Amazon Q Business application
* where the email content will be stored and indexed.</p>
* @public
*/
IndexId: string | undefined;

/**
* <p>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.</p>
* @public
*/
RoleArn: string | undefined;
}

/**
* <p>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
Expand Down Expand Up @@ -1552,6 +1587,7 @@ export type RuleAction =
| RuleAction.AddHeaderMember
| RuleAction.ArchiveMember
| RuleAction.DeliverToMailboxMember
| RuleAction.DeliverToQBusinessMember
| RuleAction.DropMember
| RuleAction.RelayMember
| RuleAction.ReplaceRecipientMember
Expand All @@ -1576,6 +1612,7 @@ export namespace RuleAction {
AddHeader?: never;
ReplaceRecipient?: never;
DeliverToMailbox?: never;
DeliverToQBusiness?: never;
$unknown?: never;
}

Expand All @@ -1592,6 +1629,7 @@ export namespace RuleAction {
AddHeader?: never;
ReplaceRecipient?: never;
DeliverToMailbox?: never;
DeliverToQBusiness?: never;
$unknown?: never;
}

Expand All @@ -1609,6 +1647,7 @@ export namespace RuleAction {
AddHeader?: never;
ReplaceRecipient?: never;
DeliverToMailbox?: never;
DeliverToQBusiness?: never;
$unknown?: never;
}

Expand All @@ -1625,6 +1664,7 @@ export namespace RuleAction {
AddHeader?: never;
ReplaceRecipient?: never;
DeliverToMailbox?: never;
DeliverToQBusiness?: never;
$unknown?: never;
}

Expand All @@ -1641,6 +1681,7 @@ export namespace RuleAction {
AddHeader?: never;
ReplaceRecipient?: never;
DeliverToMailbox?: never;
DeliverToQBusiness?: never;
$unknown?: never;
}

Expand All @@ -1657,6 +1698,7 @@ export namespace RuleAction {
AddHeader: AddHeaderAction;
ReplaceRecipient?: never;
DeliverToMailbox?: never;
DeliverToQBusiness?: never;
$unknown?: never;
}

Expand All @@ -1674,6 +1716,7 @@ export namespace RuleAction {
AddHeader?: never;
ReplaceRecipient: ReplaceRecipientAction;
DeliverToMailbox?: never;
DeliverToQBusiness?: never;
$unknown?: never;
}

Expand All @@ -1690,6 +1733,25 @@ export namespace RuleAction {
AddHeader?: never;
ReplaceRecipient?: never;
DeliverToMailbox: DeliverToMailboxAction;
DeliverToQBusiness?: never;
$unknown?: never;
}

/**
* <p>This action delivers an email to an Amazon Q Business application for ingestion into
* its knowledge base.</p>
* @public
*/
export interface DeliverToQBusinessMember {
Drop?: never;
Relay?: never;
Archive?: never;
WriteToS3?: never;
Send?: never;
AddHeader?: never;
ReplaceRecipient?: never;
DeliverToMailbox?: never;
DeliverToQBusiness: DeliverToQBusinessAction;
$unknown?: never;
}

Expand All @@ -1705,6 +1767,7 @@ export namespace RuleAction {
AddHeader?: never;
ReplaceRecipient?: never;
DeliverToMailbox?: never;
DeliverToQBusiness?: never;
$unknown: [string, any];
}

Expand All @@ -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;
}

Expand All @@ -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]);
};
}
Expand Down Expand Up @@ -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" };
};

Expand Down
5 changes: 5 additions & 0 deletions clients/client-mailmanager/src/protocols/Aws_json1_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ import {
DeleteRuleSetRequest,
DeleteTrafficPolicyRequest,
DeliverToMailboxAction,
DeliverToQBusinessAction,
DropAction,
ExportDestinationConfiguration,
ExportStatus,
Expand Down Expand Up @@ -2059,6 +2060,8 @@ const se_CreateTrafficPolicyRequest = (input: CreateTrafficPolicyRequest, contex

// se_DeliverToMailboxAction omitted.

// se_DeliverToQBusinessAction omitted.

// se_DropAction omitted.

// se_ExportDestinationConfiguration omitted.
Expand Down Expand Up @@ -2439,6 +2442,8 @@ const de_ArchivesList = (output: any, context: __SerdeContext): Archive[] => {

// de_DeliverToMailboxAction omitted.

// de_DeliverToQBusinessAction omitted.

// de_DropAction omitted.

// de_EmailReceivedHeadersList omitted.
Expand Down
61 changes: 61 additions & 0 deletions codegen/sdk-codegen/aws-models/mailmanager.json
Original file line number Diff line number Diff line change
Expand Up @@ -1727,6 +1727,41 @@
"smithy.api#documentation": "<p>This action to delivers an email to a mailbox.</p>"
}
},
"com.amazonaws.mailmanager#DeliverToQBusinessAction": {
"type": "structure",
"members": {
"ActionFailurePolicy": {
"target": "com.amazonaws.mailmanager#ActionFailurePolicy",
"traits": {
"smithy.api#documentation": "<p>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.</p>"
}
},
"ApplicationId": {
"target": "com.amazonaws.mailmanager#QBusinessApplicationId",
"traits": {
"smithy.api#documentation": "<p>The unique identifier of the Amazon Q Business application instance where the email\n content will be delivered.</p>",
"smithy.api#required": {}
}
},
"IndexId": {
"target": "com.amazonaws.mailmanager#QBusinessIndexId",
"traits": {
"smithy.api#documentation": "<p>The identifier of the knowledge base index within the Amazon Q Business application\n where the email content will be stored and indexed.</p>",
"smithy.api#required": {}
}
},
"RoleArn": {
"target": "com.amazonaws.mailmanager#IamRoleArn",
"traits": {
"smithy.api#documentation": "<p>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.</p>",
"smithy.api#required": {}
}
}
},
"traits": {
"smithy.api#documentation": "<p>The action to deliver incoming emails to an Amazon Q Business application for indexing.</p>"
}
},
"com.amazonaws.mailmanager#DropAction": {
"type": "structure",
"members": {},
Expand Down Expand Up @@ -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": {
Expand Down Expand Up @@ -5867,6 +5922,12 @@
"traits": {
"smithy.api#documentation": "<p>This action delivers an email to a WorkMail mailbox.</p>"
}
},
"DeliverToQBusiness": {
"target": "com.amazonaws.mailmanager#DeliverToQBusinessAction",
"traits": {
"smithy.api#documentation": "<p>This action delivers an email to an Amazon Q Business application for ingestion into\n its knowledge base.</p>"
}
}
},
"traits": {
Expand Down

0 comments on commit 048d165

Please sign in to comment.