def delete_application_version(self, application, version_label, delete_bundle='false'): request = Request() request.set_operation('DeleteApplicationVersion') request.set_app_name(application) request.set_version_label(version_label) request.set_delete_source_bundle(delete_bundle) try: response = self.call(request) except AwsServiceException as ex: if ex.code.lower() == EBErrorCode.SourceBundleDeletion: raise SourceBundleDeletionException(ex) if ex.code.lower() == EBErrorCode.S3LocationNotInServiceRegion: raise S3LocationNotInServiceRegionException(ex) if ex.code.lower() == EBErrorCode.OperationInProgress: raise OperationInProgressException(ex) raise request_id = response['DeleteApplicationVersionResponse']\ ['ResponseMetadata']['RequestId'] return Response(request_id)