import { Command as $Command } from "@smithy/smithy-client"; import type { MetadataBearer as __MetadataBearer } from "@smithy/types"; import type { CloudTrailClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CloudTrailClient"; import type { CreateDashboardRequest, CreateDashboardResponse } from "../models/models_0"; /** * @public */ export type { __MetadataBearer }; export { $Command }; /** * @public * * The input for {@link CreateDashboardCommand}. */ export interface CreateDashboardCommandInput extends CreateDashboardRequest { } /** * @public * * The output of {@link CreateDashboardCommand}. */ export interface CreateDashboardCommandOutput extends CreateDashboardResponse, __MetadataBearer { } declare const CreateDashboardCommand_base: { new (input: CreateDashboardCommandInput): import("@smithy/smithy-client").CommandImpl; new (input: CreateDashboardCommandInput): import("@smithy/smithy-client").CommandImpl; getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; }; /** *

* Creates a custom dashboard or the Highlights dashboard. *

* *

* CloudTrail runs queries to populate the dashboard's widgets during a manual or scheduled refresh. CloudTrail must be granted permissions to run the StartQuery operation on your behalf. To provide permissions, run the PutResourcePolicy operation to attach a resource-based policy to each event data store. For more information, * see Example: Allow CloudTrail to run queries to populate a dashboard in the CloudTrail User Guide. *

*

* To set a refresh schedule, CloudTrail must be granted permissions to run the StartDashboardRefresh operation to refresh the dashboard on your behalf. To provide permissions, run the PutResourcePolicy operation to attach a resource-based policy to the dashboard. For more information, * see * Resource-based policy example for a dashboard in the CloudTrail User Guide. *

*

For more information about dashboards, see CloudTrail Lake dashboards in the CloudTrail User Guide.

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { CloudTrailClient, CreateDashboardCommand } from "@aws-sdk/client-cloudtrail"; // ES Modules import * // const { CloudTrailClient, CreateDashboardCommand } = require("@aws-sdk/client-cloudtrail"); // CommonJS import * // import type { CloudTrailClientConfig } from "@aws-sdk/client-cloudtrail"; * const config = {}; // type is CloudTrailClientConfig * const client = new CloudTrailClient(config); * const input = { // CreateDashboardRequest * Name: "STRING_VALUE", // required * RefreshSchedule: { // RefreshSchedule * Frequency: { // RefreshScheduleFrequency * Unit: "HOURS" || "DAYS", * Value: Number("int"), * }, * Status: "ENABLED" || "DISABLED", * TimeOfDay: "STRING_VALUE", * }, * TagsList: [ // TagsList * { // Tag * Key: "STRING_VALUE", // required * Value: "STRING_VALUE", * }, * ], * TerminationProtectionEnabled: true || false, * Widgets: [ // RequestWidgetList * { // RequestWidget * QueryStatement: "STRING_VALUE", // required * QueryParameters: [ // QueryParameters * "STRING_VALUE", * ], * ViewProperties: { // ViewPropertiesMap // required * "": "STRING_VALUE", * }, * }, * ], * }; * const command = new CreateDashboardCommand(input); * const response = await client.send(command); * // { // CreateDashboardResponse * // DashboardArn: "STRING_VALUE", * // Name: "STRING_VALUE", * // Type: "MANAGED" || "CUSTOM", * // Widgets: [ // WidgetList * // { // Widget * // QueryAlias: "STRING_VALUE", * // QueryStatement: "STRING_VALUE", * // QueryParameters: [ // QueryParameters * // "STRING_VALUE", * // ], * // ViewProperties: { // ViewPropertiesMap * // "": "STRING_VALUE", * // }, * // }, * // ], * // TagsList: [ // TagsList * // { // Tag * // Key: "STRING_VALUE", // required * // Value: "STRING_VALUE", * // }, * // ], * // RefreshSchedule: { // RefreshSchedule * // Frequency: { // RefreshScheduleFrequency * // Unit: "HOURS" || "DAYS", * // Value: Number("int"), * // }, * // Status: "ENABLED" || "DISABLED", * // TimeOfDay: "STRING_VALUE", * // }, * // TerminationProtectionEnabled: true || false, * // }; * * ``` * * @param CreateDashboardCommandInput - {@link CreateDashboardCommandInput} * @returns {@link CreateDashboardCommandOutput} * @see {@link CreateDashboardCommandInput} for command's `input` shape. * @see {@link CreateDashboardCommandOutput} for command's `response` shape. * @see {@link CloudTrailClientResolvedConfig | config} for CloudTrailClient's `config` shape. * * @throws {@link ConflictException} (client fault) *

This exception is thrown when the specified resource is not ready for an operation. This * can occur when you try to run an operation on a resource before CloudTrail has time * to fully load the resource, or because another operation is modifying the resource. If this exception occurs, wait a few minutes, and then try the * operation again.

* * @throws {@link EventDataStoreNotFoundException} (client fault) *

The specified event data store was not found.

* * @throws {@link InactiveEventDataStoreException} (client fault) *

The event data store is inactive.

* * @throws {@link InsufficientEncryptionPolicyException} (client fault) *

For the CreateTrail * PutInsightSelectors, UpdateTrail, StartQuery, and StartImport operations, this exception is thrown * when the policy on the S3 bucket or KMS key does * not have sufficient permissions for the operation.

*

For all other operations, this exception is thrown when the policy for the KMS key does * not have sufficient permissions for the operation.

* * @throws {@link InvalidQueryStatementException} (client fault) *

The query that was submitted has validation errors, or uses incorrect syntax or * unsupported keywords. For more information about writing a query, see Create or edit a query in the CloudTrail User * Guide.

* * @throws {@link InvalidTagParameterException} (client fault) *

This exception is thrown when the specified tag key or values are not valid. It can also * occur if there are duplicate tags or too many tags on the resource.

* * @throws {@link ServiceQuotaExceededException} (client fault) *

* This exception is thrown when the quota is exceeded. For information about CloudTrail quotas, see Service quotas * in the Amazon Web Services General Reference. *

* * @throws {@link UnsupportedOperationException} (client fault) *

This exception is thrown when the requested operation is not supported.

* * @throws {@link CloudTrailServiceException} *

Base exception class for all service exceptions from CloudTrail service.

* * * @public */ export declare class CreateDashboardCommand extends CreateDashboardCommand_base { /** @internal type navigation helper, not in runtime. */ protected static __types: { api: { input: CreateDashboardRequest; output: CreateDashboardResponse; }; sdk: { input: CreateDashboardCommandInput; output: CreateDashboardCommandOutput; }; }; }