deleteEnvironmentTemplateVersion method
If no other minor versions of an environment template exist, delete a
major version of the environment template if it's not the
Recommended version. Delete the Recommended
version of the environment template if no other major versions or minor
versions of the environment template exist. A major version of an
environment template is a version that's not backward compatible.
Delete a minor version of an environment template if it isn't the
Recommended version. Delete a Recommended minor
version of the environment template if no other minor versions of the
environment template exist. A minor version of an environment template is
a version that's backward compatible.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter majorVersion :
The environment template major version to delete.
Parameter minorVersion :
The environment template minor version to delete.
Parameter templateName :
The name of the environment template.
Implementation
Future<DeleteEnvironmentTemplateVersionOutput>
deleteEnvironmentTemplateVersion({
required String majorVersion,
required String minorVersion,
required String templateName,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.0',
'X-Amz-Target': 'AwsProton20200720.DeleteEnvironmentTemplateVersion'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'majorVersion': majorVersion,
'minorVersion': minorVersion,
'templateName': templateName,
},
);
return DeleteEnvironmentTemplateVersionOutput.fromJson(jsonResponse.body);
}