|
| 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 | +} |
0 commit comments