validateConfigurationSettings method
Takes a set of configuration settings and either a configuration template or environment, and determines whether those values are valid.
This action returns a list of messages indicating any errors or warnings associated with the selection of option values.
May throw InsufficientPrivilegesException.
May throw TooManyBucketsException.
Parameter applicationName :
The name of the application that the configuration template or environment
belongs to.
Parameter optionSettings :
A list of the options and desired values to evaluate.
Parameter environmentName :
The name of the environment to validate the settings against.
Condition: You cannot specify both this and a configuration template name.
Parameter templateName :
The name of the configuration template to validate the settings against.
Condition: You cannot specify both this and an environment name.
Implementation
Future<ConfigurationSettingsValidationMessages>
validateConfigurationSettings({
required String applicationName,
required List<ConfigurationOptionSetting> optionSettings,
String? environmentName,
String? templateName,
}) async {
final $request = <String, String>{
'ApplicationName': applicationName,
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 (environmentName != null) 'EnvironmentName': environmentName,
if (templateName != null) 'TemplateName': templateName,
};
final $result = await _protocol.send(
$request,
action: 'ValidateConfigurationSettings',
version: '2010-12-01',
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
resultWrapper: 'ValidateConfigurationSettingsResult',
);
return ConfigurationSettingsValidationMessages.fromXml($result);
}