deleteTheme method
Deletes a theme.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalFailureException.
May throw InvalidParameterValueException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw UnsupportedUserEditionException.
Parameter awsAccountId :
The ID of the Amazon Web Services account that contains the theme that
you're deleting.
Parameter themeId :
An ID for the theme that you want to delete.
Parameter versionNumber :
The version of the theme that you want to delete.
Note: If you don't provide a version number, you're using this call
to DeleteTheme to delete all versions of the theme.
Implementation
Future<DeleteThemeResponse> deleteTheme({
required String awsAccountId,
required String themeId,
int? versionNumber,
}) async {
_s.validateNumRange(
'versionNumber',
versionNumber,
1,
1152921504606846976,
);
final $query = <String, List<String>>{
if (versionNumber != null) 'version-number': [versionNumber.toString()],
};
final response = await _protocol.send(
payload: null,
method: 'DELETE',
requestUri:
'/accounts/${Uri.encodeComponent(awsAccountId)}/themes/${Uri.encodeComponent(themeId)}',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return DeleteThemeResponse.fromJson(response);
}