updateDashboard method
- required String awsAccountId,
- required String dashboardId,
- required String name,
- required DashboardSourceEntity sourceEntity,
- DashboardPublishOptions? dashboardPublishOptions,
- Parameters? parameters,
- String? themeArn,
- String? versionDescription,
Updates a dashboard in an AWS account.
May throw ThrottlingException. May throw InvalidParameterValueException. May throw ResourceNotFoundException. May throw ConflictException. May throw LimitExceededException. May throw UnsupportedUserEditionException. May throw InternalFailureException.
Parameter awsAccountId
:
The ID of the AWS 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 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 AWS Account and any
QuickSight-supported AWS 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 dashboardPublishOptions
:
Options for publishing the dashboard when you create it:
-
AvailabilityStatus
forAdHocFilteringOption
- This status can be eitherENABLED
orDISABLED
. When this is set toDISABLED
, QuickSight disables the left filter pane on the published dashboard, which can be used for ad hoc (one-time) filtering. This option isENABLED
by default. -
AvailabilityStatus
forExportToCSVOption
- This status can be eitherENABLED
orDISABLED
. The visual option to export data to .CSV format isn't enabled when this is set toDISABLED
. This option isENABLED
by default. -
VisibilityState
forSheetControlsOption
- This visibility state can be eitherCOLLAPSED
orEXPANDED
. This option isCOLLAPSED
by default.
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 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 AWS account where you create the dashboard.
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,
required DashboardSourceEntity sourceEntity,
DashboardPublishOptions? dashboardPublishOptions,
Parameters? parameters,
String? themeArn,
String? versionDescription,
}) async {
ArgumentError.checkNotNull(awsAccountId, 'awsAccountId');
_s.validateStringLength(
'awsAccountId',
awsAccountId,
12,
12,
isRequired: true,
);
ArgumentError.checkNotNull(dashboardId, 'dashboardId');
_s.validateStringLength(
'dashboardId',
dashboardId,
1,
2048,
isRequired: true,
);
ArgumentError.checkNotNull(name, 'name');
_s.validateStringLength(
'name',
name,
1,
2048,
isRequired: true,
);
ArgumentError.checkNotNull(sourceEntity, 'sourceEntity');
_s.validateStringLength(
'versionDescription',
versionDescription,
1,
512,
);
final $payload = <String, dynamic>{
'Name': name,
'SourceEntity': sourceEntity,
if (dashboardPublishOptions != null)
'DashboardPublishOptions': dashboardPublishOptions,
if (parameters != null) 'Parameters': parameters,
if (themeArn != null) 'ThemeArn': themeArn,
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);
}