updateDashboard method
- required String awsAccountId,
- required String dashboardId,
- required String name,
- DashboardPublishOptions? dashboardPublishOptions,
- DashboardVersionDefinition? definition,
- Parameters? parameters,
- DashboardSourceEntity? sourceEntity,
- String? themeArn,
- ValidationStrategy? validationStrategy,
- String? versionDescription,
Updates a dashboard in an Amazon Web Services account.
May throw ConflictException.
May throw InternalFailureException.
May throw InvalidParameterValueException.
May throw LimitExceededException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw UnsupportedUserEditionException.
Parameter awsAccountId :
The ID of the Amazon Web Services account that contains the dashboard that
you're updating.
Parameter dashboardId :
The ID for the dashboard.
Parameter name :
The display name of the dashboard.
Parameter dashboardPublishOptions :
Options for publishing the dashboard when you create it:
-
AvailabilityStatusforAdHocFilteringOption- This status can be eitherENABLEDorDISABLED. When this is set toDISABLED, Amazon Quick Sight disables the left filter pane on the published dashboard, which can be used for ad hoc (one-time) filtering. This option isENABLEDby default. -
AvailabilityStatusforExportToCSVOption- This status can be eitherENABLEDorDISABLED. The visual option to export data to .CSV format isn't enabled when this is set toDISABLED. This option isENABLEDby default. -
VisibilityStateforSheetControlsOption- This visibility state can be eitherCOLLAPSEDorEXPANDED. This option isCOLLAPSEDby default. -
AvailabilityStatusforQuickSuiteActionsOption- This status can be eitherENABLEDorDISABLED. Features related to Actions in Amazon Quick Suite on dashboards are disabled when this is set toDISABLED. This option isDISABLEDby default. -
AvailabilityStatusforExecutiveSummaryOption- This status can be eitherENABLEDorDISABLED. The option to build an executive summary is disabled when this is set toDISABLED. This option isENABLEDby default. -
AvailabilityStatusforDataStoriesSharingOption- This status can be eitherENABLEDorDISABLED. The option to share a data story is disabled when this is set toDISABLED. This option isENABLEDby default.
Parameter definition :
The definition of a dashboard.
A definition is the data model of all features in a Dashboard, Template, or Analysis.
Parameter parameters :
A structure that contains the parameters of the dashboard. These are
parameter overrides for a dashboard. A dashboard can have any type of
parameters, and some parameters might accept multiple values.
Parameter sourceEntity :
The entity that you are using as a source when you update the dashboard.
In SourceEntity, you specify the type of object you're using
as source. You can only update a dashboard from a template, so you use a
SourceTemplate entity. If you need to update a dashboard from
an analysis, first convert the analysis to a template by using the
CreateTemplate
API operation. For SourceTemplate, specify the Amazon
Resource Name (ARN) of the source template. The
SourceTemplate ARN can contain any Amazon Web Services
account and any Amazon Quick Sight-supported Amazon Web Services Region.
Use the DataSetReferences entity within
SourceTemplate to list the replacement datasets for the
placeholders listed in the original. The schema in each dataset must match
its placeholder.
Parameter themeArn :
The Amazon Resource Name (ARN) of the theme that is being used for this
dashboard. If you add a value for this field, it overrides the value that
was originally associated with the entity. The theme ARN must exist in the
same Amazon Web Services account where you create the dashboard.
Parameter validationStrategy :
The option to relax the validation needed to update a dashboard with
definition objects. This skips the validation step for specific errors.
Parameter versionDescription :
A description for the first version of the dashboard being created.
Implementation
Future<UpdateDashboardResponse> updateDashboard({
required String awsAccountId,
required String dashboardId,
required String name,
DashboardPublishOptions? dashboardPublishOptions,
DashboardVersionDefinition? definition,
Parameters? parameters,
DashboardSourceEntity? sourceEntity,
String? themeArn,
ValidationStrategy? validationStrategy,
String? versionDescription,
}) async {
final $payload = <String, dynamic>{
'Name': name,
if (dashboardPublishOptions != null)
'DashboardPublishOptions': dashboardPublishOptions,
if (definition != null) 'Definition': definition,
if (parameters != null) 'Parameters': parameters,
if (sourceEntity != null) 'SourceEntity': sourceEntity,
if (themeArn != null) 'ThemeArn': themeArn,
if (validationStrategy != null) 'ValidationStrategy': validationStrategy,
if (versionDescription != null) 'VersionDescription': versionDescription,
};
final response = await _protocol.send(
payload: $payload,
method: 'PUT',
requestUri:
'/accounts/${Uri.encodeComponent(awsAccountId)}/dashboards/${Uri.encodeComponent(dashboardId)}',
exceptionFnMap: _exceptionFns,
);
return UpdateDashboardResponse.fromJson(response);
}