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";

0 commit comments

Comments
 (0)