updateTheme method

Future<UpdateThemeResponse> updateTheme({
  1. required String awsAccountId,
  2. required String baseThemeId,
  3. required String themeId,
  4. ThemeConfiguration? configuration,
  5. String? name,
  6. String? versionDescription,
})

Updates a theme.

May throw AccessDeniedException. May throw InvalidParameterValueException. May throw LimitExceededException. May throw ResourceExistsException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw UnsupportedUserEditionException. May throw InternalFailureException.

Parameter awsAccountId : The ID of the AWS account that contains the theme that you're updating.

Parameter baseThemeId : The theme ID, defined by Amazon QuickSight, that a custom theme inherits from. All themes initially inherit from a default QuickSight theme.

Parameter themeId : The ID for the theme.

Parameter configuration : The theme configuration, which contains the theme display properties.

Parameter name : The name for the theme.

Parameter versionDescription : A description of the theme version that you're updating Every time that you call UpdateTheme, you create a new version of the theme. Each version of the theme maintains a description of the version in VersionDescription.

Implementation

Future<UpdateThemeResponse> updateTheme({
  required String awsAccountId,
  required String baseThemeId,
  required String themeId,
  ThemeConfiguration? configuration,
  String? name,
  String? versionDescription,
}) async {
  ArgumentError.checkNotNull(awsAccountId, 'awsAccountId');
  _s.validateStringLength(
    'awsAccountId',
    awsAccountId,
    12,
    12,
    isRequired: true,
  );
  ArgumentError.checkNotNull(baseThemeId, 'baseThemeId');
  _s.validateStringLength(
    'baseThemeId',
    baseThemeId,
    1,
    2048,
    isRequired: true,
  );
  ArgumentError.checkNotNull(themeId, 'themeId');
  _s.validateStringLength(
    'themeId',
    themeId,
    1,
    2048,
    isRequired: true,
  );
  _s.validateStringLength(
    'name',
    name,
    1,
    2048,
  );
  _s.validateStringLength(
    'versionDescription',
    versionDescription,
    1,
    512,
  );
  final $payload = <String, dynamic>{
    'BaseThemeId': baseThemeId,
    if (configuration != null) 'Configuration': configuration,
    if (name != null) 'Name': name,
    if (versionDescription != null) 'VersionDescription': versionDescription,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PUT',
    requestUri:
        '/accounts/${Uri.encodeComponent(awsAccountId)}/themes/${Uri.encodeComponent(themeId)}',
    exceptionFnMap: _exceptionFns,
  );
  return UpdateThemeResponse.fromJson(response);
}