Skip to content

Commit

Permalink
feat(client-quicksight): Add StartDashboardSnapshotJobSchedule API. R…
Browse files Browse the repository at this point in the history
…estoreAnalysis now supports restoring analysis to folders.
  • Loading branch information
awstools committed Oct 17, 2024
1 parent e0b3fe4 commit 0bfe6e2
Show file tree
Hide file tree
Showing 17 changed files with 427 additions and 19 deletions.
8 changes: 8 additions & 0 deletions clients/client-quicksight/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/)

</details>
<details>
<summary>
StartDashboardSnapshotJobSchedule
</summary>

[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/)

</details>
<details>
<summary>
Expand Down
23 changes: 23 additions & 0 deletions clients/client-quicksight/src/QuickSight.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -980,6 +985,7 @@ const commands = {
StartAssetBundleExportJobCommand,
StartAssetBundleImportJobCommand,
StartDashboardSnapshotJobCommand,
StartDashboardSnapshotJobScheduleCommand,
TagResourceCommand,
UntagResourceCommand,
UpdateAccountCustomizationCommand,
Expand Down Expand Up @@ -3235,6 +3241,23 @@ export interface QuickSight {
cb: (err: any, data?: StartDashboardSnapshotJobCommandOutput) => void
): void;

/**
* @see {@link StartDashboardSnapshotJobScheduleCommand}
*/
startDashboardSnapshotJobSchedule(
args: StartDashboardSnapshotJobScheduleCommandInput,
options?: __HttpHandlerOptions
): Promise<StartDashboardSnapshotJobScheduleCommandOutput>;
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}
*/
Expand Down
6 changes: 6 additions & 0 deletions clients/client-quicksight/src/QuickSightClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -700,6 +704,7 @@ export type ServiceInputTypes =
| StartAssetBundleExportJobCommandInput
| StartAssetBundleImportJobCommandInput
| StartDashboardSnapshotJobCommandInput
| StartDashboardSnapshotJobScheduleCommandInput
| TagResourceCommandInput
| UntagResourceCommandInput
| UpdateAccountCustomizationCommandInput
Expand Down Expand Up @@ -885,6 +890,7 @@ export type ServiceOutputTypes =
| StartAssetBundleExportJobCommandOutput
| StartAssetBundleImportJobCommandOutput
| StartDashboardSnapshotJobCommandOutput
| StartDashboardSnapshotJobScheduleCommandOutput
| TagResourceCommandOutput
| UntagResourceCommandOutput
| UpdateAccountCustomizationCommandOutput
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -60,7 +60,7 @@ export interface DescribeDashboardPermissionsCommandOutput
* // Status: Number("int"),
* // RequestId: "STRING_VALUE",
* // LinkSharingConfiguration: { // LinkSharingConfiguration
* // Permissions: [
* // Permissions: [ // ResourcePermissionList
* // {
* // Principal: "STRING_VALUE", // required
* // Actions: [ // required
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 10 additions & 0 deletions clients/client-quicksight/src/commands/RestoreAnalysisCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -46,6 +47,9 @@ export interface RestoreAnalysisCommandOutput extends RestoreAnalysisResponse, _
* // Arn: "STRING_VALUE",
* // AnalysisId: "STRING_VALUE",
* // RequestId: "STRING_VALUE",
* // RestorationFailedFolderArns: [ // FolderArnList
* // "STRING_VALUE",
* // ],
* // };
*
* ```
Expand All @@ -65,6 +69,12 @@ export interface RestoreAnalysisCommandOutput extends RestoreAnalysisResponse, _
* @throws {@link InvalidParameterValueException} (client fault)
* <p>One or more parameters has a value that isn't valid.</p>
*
* @throws {@link LimitExceededException} (client fault)
* <p>A limit is exceeded.</p>
*
* @throws {@link PreconditionNotMetException} (client fault)
* <p>One or more preconditions aren't met.</p>
*
* @throws {@link ResourceNotFoundException} (client fault)
* <p>One or more resources can't be found.</p>
*
Expand Down
Original file line number Diff line number Diff line change
@@ -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 {}

/**
* <p>Starts an asynchronous job that runs an existing dashboard schedule and sends the dashboard snapshot through email. </p>
* <p>Only one job can run simultaneously in a given schedule. Repeated requests are skipped with a <code>202</code> HTTP status code.</p>
* <p>For more information, see <a href="https://docs.aws.amazon.com/quicksight/latest/user/sending-reports.html">Scheduling and sending Amazon QuickSight reports by email</a> and <a href="https://docs.aws.amazon.com/quicksight/latest/user/email-reports-from-dashboard.html">Configuring email report settings for a Amazon QuickSight dashboard</a> in the <i>Amazon QuickSight User Guide</i>.</p>
* @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)
* <p>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.</p>
*
* @throws {@link InternalFailureException} (server fault)
* <p>An internal failure occurred.</p>
*
* @throws {@link InvalidParameterValueException} (client fault)
* <p>One or more parameters has a value that isn't valid.</p>
*
* @throws {@link LimitExceededException} (client fault)
* <p>A limit is exceeded.</p>
*
* @throws {@link ResourceNotFoundException} (client fault)
* <p>One or more resources can't be found.</p>
*
* @throws {@link ThrottlingException} (client fault)
* <p>Access is throttled.</p>
*
* @throws {@link UnsupportedUserEditionException} (client fault)
* <p>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.</p>
*
* @throws {@link QuickSightServiceException}
* <p>Base exception class for all service exceptions from QuickSight service.</p>
*
* @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;
};
};
}
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions clients/client-quicksight/src/commands/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
Loading

0 comments on commit 0bfe6e2

Please sign in to comment.