Skip to content

Commit 6197c7b

Browse files
author
awstools
committed
feat(client-qbusiness): Add support for anonymous user access for Q Business applications
1 parent 73c2247 commit 6197c7b

14 files changed

+399
-60
lines changed

clients/client-qbusiness/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,14 @@ CheckDocumentAccess
258258

259259
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qbusiness/command/CheckDocumentAccessCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/CheckDocumentAccessCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/CheckDocumentAccessCommandOutput/)
260260

261+
</details>
262+
<details>
263+
<summary>
264+
CreateAnonymousWebExperienceUrl
265+
</summary>
266+
267+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qbusiness/command/CreateAnonymousWebExperienceUrlCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/CreateAnonymousWebExperienceUrlCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qbusiness/Interface/CreateAnonymousWebExperienceUrlCommandOutput/)
268+
261269
</details>
262270
<details>
263271
<summary>

clients/client-qbusiness/src/QBusiness.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@ import {
2929
CheckDocumentAccessCommandInput,
3030
CheckDocumentAccessCommandOutput,
3131
} from "./commands/CheckDocumentAccessCommand";
32+
import {
33+
CreateAnonymousWebExperienceUrlCommand,
34+
CreateAnonymousWebExperienceUrlCommandInput,
35+
CreateAnonymousWebExperienceUrlCommandOutput,
36+
} from "./commands/CreateAnonymousWebExperienceUrlCommand";
3237
import {
3338
CreateApplicationCommand,
3439
CreateApplicationCommandInput,
@@ -308,6 +313,7 @@ const commands = {
308313
ChatCommand,
309314
ChatSyncCommand,
310315
CheckDocumentAccessCommand,
316+
CreateAnonymousWebExperienceUrlCommand,
311317
CreateApplicationCommand,
312318
CreateDataAccessorCommand,
313319
CreateDataSourceCommand,
@@ -483,6 +489,23 @@ export interface QBusiness {
483489
cb: (err: any, data?: CheckDocumentAccessCommandOutput) => void
484490
): void;
485491

492+
/**
493+
* @see {@link CreateAnonymousWebExperienceUrlCommand}
494+
*/
495+
createAnonymousWebExperienceUrl(
496+
args: CreateAnonymousWebExperienceUrlCommandInput,
497+
options?: __HttpHandlerOptions
498+
): Promise<CreateAnonymousWebExperienceUrlCommandOutput>;
499+
createAnonymousWebExperienceUrl(
500+
args: CreateAnonymousWebExperienceUrlCommandInput,
501+
cb: (err: any, data?: CreateAnonymousWebExperienceUrlCommandOutput) => void
502+
): void;
503+
createAnonymousWebExperienceUrl(
504+
args: CreateAnonymousWebExperienceUrlCommandInput,
505+
options: __HttpHandlerOptions,
506+
cb: (err: any, data?: CreateAnonymousWebExperienceUrlCommandOutput) => void
507+
): void;
508+
486509
/**
487510
* @see {@link CreateApplicationCommand}
488511
*/

clients/client-qbusiness/src/QBusinessClient.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,10 @@ import {
8181
CheckDocumentAccessCommandInput,
8282
CheckDocumentAccessCommandOutput,
8383
} from "./commands/CheckDocumentAccessCommand";
84+
import {
85+
CreateAnonymousWebExperienceUrlCommandInput,
86+
CreateAnonymousWebExperienceUrlCommandOutput,
87+
} from "./commands/CreateAnonymousWebExperienceUrlCommand";
8488
import { CreateApplicationCommandInput, CreateApplicationCommandOutput } from "./commands/CreateApplicationCommand";
8589
import { CreateDataAccessorCommandInput, CreateDataAccessorCommandOutput } from "./commands/CreateDataAccessorCommand";
8690
import { CreateDataSourceCommandInput, CreateDataSourceCommandOutput } from "./commands/CreateDataSourceCommand";
@@ -214,6 +218,7 @@ export type ServiceInputTypes =
214218
| ChatCommandInput
215219
| ChatSyncCommandInput
216220
| CheckDocumentAccessCommandInput
221+
| CreateAnonymousWebExperienceUrlCommandInput
217222
| CreateApplicationCommandInput
218223
| CreateDataAccessorCommandInput
219224
| CreateDataSourceCommandInput
@@ -295,6 +300,7 @@ export type ServiceOutputTypes =
295300
| ChatCommandOutput
296301
| ChatSyncCommandOutput
297302
| CheckDocumentAccessCommandOutput
303+
| CreateAnonymousWebExperienceUrlCommandOutput
298304
| CreateApplicationCommandOutput
299305
| CreateDataAccessorCommandOutput
300306
| CreateDataSourceCommandOutput
Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
// smithy-typescript generated code
2+
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
3+
import { getSerdePlugin } from "@smithy/middleware-serde";
4+
import { Command as $Command } from "@smithy/smithy-client";
5+
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
6+
7+
import { commonParams } from "../endpoint/EndpointParameters";
8+
import { CreateAnonymousWebExperienceUrlRequest, CreateAnonymousWebExperienceUrlResponse } from "../models/models_0";
9+
import {
10+
de_CreateAnonymousWebExperienceUrlCommand,
11+
se_CreateAnonymousWebExperienceUrlCommand,
12+
} from "../protocols/Aws_restJson1";
13+
import { QBusinessClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../QBusinessClient";
14+
15+
/**
16+
* @public
17+
*/
18+
export type { __MetadataBearer };
19+
export { $Command };
20+
/**
21+
* @public
22+
*
23+
* The input for {@link CreateAnonymousWebExperienceUrlCommand}.
24+
*/
25+
export interface CreateAnonymousWebExperienceUrlCommandInput extends CreateAnonymousWebExperienceUrlRequest {}
26+
/**
27+
* @public
28+
*
29+
* The output of {@link CreateAnonymousWebExperienceUrlCommand}.
30+
*/
31+
export interface CreateAnonymousWebExperienceUrlCommandOutput
32+
extends CreateAnonymousWebExperienceUrlResponse,
33+
__MetadataBearer {}
34+
35+
/**
36+
* <p>Creates a unique URL for anonymous Amazon Q Business web experience. This URL can only be used once and must be used within 5 minutes after it's generated.</p>
37+
* @example
38+
* Use a bare-bones client and the command you need to make an API call.
39+
* ```javascript
40+
* import { QBusinessClient, CreateAnonymousWebExperienceUrlCommand } from "@aws-sdk/client-qbusiness"; // ES Modules import
41+
* // const { QBusinessClient, CreateAnonymousWebExperienceUrlCommand } = require("@aws-sdk/client-qbusiness"); // CommonJS import
42+
* const client = new QBusinessClient(config);
43+
* const input = { // CreateAnonymousWebExperienceUrlRequest
44+
* applicationId: "STRING_VALUE", // required
45+
* webExperienceId: "STRING_VALUE", // required
46+
* sessionDurationInMinutes: Number("int"),
47+
* };
48+
* const command = new CreateAnonymousWebExperienceUrlCommand(input);
49+
* const response = await client.send(command);
50+
* // { // CreateAnonymousWebExperienceUrlResponse
51+
* // anonymousUrl: "STRING_VALUE",
52+
* // };
53+
*
54+
* ```
55+
*
56+
* @param CreateAnonymousWebExperienceUrlCommandInput - {@link CreateAnonymousWebExperienceUrlCommandInput}
57+
* @returns {@link CreateAnonymousWebExperienceUrlCommandOutput}
58+
* @see {@link CreateAnonymousWebExperienceUrlCommandInput} for command's `input` shape.
59+
* @see {@link CreateAnonymousWebExperienceUrlCommandOutput} for command's `response` shape.
60+
* @see {@link QBusinessClientResolvedConfig | config} for QBusinessClient's `config` shape.
61+
*
62+
* @throws {@link AccessDeniedException} (client fault)
63+
* <p> You don't have access to perform this action. Make sure you have the required permission policies and user accounts and try again.</p>
64+
*
65+
* @throws {@link InternalServerException} (server fault)
66+
* <p>An issue occurred with the internal server used for your Amazon Q Business service. Wait some minutes and try again, or contact <a href="http://aws.amazon.com/contact-us/">Support</a> for help.</p>
67+
*
68+
* @throws {@link ResourceNotFoundException} (client fault)
69+
* <p>The application or plugin resource you want to use doesn’t exist. Make sure you have provided the correct resource and try again.</p>
70+
*
71+
* @throws {@link ServiceQuotaExceededException} (client fault)
72+
* <p>You have exceeded the set limits for your Amazon Q Business service. </p>
73+
*
74+
* @throws {@link ThrottlingException} (client fault)
75+
* <p>The request was denied due to throttling. Reduce the number of requests and try again.</p>
76+
*
77+
* @throws {@link ValidationException} (client fault)
78+
* <p>The input doesn't meet the constraints set by the Amazon Q Business service. Provide the correct input and try again.</p>
79+
*
80+
* @throws {@link QBusinessServiceException}
81+
* <p>Base exception class for all service exceptions from QBusiness service.</p>
82+
*
83+
*
84+
* @public
85+
*/
86+
export class CreateAnonymousWebExperienceUrlCommand extends $Command
87+
.classBuilder<
88+
CreateAnonymousWebExperienceUrlCommandInput,
89+
CreateAnonymousWebExperienceUrlCommandOutput,
90+
QBusinessClientResolvedConfig,
91+
ServiceInputTypes,
92+
ServiceOutputTypes
93+
>()
94+
.ep(commonParams)
95+
.m(function (this: any, Command: any, cs: any, config: QBusinessClientResolvedConfig, o: any) {
96+
return [
97+
getSerdePlugin(config, this.serialize, this.deserialize),
98+
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
99+
];
100+
})
101+
.s("ExpertQ", "CreateAnonymousWebExperienceUrl", {})
102+
.n("QBusinessClient", "CreateAnonymousWebExperienceUrlCommand")
103+
.f(void 0, void 0)
104+
.ser(se_CreateAnonymousWebExperienceUrlCommand)
105+
.de(de_CreateAnonymousWebExperienceUrlCommand)
106+
.build() {
107+
/** @internal type navigation helper, not in runtime. */
108+
protected declare static __types: {
109+
api: {
110+
input: CreateAnonymousWebExperienceUrlRequest;
111+
output: CreateAnonymousWebExperienceUrlResponse;
112+
};
113+
sdk: {
114+
input: CreateAnonymousWebExperienceUrlCommandInput;
115+
output: CreateAnonymousWebExperienceUrlCommandOutput;
116+
};
117+
};
118+
}

clients/client-qbusiness/src/commands/CreateApplicationCommand.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export interface CreateApplicationCommandOutput extends CreateApplicationRespons
4242
* const input = { // CreateApplicationRequest
4343
* displayName: "STRING_VALUE", // required
4444
* roleArn: "STRING_VALUE",
45-
* identityType: "AWS_IAM_IDP_SAML" || "AWS_IAM_IDP_OIDC" || "AWS_IAM_IDC" || "AWS_QUICKSIGHT_IDP",
45+
* identityType: "AWS_IAM_IDP_SAML" || "AWS_IAM_IDP_OIDC" || "AWS_IAM_IDC" || "AWS_QUICKSIGHT_IDP" || "ANONYMOUS",
4646
* iamIdentityProviderArn: "STRING_VALUE",
4747
* identityCenterInstanceArn: "STRING_VALUE",
4848
* clientIdsForOIDC: [ // ClientIdsForOIDC

clients/client-qbusiness/src/commands/GetApplicationCommand.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ export interface GetApplicationCommandOutput extends GetApplicationResponse, __M
4848
* // displayName: "STRING_VALUE",
4949
* // applicationId: "STRING_VALUE",
5050
* // applicationArn: "STRING_VALUE",
51-
* // identityType: "AWS_IAM_IDP_SAML" || "AWS_IAM_IDP_OIDC" || "AWS_IAM_IDC" || "AWS_QUICKSIGHT_IDP",
51+
* // identityType: "AWS_IAM_IDP_SAML" || "AWS_IAM_IDP_OIDC" || "AWS_IAM_IDC" || "AWS_QUICKSIGHT_IDP" || "ANONYMOUS",
5252
* // iamIdentityProviderArn: "STRING_VALUE",
5353
* // identityCenterApplicationArn: "STRING_VALUE",
5454
* // roleArn: "STRING_VALUE",

clients/client-qbusiness/src/commands/ListApplicationsCommand.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export interface ListApplicationsCommandOutput extends ListApplicationsResponse,
5050
* // createdAt: new Date("TIMESTAMP"),
5151
* // updatedAt: new Date("TIMESTAMP"),
5252
* // status: "CREATING" || "ACTIVE" || "DELETING" || "FAILED" || "UPDATING",
53-
* // identityType: "AWS_IAM_IDP_SAML" || "AWS_IAM_IDP_OIDC" || "AWS_IAM_IDC" || "AWS_QUICKSIGHT_IDP",
53+
* // identityType: "AWS_IAM_IDP_SAML" || "AWS_IAM_IDP_OIDC" || "AWS_IAM_IDC" || "AWS_QUICKSIGHT_IDP" || "ANONYMOUS",
5454
* // quickSightConfiguration: { // QuickSightConfiguration
5555
* // clientNamespace: "STRING_VALUE", // required
5656
* // },

clients/client-qbusiness/src/commands/ListDataSourceSyncJobsCommand.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ import { Command as $Command } from "@smithy/smithy-client";
55
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
66

77
import { commonParams } from "../endpoint/EndpointParameters";
8-
import { ListDataSourceSyncJobsRequest, ListDataSourceSyncJobsResponse } from "../models/models_0";
8+
import { ListDataSourceSyncJobsRequest } from "../models/models_0";
9+
import { ListDataSourceSyncJobsResponse } from "../models/models_1";
910
import { de_ListDataSourceSyncJobsCommand, se_ListDataSourceSyncJobsCommand } from "../protocols/Aws_restJson1";
1011
import { QBusinessClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../QBusinessClient";
1112

clients/client-qbusiness/src/commands/ListDocumentsCommand.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ import { Command as $Command } from "@smithy/smithy-client";
55
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
66

77
import { commonParams } from "../endpoint/EndpointParameters";
8-
import { ListDocumentsRequest } from "../models/models_0";
9-
import { ListDocumentsResponse } from "../models/models_1";
8+
import { ListDocumentsRequest, ListDocumentsResponse } from "../models/models_1";
109
import { de_ListDocumentsCommand, se_ListDocumentsCommand } from "../protocols/Aws_restJson1";
1110
import { QBusinessClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../QBusinessClient";
1211

clients/client-qbusiness/src/commands/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ export * from "./CancelSubscriptionCommand";
66
export * from "./ChatCommand";
77
export * from "./ChatSyncCommand";
88
export * from "./CheckDocumentAccessCommand";
9+
export * from "./CreateAnonymousWebExperienceUrlCommand";
910
export * from "./CreateApplicationCommand";
1011
export * from "./CreateDataAccessorCommand";
1112
export * from "./CreateDataSourceCommand";

clients/client-qbusiness/src/models/models_0.ts

Lines changed: 36 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -691,6 +691,7 @@ export type APISchemaType = (typeof APISchemaType)[keyof typeof APISchemaType];
691691
* @enum
692692
*/
693693
export const IdentityType = {
694+
ANONYMOUS: "ANONYMOUS",
694695
AWS_IAM_IDC: "AWS_IAM_IDC",
695696
AWS_IAM_IDP_OIDC: "AWS_IAM_IDP_OIDC",
696697
AWS_IAM_IDP_SAML: "AWS_IAM_IDP_SAML",
@@ -6391,6 +6392,40 @@ export interface Conversation {
63916392
startTime?: Date | undefined;
63926393
}
63936394

6395+
/**
6396+
* @public
6397+
*/
6398+
export interface CreateAnonymousWebExperienceUrlRequest {
6399+
/**
6400+
* <p>The identifier of the Amazon Q Business application environment attached to the web experience.</p>
6401+
* @public
6402+
*/
6403+
applicationId: string | undefined;
6404+
6405+
/**
6406+
* <p>The identifier of the web experience.</p>
6407+
* @public
6408+
*/
6409+
webExperienceId: string | undefined;
6410+
6411+
/**
6412+
* <p>The duration of the session associated with the unique URL for the web experience.</p>
6413+
* @public
6414+
*/
6415+
sessionDurationInMinutes?: number | undefined;
6416+
}
6417+
6418+
/**
6419+
* @public
6420+
*/
6421+
export interface CreateAnonymousWebExperienceUrlResponse {
6422+
/**
6423+
* <p>The unique URL for accessing the web experience.</p> <important> <p>This URL can only be used once and must be used within 5 minutes after it's generated.</p> </important>
6424+
* @public
6425+
*/
6426+
anonymousUrl?: string | undefined;
6427+
}
6428+
63946429
/**
63956430
* <p>A user or group in the IAM Identity Center instance connected to the Amazon Q Business application.</p>
63966431
* @public
@@ -6928,7 +6963,7 @@ export type HallucinationReductionControl =
69286963
(typeof HallucinationReductionControl)[keyof typeof HallucinationReductionControl];
69296964

69306965
/**
6931-
* <p>Configuration information required to setup hallucination reduction. For more information, see <a href="amazonq/latest/qbusiness-ug/hallucination-reduction.html">hallucination reduction</a>.</p> <note> <p>The hallucination reduction feature won't work if chat orchestration controls are enabled for your application.</p> </note>
6966+
* <p>Configuration information required to setup hallucination reduction. For more information, see <a href="https://docs.aws.amazon.com/amazonq/latest/qbusiness-ug/hallucination-reduction.html"> hallucination reduction</a>.</p> <note> <p>The hallucination reduction feature won't work if chat orchestration controls are enabled for your application.</p> </note>
69326967
* @public
69336968
*/
69346969
export interface HallucinationReductionConfiguration {
@@ -7501,58 +7536,6 @@ export interface ListDataSourceSyncJobsRequest {
75017536
statusFilter?: DataSourceSyncJobStatus | undefined;
75027537
}
75037538

7504-
/**
7505-
* @public
7506-
*/
7507-
export interface ListDataSourceSyncJobsResponse {
7508-
/**
7509-
* <p>A history of synchronization jobs for the data source connector.</p>
7510-
* @public
7511-
*/
7512-
history?: DataSourceSyncJob[] | undefined;
7513-
7514-
/**
7515-
* <p>If the response is truncated, Amazon Q Business returns this token. You can use this token in any subsequent request to retrieve the next set of jobs.</p>
7516-
* @public
7517-
*/
7518-
nextToken?: string | undefined;
7519-
}
7520-
7521-
/**
7522-
* @public
7523-
*/
7524-
export interface ListDocumentsRequest {
7525-
/**
7526-
* <p>The identifier of the application id the documents are attached to.</p>
7527-
* @public
7528-
*/
7529-
applicationId: string | undefined;
7530-
7531-
/**
7532-
* <p>The identifier of the index the documents are attached to.</p>
7533-
* @public
7534-
*/
7535-
indexId: string | undefined;
7536-
7537-
/**
7538-
* <p>The identifier of the data sources the documents are attached to.</p>
7539-
* @public
7540-
*/
7541-
dataSourceIds?: string[] | undefined;
7542-
7543-
/**
7544-
* <p>If the <code>maxResults</code> response was incomplete because there is more data to retrieve, Amazon Q Business returns a pagination token in the response. You can use this pagination token to retrieve the next set of documents.</p>
7545-
* @public
7546-
*/
7547-
nextToken?: string | undefined;
7548-
7549-
/**
7550-
* <p>The maximum number of documents to return.</p>
7551-
* @public
7552-
*/
7553-
maxResults?: number | undefined;
7554-
}
7555-
75567539
/**
75577540
* @internal
75587541
*/

0 commit comments

Comments
 (0)