updateApplicationVersion method

Future<ApplicationVersionDescriptionMessage> updateApplicationVersion(
  1. {required String applicationName,
  2. required String versionLabel,
  3. String? description}
)

Updates the specified application version to have the specified properties.

Parameter applicationName : The name of the application associated with this version.

If no application is found with this name, UpdateApplication returns an InvalidParameterValue error.

Parameter versionLabel : The name of the version to update.

If no application version is found with this label, UpdateApplication returns an InvalidParameterValue error.

Parameter description : A new description for this version.

Implementation

Future<ApplicationVersionDescriptionMessage> updateApplicationVersion({
  required String applicationName,
  required String versionLabel,
  String? description,
}) async {
  ArgumentError.checkNotNull(applicationName, 'applicationName');
  _s.validateStringLength(
    'applicationName',
    applicationName,
    1,
    100,
    isRequired: true,
  );
  ArgumentError.checkNotNull(versionLabel, 'versionLabel');
  _s.validateStringLength(
    'versionLabel',
    versionLabel,
    1,
    100,
    isRequired: true,
  );
  _s.validateStringLength(
    'description',
    description,
    0,
    200,
  );
  final $request = <String, dynamic>{};
  $request['ApplicationName'] = applicationName;
  $request['VersionLabel'] = versionLabel;
  description?.also((arg) => $request['Description'] = arg);
  final $result = await _protocol.send(
    $request,
    action: 'UpdateApplicationVersion',
    version: '2010-12-01',
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    shape: shapes['UpdateApplicationVersionMessage'],
    shapes: shapes,
    resultWrapper: 'UpdateApplicationVersionResult',
  );
  return ApplicationVersionDescriptionMessage.fromXml($result);
}