From 0bfe6e2598c4db0c223ab650ef12d579943ffa42 Mon Sep 17 00:00:00 2001 From: awstools Date: Thu, 17 Oct 2024 18:20:14 +0000 Subject: [PATCH] feat(client-quicksight): Add StartDashboardSnapshotJobSchedule API. RestoreAnalysis now supports restoring analysis to folders. --- clients/client-quicksight/README.md | 8 ++ clients/client-quicksight/src/QuickSight.ts | 23 +++ .../client-quicksight/src/QuickSightClient.ts | 6 + .../DescribeAnalysisPermissionsCommand.ts | 2 +- .../DescribeDashboardPermissionsCommand.ts | 4 +- .../DescribeTemplatePermissionsCommand.ts | 2 +- .../DescribeThemePermissionsCommand.ts | 2 +- .../src/commands/RestoreAnalysisCommand.ts | 10 ++ ...tartDashboardSnapshotJobScheduleCommand.ts | 132 +++++++++++++++++ .../UpdateAnalysisPermissionsCommand.ts | 2 +- .../UpdateDashboardPermissionsCommand.ts | 4 +- .../UpdateTemplatePermissionsCommand.ts | 2 +- .../commands/UpdateThemePermissionsCommand.ts | 2 +- .../client-quicksight/src/commands/index.ts | 1 + .../client-quicksight/src/models/models_4.ts | 55 ++++++++ .../src/protocols/Aws_restJson1.ts | 58 +++++++- .../sdk-codegen/aws-models/quicksight.json | 133 ++++++++++++++++-- 17 files changed, 427 insertions(+), 19 deletions(-) create mode 100644 clients/client-quicksight/src/commands/StartDashboardSnapshotJobScheduleCommand.ts diff --git a/clients/client-quicksight/README.md b/clients/client-quicksight/README.md index 3ff7e16a5e2f..2abe6d4cd685 100644 --- a/clients/client-quicksight/README.md +++ b/clients/client-quicksight/README.md @@ -1351,6 +1351,14 @@ StartDashboardSnapshotJob [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/quicksight/command/StartDashboardSnapshotJobCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-quicksight/Interface/StartDashboardSnapshotJobCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-quicksight/Interface/StartDashboardSnapshotJobCommandOutput/) + +
+ +StartDashboardSnapshotJobSchedule + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/quicksight/command/StartDashboardSnapshotJobScheduleCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-quicksight/Interface/StartDashboardSnapshotJobScheduleCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-quicksight/Interface/StartDashboardSnapshotJobScheduleCommandOutput/) +
diff --git a/clients/client-quicksight/src/QuickSight.ts b/clients/client-quicksight/src/QuickSight.ts index 7351167fb774..861f78a075ff 100644 --- a/clients/client-quicksight/src/QuickSight.ts +++ b/clients/client-quicksight/src/QuickSight.ts @@ -669,6 +669,11 @@ import { StartDashboardSnapshotJobCommandInput, StartDashboardSnapshotJobCommandOutput, } from "./commands/StartDashboardSnapshotJobCommand"; +import { + StartDashboardSnapshotJobScheduleCommand, + StartDashboardSnapshotJobScheduleCommandInput, + StartDashboardSnapshotJobScheduleCommandOutput, +} from "./commands/StartDashboardSnapshotJobScheduleCommand"; import { TagResourceCommand, TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand"; import { UntagResourceCommand, @@ -980,6 +985,7 @@ const commands = { StartAssetBundleExportJobCommand, StartAssetBundleImportJobCommand, StartDashboardSnapshotJobCommand, + StartDashboardSnapshotJobScheduleCommand, TagResourceCommand, UntagResourceCommand, UpdateAccountCustomizationCommand, @@ -3235,6 +3241,23 @@ export interface QuickSight { cb: (err: any, data?: StartDashboardSnapshotJobCommandOutput) => void ): void; + /** + * @see {@link StartDashboardSnapshotJobScheduleCommand} + */ + startDashboardSnapshotJobSchedule( + args: StartDashboardSnapshotJobScheduleCommandInput, + options?: __HttpHandlerOptions + ): Promise; + startDashboardSnapshotJobSchedule( + args: StartDashboardSnapshotJobScheduleCommandInput, + cb: (err: any, data?: StartDashboardSnapshotJobScheduleCommandOutput) => void + ): void; + startDashboardSnapshotJobSchedule( + args: StartDashboardSnapshotJobScheduleCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: StartDashboardSnapshotJobScheduleCommandOutput) => void + ): void; + /** * @see {@link TagResourceCommand} */ diff --git a/clients/client-quicksight/src/QuickSightClient.ts b/clients/client-quicksight/src/QuickSightClient.ts index dd6fcfe0662a..cb26235be8bf 100644 --- a/clients/client-quicksight/src/QuickSightClient.ts +++ b/clients/client-quicksight/src/QuickSightClient.ts @@ -433,6 +433,10 @@ import { StartDashboardSnapshotJobCommandInput, StartDashboardSnapshotJobCommandOutput, } from "./commands/StartDashboardSnapshotJobCommand"; +import { + StartDashboardSnapshotJobScheduleCommandInput, + StartDashboardSnapshotJobScheduleCommandOutput, +} from "./commands/StartDashboardSnapshotJobScheduleCommand"; import { TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand"; import { UntagResourceCommandInput, UntagResourceCommandOutput } from "./commands/UntagResourceCommand"; import { @@ -700,6 +704,7 @@ export type ServiceInputTypes = | StartAssetBundleExportJobCommandInput | StartAssetBundleImportJobCommandInput | StartDashboardSnapshotJobCommandInput + | StartDashboardSnapshotJobScheduleCommandInput | TagResourceCommandInput | UntagResourceCommandInput | UpdateAccountCustomizationCommandInput @@ -885,6 +890,7 @@ export type ServiceOutputTypes = | StartAssetBundleExportJobCommandOutput | StartAssetBundleImportJobCommandOutput | StartDashboardSnapshotJobCommandOutput + | StartDashboardSnapshotJobScheduleCommandOutput | TagResourceCommandOutput | UntagResourceCommandOutput | UpdateAccountCustomizationCommandOutput diff --git a/clients/client-quicksight/src/commands/DescribeAnalysisPermissionsCommand.ts b/clients/client-quicksight/src/commands/DescribeAnalysisPermissionsCommand.ts index a96cb14b203f..d9fbb90b2ffb 100644 --- a/clients/client-quicksight/src/commands/DescribeAnalysisPermissionsCommand.ts +++ b/clients/client-quicksight/src/commands/DescribeAnalysisPermissionsCommand.ts @@ -49,7 +49,7 @@ export interface DescribeAnalysisPermissionsCommandOutput * // { // DescribeAnalysisPermissionsResponse * // AnalysisId: "STRING_VALUE", * // AnalysisArn: "STRING_VALUE", - * // Permissions: [ // ResourcePermissionList + * // Permissions: [ // UpdateResourcePermissionList * // { // ResourcePermission * // Principal: "STRING_VALUE", // required * // Actions: [ // ActionList // required diff --git a/clients/client-quicksight/src/commands/DescribeDashboardPermissionsCommand.ts b/clients/client-quicksight/src/commands/DescribeDashboardPermissionsCommand.ts index 95f6414c33ae..d49182847f81 100644 --- a/clients/client-quicksight/src/commands/DescribeDashboardPermissionsCommand.ts +++ b/clients/client-quicksight/src/commands/DescribeDashboardPermissionsCommand.ts @@ -49,7 +49,7 @@ export interface DescribeDashboardPermissionsCommandOutput * // { // DescribeDashboardPermissionsResponse * // DashboardId: "STRING_VALUE", * // DashboardArn: "STRING_VALUE", - * // Permissions: [ // ResourcePermissionList + * // Permissions: [ // UpdateResourcePermissionList * // { // ResourcePermission * // Principal: "STRING_VALUE", // required * // Actions: [ // ActionList // required @@ -60,7 +60,7 @@ export interface DescribeDashboardPermissionsCommandOutput * // Status: Number("int"), * // RequestId: "STRING_VALUE", * // LinkSharingConfiguration: { // LinkSharingConfiguration - * // Permissions: [ + * // Permissions: [ // ResourcePermissionList * // { * // Principal: "STRING_VALUE", // required * // Actions: [ // required diff --git a/clients/client-quicksight/src/commands/DescribeTemplatePermissionsCommand.ts b/clients/client-quicksight/src/commands/DescribeTemplatePermissionsCommand.ts index 40946a80aa55..8aae6a65ffb2 100644 --- a/clients/client-quicksight/src/commands/DescribeTemplatePermissionsCommand.ts +++ b/clients/client-quicksight/src/commands/DescribeTemplatePermissionsCommand.ts @@ -49,7 +49,7 @@ export interface DescribeTemplatePermissionsCommandOutput * // { // DescribeTemplatePermissionsResponse * // TemplateId: "STRING_VALUE", * // TemplateArn: "STRING_VALUE", - * // Permissions: [ // ResourcePermissionList + * // Permissions: [ // UpdateResourcePermissionList * // { // ResourcePermission * // Principal: "STRING_VALUE", // required * // Actions: [ // ActionList // required diff --git a/clients/client-quicksight/src/commands/DescribeThemePermissionsCommand.ts b/clients/client-quicksight/src/commands/DescribeThemePermissionsCommand.ts index fe616751c692..c3b952d05a6d 100644 --- a/clients/client-quicksight/src/commands/DescribeThemePermissionsCommand.ts +++ b/clients/client-quicksight/src/commands/DescribeThemePermissionsCommand.ts @@ -44,7 +44,7 @@ export interface DescribeThemePermissionsCommandOutput extends DescribeThemePerm * // { // DescribeThemePermissionsResponse * // ThemeId: "STRING_VALUE", * // ThemeArn: "STRING_VALUE", - * // Permissions: [ // ResourcePermissionList + * // Permissions: [ // UpdateResourcePermissionList * // { // ResourcePermission * // Principal: "STRING_VALUE", // required * // Actions: [ // ActionList // required diff --git a/clients/client-quicksight/src/commands/RestoreAnalysisCommand.ts b/clients/client-quicksight/src/commands/RestoreAnalysisCommand.ts index 2d80b90ab023..0de0d7e75ff4 100644 --- a/clients/client-quicksight/src/commands/RestoreAnalysisCommand.ts +++ b/clients/client-quicksight/src/commands/RestoreAnalysisCommand.ts @@ -38,6 +38,7 @@ export interface RestoreAnalysisCommandOutput extends RestoreAnalysisResponse, _ * const input = { // RestoreAnalysisRequest * AwsAccountId: "STRING_VALUE", // required * AnalysisId: "STRING_VALUE", // required + * RestoreToFolders: true || false, * }; * const command = new RestoreAnalysisCommand(input); * const response = await client.send(command); @@ -46,6 +47,9 @@ export interface RestoreAnalysisCommandOutput extends RestoreAnalysisResponse, _ * // Arn: "STRING_VALUE", * // AnalysisId: "STRING_VALUE", * // RequestId: "STRING_VALUE", + * // RestorationFailedFolderArns: [ // FolderArnList + * // "STRING_VALUE", + * // ], * // }; * * ``` @@ -65,6 +69,12 @@ export interface RestoreAnalysisCommandOutput extends RestoreAnalysisResponse, _ * @throws {@link InvalidParameterValueException} (client fault) *

One or more parameters has a value that isn't valid.

* + * @throws {@link LimitExceededException} (client fault) + *

A limit is exceeded.

+ * + * @throws {@link PreconditionNotMetException} (client fault) + *

One or more preconditions aren't met.

+ * * @throws {@link ResourceNotFoundException} (client fault) *

One or more resources can't be found.

* diff --git a/clients/client-quicksight/src/commands/StartDashboardSnapshotJobScheduleCommand.ts b/clients/client-quicksight/src/commands/StartDashboardSnapshotJobScheduleCommand.ts new file mode 100644 index 000000000000..9b26e1a1a387 --- /dev/null +++ b/clients/client-quicksight/src/commands/StartDashboardSnapshotJobScheduleCommand.ts @@ -0,0 +1,132 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { commonParams } from "../endpoint/EndpointParameters"; +import { + StartDashboardSnapshotJobScheduleRequest, + StartDashboardSnapshotJobScheduleResponse, +} from "../models/models_4"; +import { + de_StartDashboardSnapshotJobScheduleCommand, + se_StartDashboardSnapshotJobScheduleCommand, +} from "../protocols/Aws_restJson1"; +import { QuickSightClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../QuickSightClient"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link StartDashboardSnapshotJobScheduleCommand}. + */ +export interface StartDashboardSnapshotJobScheduleCommandInput extends StartDashboardSnapshotJobScheduleRequest {} +/** + * @public + * + * The output of {@link StartDashboardSnapshotJobScheduleCommand}. + */ +export interface StartDashboardSnapshotJobScheduleCommandOutput + extends StartDashboardSnapshotJobScheduleResponse, + __MetadataBearer {} + +/** + *

Starts an asynchronous job that runs an existing dashboard schedule and sends the dashboard snapshot through email.

+ *

Only one job can run simultaneously in a given schedule. Repeated requests are skipped with a 202 HTTP status code.

+ *

For more information, see Scheduling and sending Amazon QuickSight reports by email and Configuring email report settings for a Amazon QuickSight dashboard in the Amazon QuickSight User Guide.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { QuickSightClient, StartDashboardSnapshotJobScheduleCommand } from "@aws-sdk/client-quicksight"; // ES Modules import + * // const { QuickSightClient, StartDashboardSnapshotJobScheduleCommand } = require("@aws-sdk/client-quicksight"); // CommonJS import + * const client = new QuickSightClient(config); + * const input = { // StartDashboardSnapshotJobScheduleRequest + * AwsAccountId: "STRING_VALUE", // required + * DashboardId: "STRING_VALUE", // required + * ScheduleId: "STRING_VALUE", // required + * }; + * const command = new StartDashboardSnapshotJobScheduleCommand(input); + * const response = await client.send(command); + * // { // StartDashboardSnapshotJobScheduleResponse + * // RequestId: "STRING_VALUE", + * // Status: Number("int"), + * // }; + * + * ``` + * + * @param StartDashboardSnapshotJobScheduleCommandInput - {@link StartDashboardSnapshotJobScheduleCommandInput} + * @returns {@link StartDashboardSnapshotJobScheduleCommandOutput} + * @see {@link StartDashboardSnapshotJobScheduleCommandInput} for command's `input` shape. + * @see {@link StartDashboardSnapshotJobScheduleCommandOutput} for command's `response` shape. + * @see {@link QuickSightClientResolvedConfig | config} for QuickSightClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You don't have access to this item. The provided credentials couldn't be + * validated. You might not be authorized to carry out the request. Make sure that your + * account is authorized to use the Amazon QuickSight service, that your policies have the + * correct permissions, and that you are using the correct credentials.

+ * + * @throws {@link InternalFailureException} (server fault) + *

An internal failure occurred.

+ * + * @throws {@link InvalidParameterValueException} (client fault) + *

One or more parameters has a value that isn't valid.

+ * + * @throws {@link LimitExceededException} (client fault) + *

A limit is exceeded.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

One or more resources can't be found.

+ * + * @throws {@link ThrottlingException} (client fault) + *

Access is throttled.

+ * + * @throws {@link UnsupportedUserEditionException} (client fault) + *

This error indicates that you are calling an operation on an Amazon QuickSight + * subscription where the edition doesn't include support for that operation. Amazon + * Amazon QuickSight currently has Standard Edition and Enterprise Edition. Not every operation and + * capability is available in every edition.

+ * + * @throws {@link QuickSightServiceException} + *

Base exception class for all service exceptions from QuickSight service.

+ * + * @public + */ +export class StartDashboardSnapshotJobScheduleCommand extends $Command + .classBuilder< + StartDashboardSnapshotJobScheduleCommandInput, + StartDashboardSnapshotJobScheduleCommandOutput, + QuickSightClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep(commonParams) + .m(function (this: any, Command: any, cs: any, config: QuickSightClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("QuickSight_20180401", "StartDashboardSnapshotJobSchedule", {}) + .n("QuickSightClient", "StartDashboardSnapshotJobScheduleCommand") + .f(void 0, void 0) + .ser(se_StartDashboardSnapshotJobScheduleCommand) + .de(de_StartDashboardSnapshotJobScheduleCommand) + .build() { + /** @internal type navigation helper, not in runtime. */ + protected declare static __types: { + api: { + input: StartDashboardSnapshotJobScheduleRequest; + output: StartDashboardSnapshotJobScheduleResponse; + }; + sdk: { + input: StartDashboardSnapshotJobScheduleCommandInput; + output: StartDashboardSnapshotJobScheduleCommandOutput; + }; + }; +} diff --git a/clients/client-quicksight/src/commands/UpdateAnalysisPermissionsCommand.ts b/clients/client-quicksight/src/commands/UpdateAnalysisPermissionsCommand.ts index 54c0680e9f32..a913731b4547 100644 --- a/clients/client-quicksight/src/commands/UpdateAnalysisPermissionsCommand.ts +++ b/clients/client-quicksight/src/commands/UpdateAnalysisPermissionsCommand.ts @@ -60,7 +60,7 @@ export interface UpdateAnalysisPermissionsCommandOutput extends UpdateAnalysisPe * // { // UpdateAnalysisPermissionsResponse * // AnalysisArn: "STRING_VALUE", * // AnalysisId: "STRING_VALUE", - * // Permissions: [ // ResourcePermissionList + * // Permissions: [ // UpdateResourcePermissionList * // { // ResourcePermission * // Principal: "STRING_VALUE", // required * // Actions: [ // ActionList // required diff --git a/clients/client-quicksight/src/commands/UpdateDashboardPermissionsCommand.ts b/clients/client-quicksight/src/commands/UpdateDashboardPermissionsCommand.ts index 818b72b1c008..230d07d8efba 100644 --- a/clients/client-quicksight/src/commands/UpdateDashboardPermissionsCommand.ts +++ b/clients/client-quicksight/src/commands/UpdateDashboardPermissionsCommand.ts @@ -76,7 +76,7 @@ export interface UpdateDashboardPermissionsCommandOutput extends UpdateDashboard * // { // UpdateDashboardPermissionsResponse * // DashboardArn: "STRING_VALUE", * // DashboardId: "STRING_VALUE", - * // Permissions: [ // ResourcePermissionList + * // Permissions: [ // UpdateResourcePermissionList * // { // ResourcePermission * // Principal: "STRING_VALUE", // required * // Actions: [ // ActionList // required @@ -87,7 +87,7 @@ export interface UpdateDashboardPermissionsCommandOutput extends UpdateDashboard * // RequestId: "STRING_VALUE", * // Status: Number("int"), * // LinkSharingConfiguration: { // LinkSharingConfiguration - * // Permissions: [ + * // Permissions: [ // ResourcePermissionList * // { * // Principal: "STRING_VALUE", // required * // Actions: [ // required diff --git a/clients/client-quicksight/src/commands/UpdateTemplatePermissionsCommand.ts b/clients/client-quicksight/src/commands/UpdateTemplatePermissionsCommand.ts index c53d8cb0aac0..14d598e20d48 100644 --- a/clients/client-quicksight/src/commands/UpdateTemplatePermissionsCommand.ts +++ b/clients/client-quicksight/src/commands/UpdateTemplatePermissionsCommand.ts @@ -60,7 +60,7 @@ export interface UpdateTemplatePermissionsCommandOutput extends UpdateTemplatePe * // { // UpdateTemplatePermissionsResponse * // TemplateId: "STRING_VALUE", * // TemplateArn: "STRING_VALUE", - * // Permissions: [ // ResourcePermissionList + * // Permissions: [ // UpdateResourcePermissionList * // { // ResourcePermission * // Principal: "STRING_VALUE", // required * // Actions: [ // ActionList // required diff --git a/clients/client-quicksight/src/commands/UpdateThemePermissionsCommand.ts b/clients/client-quicksight/src/commands/UpdateThemePermissionsCommand.ts index 4c2348b13880..52969bd0d82b 100644 --- a/clients/client-quicksight/src/commands/UpdateThemePermissionsCommand.ts +++ b/clients/client-quicksight/src/commands/UpdateThemePermissionsCommand.ts @@ -153,7 +153,7 @@ export interface UpdateThemePermissionsCommandOutput extends UpdateThemePermissi * // { // UpdateThemePermissionsResponse * // ThemeId: "STRING_VALUE", * // ThemeArn: "STRING_VALUE", - * // Permissions: [ // ResourcePermissionList + * // Permissions: [ // UpdateResourcePermissionList * // { // ResourcePermission * // Principal: "STRING_VALUE", // required * // Actions: [ // ActionList // required diff --git a/clients/client-quicksight/src/commands/index.ts b/clients/client-quicksight/src/commands/index.ts index c9f55feb9115..0ebc4aa2e6a3 100644 --- a/clients/client-quicksight/src/commands/index.ts +++ b/clients/client-quicksight/src/commands/index.ts @@ -142,6 +142,7 @@ export * from "./SearchGroupsCommand"; export * from "./StartAssetBundleExportJobCommand"; export * from "./StartAssetBundleImportJobCommand"; export * from "./StartDashboardSnapshotJobCommand"; +export * from "./StartDashboardSnapshotJobScheduleCommand"; export * from "./TagResourceCommand"; export * from "./UntagResourceCommand"; export * from "./UpdateAccountCustomizationCommand"; diff --git a/clients/client-quicksight/src/models/models_4.ts b/clients/client-quicksight/src/models/models_4.ts index c8c6a7014283..95dbadd61a53 100644 --- a/clients/client-quicksight/src/models/models_4.ts +++ b/clients/client-quicksight/src/models/models_4.ts @@ -4010,6 +4010,12 @@ export interface RestoreAnalysisRequest { * @public */ AnalysisId: string | undefined; + + /** + *

A boolean value that determines if the analysis will be restored to folders that it previously resided in. A True value restores analysis back to all folders that it previously resided in. A False value restores the analysis but does not restore the analysis back to all previously resided folders. Restoring a restricted analysis requires this parameter to be set to True.

+ * @public + */ + RestoreToFolders?: boolean; } /** @@ -4040,6 +4046,12 @@ export interface RestoreAnalysisResponse { * @public */ RequestId?: string; + + /** + *

A list of folder arns thatthe analysis failed to be restored to.

+ * @public + */ + RestorationFailedFolderArns?: string[]; } /** @@ -4727,6 +4739,49 @@ export interface StartDashboardSnapshotJobResponse { Status?: number; } +/** + * @public + */ +export interface StartDashboardSnapshotJobScheduleRequest { + /** + *

The ID of the Amazon Web Services account that the dashboard snapshot job is executed in.

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

The ID of the dashboard that you want to start a snapshot job schedule for. + *

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

The ID of the schedule that you want to start a snapshot job schedule for. The schedule ID can be found in the Amazon QuickSight console in the Schedules pane of the dashboard that the schedule is configured for.

+ * @public + */ + ScheduleId: string | undefined; +} + +/** + * @public + */ +export interface StartDashboardSnapshotJobScheduleResponse { + /** + *

+ * The Amazon Web Services request ID for this operation. + *

+ * @public + */ + RequestId?: string; + + /** + *

The HTTP status of the request

+ * @public + */ + Status?: number; +} + /** * @public */ diff --git a/clients/client-quicksight/src/protocols/Aws_restJson1.ts b/clients/client-quicksight/src/protocols/Aws_restJson1.ts index a47268562f9f..249cccc3ed9d 100644 --- a/clients/client-quicksight/src/protocols/Aws_restJson1.ts +++ b/clients/client-quicksight/src/protocols/Aws_restJson1.ts @@ -413,6 +413,10 @@ import { StartDashboardSnapshotJobCommandInput, StartDashboardSnapshotJobCommandOutput, } from "../commands/StartDashboardSnapshotJobCommand"; +import { + StartDashboardSnapshotJobScheduleCommandInput, + StartDashboardSnapshotJobScheduleCommandOutput, +} from "../commands/StartDashboardSnapshotJobScheduleCommand"; import { TagResourceCommandInput, TagResourceCommandOutput } from "../commands/TagResourceCommand"; import { UntagResourceCommandInput, UntagResourceCommandOutput } from "../commands/UntagResourceCommand"; import { @@ -4092,8 +4096,11 @@ export const se_RestoreAnalysisCommand = async ( b.bp("/accounts/{AwsAccountId}/restore/analyses/{AnalysisId}"); b.p("AwsAccountId", () => input.AwsAccountId!, "{AwsAccountId}", false); b.p("AnalysisId", () => input.AnalysisId!, "{AnalysisId}", false); + const query: any = map({ + [_rtf]: [() => input.RestoreToFolders !== void 0, () => input[_RTF]!.toString()], + }); let body: any; - b.m("POST").h(headers).b(body); + b.m("POST").h(headers).q(query).b(body); return b.build(); }; @@ -4337,6 +4344,24 @@ export const se_StartDashboardSnapshotJobCommand = async ( return b.build(); }; +/** + * serializeAws_restJson1StartDashboardSnapshotJobScheduleCommand + */ +export const se_StartDashboardSnapshotJobScheduleCommand = async ( + input: StartDashboardSnapshotJobScheduleCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const b = rb(input, context); + const headers: any = {}; + b.bp("/accounts/{AwsAccountId}/dashboards/{DashboardId}/schedules/{ScheduleId}"); + b.p("AwsAccountId", () => input.AwsAccountId!, "{AwsAccountId}", false); + b.p("DashboardId", () => input.DashboardId!, "{DashboardId}", false); + b.p("ScheduleId", () => input.ScheduleId!, "{ScheduleId}", false); + let body: any; + b.m("POST").h(headers).b(body); + return b.build(); +}; + /** * serializeAws_restJson1TagResourceCommand */ @@ -8782,6 +8807,7 @@ export const de_RestoreAnalysisCommand = async ( AnalysisId: __expectString, Arn: __expectString, RequestId: __expectString, + RestorationFailedFolderArns: _json, }); Object.assign(contents, doc); map(contents, { @@ -9024,6 +9050,30 @@ export const de_StartDashboardSnapshotJobCommand = async ( return contents; }; +/** + * deserializeAws_restJson1StartDashboardSnapshotJobScheduleCommand + */ +export const de_StartDashboardSnapshotJobScheduleCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + RequestId: __expectString, + }); + Object.assign(contents, doc); + map(contents, { + Status: [, output.statusCode], + }); + return contents; +}; + /** * deserializeAws_restJson1TagResourceCommand */ @@ -17955,6 +18005,8 @@ const de_Folder = (output: any, context: __SerdeContext): Folder => { }) as any; }; +// de_FolderArnList omitted. + // de_FolderColumnList omitted. // de_FolderMember omitted. @@ -21266,6 +21318,8 @@ const de_TreeMapVisual = (output: any, context: __SerdeContext): TreeMapVisual = // de_UntagColumnOperation omitted. +// de_UpdateResourcePermissionList omitted. + // de_UploadSettings omitted. // de_User omitted. @@ -21637,6 +21691,7 @@ const _N = "Namespace"; const _NT = "NextToken"; const _R = "Resolved"; const _RD = "ResetDisabled"; +const _RTF = "RestoreToFolders"; const _RWID = "RecoveryWindowInDays"; const _SLIM = "SessionLifetimeInMinutes"; const _SPE = "StatePersistenceEnabled"; @@ -21659,6 +21714,7 @@ const _n = "namespace"; const _nt = "next-token"; const _r = "resolved"; const _rd = "reset-disabled"; +const _rtf = "restore-to-folders"; const _rwid = "recovery-window-in-days"; const _sl = "session-lifetime"; const _spe = "state-persistence-enabled"; diff --git a/codegen/sdk-codegen/aws-models/quicksight.json b/codegen/sdk-codegen/aws-models/quicksight.json index 4f8744390231..92ee4e9f82fc 100644 --- a/codegen/sdk-codegen/aws-models/quicksight.json +++ b/codegen/sdk-codegen/aws-models/quicksight.json @@ -18115,7 +18115,7 @@ } }, "Permissions": { - "target": "com.amazonaws.quicksight#ResourcePermissionList", + "target": "com.amazonaws.quicksight#UpdateResourcePermissionList", "traits": { "smithy.api#documentation": "

A structure that describes the principals and the resource-level permissions on an\n analysis.

" } @@ -18785,7 +18785,7 @@ } }, "Permissions": { - "target": "com.amazonaws.quicksight#ResourcePermissionList", + "target": "com.amazonaws.quicksight#UpdateResourcePermissionList", "traits": { "smithy.api#documentation": "

A structure that contains the permissions for the dashboard.

" } @@ -21286,7 +21286,7 @@ } }, "Permissions": { - "target": "com.amazonaws.quicksight#ResourcePermissionList", + "target": "com.amazonaws.quicksight#UpdateResourcePermissionList", "traits": { "smithy.api#documentation": "

A list of resource permissions to be set on the template.

" } @@ -21590,7 +21590,7 @@ } }, "Permissions": { - "target": "com.amazonaws.quicksight#ResourcePermissionList", + "target": "com.amazonaws.quicksight#UpdateResourcePermissionList", "traits": { "smithy.api#documentation": "

A list of resource permissions set on the theme.

" } @@ -38835,6 +38835,9 @@ { "target": "com.amazonaws.quicksight#StartDashboardSnapshotJob" }, + { + "target": "com.amazonaws.quicksight#StartDashboardSnapshotJobSchedule" + }, { "target": "com.amazonaws.quicksight#TagResource" }, @@ -41553,6 +41556,12 @@ { "target": "com.amazonaws.quicksight#InvalidParameterValueException" }, + { + "target": "com.amazonaws.quicksight#LimitExceededException" + }, + { + "target": "com.amazonaws.quicksight#PreconditionNotMetException" + }, { "target": "com.amazonaws.quicksight#ResourceNotFoundException" }, @@ -41590,6 +41599,14 @@ "smithy.api#httpLabel": {}, "smithy.api#required": {} } + }, + "RestoreToFolders": { + "target": "com.amazonaws.quicksight#Boolean", + "traits": { + "smithy.api#default": false, + "smithy.api#documentation": "

A boolean value that determines if the analysis will be restored to folders that it previously resided in. A True value restores analysis back to all folders that it previously resided in. A False value restores the analysis but does not restore the analysis back to all previously resided folders. Restoring a restricted analysis requires this parameter to be set to True.

", + "smithy.api#httpQuery": "restore-to-folders" + } } }, "traits": { @@ -41624,6 +41641,12 @@ "traits": { "smithy.api#documentation": "

The Amazon Web Services request ID for this operation.

" } + }, + "RestorationFailedFolderArns": { + "target": "com.amazonaws.quicksight#FolderArnList", + "traits": { + "smithy.api#documentation": "

A list of folder arns thatthe analysis failed to be restored to.

" + } } }, "traits": { @@ -45885,6 +45908,100 @@ "smithy.api#output": {} } }, + "com.amazonaws.quicksight#StartDashboardSnapshotJobSchedule": { + "type": "operation", + "input": { + "target": "com.amazonaws.quicksight#StartDashboardSnapshotJobScheduleRequest" + }, + "output": { + "target": "com.amazonaws.quicksight#StartDashboardSnapshotJobScheduleResponse" + }, + "errors": [ + { + "target": "com.amazonaws.quicksight#AccessDeniedException" + }, + { + "target": "com.amazonaws.quicksight#InternalFailureException" + }, + { + "target": "com.amazonaws.quicksight#InvalidParameterValueException" + }, + { + "target": "com.amazonaws.quicksight#LimitExceededException" + }, + { + "target": "com.amazonaws.quicksight#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.quicksight#ThrottlingException" + }, + { + "target": "com.amazonaws.quicksight#UnsupportedUserEditionException" + } + ], + "traits": { + "smithy.api#documentation": "

Starts an asynchronous job that runs an existing dashboard schedule and sends the dashboard snapshot through email.

\n

Only one job can run simultaneously in a given schedule. Repeated requests are skipped with a 202 HTTP status code.

\n

For more information, see Scheduling and sending Amazon QuickSight reports by email and Configuring email report settings for a Amazon QuickSight dashboard in the Amazon QuickSight User Guide.

", + "smithy.api#http": { + "method": "POST", + "uri": "/accounts/{AwsAccountId}/dashboards/{DashboardId}/schedules/{ScheduleId}", + "code": 200 + } + } + }, + "com.amazonaws.quicksight#StartDashboardSnapshotJobScheduleRequest": { + "type": "structure", + "members": { + "AwsAccountId": { + "target": "com.amazonaws.quicksight#AwsAccountId", + "traits": { + "smithy.api#documentation": "

The ID of the Amazon Web Services account that the dashboard snapshot job is executed in.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "DashboardId": { + "target": "com.amazonaws.quicksight#ShortRestrictiveResourceId", + "traits": { + "smithy.api#documentation": "

The ID of the dashboard that you want to start a snapshot job schedule for.\n

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "ScheduleId": { + "target": "com.amazonaws.quicksight#ShortRestrictiveResourceId", + "traits": { + "smithy.api#documentation": "

The ID of the schedule that you want to start a snapshot job schedule for. The schedule ID can be found in the Amazon QuickSight console in the Schedules pane of the dashboard that the schedule is configured for.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.quicksight#StartDashboardSnapshotJobScheduleResponse": { + "type": "structure", + "members": { + "RequestId": { + "target": "com.amazonaws.quicksight#NonEmptyString", + "traits": { + "smithy.api#documentation": "

\n The Amazon Web Services request ID for this operation.\n

" + } + }, + "Status": { + "target": "com.amazonaws.quicksight#StatusCode", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

The HTTP status of the request

", + "smithy.api#httpResponseCode": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.quicksight#StatePersistenceConfigurations": { "type": "structure", "members": { @@ -51815,7 +51932,7 @@ } }, "Permissions": { - "target": "com.amazonaws.quicksight#ResourcePermissionList", + "target": "com.amazonaws.quicksight#UpdateResourcePermissionList", "traits": { "smithy.api#documentation": "

A structure that describes the principals and the resource-level permissions on an\n analysis.

" } @@ -52189,7 +52306,7 @@ } }, "Permissions": { - "target": "com.amazonaws.quicksight#ResourcePermissionList", + "target": "com.amazonaws.quicksight#UpdateResourcePermissionList", "traits": { "smithy.api#documentation": "

Information about the permissions on the dashboard.

" } @@ -54427,7 +54544,7 @@ } }, "Permissions": { - "target": "com.amazonaws.quicksight#ResourcePermissionList", + "target": "com.amazonaws.quicksight#UpdateResourcePermissionList", "traits": { "smithy.api#documentation": "

A list of resource permissions to be set on the template.

" } @@ -54793,7 +54910,7 @@ } }, "Permissions": { - "target": "com.amazonaws.quicksight#ResourcePermissionList", + "target": "com.amazonaws.quicksight#UpdateResourcePermissionList", "traits": { "smithy.api#documentation": "

The resulting list of resource permissions for the theme.

" }