updateConfigurationTemplate method
Updates the specified configuration template to have the specified properties or configuration option values. Related Topics
May throw InsufficientPrivilegesException.
May throw TooManyBucketsException.
Parameter applicationName :
The name of the application associated with the configuration template to
update.
If no application is found with this name,
UpdateConfigurationTemplate returns an
InvalidParameterValue error.
Parameter templateName :
The name of the configuration template to update.
If no configuration template is found with this name,
UpdateConfigurationTemplate returns an
InvalidParameterValue error.
Parameter description :
A new description for the configuration.
Parameter optionSettings :
A list of configuration option settings to update with the new specified
option value.
Parameter optionsToRemove :
A list of configuration options to remove from the configuration set.
Constraint: You can remove only UserDefined configuration
options.
Implementation
Future<ConfigurationSettingsDescription> updateConfigurationTemplate({
required String applicationName,
required String templateName,
String? description,
List<ConfigurationOptionSetting>? optionSettings,
List<OptionSpecification>? optionsToRemove,
}) async {
final $request = <String, String>{
'ApplicationName': applicationName,
'TemplateName': templateName,
if (description != null) 'Description': description,
if (optionSettings != null)
if (optionSettings.isEmpty)
'OptionSettings': ''
else
for (var i1 = 0; i1 < optionSettings.length; i1++)
for (var e3 in optionSettings[i1].toQueryMap().entries)
'OptionSettings.member.${i1 + 1}.${e3.key}': e3.value,
if (optionsToRemove != null)
if (optionsToRemove.isEmpty)
'OptionsToRemove': ''
else
for (var i1 = 0; i1 < optionsToRemove.length; i1++)
for (var e3 in optionsToRemove[i1].toQueryMap().entries)
'OptionsToRemove.member.${i1 + 1}.${e3.key}': e3.value,
};
final $result = await _protocol.send(
$request,
action: 'UpdateConfigurationTemplate',
version: '2010-12-01',
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
resultWrapper: 'UpdateConfigurationTemplateResult',
);
return ConfigurationSettingsDescription.fromXml($result);
}