updateAnalysis method
Updates an analysis in Amazon Quick Sight
May throw ConflictException.
May throw InternalFailureException.
May throw InvalidParameterValueException.
May throw ResourceExistsException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw UnsupportedUserEditionException.
Parameter analysisId :
The ID for the analysis that you're updating. This ID displays in the URL
of the analysis.
Parameter awsAccountId :
The ID of the Amazon Web Services account that contains the analysis that
you're updating.
Parameter name :
A descriptive name for the analysis that you're updating. This name
displays for the analysis in the Amazon Quick Sight console.
Parameter definition :
The definition of an analysis.
A definition is the data model of all features in a Dashboard, Template, or Analysis.
Parameter parameters :
The parameter names and override values that you want to use. An analysis
can have any parameter type, and some parameters might accept multiple
values.
Parameter sourceEntity :
A source entity to use for the analysis that you're updating. This
metadata structure contains details that describe a source template and
one or more datasets.
Parameter themeArn :
The Amazon Resource Name (ARN) for the theme to apply to the analysis that
you're creating. To see the theme in the Amazon Quick Sight console, make
sure that you have access to it.
Parameter validationStrategy :
The option to relax the validation needed to update an analysis with
definition objects. This skips the validation step for specific errors.
Implementation
Future<UpdateAnalysisResponse> updateAnalysis({
required String analysisId,
required String awsAccountId,
required String name,
AnalysisDefinition? definition,
Parameters? parameters,
AnalysisSourceEntity? sourceEntity,
String? themeArn,
ValidationStrategy? validationStrategy,
}) async {
final $payload = <String, dynamic>{
'Name': name,
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,
};
final response = await _protocol.send(
payload: $payload,
method: 'PUT',
requestUri:
'/accounts/${Uri.encodeComponent(awsAccountId)}/analyses/${Uri.encodeComponent(analysisId)}',
exceptionFnMap: _exceptionFns,
);
return UpdateAnalysisResponse.fromJson(response);
}