validateConfigurationSettings method
- required String applicationName,
- required List<
ConfigurationOptionSetting> optionSettings, - String? environmentName,
- String? templateName,
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 {
ArgumentError.checkNotNull(applicationName, 'applicationName');
_s.validateStringLength(
'applicationName',
applicationName,
1,
100,
isRequired: true,
);
ArgumentError.checkNotNull(optionSettings, 'optionSettings');
_s.validateStringLength(
'environmentName',
environmentName,
4,
40,
);
_s.validateStringLength(
'templateName',
templateName,
1,
100,
);
final $request = <String, dynamic>{};
$request['ApplicationName'] = applicationName;
$request['OptionSettings'] = optionSettings;
environmentName?.also((arg) => $request['EnvironmentName'] = arg);
templateName?.also((arg) => $request['TemplateName'] = arg);
final $result = await _protocol.send(
$request,
action: 'ValidateConfigurationSettings',
version: '2010-12-01',
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
shape: shapes['ValidateConfigurationSettingsMessage'],
shapes: shapes,
resultWrapper: 'ValidateConfigurationSettingsResult',
);
return ConfigurationSettingsValidationMessages.fromXml($result);
}